1eb7292 | Anthony Dmitriyev | 12 July 2018, 22:32:22 UTC | Update version to 6.12.0 | 12 July 2018, 22:32:22 UTC |
8484c49 | Anthony Dmitriyev | 07 July 2018, 20:49:02 UTC | Remove memoization for #empty/#zero (#781) Memoization of #empty can cause issues because of default_currency and default_bank which are used when initializing a Money object. In case one of these will get changed after #empty got memoized — the memoized version will no longer reflect the latest state. | 07 July 2018, 20:49:02 UTC |
b3886bd | Anthony Dmitriyev | 27 June 2018, 22:47:47 UTC | Merge pull request #780 from antstorm/fix-round Respect rounding mode when infinite_precision is false | 27 June 2018, 22:47:47 UTC |
646208f | Anthony Dmitriyev | 27 June 2018, 08:51:57 UTC | Preserve assigned bank when rounding | 27 June 2018, 08:51:57 UTC |
5445be2 | Anthony Dmitriyev | 27 June 2018, 08:33:11 UTC | Always round the fractional part when calling #round We used to just return self when infinite_precision was disabled, but since we store the fractional part as a BigDecimal this might accumulate error and return unexpected results. This commit ensures we always round as it is expected to loose precision when rounding. | 27 June 2018, 08:49:12 UTC |
1a75227 | Rolandas Barysas | 12 June 2018, 19:47:57 UTC | Wrap all amount parts when html option is used (#777) * Wrap all amount parts when html option is used When using formatter's `html: true` option, all amount's string parts will be wrapped in html elements (symbol, whole part, decimal mark, decimal part and, if `with_currency` is true, currency). Also deprecated html_wrap_symbol option, since it will be always wrapped with `html: true` option. * Fix html option docs error * Fix docs typo * Preserve and deprecate old html formatter option | 12 June 2018, 19:47:57 UTC |
c06f85c | Anthony Dmitriyev | 11 June 2018, 07:39:30 UTC | Merge pull request #776 from antstorm/deprecate-currency-as-string Deprecate currency_as_string | 11 June 2018, 07:39:30 UTC |
26959bf | Anthony Dmitriyev | 10 June 2018, 20:09:30 UTC | Deprecate #currency_as_string and #currency_as_string= | 10 June 2018, 20:09:30 UTC |
6563f3f | Anthony Dmitriyev | 10 June 2018, 20:07:00 UTC | Add #with_currency for swapping the currency | 10 June 2018, 20:08:57 UTC |
2d6ccc1 | Anthony Dmitriyev | 19 May 2018, 23:22:14 UTC | Rewrite allocate/split (#772) This commit introduces a more effective and uniform solution to the #allocate and #split methods. These are now synonyms accepting either array for allocations or a number for even splits. The solution does not differ between the two approaches. It also adds a couple of tests to make sure it works as expected, since there were some inconsistencies with the former solution. | 19 May 2018, 23:22:14 UTC |
1f1c8c7 | Anthony Dmitriyev | 09 May 2018, 21:49:10 UTC | Update version to 6.11.3 | 09 May 2018, 21:49:10 UTC |
88e1d97 | Anthony Dmitriyev | 09 May 2018, 21:38:42 UTC | Respect i18n for #to_s (#771) There have been a couple of problems with using `currency.decimal_mark` when calling `to_s`. Primarily the inconsistency with how money-rails validates input, relying on i18n for determining acceptable decimal mark. This commit restores the behaviour similar to the original. | 09 May 2018, 21:38:42 UTC |
3d6e74a | Anthony Dmitriyev | 03 May 2018, 23:01:44 UTC | Update to 6.11.2 | 03 May 2018, 23:01:44 UTC |
f9482a1 | Anthony Dmitriyev | 03 May 2018, 22:59:00 UTC | Ignore formatting defaults for to_s (#768) | 03 May 2018, 22:59:00 UTC |
5a4be95 | Anthony Dmitriyev | 01 May 2018, 07:42:02 UTC | Update CHANGELOG | 01 May 2018, 07:42:02 UTC |
b163655 | Anthony Dmitriyev | 30 April 2018, 20:47:21 UTC | Update version to 6.11.1 | 30 April 2018, 20:47:21 UTC |
987573b | Koen Rouwhorst | 28 April 2018, 09:36:12 UTC | Fix issue with summing non-default/USD currency 'Money' objects (#767) * Added failing spec for summing non-USD money instances. * Fixed sum issue. | 28 April 2018, 09:36:11 UTC |
7ab48b9 | Anthony Dmitriyev | 26 April 2018, 22:13:14 UTC | Fix formatting links in the README (#766) | 26 April 2018, 22:13:14 UTC |
8c71341 | Anthony Dmitriyev | 24 April 2018, 19:54:50 UTC | Switch to new ruby hash syntax (#763) | 24 April 2018, 19:54:50 UTC |
cca9cad | Anthony Dmitriyev | 14 April 2018, 11:04:25 UTC | Add link to money-collection to the README | 14 April 2018, 11:04:34 UTC |
f260b9d | Anthony Dmitriyev | 14 April 2018, 10:49:08 UTC | Merge pull request #760 from antstorm/change-to-s-implementation Use Formatter for #to_s | 14 April 2018, 10:49:08 UTC |
b2942eb | Anthony Dmitriyev | 08 April 2018, 15:27:02 UTC | Update version to 6.11.0 | 08 April 2018, 15:27:02 UTC |
e96e1f0 | Anthony Dmitriyev | 04 April 2018, 22:04:37 UTC | Simplify #to_s by using the Formatter This allows for a cleanup of the #to_s code which duplicates a good part of the logic inside Formatter | 04 April 2018, 22:04:37 UTC |
3b99dee | Anthony Dmitriyev | 04 April 2018, 21:12:25 UTC | Display decimal part when decimal_places is 0, but infinite_precision is on This change will make sure that infinite_precision isn't swallowed for currencies with subunit_to_unit of 1. If you need to hide it use :no_cents or :no_cents_if_whole. | 04 April 2018, 21:12:25 UTC |
bb011b7 | Laurent Arnoud | 04 April 2018, 20:20:27 UTC | Update travis rubies to use last versions when possible (#759) * Update travis rubies use last versions when possible * Fix patch level rubies on travis | 04 April 2018, 20:20:27 UTC |
433cb76 | Laurent Arnoud | 03 April 2018, 23:20:25 UTC | README: more info about AR ExchangeRate model (#758) | 03 April 2018, 23:20:25 UTC |
e8992e3 | Stefan Wrobel | 18 March 2018, 21:44:42 UTC | Support i18n 1.0 (#756) | 18 March 2018, 21:44:42 UTC |
db467e0 | Kevin Attfield | 17 March 2018, 18:08:29 UTC | Allow splits with sums greater than 1 (#752) Requiring that the sum of splits be less than or equal to one seems like an arbitrary requirement. Removing it opens the door to new client uses. | 17 March 2018, 18:08:29 UTC |
26dd4f9 | Anthony Dmitriyev | 15 March 2018, 21:46:43 UTC | update AUTHORS | 15 March 2018, 21:46:43 UTC |
2626647 | Ivan Shamatov | 15 March 2018, 21:41:44 UTC | Adding inheritance for currencies (#754) * Adding inheritance for currencies * fix inherit method annotation | 15 March 2018, 21:41:44 UTC |
56a2d0f | Tim Krins | 15 March 2018, 21:39:07 UTC | Custom round precision when using `infinite_precision` (#755) * Add optional precision to round * Add test for optional rounding precision | 15 March 2018, 21:39:07 UTC |
10333f5 | Anthony Dmitriyev | 17 February 2018, 20:42:26 UTC | Merge pull request #751 from antstorm/refactor-formatter Refactor formatter | 17 February 2018, 20:42:26 UTC |
7d491c5 | Anthony Dmitriyev | 15 February 2018, 00:04:06 UTC | Fix MGA formatting specs to correct values With a subunit_to_unit of 5 the following should be true: 1 ariary = 5 francs 1 franc = 0.2 ariary 6 francs = 1.2 ariary 1.5 franc = 0.3 ariary | 15 February 2018, 00:23:08 UTC |
802617d | Anthony Dmitriyev | 14 February 2018, 23:58:40 UTC | Refactor the formatting logic The main difference is avoiding constant string <-> numeric formatting - numeric result is rounded then split into whole and decimal parts, which are then formatted individually. | 15 February 2018, 00:23:08 UTC |
6cebd98 | Anthony Dmitriyev | 12 February 2018, 22:11:09 UTC | Move free text logic into a method | 15 February 2018, 00:21:25 UTC |
d01bcf0 | Anthony Dmitriyev | 15 February 2018, 00:09:15 UTC | Merge pull request #748 from antstorm/fix-asian-number-formatting Fix for south asian number formatting | 15 February 2018, 00:09:15 UTC |
798b082 | Anthony Dmitriyev | 08 February 2018, 23:54:27 UTC | Use String#rjust for subunit padding (#750) | 08 February 2018, 23:54:27 UTC |
7186b0b | Anthony Dmitriyev | 08 February 2018, 22:51:46 UTC | Alias Currency#exponent with decimal_places (#749) Because it is exactly the same thing | 08 February 2018, 22:51:46 UTC |
5dba0de | Anthony Dmitriyev | 07 February 2018, 22:13:40 UTC | Temporary fix for INDIAN_BAR south asian formatting | 07 February 2018, 22:13:40 UTC |
449b643 | Anthony Dmitriyev | 07 February 2018, 22:11:40 UTC | Support whole numbers in south asian formatting regexp | 07 February 2018, 22:11:40 UTC |
184094f | Anthony Dmitriyev | 04 February 2018, 20:39:43 UTC | Merge pull request #739 from antstorm/extract-formatting Extract formatting into a separate module | 04 February 2018, 20:39:43 UTC |
b5e2a42 | Nicolay Hvidsten | 27 January 2018, 15:32:26 UTC | Added new symbol for bitcoin denomination (#744) The new symbeol adheres to the UTF 10.0 standard, pointing to U+20BF | 27 January 2018, 15:32:26 UTC |
6510825 | Nathan Griffith | 27 January 2018, 15:24:41 UTC | Fix case of coerced zero numeric subtraction (#745) * Add failing spec for 0 - Money * Fix 0 - Money case * One more test to cover addition case (was passing before) | 27 January 2018, 15:24:41 UTC |
0a157b6 | Vladislav Korotkov | 18 January 2018, 22:33:00 UTC | Pass bank to initializer in arithmetic methods (#743) Ensures that results of arithmetic operations have the same bank an input arguments | 18 January 2018, 22:33:00 UTC |
513ef11 | Anthony Dmitriyev | 05 September 2017, 08:26:39 UTC | Extract Formatting Rules | 08 January 2018, 21:12:28 UTC |
2286f4f | Anthony Dmitriyev | 04 September 2017, 21:05:00 UTC | Use instance of a Formatter instead of including it into Money | 07 January 2018, 19:57:09 UTC |
14711a5 | Anthony Dmitriyev | 04 September 2017, 20:53:27 UTC | Use #decimal_mark from currency in Money#to_s | 07 January 2018, 19:57:09 UTC |
a8d67f2 | Anthony Dmitriyev | 04 September 2017, 20:47:08 UTC | Move out-of-scope Formatter methods back into scope | 07 January 2018, 19:57:09 UTC |
3a7600d | Anthony Dmitriyev | 04 September 2017, 20:27:10 UTC | Rename Formatting module to Formatter | 07 January 2018, 19:57:09 UTC |
2626d76 | Anthony Dmitriyev | 03 January 2018, 09:52:48 UTC | Merge pull request #738 from antstorm/ruby-2-5-0 Ruby 2.5.0 | 03 January 2018, 09:52:48 UTC |
311d90a | Anthony Dmitriyev | 03 January 2018, 08:15:52 UTC | Update older rubies to their latest revisions | 03 January 2018, 08:15:52 UTC |
1991c67 | Anthony Dmitriyev | 03 January 2018, 08:14:48 UTC | Add ruby 2.5.0 as testing target for Travis | 03 January 2018, 08:14:48 UTC |
4d5883e | Anthony Dmitriyev | 01 January 2018, 15:38:13 UTC | Update yard dependency to 0.9.11 (#737) Fixes a vulnerability in older yard versions | 01 January 2018, 15:38:13 UTC |
01b14a4 | Kevin Sołtysiak | 23 December 2017, 13:38:08 UTC | Remove deprecation warnings (#735) | 23 December 2017, 13:38:08 UTC |
7523ad9 | Anthony Dmitriyev | 15 December 2017, 23:13:18 UTC | Update version to 6.10.1 | 15 December 2017, 23:13:18 UTC |
bbf748a | Fred Liang | 15 December 2017, 23:07:58 UTC | Fix a construction bug (#733) Steps to reproduce the bug: 1. start a new ruby console 2. require 'money'; Money.zero(:usd); Money.zero You will see the error | 15 December 2017, 23:07:58 UTC |
40ece66 | Anthony Dmitriyev | 04 November 2017, 18:28:05 UTC | Update version to 6.10.0 | 04 November 2017, 18:28:05 UTC |
3017883 | Gonzalo Rodríguez-Baltanás Díaz | 17 October 2017, 23:49:59 UTC | Adds support for i18n version 0.9 (#730) | 17 October 2017, 23:49:59 UTC |
bbd5d98 | Alex Dunae | 12 September 2017, 08:41:53 UTC | Don't round when verifying allocation splits (#726) There’s no reason to perform coercion here since since the result isn’t saved and Money#amounts_from_splits doesn’t perform coercion either. See #725 | 12 September 2017, 08:41:53 UTC |
c57c081 | Anthony Dmitriyev | 05 September 2017, 08:48:20 UTC | Update the bundler on Travis to the latest available version (#724) | 05 September 2017, 08:48:20 UTC |
2fedc71 | Marek Stańczyk | 05 September 2017, 08:43:20 UTC | Add Chinese Yuan Offshore (CNH) (#723) * add Chinese Yuan Offshore (CNH) * add disambiguate symbol for CNH | 05 September 2017, 08:43:20 UTC |
9f3a028 | Anthony Dmitriyev | 21 August 2017, 21:29:10 UTC | Fix html_entity for ARS (#721) | 21 August 2017, 21:29:10 UTC |
a193665 | Anthony Dmitriyev | 10 August 2017, 21:30:38 UTC | Colorize RSpec output (#719) | 10 August 2017, 21:30:38 UTC |
42cbc36 | Adis Osmonov | 31 July 2017, 08:20:05 UTC | Fix KZT symbol (#718) It was using postal mark: http://unicodelookup.com/#〒/1 | 31 July 2017, 08:20:05 UTC |
17cf0b8 | isaacsouza | 14 July 2017, 08:06:17 UTC | Adjusted attribute name in README (#714) * Adjusted attribute name in readme text * Adjusted value of the attributes that were edited * Adjusted attributes names in help text | 14 July 2017, 08:06:17 UTC |
27b8b14 | Kyle Schutt | 03 July 2017, 06:54:39 UTC | updating XTS iso_code to be all uppercase (#713) | 03 July 2017, 06:54:39 UTC |
6a1de27 | Anthony Dmitriyev | 05 June 2017, 15:17:49 UTC | Merge pull request #705 from orien/compare_zero Allow comparing cross currency when both are zero | 05 June 2017, 15:17:49 UTC |
516db28 | Orien Madgwick | 10 May 2017, 02:03:55 UTC | Spec for #eql? comparing 0 amount, differing currencies | 10 May 2017, 02:03:55 UTC |
8d7efc2 | Orien Madgwick | 07 May 2017, 12:50:43 UTC | Allow comparing cross currency when both are zero Money.disallow_currency_conversion! Money.new(0, 'USD') == Money.new(0, 'AUD') # => true This is consistent with the already existing Money.new(0, 'USD').eql? Money.new(0, 'AUD') # => true | 10 May 2017, 01:58:11 UTC |
24682ba | Orien Madgwick | 09 May 2017, 15:45:57 UTC | Test against latest MRI patch releases (#706) | 09 May 2017, 15:45:57 UTC |
3a126f4 | Dan Schultzer | 26 April 2017, 07:12:45 UTC | Make marshal dump work for memory store (#704) | 26 April 2017, 07:12:45 UTC |
5ecaa8d | Daniel Nagy | 25 April 2017, 22:21:40 UTC | correct HUF subunit and thousands separator config (#703) | 25 April 2017, 22:21:40 UTC |
8877521 | Anthony Dmitriyev | 20 April 2017, 21:19:00 UTC | Update version to 6.9.0 | 20 April 2017, 21:19:00 UTC |
ca4b1b2 | Anthony Dmitriyev | 20 April 2017, 21:15:09 UTC | Mention money-heuristics in README | 20 April 2017, 21:18:19 UTC |
2932485 | Anthony Dmitriyev | 19 April 2017, 23:14:09 UTC | Update version to 6.8.4 | 20 April 2017, 21:17:56 UTC |
f752939 | Anthony Dmitriyev | 06 April 2017, 20:40:04 UTC | Update version to 6.8.3 | 20 April 2017, 21:17:56 UTC |
50a302f | archanasingh | 11 April 2017, 19:15:43 UTC | Resolving NIO ambiguity with CAD (#698) | 11 April 2017, 19:15:43 UTC |
ec1c46b | Jackson Harper | 10 April 2017, 08:14:56 UTC | Display the BBD $ symbol before digits. (#696) The currency pattern for the BBD is "¤#,##0.00": http://demo.icu-project.org/icu-bin/locexp?d_=en&_=en_BB | 10 April 2017, 08:14:56 UTC |
ed3b8db | archanasingh | 10 April 2017, 08:13:18 UTC | Symbol first for NIO and PAB currencies (#697) | 10 April 2017, 08:13:18 UTC |
1622ed1 | Dilum Navanjana | 06 April 2017, 20:28:16 UTC | LKR currency html_entity symbol fix with the correct value (#694) | 06 April 2017, 20:28:16 UTC |
641e094 | Mikael Roos | 04 April 2017, 11:09:14 UTC | Add support for the British Penny (GBX) (#692) GBX is in wide use in the world of stock exchanges. https://en.wikipedia.org/wiki/Penny_sterling | 04 April 2017, 11:09:14 UTC |
57480da | Anthony Dmitriyev | 14 March 2017, 21:45:22 UTC | Merge pull request #691 from stereobooster/remove-heuristics-module Remove heuristics module | 14 March 2017, 21:45:22 UTC |
44e4e0d | stereobooster | 14 March 2017, 17:55:32 UTC | Added deprecation error for heuristics module | 14 March 2017, 17:55:32 UTC |
0a56365 | Anthony Dmitriyev | 10 March 2017, 10:35:31 UTC | Update version to 6.8.2 | 10 March 2017, 10:35:31 UTC |
faaeb15 | stereobooster | 09 March 2017, 14:11:57 UTC | Remove heuristics module | 09 March 2017, 14:11:57 UTC |
1d3a06e | Guilherme Simoes | 09 March 2017, 09:00:16 UTC | Update links to HTTPS (#689) | 09 March 2017, 09:00:16 UTC |
700c4ad | TM Lee | 01 March 2017, 10:51:03 UTC | [Issue #678] VND currency should have symbol_first: false (#686) - Related to https://github.com/RubyMoney/money/issues/678 - Set VND currency to display dong symbol at the end | 01 March 2017, 10:51:03 UTC |
6e00067 | Ville Lautanala | 25 February 2017, 17:47:17 UTC | Relax i18n version constraint to allow patch version updates (#685) | 25 February 2017, 17:47:17 UTC |
190683e | Eugene Russkikh | 13 February 2017, 17:45:19 UTC | Peruvian Sol (#684) At its introduction in 1991, the currency was officially called nuevo sol ("new sol"), but on November 13, 2015, the Peruvian Congress voted to rename the currency simply sol https://en.wikipedia.org/wiki/Peruvian_sol | 13 February 2017, 17:45:19 UTC |
26465ab | Anthony Dmitriyev | 09 February 2017, 14:24:03 UTC | Merge pull request #683 from antstorm/fix-uzs Fix symbol for UZS | 09 February 2017, 14:24:03 UTC |
536059a | Anthony Dmitriyev | 08 February 2017, 20:25:24 UTC | Add disambiguate_symbol for XFU | 08 February 2017, 20:28:22 UTC |
a8de622 | Anthony Dmitriyev | 08 February 2017, 20:24:37 UTC | Set symbol for UZS | 08 February 2017, 20:28:22 UTC |
c7fd576 | Anthony Dmitriyev | 04 February 2017, 10:15:47 UTC | Bump i18n version to 0.8.0 (#681) | 04 February 2017, 10:15:47 UTC |
557561e | Anthony Dmitriyev | 01 February 2017, 16:58:29 UTC | Merge pull request #680 from karthikmuralidharan/patch-2 fix self_amount constructor accepting nil currency_code | 01 February 2017, 16:58:29 UTC |
fd91901 | Karthik Muralidharan | 01 February 2017, 12:05:53 UTC | fix self_amount constructor accepting nil currency_code This scenario happened to me: ``` currency_code = nil (returned by data store) amount = 500 Money.from_amount(amount, currency_code).cents results in ``` Basically currency_code did not default to the default_currency value and was accepted as nil. | 01 February 2017, 13:16:53 UTC |
7552ed6 | Karol Galanciak | 25 January 2017, 18:55:23 UTC | eliminate subunits for forints (#679) | 25 January 2017, 18:55:23 UTC |
c7999bd | Anthony Dmitriyev | 08 January 2017, 11:13:53 UTC | Update version to 6.8.1 | 08 January 2017, 11:14:39 UTC |
290fb35 | Anthony Dmitriyev | 08 January 2017, 11:11:17 UTC | Merge pull request #676 from antstorm/fix-frozen-money-issue Rollback #666 + different caching solution | 08 January 2017, 11:11:17 UTC |
3450314 | Anthony Dmitriyev | 07 January 2017, 19:20:47 UTC | Rollback #666 + different caching solution | 07 January 2017, 19:20:47 UTC |
ac88208 | Anthony Dmitriyev | 03 January 2017, 18:10:27 UTC | Update version to 6.8.0 | 03 January 2017, 18:10:27 UTC |