diff --git a/Gemfile b/Gemfile index d36b368..3fad150 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' ruby '2.6.5' -gem 'haml', '~> 5.2' +gem 'haml', '~> 6.0' gem 'iso-639', '~> 0.3.5' gem 'json', '~> 2.6' gem 'mail', '~> 2.7' diff --git a/Gemfile.lock b/Gemfile.lock index 9879a17..ae39424 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,8 +15,9 @@ GEM fugit (1.7.1) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) - haml (5.2.2) - temple (>= 0.8.0) + haml (6.0.5) + temple (>= 0.8.2) + thor tilt http-accept (1.7.0) http-cookie (1.0.3) @@ -92,7 +93,8 @@ GEM daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) rack (>= 1, < 3) - tilt (2.0.10) + thor (1.2.1) + tilt (2.0.11) timecop (0.9.5) tzinfo (2.0.5) concurrent-ruby (~> 1.0) @@ -111,7 +113,7 @@ PLATFORMS DEPENDENCIES byebug (~> 11.1) - haml (~> 5.2) + haml (~> 6.0) iso-639 (~> 0.3.5) json (~> 2.6) mail (~> 2.7) diff --git a/lib/autoheathen/email_processor.rb b/lib/autoheathen/email_processor.rb index b82c299..325ee3e 100644 --- a/lib/autoheathen/email_processor.rb +++ b/lib/autoheathen/email_processor.rb @@ -158,12 +158,12 @@ def deliver_rts email, documents, mail_to cfg = @cfg # stoopid Mail scoping me = self # stoopid Mail scoping mail.text_part do - s = Haml::Engine.new( me.read_file cfg[:text_template] ).render(Object.new, to: mail_to, documents: documents, cfg: cfg) + s = Haml::Template.new { me.read_file cfg[:text_template] }.render(Object.new, to: mail_to, documents: documents, cfg: cfg) body s end mail.html_part do content_type 'text/html; charset=UTF-8' - s = Haml::Engine.new( me.read_file cfg[:html_template] ).render(Object.new, to: mail_to, documents: documents, cfg: cfg) + s = Haml::Template.new { me.read_file cfg[:html_template] }.render(Object.new, to: mail_to, documents: documents, cfg: cfg) body s end mail.delivery_method :smtp, address: @cfg[:mail_host], port: @cfg[:mail_port]