money-rails 1.15.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -6
- data/LICENSE +1 -1
- data/README.md +182 -152
- data/config/locales/money.pt.yml +4 -0
- data/lib/money-rails/active_job/money_serializer.rb +23 -0
- data/lib/money-rails/active_record/monetizable.rb +39 -19
- data/lib/money-rails/configuration.rb +2 -2
- data/lib/money-rails/helpers/action_view_extension.rb +1 -1
- data/lib/money-rails/hooks.rb +16 -27
- data/lib/money-rails/mongoid/money.rb +4 -14
- data/lib/money-rails/test_helpers.rb +4 -4
- data/lib/money-rails/version.rb +3 -1
- data/lib/money-rails.rb +2 -0
- data/money-rails.gemspec +13 -26
- metadata +18 -228
- data/Rakefile +0 -84
- data/lib/money-rails/mongoid/two.rb +0 -35
- data/spec/active_record/migration_extensions/schema_statements_spec.rb +0 -101
- data/spec/active_record/migration_extensions/table_spec.rb +0 -104
- data/spec/active_record/monetizable_spec.rb +0 -1062
- data/spec/configuration_spec.rb +0 -147
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/config/manifest.js +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/dummy_product.rb +0 -8
- data/spec/dummy/app/models/priceable.rb +0 -8
- data/spec/dummy/app/models/product.rb +0 -59
- data/spec/dummy/app/models/service.rb +0 -5
- data/spec/dummy/app/models/transaction.rb +0 -13
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -66
- data/spec/dummy/config/boot.rb +0 -13
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -30
- data/spec/dummy/config/environments/production.rb +0 -69
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/money.rb +0 -31
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en-GB.yml +0 -11
- data/spec/dummy/config/locales/en-US.yml +0 -5
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/locales/it.yml +0 -11
- data/spec/dummy/config/mongoid.yml +0 -29
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20120331190108_create_products.rb +0 -10
- data/spec/dummy/db/migrate/20120402080348_add_bonus_cents_to_product.rb +0 -6
- data/spec/dummy/db/migrate/20120524052716_create_services.rb +0 -10
- data/spec/dummy/db/migrate/20120528181002_create_transactions.rb +0 -11
- data/spec/dummy/db/migrate/20120528210103_create_dummy_products.rb +0 -10
- data/spec/dummy/db/migrate/20120607210247_add_column_that_allows_nil.rb +0 -5
- data/spec/dummy/db/migrate/20120712202655_add_sale_price_cents_to_product.rb +0 -7
- data/spec/dummy/db/migrate/20130124023419_add_price_in_a_range_cents_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20140110194016_add_validates_method_amount_cents_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20141005075025_add_aliased_attr_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20150107061030_add_delivery_fee_cents_and_restock_fee_cents_to_product.rb +0 -6
- data/spec/dummy/db/migrate/20150126231442_add_reduced_price_to_products.rb +0 -6
- data/spec/dummy/db/migrate/20150213234410_add_special_price_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20150217222612_add_lambda_price_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20150303222230_add_skip_validation_price_cents_to_products.rb +0 -5
- data/spec/dummy/db/migrate/20151026220420_add_optional_amount_to_transactions.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -59
- data/spec/dummy/db/structure.sql +0 -21
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/helpers/action_view_extension_spec.rb +0 -189
- data/spec/helpers/form_helper_spec.rb +0 -19
- data/spec/money_spec.rb +0 -40
- data/spec/mongoid/mongoid_spec.rb +0 -130
- data/spec/mongoid/two_spec.rb +0 -80
- data/spec/spec_helper.rb +0 -23
- data/spec/support/database_cleaner.rb +0 -14
- data/spec/test_helpers_spec.rb +0 -72
- /data/lib/money-rails/active_record/migration_extensions/{schema_statements_pg_rails4.rb → schema_statements_pg.rb} +0 -0
- /data/lib/money-rails/active_record/migration_extensions/{table_pg_rails4.rb → table_pg.rb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb63337354249ecd15c15695c269080edb51883d30b78f833256dbc1222a86b9
|
|
4
|
+
data.tar.gz: 809dcf758b84ae3a66edf286691f031dfc5fb68706cc604742fc5230e7a27c3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f52ce4f9d92e1352a962147882337fb17c04961b0b935760e0011d3d1d3a433250fe0d0cc3d9837943c912b48dda94b0dcdb82919f9fd98334ef894601e4f82b
|
|
7
|
+
data.tar.gz: 0d0fb9c5ef2adb1db3d1de67b7799059cedb5fb52610dc5eb44f605a31e398e37852f51bb583b039fec7ffd05b17a89abf1f9cb8889969078fdcf3c9d34b745a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 3.0.0
|
|
6
|
+
|
|
7
|
+
- **Breaking change**: Drop support for Rails < 7.0
|
|
8
|
+
- Allow `super` when overriding methods
|
|
9
|
+
- Fix `MoneyRails::ActionViewExtension` not available during eager loading (#614)
|
|
10
|
+
- Fix deprecation warning on the ActiveJob serializer to support future Rails 8.2 (#729)
|
|
11
|
+
- Support Mongoid 8.x and 9.x
|
|
12
|
+
- `MoneyRails::TestHelpers` can be used in Minitest
|
|
13
|
+
|
|
14
|
+
## 2.0.0
|
|
15
|
+
|
|
16
|
+
- **Breaking change**: Requires `money` gem version ~> 7.0.
|
|
17
|
+
See the [Money 7.0 upgrading guide](https://github.com/RubyMoney/money/blob/main/UPGRADING-7.0.md)
|
|
18
|
+
- **Breaking change**: Requires `monetize` gem version ~> 7.0
|
|
19
|
+
- **Breaking change**: Drop support for Ruby < 3.1 and Rails < 6.1
|
|
20
|
+
- Allow monetizing methods with kwargs
|
|
21
|
+
- Fix `money_only_cents` for negative money
|
|
22
|
+
- Allow `nil` to be set as the default currency
|
|
23
|
+
- Portuguese translation for errors
|
|
24
|
+
- Skip subunit write for non-attributes in `read_monetized`
|
|
25
|
+
|
|
26
|
+
## 1.15.0
|
|
27
|
+
|
|
28
|
+
- Bump money version to ~> 6.16
|
|
29
|
+
- Tweak to invalid currency message
|
|
30
|
+
|
|
3
31
|
## 1.14.1
|
|
4
32
|
|
|
5
33
|
- Fix invalid_currency error definition
|
|
@@ -46,7 +74,7 @@
|
|
|
46
74
|
|
|
47
75
|
- Bump money version to ~> 6.12.0
|
|
48
76
|
- Bump monetize version to ~> 1.9.0
|
|
49
|
-
- BREAKING CHANGE: Fix to rounding logic in this version from 1.11.0 can cause breaking changes for those relying on the incorrect behavior.
|
|
77
|
+
- BREAKING CHANGE: Fix to rounding logic in this version from 1.11.0 can cause breaking changes for those relying on the incorrect behavior. See [the issue](https://github.com/RubyMoney/money-rails/issues/608) for details.
|
|
50
78
|
|
|
51
79
|
## 1.11.0
|
|
52
80
|
|
|
@@ -84,7 +112,7 @@
|
|
|
84
112
|
- Fix attribute order possibly affecting the value of monetized attribute
|
|
85
113
|
- Add support for RailsAdmin (use :money type)
|
|
86
114
|
- Raise error when gem was unable to infer monetized attribute name
|
|
87
|
-
- Revert decimal mark and thousands separator
|
|
115
|
+
- Revert decimal mark and thousands separator addition, since formatting should depend on country and locale, instead of currency
|
|
88
116
|
|
|
89
117
|
## 1.6.1
|
|
90
118
|
|
|
@@ -148,8 +176,8 @@
|
|
|
148
176
|
## 1.1.0
|
|
149
177
|
|
|
150
178
|
- Update dependencies to money 6.4.x and monetize 1.0.x.
|
|
151
|
-
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...`
|
|
152
|
-
|
|
179
|
+
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...`
|
|
180
|
+
variable. (Fixes validation errors.)
|
|
153
181
|
- use HashWithIndifferentAccess instead of Hash for
|
|
154
182
|
ActiveRecord::Base::monetized_attributes
|
|
155
183
|
- Let the 'monetize' test helper work when testing against the model's class,
|
|
@@ -159,7 +187,7 @@
|
|
|
159
187
|
- Upgrade specs to RSpec 3
|
|
160
188
|
- Use #respond_to? instead of #try? when monetizing an aliased attribute.
|
|
161
189
|
- Allow aliased attributes to be monetized
|
|
162
|
-
- Fix
|
|
190
|
+
- Fix compatibility issue with Rails 4.2
|
|
163
191
|
- Allow empty string as thousands separator.
|
|
164
192
|
- Allow using a lambda to set default_currency
|
|
165
193
|
|
|
@@ -292,4 +320,3 @@
|
|
|
292
320
|
## 0.0.1
|
|
293
321
|
|
|
294
322
|
- Hello World
|
|
295
|
-
|
data/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2012 Andreas Loupasakis
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2025 Shane Emmons
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|