Skip to content

Commit

Permalink
Remove PDF related dependencies
Browse files Browse the repository at this point in the history
WickedPDF may be causing the 'fatal (machine stack overflow in critical region)' error that we're receiving. See mileszs/wicked_pdf#818
  • Loading branch information
zavan committed Sep 28, 2021
1 parent da3fe0a commit a8776e7
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 141 deletions.
83 changes: 0 additions & 83 deletions app/assets/stylesheets/spree/backend/override_pdf.css

This file was deleted.

4 changes: 0 additions & 4 deletions app/helpers/spree/admin/base_helper_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ def form_action(insight, insight_type)
def page_selector_options
[5, 10, 20, 30, 45, 60]
end

def pdf_logo(image_path = Spree::Config[:logo])
wicked_pdf_image_tag image_path, class: 'logo'
end
end
end
end
Expand Down
27 changes: 0 additions & 27 deletions app/views/spree/admin/insights/download.pdf.erb

This file was deleted.

1 change: 0 additions & 1 deletion config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Mime::Type.register "application/xls", :xls
# Mime::Type.register "application/pdf", :pdf
21 changes: 0 additions & 21 deletions config/initializers/wicked_pdf.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/spree_admin_insights/engine.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module SpreeAdminInsights
class Engine < Rails::Engine
require 'spree/core'
require 'wicked_pdf'
require 'csv'

isolate_namespace Spree
Expand All @@ -12,8 +11,6 @@ class Engine < Rails::Engine
g.test_framework :rspec
end

config.assets.precompile << 'spree/backend/override_pdf.css'

def self.activate
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
Expand Down
2 changes: 0 additions & 2 deletions spree_admin_insights.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@ Gem::Specification.new do |s|
s.add_development_dependency 'simplecov'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'shoulda-matchers'
s.add_dependency 'wicked_pdf'
s.add_dependency 'wkhtmltopdf-binary'
end

0 comments on commit a8776e7

Please sign in to comment.