money 3.7.1 → 4.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.
Files changed (43) hide show
  1. data/CHANGELOG.md +384 -351
  2. data/LICENSE +21 -21
  3. data/README.md +243 -214
  4. data/Rakefile +49 -49
  5. data/lib/money.rb +28 -27
  6. data/lib/money/bank/base.rb +131 -131
  7. data/lib/money/bank/variable_exchange.rb +252 -252
  8. data/lib/money/core_extensions.rb +82 -82
  9. data/lib/money/currency.rb +263 -422
  10. data/lib/money/currency_loader.rb +19 -0
  11. data/lib/money/money.rb +405 -405
  12. data/lib/money/money/arithmetic.rb +246 -246
  13. data/lib/money/money/formatting.rb +260 -244
  14. data/lib/money/money/parsing.rb +350 -350
  15. data/money.gemspec +29 -35
  16. data/spec/bank/base_spec.rb +72 -72
  17. data/spec/bank/variable_exchange_spec.rb +238 -238
  18. data/spec/core_extensions_spec.rb +158 -158
  19. data/spec/currency_spec.rb +120 -133
  20. data/spec/money/arithmetic_spec.rb +479 -479
  21. data/spec/money/formatting_spec.rb +383 -375
  22. data/spec/money/parsing_spec.rb +197 -197
  23. data/spec/money_spec.rb +292 -292
  24. data/spec/spec_helper.rb +28 -28
  25. metadata +54 -126
  26. data/lib/money.rbc +0 -184
  27. data/lib/money/bank/base.rbc +0 -818
  28. data/lib/money/bank/variable_exchange.rbc +0 -2550
  29. data/lib/money/core_extensions.rbc +0 -664
  30. data/lib/money/currency.rbc +0 -22708
  31. data/lib/money/money.rbc +0 -3861
  32. data/lib/money/money/arithmetic.rbc +0 -2778
  33. data/lib/money/money/formatting.rbc +0 -2265
  34. data/lib/money/money/parsing.rbc +0 -2737
  35. data/spec/bank/base_spec.rbc +0 -2461
  36. data/spec/bank/variable_exchange_spec.rbc +0 -7541
  37. data/spec/core_extensions_spec.rbc +0 -5921
  38. data/spec/currency_spec.rbc +0 -4535
  39. data/spec/money/arithmetic_spec.rbc +0 -25140
  40. data/spec/money/formatting_spec.rbc +0 -12545
  41. data/spec/money/parsing_spec.rbc +0 -6511
  42. data/spec/money_spec.rbc +0 -9824
  43. data/spec/spec_helper.rbc +0 -575
data/CHANGELOG.md CHANGED
@@ -1,351 +1,384 @@
1
- Money 3.7.1
2
- ===========
3
-
4
- Bugfixes
5
- --------
6
- - Add encoding indicator to top of Gemspec
7
-
8
- Money 3.7.0
9
- ===========
10
-
11
- Features
12
- --------
13
- - add Money#to_d (thanks Andrew White)
14
- - Add Money.use_i18n, this allows you to enable/disable i18n from being used,
15
- even if it's required in your app.
16
-
17
- Money 3.6.2
18
- ===========
19
-
20
- Features
21
- --------
22
- - i18n enhancements (thanks eloyesp [link](https://github.com/RubyMoney/money/commit/b2cab76c78ae04f40251fa20c4ab18faa968dc53))
23
- - README updates (thanks pconnor)
24
- - Break into modules
25
- - Added `:no_cents_if_whole` format option
26
- - Update HKD from Ho to Cent
27
- - Performance improvements (thanks weppos)
28
- - Added Symbol#to_currency
29
- - Added Gemfile for development
30
- - Updated HUF currency to use `symbol_first => false`
31
- - Updated "Turkish New Lira" to "Turkish Lira"
32
-
33
- Money 3.6.1
34
- ===========
35
-
36
- Bugfixes
37
- --------
38
- - Floating point comparison needs to Epsilon aware (thanks Tobias Luetke)
39
- - reimplement fix for #issue/43, enable Marshal.(load/dump)
40
-
41
- Money 3.6.0
42
- ===========
43
-
44
- Features
45
- --------
46
- - Add a symbol position option for Money#format (thanks Romain, Gil and
47
- Julien)
48
- - Updated CNY to use "Fen" and subunit_to_unit of 100
49
- - Updates to work with gem-testers.org
50
-
51
- Bugfixes
52
- --------
53
- - Fixed issue with #format(:no_cents => true) (thanks Romain & Julien)
54
-
55
- Money 3.5.5
56
- ===========
57
-
58
- Features
59
- --------
60
- - Enhancements to Money::Currency (thanks Matthew McEachen)
61
- - Replace delimiter with thousands_separator
62
- - Replace separator with decimal_mark
63
- - Added symbol_first and html_entity
64
- - Added allocation algorithm for fair(ish) splitting of money between parties
65
- without loosing pennies (thanks Tobias Luetke)
66
-
67
- Bugfixes
68
- --------
69
- - Always store cents as an Integer (thanks Abhay Kumar)
70
- - Fixed TypeError in rate exchange (thanks Christian Billen)
71
- - Cleanup #parse (thanks Tom Lianza)
72
-
73
- Money 3.5.4
74
- ===========
75
-
76
- Features
77
- --------
78
- - Added Currency#decimal_places.
79
-
80
- Bugfixes
81
- --------
82
- - Fixed error with Money#to_s error with negative amounts that are only cents.
83
-
84
- Money 3.5.3
85
- ===========
86
-
87
- Bugfixes
88
- --------
89
- - Fixed an error in #to_s when cents is negative
90
-
91
- Money 3.5.2
92
- ===========
93
-
94
- Bugfixes
95
- --------
96
- - Fixed an error in #to_s which appended extra 0s incorrectly
97
-
98
- Money 3.5.1
99
- ===========
100
-
101
- Bugfixes
102
- --------
103
- - Removed erroneous require.
104
-
105
- Money 3.5.0
106
- ===========
107
-
108
- Features
109
- --------
110
- - Updated to RSpec2.
111
- - Use i18n to lookup separator and delimiter signs.
112
- - Removed all deprecated methods up to v3.5.0, including the following:
113
- - Using Money#format with params instead of a Hash.
114
- - Using a Hash with Money#new.
115
- - Using Bank#exchange, use Bank#exchange_with instead.
116
-
117
- Bugfixes
118
- --------
119
- - Updated Money#to_s to respect :separator and :subunit_to_unit.
120
- - Fixed Money#format for :subunit_to_unit != 100.
121
- ([#issue/37](http://github.com/RubyMoney/money/issue/37))
122
- - Fixed String#to_money for :subunit_to_unit != 100.
123
- ([#issue/36](http://github.com/RubyMoney/money/issue/36))
124
- - Removed duplicate currencies.
125
- ([#issue/38](http://github.com/RubyMoney/money/issue/38))
126
- - Fixed issue related to JRuby returning 2 for Math.log10(1000).floor instead
127
- of correctly returning 3.
128
-
129
- Money 3.1.5
130
- ===========
131
-
132
- Features
133
- --------
134
- - Added support for creating objects with the main monetary unit instead of
135
- cents.
136
- ([#issue/25](http://github.com/RubyMoney/money/issues/25))
137
- - Deprecated `Money#format` with separate params instead of Hash. Deprecation
138
- target set to Money 3.5.0.
139
- ([#issue/31](http://github.com/RubyMoney/money/issues/31))
140
- - Deprecated `Money#new(0, :currency => "EUR")` in favor of
141
- `Money#new(0, "EUR")`. Deprecation target set to Money 3.5.0.
142
- ([#issue/31](http://github.com/RubyMoney/money/issues/31))
143
- - Throw ArgumentError when trying to multiply two Money objects together.
144
- ([#issue/29](http://github.com/RubyMoney/money/issues/29))
145
- - Update Money#parse to use :subunit_to_unit
146
- ([#issue/30](http://github.com/RubyMoney/money/issues/30))
147
-
148
- Bugfixes
149
- --------
150
- - Downgraded required_rubygems_version to >= 1.3.6.
151
- ([#issue/26](http://github.com/RubyMoney/money/issues/26))
152
- - Use BigDecimal when floating point calculations are needed.
153
- - Ruby 1.9.2 compatibility enhancements.
154
-
155
-
156
- Money 3.1.0
157
- ===========
158
-
159
- Features
160
- --------
161
- - Implemented `Money::Bank::Base`.
162
- ([#issue/14](http://github.com/RubyMoney/money/issues/14))
163
- - Added `Money::Bank::Base#exchange_with`.
164
- - Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
165
- 3.2.0.
166
- - Implented `Money::Bank::VariableExchange`
167
- - Deprecated `Money::VariableExchangeBank`. Deprecation target set to Money
168
- 3.2.0.
169
- - Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
170
- Deprecation target set to Money 3.2.0.
171
- ([#issue/16](http://github.com/RubyMoney/money/issues/16))
172
- - Implemented `#has` for `Money` and `Money::Currency`.
173
- - Refactored test suite to conform to RSpec conventions.
174
- - Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
175
- [RubyMoney](http://github.com/RubyMoney)
176
- - Added Simone Carletti to list of authors.
177
- - Moved `@rounding_method` from `Money::Bank::VariableExchange` to
178
- `Money::Bank::Base`.
179
- ([#issue/18](http://github.com/RubyMoney/money/issues/18))
180
- - Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
181
- ([#issue/19](http://github.com/RubyMoney/money/issues/19))
182
- - Added [google_currency](http://github.com/RubyMoney/google_currency) to list
183
- of Currency Exchange Implementations.
184
- - Added `#export_rates` to `Money::Bank::VariableExchange`.
185
- ([#issue/21](http://github.com/RubyMoney/money/issues/21))
186
- - Added `#import_rates` to `Money::Bank::VariableExchange`.
187
- ([#issue/21](http://github.com/RubyMoney/money/issues/21))
188
- - Removed dependency on Jeweler.
189
- - Replaced usage of hanna with yardoc.
190
- - Rewrote/reformatted all documentation.
191
-
192
- Bugfixes
193
- --------
194
- - Fixed incorrect URLs in documentation.
195
- ([#issue/17](http://github.com/RubyMoney/money/issues/17))
196
- - Updated `:subunit_to_unit` for HKD from 10 to 100.
197
- ([#issue/20](http://github.com/RubyMoney/money/issues/20))
198
- - Updated Ghanaian Cedi to use correct ISO Code, GHS.
199
- ([#issue/22](http://github.com/RubyMoney/money/issues/22))
200
- - Make `default` rake task call `spec`.
201
- ([#issue/23](http://github.com/RubyMoney/money/issues/23))
202
-
203
- Money 3.1.0.pre3
204
- ================
205
-
206
- Features
207
- --------
208
- - Added [google_currency](http://github.com/RubyMoney/google_currency) to list
209
- of Currency Exchange Implementations.
210
- - Added `#export_rates` to `Money::Bank::VariableExchange`.
211
- ([#issue/21](http://github.com/RubyMoney/money/issues/21))
212
- - Added `#import_rates` to `Money::Bank::VariableExchange`.
213
- ([#issue/21](http://github.com/RubyMoney/money/issues/21))
214
-
215
- Bugfixes
216
- --------
217
- - Updated `:subunit_to_unit` for HKD from 10 to 100.
218
- ([#issue/20](http://github.com/RubyMoney/money/issues/20))
219
-
220
- Money 3.1.0.pre2
221
- ================
222
-
223
- Features
224
- --------
225
- - Moved `@rounding_method` from `Money::Bank::VariableExchange` to
226
- `Money::Bank::Base`.
227
- ([#issue/18](http://github.com/RubyMoney/money/issues/18))
228
- - Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
229
- ([#issue/19](http://github.com/RubyMoney/money/issues/19))
230
-
231
- Bugfixes
232
- --------
233
- - Fixed incorrect URLs in documentation.
234
- ([#issue/17](http://github.com/RubyMoney/money/issues/17))
235
-
236
- Money 3.1.0.pre1
237
- ================
238
-
239
- Features
240
- --------
241
- - Implemented `Money::Bank::Base`.
242
- ([#issue/14](http://github.com/RubyMoney/money/issues/14))
243
- - Added `Money::Bank::Base#exchange_with`.
244
- - Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
245
- 3.2.0.
246
- - Implented `Money::Bank::VariableExchange`
247
- - Deprecated `Money::VariableExchangeBank`. Deprecation target set to Money
248
- 3.2.0.
249
- - Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
250
- Deprecation target set to Money 3.2.0.
251
- ([#issue/16](http://github.com/RubyMoney/money/issues/16))
252
- - Implemented `#has` for `Money` and `Money::Currency`.
253
- - Refactored test suite to conform to RSpec conventions.
254
- - Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
255
- [RubyMoney](http://github.com/RubyMoney)
256
- - Added Simone Carletti to list of authors.
257
-
258
- Bugfixes
259
- --------
260
- - Fixed rounding error in `Numeric#to_money`.
261
- ([#issue/15](http://github.com/RubyMoney/money/issues/15))
262
-
263
- Money 3.0.5
264
- ===========
265
-
266
- Features
267
- --------
268
- - Added `Money#abs`.
269
- - Added ability to pass a block to `VariableExchangeBank#new` or `#exchange`,
270
- specifying a custom truncation method
271
- - Added optional `currency` argument to` Numeric#to_money`.
272
- ([#issue/11](http://github.com/RubyMoney/money/issues/11))
273
- - Added optional `currency` argument to `String#to_money`.
274
- ([#issue/11](http://github.com/RubyMoney/money/issues/11))
275
- - Use '¤' as the default currency symbol.
276
- ([#issue/10](http://github.com/RubyMoney/money/issues/10))
277
-
278
- Bugfixes
279
- --------
280
- - Updated `Currency#subunit_to_unit` documentation (it's an integer not a
281
- string).
282
- - Fixed issue when exchanging currencies with different `:subunit_to_unit`
283
- values.
284
- - `Numeric#to_money` now respects `:subunit_to_unit`.
285
- ([#issue/12](http://github.com/RubyMoney/money/issues/12))
286
-
287
- Money 3.0.4
288
- ===========
289
-
290
- Features
291
- --------
292
- - Use `:subunit_to_unit` in `#to_s`, `#to_f` and `#format`.
293
- - Deprecated `Money#SEPARATORS` and `Money#DELIMITERS`.
294
-
295
- Bugfixes
296
- --------
297
- - Updated `#exchange` to avoid floating point rounding errors.
298
- - Added `:separator` and `:delimiter` to `Currency`
299
- - Updated the attributes of the Chilean Peso.
300
-
301
- Money 3.0.3
302
- ===========
303
-
304
- Features
305
- --------
306
- - Added `#currency_as_string` and `#currency_as_string=` for easier
307
- integration with ActiveRecord/Rails
308
-
309
- Money 3.0.2
310
- ===========
311
-
312
- Features
313
- --------
314
- - Added `#div`, `#divmod`, `#modulo`, `#%` and `#remainder` to `Money`.
315
-
316
- Money 3.0.1
317
- ===========
318
-
319
- Features
320
- --------
321
- - Added `#eql?` to `Money`
322
- - Updated `Numeric#to_money` to work with all children of `Numeric` (i.e.
323
- `BigDecimal`, `Integer`, `Fixnum`, `Float`, etc)
324
-
325
- Money 3.0.0
326
- ===========
327
-
328
- Features
329
- --------
330
- - Version Bump due to compatibility changes with ActiveRecord. See
331
- conversation
332
- [here](http://github.com/RubyMoney/money/issues#issue/4/comment/224880)
333
- for more information.
334
-
335
- Money 2.3.0
336
- ===========
337
-
338
- Features
339
- --------
340
- - Currency is now represented by a `Currency` Object instead of a `String`.
341
-
342
- Money 2.2.0
343
- ===========
344
-
345
- Features
346
- --------
347
- - Can now divide two Money objects by one another using `#/`.
348
- - Can now convert a Money object to a float using `#to_f`.
349
- - Users can now specify Separators and Delimiters when using `#format`.
350
- - Support for Brazilian Real `Money.new(1_00, :BRL)`
351
- - Migrated to Jeweler
1
+ Money 4.0.0
2
+ ===========
3
+
4
+ The big change this release is moving the currency information into a JSON
5
+ file. This should make it easier for users to add and test things. Thanks to
6
+ Steve Morris for working on this during his Mendicant University course.
7
+
8
+ In addition to this big change there were well over a dozen other minor
9
+ changes.
10
+
11
+ Features
12
+ --------
13
+ - a new exchange bank nordea has been added to the README. (k33l0r)
14
+ - a new exchange bank nbrb_currency has been added to the README. (slbug)
15
+ - update Rake tasks
16
+ - See our CI status in the README
17
+ - Add syntax highlighting to the README (phlipper)
18
+ - Remove minor unit from YEN (pwim)
19
+ - Format YEN (pwim)
20
+ - Update README for `_as_string` (mjankowski)
21
+ - Update Lebanon currency (kaleemullah)
22
+ - Update Polish złoty (holek)
23
+ - Move currency information into JSON storage! (stevemorris)
24
+ - Add ISO4217 Numeric codes (alovak)
25
+
26
+ Bugfixes
27
+ --------
28
+ - EEK currency is no longer used, kept for BC ([#issue/110](http://github.com/RubyMoney/money/issues/110))
29
+ - Lithuanian Litas symbol position fixed (laurynas)
30
+ - Fixed README typos (phlipper)
31
+ - Fixed README typos (pwim)
32
+ - Fix specs (alovak)
33
+
34
+ Money 3.7.1
35
+ ===========
36
+
37
+ Bugfixes
38
+ --------
39
+ - Add encoding indicator to top of Gemspec
40
+
41
+ Money 3.7.0
42
+ ===========
43
+
44
+ Features
45
+ --------
46
+ - add Money#to_d (thanks Andrew White)
47
+ - Add Money.use_i18n, this allows you to enable/disable i18n from being used,
48
+ even if it's required in your app.
49
+
50
+ Money 3.6.2
51
+ ===========
52
+
53
+ Features
54
+ --------
55
+ - i18n enhancements (thanks eloyesp [link](https://github.com/RubyMoney/money/commit/b2cab76c78ae04f40251fa20c4ab18faa968dc53))
56
+ - README updates (thanks pconnor)
57
+ - Break into modules
58
+ - Added `:no_cents_if_whole` format option
59
+ - Update HKD from Ho to Cent
60
+ - Performance improvements (thanks weppos)
61
+ - Added Symbol#to_currency
62
+ - Added Gemfile for development
63
+ - Updated HUF currency to use `symbol_first => false`
64
+ - Updated "Turkish New Lira" to "Turkish Lira"
65
+
66
+ Money 3.6.1
67
+ ===========
68
+
69
+ Bugfixes
70
+ --------
71
+ - Floating point comparison needs to Epsilon aware (thanks Tobias Luetke)
72
+ - reimplement fix for #issue/43, enable Marshal.(load/dump)
73
+
74
+ Money 3.6.0
75
+ ===========
76
+
77
+ Features
78
+ --------
79
+ - Add a symbol position option for Money#format (thanks Romain, Gil and
80
+ Julien)
81
+ - Updated CNY to use "Fen" and subunit_to_unit of 100
82
+ - Updates to work with gem-testers.org
83
+
84
+ Bugfixes
85
+ --------
86
+ - Fixed issue with #format(:no_cents => true) (thanks Romain & Julien)
87
+
88
+ Money 3.5.5
89
+ ===========
90
+
91
+ Features
92
+ --------
93
+ - Enhancements to Money::Currency (thanks Matthew McEachen)
94
+ - Replace delimiter with thousands_separator
95
+ - Replace separator with decimal_mark
96
+ - Added symbol_first and html_entity
97
+ - Added allocation algorithm for fair(ish) splitting of money between parties
98
+ without loosing pennies (thanks Tobias Luetke)
99
+
100
+ Bugfixes
101
+ --------
102
+ - Always store cents as an Integer (thanks Abhay Kumar)
103
+ - Fixed TypeError in rate exchange (thanks Christian Billen)
104
+ - Cleanup #parse (thanks Tom Lianza)
105
+
106
+ Money 3.5.4
107
+ ===========
108
+
109
+ Features
110
+ --------
111
+ - Added Currency#decimal_places.
112
+
113
+ Bugfixes
114
+ --------
115
+ - Fixed error with Money#to_s error with negative amounts that are only cents.
116
+
117
+ Money 3.5.3
118
+ ===========
119
+
120
+ Bugfixes
121
+ --------
122
+ - Fixed an error in #to_s when cents is negative
123
+
124
+ Money 3.5.2
125
+ ===========
126
+
127
+ Bugfixes
128
+ --------
129
+ - Fixed an error in #to_s which appended extra 0s incorrectly
130
+
131
+ Money 3.5.1
132
+ ===========
133
+
134
+ Bugfixes
135
+ --------
136
+ - Removed erroneous require.
137
+
138
+ Money 3.5.0
139
+ ===========
140
+
141
+ Features
142
+ --------
143
+ - Updated to RSpec2.
144
+ - Use i18n to lookup separator and delimiter signs.
145
+ - Removed all deprecated methods up to v3.5.0, including the following:
146
+ - Using Money#format with params instead of a Hash.
147
+ - Using a Hash with Money#new.
148
+ - Using Bank#exchange, use Bank#exchange_with instead.
149
+
150
+ Bugfixes
151
+ --------
152
+ - Updated Money#to_s to respect :separator and :subunit_to_unit.
153
+ - Fixed Money#format for :subunit_to_unit != 100.
154
+ ([#issue/37](http://github.com/RubyMoney/money/issue/37))
155
+ - Fixed String#to_money for :subunit_to_unit != 100.
156
+ ([#issue/36](http://github.com/RubyMoney/money/issue/36))
157
+ - Removed duplicate currencies.
158
+ ([#issue/38](http://github.com/RubyMoney/money/issue/38))
159
+ - Fixed issue related to JRuby returning 2 for Math.log10(1000).floor instead
160
+ of correctly returning 3.
161
+
162
+ Money 3.1.5
163
+ ===========
164
+
165
+ Features
166
+ --------
167
+ - Added support for creating objects with the main monetary unit instead of
168
+ cents.
169
+ ([#issue/25](http://github.com/RubyMoney/money/issues/25))
170
+ - Deprecated `Money#format` with separate params instead of Hash. Deprecation
171
+ target set to Money 3.5.0.
172
+ ([#issue/31](http://github.com/RubyMoney/money/issues/31))
173
+ - Deprecated `Money#new(0, :currency => "EUR")` in favor of
174
+ `Money#new(0, "EUR")`. Deprecation target set to Money 3.5.0.
175
+ ([#issue/31](http://github.com/RubyMoney/money/issues/31))
176
+ - Throw ArgumentError when trying to multiply two Money objects together.
177
+ ([#issue/29](http://github.com/RubyMoney/money/issues/29))
178
+ - Update Money#parse to use :subunit_to_unit
179
+ ([#issue/30](http://github.com/RubyMoney/money/issues/30))
180
+
181
+ Bugfixes
182
+ --------
183
+ - Downgraded required_rubygems_version to >= 1.3.6.
184
+ ([#issue/26](http://github.com/RubyMoney/money/issues/26))
185
+ - Use BigDecimal when floating point calculations are needed.
186
+ - Ruby 1.9.2 compatibility enhancements.
187
+
188
+
189
+ Money 3.1.0
190
+ ===========
191
+
192
+ Features
193
+ --------
194
+ - Implemented `Money::Bank::Base`.
195
+ ([#issue/14](http://github.com/RubyMoney/money/issues/14))
196
+ - Added `Money::Bank::Base#exchange_with`.
197
+ - Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
198
+ 3.2.0.
199
+ - Implented `Money::Bank::VariableExchange`
200
+ - Deprecated `Money::VariableExchangeBank`. Deprecation target set to Money
201
+ 3.2.0.
202
+ - Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
203
+ Deprecation target set to Money 3.2.0.
204
+ ([#issue/16](http://github.com/RubyMoney/money/issues/16))
205
+ - Implemented `#has` for `Money` and `Money::Currency`.
206
+ - Refactored test suite to conform to RSpec conventions.
207
+ - Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
208
+ [RubyMoney](http://github.com/RubyMoney)
209
+ - Added Simone Carletti to list of authors.
210
+ - Moved `@rounding_method` from `Money::Bank::VariableExchange` to
211
+ `Money::Bank::Base`.
212
+ ([#issue/18](http://github.com/RubyMoney/money/issues/18))
213
+ - Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
214
+ ([#issue/19](http://github.com/RubyMoney/money/issues/19))
215
+ - Added [google_currency](http://github.com/RubyMoney/google_currency) to list
216
+ of Currency Exchange Implementations.
217
+ - Added `#export_rates` to `Money::Bank::VariableExchange`.
218
+ ([#issue/21](http://github.com/RubyMoney/money/issues/21))
219
+ - Added `#import_rates` to `Money::Bank::VariableExchange`.
220
+ ([#issue/21](http://github.com/RubyMoney/money/issues/21))
221
+ - Removed dependency on Jeweler.
222
+ - Replaced usage of hanna with yardoc.
223
+ - Rewrote/reformatted all documentation.
224
+
225
+ Bugfixes
226
+ --------
227
+ - Fixed incorrect URLs in documentation.
228
+ ([#issue/17](http://github.com/RubyMoney/money/issues/17))
229
+ - Updated `:subunit_to_unit` for HKD from 10 to 100.
230
+ ([#issue/20](http://github.com/RubyMoney/money/issues/20))
231
+ - Updated Ghanaian Cedi to use correct ISO Code, GHS.
232
+ ([#issue/22](http://github.com/RubyMoney/money/issues/22))
233
+ - Make `default` rake task call `spec`.
234
+ ([#issue/23](http://github.com/RubyMoney/money/issues/23))
235
+
236
+ Money 3.1.0.pre3
237
+ ================
238
+
239
+ Features
240
+ --------
241
+ - Added [google_currency](http://github.com/RubyMoney/google_currency) to list
242
+ of Currency Exchange Implementations.
243
+ - Added `#export_rates` to `Money::Bank::VariableExchange`.
244
+ ([#issue/21](http://github.com/RubyMoney/money/issues/21))
245
+ - Added `#import_rates` to `Money::Bank::VariableExchange`.
246
+ ([#issue/21](http://github.com/RubyMoney/money/issues/21))
247
+
248
+ Bugfixes
249
+ --------
250
+ - Updated `:subunit_to_unit` for HKD from 10 to 100.
251
+ ([#issue/20](http://github.com/RubyMoney/money/issues/20))
252
+
253
+ Money 3.1.0.pre2
254
+ ================
255
+
256
+ Features
257
+ --------
258
+ - Moved `@rounding_method` from `Money::Bank::VariableExchange` to
259
+ `Money::Bank::Base`.
260
+ ([#issue/18](http://github.com/RubyMoney/money/issues/18))
261
+ - Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
262
+ ([#issue/19](http://github.com/RubyMoney/money/issues/19))
263
+
264
+ Bugfixes
265
+ --------
266
+ - Fixed incorrect URLs in documentation.
267
+ ([#issue/17](http://github.com/RubyMoney/money/issues/17))
268
+
269
+ Money 3.1.0.pre1
270
+ ================
271
+
272
+ Features
273
+ --------
274
+ - Implemented `Money::Bank::Base`.
275
+ ([#issue/14](http://github.com/RubyMoney/money/issues/14))
276
+ - Added `Money::Bank::Base#exchange_with`.
277
+ - Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
278
+ 3.2.0.
279
+ - Implented `Money::Bank::VariableExchange`
280
+ - Deprecated `Money::VariableExchangeBank`. Deprecation target set to Money
281
+ 3.2.0.
282
+ - Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
283
+ Deprecation target set to Money 3.2.0.
284
+ ([#issue/16](http://github.com/RubyMoney/money/issues/16))
285
+ - Implemented `#has` for `Money` and `Money::Currency`.
286
+ - Refactored test suite to conform to RSpec conventions.
287
+ - Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
288
+ [RubyMoney](http://github.com/RubyMoney)
289
+ - Added Simone Carletti to list of authors.
290
+
291
+ Bugfixes
292
+ --------
293
+ - Fixed rounding error in `Numeric#to_money`.
294
+ ([#issue/15](http://github.com/RubyMoney/money/issues/15))
295
+
296
+ Money 3.0.5
297
+ ===========
298
+
299
+ Features
300
+ --------
301
+ - Added `Money#abs`.
302
+ - Added ability to pass a block to `VariableExchangeBank#new` or `#exchange`,
303
+ specifying a custom truncation method
304
+ - Added optional `currency` argument to` Numeric#to_money`.
305
+ ([#issue/11](http://github.com/RubyMoney/money/issues/11))
306
+ - Added optional `currency` argument to `String#to_money`.
307
+ ([#issue/11](http://github.com/RubyMoney/money/issues/11))
308
+ - Use '¤' as the default currency symbol.
309
+ ([#issue/10](http://github.com/RubyMoney/money/issues/10))
310
+
311
+ Bugfixes
312
+ --------
313
+ - Updated `Currency#subunit_to_unit` documentation (it's an integer not a
314
+ string).
315
+ - Fixed issue when exchanging currencies with different `:subunit_to_unit`
316
+ values.
317
+ - `Numeric#to_money` now respects `:subunit_to_unit`.
318
+ ([#issue/12](http://github.com/RubyMoney/money/issues/12))
319
+
320
+ Money 3.0.4
321
+ ===========
322
+
323
+ Features
324
+ --------
325
+ - Use `:subunit_to_unit` in `#to_s`, `#to_f` and `#format`.
326
+ - Deprecated `Money#SEPARATORS` and `Money#DELIMITERS`.
327
+
328
+ Bugfixes
329
+ --------
330
+ - Updated `#exchange` to avoid floating point rounding errors.
331
+ - Added `:separator` and `:delimiter` to `Currency`
332
+ - Updated the attributes of the Chilean Peso.
333
+
334
+ Money 3.0.3
335
+ ===========
336
+
337
+ Features
338
+ --------
339
+ - Added `#currency_as_string` and `#currency_as_string=` for easier
340
+ integration with ActiveRecord/Rails
341
+
342
+ Money 3.0.2
343
+ ===========
344
+
345
+ Features
346
+ --------
347
+ - Added `#div`, `#divmod`, `#modulo`, `#%` and `#remainder` to `Money`.
348
+
349
+ Money 3.0.1
350
+ ===========
351
+
352
+ Features
353
+ --------
354
+ - Added `#eql?` to `Money`
355
+ - Updated `Numeric#to_money` to work with all children of `Numeric` (i.e.
356
+ `BigDecimal`, `Integer`, `Fixnum`, `Float`, etc)
357
+
358
+ Money 3.0.0
359
+ ===========
360
+
361
+ Features
362
+ --------
363
+ - Version Bump due to compatibility changes with ActiveRecord. See
364
+ conversation
365
+ [here](http://github.com/RubyMoney/money/issues#issue/4/comment/224880)
366
+ for more information.
367
+
368
+ Money 2.3.0
369
+ ===========
370
+
371
+ Features
372
+ --------
373
+ - Currency is now represented by a `Currency` Object instead of a `String`.
374
+
375
+ Money 2.2.0
376
+ ===========
377
+
378
+ Features
379
+ --------
380
+ - Can now divide two Money objects by one another using `#/`.
381
+ - Can now convert a Money object to a float using `#to_f`.
382
+ - Users can now specify Separators and Delimiters when using `#format`.
383
+ - Support for Brazilian Real `Money.new(1_00, :BRL)`
384
+ - Migrated to Jeweler