Skip to content

Commit

Permalink
Merge pull request #1 from wundertax/fix_deprecation_warnings_from_mo…
Browse files Browse the repository at this point in the history
…ney_gem

Update money gem, use recommended 'Money.locale_backend' option
  • Loading branch information
bryszard authored Oct 25, 2018
2 parents e7ca6bd + 555e305 commit 2d10583
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/payday.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require_relative "payday/version"
require_relative "payday/config"
require_relative "payday/i18n"
require_relative "payday/money"
require_relative "payday/line_itemable"
require_relative "payday/line_item"
require_relative "payday/pdf_renderer"
Expand Down
4 changes: 4 additions & 0 deletions lib/payday/locale/en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
en:
number:
format:
delimiter: ","
separator: "."
payday:
status:
paid: PAID
Expand Down
1 change: 1 addition & 0 deletions lib/payday/money.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Money.locale_backend = :i18n
2 changes: 1 addition & 1 deletion payday.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
EOF

s.add_dependency("prawn", "~> 1.0.0")
s.add_dependency("money", "~> 6.5")
s.add_dependency("money", "~> 6.13")
s.add_dependency("prawn-svg", "~> 0.15.0.0")
s.add_dependency("i18n", "~> 0.7")

Expand Down
2 changes: 2 additions & 0 deletions spec/invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ module Payday
LineItem.new(price: 5, quantity: 200, description: "Hats")
] * 30

# If you want to check how it looks, use
# invoice.render_pdf_to_file("tmp/testing.pdf")
expect(invoice.render_pdf).to match_binary_asset "testing.pdf"
end
end
Expand Down

0 comments on commit 2d10583

Please sign in to comment.