From 14d410c9c6df6f538c032ba7e9d62c83e199e127 Mon Sep 17 00:00:00 2001 From: Emerson Xavier Date: Tue, 12 Mar 2019 09:30:15 +1100 Subject: [PATCH] Rails 5.1 compatibility --- Gemfile.lock | 7 +++++-- lib/wisepdf/render.rb | 9 ++++++--- lib/wisepdf/version.rb | 4 ++-- wisepdf.gemspec | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c482fc4..3ed0775 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - wisepdf (1.3.1) + wisepdf (1.5.0) GEM remote: http://rubygems.org/ @@ -152,7 +152,7 @@ DEPENDENCIES coffee-rails coveralls faker - rails (~> 3.2.13) + rails (>= 3.2.13) rake rspec shoulda @@ -161,3 +161,6 @@ DEPENDENCIES webmock (~> 1.9.0) wisepdf! wkhtmltopdf-binary + +BUNDLED WITH + 1.17.3 diff --git a/lib/wisepdf/render.rb b/lib/wisepdf/render.rb index 79bddd1..ae42c63 100644 --- a/lib/wisepdf/render.rb +++ b/lib/wisepdf/render.rb @@ -4,9 +4,12 @@ module Wisepdf module Render def self.included(base) base.class_eval do - alias_method_chain :render, :wisepdf - alias_method_chain :render_to_string, :wisepdf - after_filter :clean_temp_files + alias_method :render_without_wisepdf, :render + alias_method :render, :render_with_wisepdf + alias_method :render_to_string_without_wisepdf, :render_to_string + alias_method :render_to_string, :render_to_string_with_wisepdf + + after_action :clean_temp_files end end diff --git a/lib/wisepdf/version.rb b/lib/wisepdf/version.rb index 44a1c3f..70463cf 100644 --- a/lib/wisepdf/version.rb +++ b/lib/wisepdf/version.rb @@ -3,10 +3,10 @@ module Wisepdf module Version MAJOR = 1 - MINOR = 4 + MINOR = 5 PATCH = 0 BUILD = nil STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.') end -end \ No newline at end of file +end diff --git a/wisepdf.gemspec b/wisepdf.gemspec index 483be2b..e6dfd9d 100644 --- a/wisepdf.gemspec +++ b/wisepdf.gemspec @@ -30,8 +30,8 @@ Gem::Specification.new do |gem| gem.add_development_dependency 'faker' gem.add_development_dependency 'capybara' - gem.add_development_dependency 'rails', '~> 3.2.13' + gem.add_development_dependency 'rails', '>= 3.2.13' gem.add_development_dependency 'coffee-rails' gem.add_development_dependency 'wkhtmltopdf-binary' -end \ No newline at end of file +end