Skip to content

Commit

Permalink
Update Haml dependency
Browse files Browse the repository at this point in the history
Change `Haml::Engine` to `Haml::Template`
  • Loading branch information
tagliala committed Oct 5, 2022
1 parent d8329cc commit 6d1527d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 6 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/autoheathen/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 6d1527d

Please sign in to comment.