money_helper 1.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +47 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +18 -8
- data/README.md +22 -16
- data/RELEASING.md +8 -4
- data/lib/money_helper.rb +33 -28
- data/lib/version.rb +1 -1
- data/money_helper.gemspec +1 -1
- data/spec/money_helper_spec.rb +188 -159
- metadata +11 -11
- data/.travis.yml +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df602a2214fc58f6ccf9041f9cce6cc87ba22609f6d8314b6a497b5802de48ff
|
4
|
+
data.tar.gz: 46e3888d004f525559bf11b657e7cb504eb9c12f5dcaed61a56b18f1469a1e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b5f70766be6b1091e40266cb5c3cbcb34d0457e37511e60537935bc4408dada70693d0141e3c95840894f3a3d34658a99cd1354c413b58c97484047448dcecc
|
7
|
+
data.tar.gz: 7eb7051305203fed98bed96d14c2651c989fc498c58859802a85bdd26e7dda11792cef78ad9c0290530b3cd7bd69d4c94c2664cfc0bb4f487584c68e86016e25
|
@@ -0,0 +1,47 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
references:
|
4
|
+
set_env: &set_env
|
5
|
+
run:
|
6
|
+
name: Set up environment
|
7
|
+
command: |
|
8
|
+
echo "export BUNDLE_GEMFILE=$(pwd)/gemfiles/activesupport_$ACTIVESUPPORT_VERSION.gemfile" >> $BASH_ENV
|
9
|
+
bundle: &bundle
|
10
|
+
run:
|
11
|
+
name: Install dependencies
|
12
|
+
command: bundle install
|
13
|
+
test: &test
|
14
|
+
run:
|
15
|
+
name: Run test suite
|
16
|
+
command: bundle exec rake
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
test:
|
20
|
+
docker:
|
21
|
+
- image: "cimg/ruby:<< parameters.ruby_version >>"
|
22
|
+
parameters:
|
23
|
+
ruby_version:
|
24
|
+
type: string
|
25
|
+
activesupport_version:
|
26
|
+
type: string
|
27
|
+
environment:
|
28
|
+
ACTIVESUPPORT_VERSION: << parameters.activesupport_version >>
|
29
|
+
steps:
|
30
|
+
- checkout
|
31
|
+
- <<: *set_env
|
32
|
+
- <<: *bundle
|
33
|
+
- <<: *test
|
34
|
+
|
35
|
+
workflows:
|
36
|
+
default:
|
37
|
+
jobs:
|
38
|
+
- test:
|
39
|
+
matrix:
|
40
|
+
parameters:
|
41
|
+
ruby_version: ["2.5", "2.6", "2.7"]
|
42
|
+
activesupport_version: ["40", "41", "42", "50", "51", "52", "edge"]
|
43
|
+
exclude:
|
44
|
+
- ruby_version: "2.5"
|
45
|
+
activesupport_version: "edge"
|
46
|
+
- ruby_version: "2.6"
|
47
|
+
activesupport_version: "edge"
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,39 +1,49 @@
|
|
1
|
-
###
|
1
|
+
### 2.0.1 (Next)
|
2
|
+
|
3
|
+
* Your contribution here.
|
4
|
+
|
5
|
+
### 2.0.0 (2021-09-20)
|
6
|
+
|
7
|
+
#### Breaking Changes
|
8
|
+
|
9
|
+
* [#20](https://github.com/artsy/money_helper/pull/20): Update `money_to_text` and `money_range_to_text` to expect amounts in minor unit and simplify formatting; drop support for Ruby 2.3 and 2.4 - [@starsirius](https://github.com/starsirius)
|
10
|
+
|
11
|
+
### 1.0.2 (2019-04-19)
|
2
12
|
|
3
13
|
* [#16](https://github.com/artsy/money_helper/pull/16): Remove deprecation warnings - [@sweir27](https://github.com/sweir27).
|
4
14
|
* [#15](https://github.com/artsy/money_helper/pull/15): Added Rubocop - [@dblock](https://github.com/dblock).
|
5
15
|
|
6
|
-
### 1.0.1 (2017
|
16
|
+
### 1.0.1 (2017-04-03)
|
7
17
|
|
8
18
|
* Relaxed activesupport version dependency - [@dblock](https://github.com/dblock).
|
9
19
|
* The `money_to_text` method now takes options - [@mzikherman](https://github.com/mzikherman).
|
10
20
|
* Added `symbol_with_optional_iso_code` - [@mzikherman](https://github.com/mzikherman).
|
11
21
|
|
12
|
-
### 1.0.0 (2015
|
22
|
+
### 1.0.0 (2015-03-07)
|
13
23
|
|
14
24
|
* Added compatibility with Money 6.5.1+, including new currency symbols - [@syakhmi](https://github.com/syakhmi).
|
15
25
|
|
16
|
-
### 0.0.5 (2014
|
26
|
+
### 0.0.5 (2014-04-12)
|
17
27
|
|
18
28
|
* Added compatibility with Money 6.1+ - [@syakhmi](https://github.com/syakhmi).
|
19
29
|
* Dropped support for pre 6.0 versions of Money - [@syakhmi](https://github.com/syakhmi).
|
20
30
|
|
21
|
-
### 0.0.4 (2014
|
31
|
+
### 0.0.4 (2014-01-08)
|
22
32
|
|
23
33
|
* Added compatibility with Money 6.x - [@dblock](https://github.com/dblock).
|
24
34
|
* Avoid failing on deprecated currencies (such as ITL) - [@joeyAghion](https://github.com/joeyAghion).
|
25
35
|
|
26
|
-
### 0.0.3 (2013
|
36
|
+
### 0.0.3 (2013-07-17)
|
27
37
|
|
28
38
|
* Added support for currencies that don't have a symbol, eg. Uzbekistan Som (UZS) - [@dblock](https://github.com/dblock).
|
29
39
|
|
30
|
-
### 0.0.2 (2013
|
40
|
+
### 0.0.2 (2013-07-16)
|
31
41
|
|
32
42
|
* Added unit tests - [@syakhmi](https://github.com/syakhmi).
|
33
43
|
* Added support for Cambodian riel - [@syakhmi](https://github.com/syakhmi).
|
34
44
|
* Added dependencies to gemspec - [@syakhmi](https://github.com/syakhmi).
|
35
45
|
* Now defaults to USD when currency not specified - [@syakhmi](https://github.com/syakhmi).
|
36
46
|
|
37
|
-
### 0.0.1 (2013
|
47
|
+
### 0.0.1 (2013-07-12)
|
38
48
|
|
39
49
|
* Initial public release - [@syakhmi](https://github.com/syakhmi).
|
data/README.md
CHANGED
@@ -1,34 +1,31 @@
|
|
1
|
-
MoneyHelper
|
1
|
+
MoneyHelper [![CircleCI][ci_badge]][circleci]
|
2
2
|
============
|
3
3
|
|
4
4
|
A simple module to assist in formatting unambiguous prices and price ranges in international currencies in a Roman Script environment.
|
5
5
|
|
6
|
-
[![Build Status](https://travis-ci.org/artsy/money_helper.svg?branch=master)](https://travis-ci.org/artsy/money_helper)
|
7
|
-
|
8
6
|
Usage
|
9
7
|
-----
|
10
8
|
|
11
9
|
Examples:
|
12
10
|
|
13
11
|
``` ruby
|
14
|
-
money_to_text(10000, 'AUD')
|
15
|
-
|
16
|
-
produces "AUD $10,000"
|
12
|
+
money_to_text(10000, currency: 'AUD')
|
13
|
+
#=> 'AUD $100.00'
|
17
14
|
|
18
|
-
|
19
|
-
|
20
|
-
```
|
21
|
-
produces "10,000"
|
15
|
+
money_to_text(10000, currency: 'AUD', with_currency: false, with_symbol: false)
|
16
|
+
#=> '100.00'
|
22
17
|
|
23
|
-
|
24
|
-
|
18
|
+
money_range_to_text(10000, 40000, currency: 'AUD')
|
19
|
+
#=> 'AUD $100.00 - 400.00'
|
20
|
+
|
21
|
+
money_range_to_text(10000, 40000, currency: 'AUD', delimiter: ' ... ')
|
22
|
+
#=> 'AUD $100.00 ... 400.00'
|
25
23
|
```
|
26
|
-
produces: "AUD $10,000 ... 40,000"
|
27
24
|
|
28
25
|
Defaults
|
29
26
|
--------
|
30
27
|
|
31
|
-
As of [#16]
|
28
|
+
As of [#16][#16] this library explicitly specifies the `Money.locale_backend = :currency` default.
|
32
29
|
|
33
30
|
Contributing
|
34
31
|
------------
|
@@ -38,6 +35,15 @@ Fork the project. Make your feature addition or bug fix with tests. Send a pull
|
|
38
35
|
Copyright and License
|
39
36
|
---------------------
|
40
37
|
|
41
|
-
MIT License, see [LICENSE]
|
38
|
+
MIT License, see [LICENSE][license] for details.
|
39
|
+
|
40
|
+
(c) 2013-2018 [Artsy][artsy], [Sahil Yakhmi][sahil_yakhmi], [Joey Aghion][joey_aghion] and [contributors][contributors].
|
42
41
|
|
43
|
-
|
42
|
+
[ci_badge]: https://circleci.com/gh/artsy/money_helper/tree/master.svg?style=shield
|
43
|
+
[circleci]: https://circleci.com/gh/artsy/money_helper/tree/master
|
44
|
+
[#16]: https://github.com/artsy/money_helper/pull/16
|
45
|
+
[license]: LICENSE.md
|
46
|
+
[artsy]: https://github.com/artsy
|
47
|
+
[sahil_yakhmi]: https://github.com/syakhmi
|
48
|
+
[joey_aghion]: https://github.com/joeyAghion
|
49
|
+
[contributors]: CHANGELOG.md
|
data/RELEASING.md
CHANGED
@@ -11,9 +11,9 @@ bundle install
|
|
11
11
|
rake
|
12
12
|
```
|
13
13
|
|
14
|
-
Check that the last build succeeded
|
14
|
+
Check that the last build succeeded on [CI][ci] for all supported platforms.
|
15
15
|
|
16
|
-
Change "Next" in [CHANGELOG.md]
|
16
|
+
Change "Next" in [CHANGELOG.md][changelog] to the current date.
|
17
17
|
|
18
18
|
```
|
19
19
|
### 0.2.2 (2015/7/10)
|
@@ -42,7 +42,7 @@ Pushed money_helper 0.2.2 to rubygems.org.
|
|
42
42
|
|
43
43
|
### Prepare for the Next Version
|
44
44
|
|
45
|
-
Add the next release to [CHANGELOG.md]
|
45
|
+
Add the next release to [CHANGELOG.md][changelog].
|
46
46
|
|
47
47
|
```
|
48
48
|
### 0.2.3 (Next)
|
@@ -50,7 +50,7 @@ Add the next release to [CHANGELOG.md](CHANGELOG.md).
|
|
50
50
|
* Your contribution here.
|
51
51
|
```
|
52
52
|
|
53
|
-
Increment the third version number in [lib/version.rb]
|
53
|
+
Increment the third version number in [lib/version.rb][version].
|
54
54
|
|
55
55
|
Commit your changes.
|
56
56
|
|
@@ -59,3 +59,7 @@ git add CHANGELOG.md lib/version.rb
|
|
59
59
|
git commit -m "Preparing for next development iteration, 0.2.3."
|
60
60
|
git push origin master
|
61
61
|
```
|
62
|
+
|
63
|
+
[ci]: https://circleci.com/gh/artsy/money_helper/tree/master
|
64
|
+
[changelog]: CHANGELOG.md
|
65
|
+
[version]: lib/version.rb
|
data/lib/money_helper.rb
CHANGED
@@ -18,25 +18,28 @@ module MoneyHelper
|
|
18
18
|
#
|
19
19
|
# = Example
|
20
20
|
#
|
21
|
-
#
|
21
|
+
# MoneyHelper.money_to_text(30_175_93, currency: 'USD') #=> 'USD $30,175.93'
|
22
|
+
# MoneyHelper.money_to_text(30_175_93, currency: 'EUR') #=> 'EUR €30.175,93'
|
23
|
+
# MoneyHelper.money_to_text(30_175_93) #=> 'USD $30,175.93'
|
22
24
|
#
|
23
25
|
# = Arguments
|
24
26
|
#
|
25
|
-
#
|
26
|
-
# currency: (String)
|
27
|
-
#
|
28
|
-
#
|
29
|
-
def self.money_to_text(
|
30
|
-
return
|
27
|
+
# amount_minor: (Integer) amount in minor unit
|
28
|
+
# currency: (String) optional ISO currency code, defaulting to USD
|
29
|
+
# with_currency: (Boolean) optional flag to include ISO currency code, defaulting to true
|
30
|
+
# with_symbol: (Boolean) optional flag to include currency symbol, defaulting to true
|
31
|
+
def self.money_to_text(amount_minor, currency: 'USD', with_currency: true, with_symbol: true)
|
32
|
+
return '' if amount_minor.blank?
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
money_options = {
|
35
|
+
format: '%u%n',
|
36
|
+
symbol: with_symbol
|
37
|
+
}
|
38
|
+
|
39
|
+
formatted_amount = Money.new(amount_minor, currency).format(money_options)
|
40
|
+
formatted_currency = with_currency ? currency.upcase : ''
|
41
|
+
|
42
|
+
"#{formatted_currency} #{formatted_amount}".strip
|
40
43
|
end
|
41
44
|
|
42
45
|
def self.symbol_with_optional_iso_code(currency = 'USD')
|
@@ -55,28 +58,30 @@ module MoneyHelper
|
|
55
58
|
#
|
56
59
|
# = Example
|
57
60
|
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
61
|
+
# MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'USD') #=> 'USD $30,175.93 - 40,983.27'
|
62
|
+
# MoneyHelper.money_range_to_text(30_175_93, 40_983_27) #=> 'USD $30,175.93 - 40,983.27'
|
63
|
+
# MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'EUR') #=> 'EUR €30.175,93 - 40.983,27'
|
64
|
+
# MoneyHelper.money_range_to_text(30_175_93, 40_983_27, delimiter: ' ... ') #=> 'USD $30,175.93 ... 40,983.27'
|
62
65
|
#
|
63
66
|
# = Arguments
|
64
67
|
#
|
65
|
-
# low: (
|
66
|
-
# high: (
|
67
|
-
# currency: (String)
|
68
|
+
# low: (Integer) amount in minor unit
|
69
|
+
# high: (Integer) amount in minor unit
|
70
|
+
# currency: (String) optional ISO currency code, defaulting to USD
|
68
71
|
# delimiter: (String) optional
|
69
|
-
def self.money_range_to_text(low, high, currency, delimiter
|
72
|
+
def self.money_range_to_text(low, high, currency: 'USD', delimiter: ' - ')
|
70
73
|
if low.blank? && high.blank?
|
71
|
-
|
74
|
+
''
|
72
75
|
elsif low.blank?
|
73
|
-
'Under ' + money_to_text(high, currency)
|
76
|
+
'Under ' + money_to_text(high, currency: currency)
|
74
77
|
elsif high.blank?
|
75
|
-
money_to_text(low, currency) + ' and up'
|
78
|
+
money_to_text(low, currency: currency) + ' and up'
|
76
79
|
elsif low == high
|
77
|
-
money_to_text(low, currency)
|
80
|
+
money_to_text(low, currency: currency)
|
78
81
|
else
|
79
|
-
|
82
|
+
formatted_low = money_to_text(low, currency: currency)
|
83
|
+
formatted_high = money_to_text(high, currency: currency, with_currency: false, with_symbol: false)
|
84
|
+
[formatted_low, formatted_high].compact.join(delimiter)
|
80
85
|
end
|
81
86
|
end
|
82
87
|
|
data/lib/version.rb
CHANGED
data/money_helper.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.require_paths = ['lib']
|
16
16
|
s.homepage = 'https://github.com/artsy/money_helper'
|
17
17
|
s.add_dependency('activesupport')
|
18
|
-
s.add_dependency('money', '
|
18
|
+
s.add_dependency('money', '6.16.0')
|
19
19
|
s.add_development_dependency('appraisal')
|
20
20
|
s.add_development_dependency('rspec', '~> 3')
|
21
21
|
s.licenses = ['MIT']
|
data/spec/money_helper_spec.rb
CHANGED
@@ -2,152 +2,168 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe MoneyHelper do
|
4
4
|
describe 'money_to_text' do
|
5
|
-
it 'includes
|
6
|
-
expect(MoneyHelper.money_to_text(
|
7
|
-
expect(MoneyHelper.money_to_text(
|
8
|
-
expect(MoneyHelper.money_to_text(
|
9
|
-
expect(MoneyHelper.money_to_text(
|
10
|
-
expect(MoneyHelper.money_to_text(
|
11
|
-
|
12
|
-
|
13
|
-
expect(MoneyHelper.money_to_text(
|
14
|
-
expect(MoneyHelper.money_to_text(
|
15
|
-
expect(MoneyHelper.money_to_text(
|
16
|
-
expect(MoneyHelper.money_to_text(
|
17
|
-
expect(MoneyHelper.money_to_text(
|
18
|
-
expect(MoneyHelper.money_to_text(
|
19
|
-
expect(MoneyHelper.money_to_text(
|
20
|
-
expect(MoneyHelper.money_to_text(
|
21
|
-
expect(MoneyHelper.money_to_text(
|
22
|
-
expect(MoneyHelper.money_to_text(
|
23
|
-
expect(MoneyHelper.money_to_text(
|
24
|
-
expect(MoneyHelper.money_to_text(
|
25
|
-
expect(MoneyHelper.money_to_text(
|
26
|
-
expect(MoneyHelper.money_to_text(
|
27
|
-
expect(MoneyHelper.money_to_text(
|
28
|
-
expect(MoneyHelper.money_to_text(
|
29
|
-
expect(MoneyHelper.money_to_text(
|
30
|
-
expect(MoneyHelper.money_to_text(
|
31
|
-
expect(MoneyHelper.money_to_text(
|
32
|
-
expect(MoneyHelper.money_to_text(
|
33
|
-
expect(MoneyHelper.money_to_text(
|
34
|
-
expect(MoneyHelper.money_to_text(
|
35
|
-
expect(MoneyHelper.money_to_text(
|
36
|
-
expect(MoneyHelper.money_to_text(
|
37
|
-
|
38
|
-
expect(MoneyHelper.money_to_text(
|
39
|
-
|
40
|
-
expect(MoneyHelper.money_to_text(
|
41
|
-
expect(MoneyHelper.money_to_text(
|
42
|
-
expect(MoneyHelper.money_to_text(
|
43
|
-
|
44
|
-
expect(MoneyHelper.money_to_text(
|
45
|
-
|
46
|
-
expect(MoneyHelper.money_to_text(
|
47
|
-
expect(MoneyHelper.money_to_text(
|
48
|
-
|
49
|
-
expect(MoneyHelper.money_to_text(
|
50
|
-
expect(MoneyHelper.money_to_text(
|
51
|
-
|
52
|
-
expect(MoneyHelper.money_to_text(
|
53
|
-
expect(MoneyHelper.money_to_text(
|
54
|
-
expect(MoneyHelper.money_to_text(
|
55
|
-
expect(MoneyHelper.money_to_text(
|
56
|
-
|
57
|
-
expect(MoneyHelper.money_to_text(
|
58
|
-
|
59
|
-
|
60
|
-
expect(MoneyHelper.money_to_text(
|
61
|
-
|
62
|
-
|
63
|
-
expect(MoneyHelper.money_to_text(
|
64
|
-
|
65
|
-
|
66
|
-
expect(MoneyHelper.money_to_text(
|
67
|
-
|
68
|
-
expect(MoneyHelper.money_to_text(
|
69
|
-
expect(MoneyHelper.money_to_text(
|
70
|
-
|
71
|
-
expect(MoneyHelper.money_to_text(
|
72
|
-
|
73
|
-
|
74
|
-
expect(MoneyHelper.money_to_text(
|
75
|
-
expect(MoneyHelper.money_to_text(
|
76
|
-
expect(MoneyHelper.money_to_text(
|
77
|
-
expect(MoneyHelper.money_to_text(
|
78
|
-
expect(MoneyHelper.money_to_text(
|
79
|
-
expect(MoneyHelper.money_to_text(
|
80
|
-
expect(MoneyHelper.money_to_text(
|
81
|
-
expect(MoneyHelper.money_to_text(
|
82
|
-
expect(MoneyHelper.money_to_text(
|
83
|
-
expect(MoneyHelper.money_to_text(
|
84
|
-
expect(MoneyHelper.money_to_text(
|
85
|
-
expect(MoneyHelper.money_to_text(
|
86
|
-
expect(MoneyHelper.money_to_text(
|
87
|
-
expect(MoneyHelper.money_to_text(
|
88
|
-
expect(MoneyHelper.money_to_text(
|
89
|
-
expect(MoneyHelper.money_to_text(
|
90
|
-
expect(MoneyHelper.money_to_text(
|
91
|
-
expect(MoneyHelper.money_to_text(
|
92
|
-
expect(MoneyHelper.money_to_text(
|
93
|
-
expect(MoneyHelper.money_to_text(
|
94
|
-
expect(MoneyHelper.money_to_text(
|
95
|
-
expect(MoneyHelper.money_to_text(
|
96
|
-
expect(MoneyHelper.money_to_text(
|
97
|
-
expect(MoneyHelper.money_to_text(
|
98
|
-
expect(MoneyHelper.money_to_text(
|
99
|
-
expect(MoneyHelper.money_to_text(
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
expect(MoneyHelper.money_to_text(
|
105
|
-
end
|
106
|
-
|
107
|
-
|
108
|
-
expect(MoneyHelper.money_to_text(
|
109
|
-
expect(MoneyHelper.money_to_text(
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
expect(MoneyHelper.money_to_text(
|
114
|
-
expect(MoneyHelper.money_to_text(
|
115
|
-
expect(MoneyHelper.money_to_text(
|
116
|
-
expect(MoneyHelper.money_to_text(
|
117
|
-
expect(MoneyHelper.money_to_text(
|
118
|
-
expect(MoneyHelper.money_to_text(
|
119
|
-
expect(MoneyHelper.money_to_text(
|
120
|
-
expect(MoneyHelper.money_to_text(
|
121
|
-
expect(MoneyHelper.money_to_text(
|
122
|
-
expect(MoneyHelper.money_to_text(
|
123
|
-
expect(MoneyHelper.money_to_text(
|
124
|
-
expect(MoneyHelper.money_to_text(
|
125
|
-
expect(MoneyHelper.money_to_text(
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
expect(MoneyHelper.money_to_text(
|
135
|
-
expect(MoneyHelper.money_to_text(
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
expect(MoneyHelper.money_to_text(
|
144
|
-
expect(MoneyHelper.money_to_text(
|
145
|
-
end
|
146
|
-
|
147
|
-
|
148
|
-
expect(MoneyHelper.money_to_text(
|
5
|
+
it 'includes ISO code and symbol' do
|
6
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AUD')).to eql('AUD $30,175.93')
|
7
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ARS')).to eql('ARS $30.175,93')
|
8
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BBD')).to eql('BBD $30,175.93')
|
9
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BMD')).to eql('BMD $30,175.93')
|
10
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BND')).to eql('BND $30,175.93')
|
11
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BSD')).to eql('BSD $30,175.93')
|
12
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BZD')).to eql('BZD $30,175.93')
|
13
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CAD')).to eql('CAD $30,175.93')
|
14
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CLP')).to eql('CLP $3.017.593')
|
15
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'COP')).to eql('COP $30.175,93')
|
16
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CUC')).to eql('CUC $30,175.93')
|
17
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CUP')).to eql('CUP $30,175.93')
|
18
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'DOP')).to eql('DOP $30,175.93')
|
19
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'FJD')).to eql('FJD $30,175.93')
|
20
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GYD')).to eql('GYD $30,175.93')
|
21
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'HKD')).to eql('HKD $30,175.93')
|
22
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'JMD')).to eql('JMD $30,175.93')
|
23
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'KYD')).to eql('KYD $30,175.93')
|
24
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'LRD')).to eql('LRD $30,175.93')
|
25
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MXN')).to eql('MXN $30,175.93')
|
26
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'NAD')).to eql('NAD $30,175.93')
|
27
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'NZD')).to eql('NZD $30,175.93')
|
28
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SBD')).to eql('SBD $30,175.93')
|
29
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SGD')).to eql('SGD $30,175.93')
|
30
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SRD')).to eql('SRD $30,175.93')
|
31
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TWD')).to eql('TWD $30,175.93')
|
32
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TTD')).to eql('TTD $30,175.93')
|
33
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'UYU')).to eql('UYU $U30.175,93')
|
34
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'USD')).to eql('USD $30,175.93')
|
35
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'XCD')).to eql('XCD $30,175.93')
|
36
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ZWL')).to eql('ZWL $30,175.93')
|
37
|
+
|
38
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EUR')).to eql('EUR €30.175,93')
|
39
|
+
|
40
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'FKP')).to eql('FKP £30,175.93')
|
41
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GBP')).to eql('GBP £30,175.93')
|
42
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GIP')).to eql('GIP £30,175.93')
|
43
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SDG')).to eql('SDG £30,175.93')
|
44
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SHP')).to eql('SHP £30,175.93')
|
45
|
+
|
46
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CNY')).to eql('CNY ¥30,175.93')
|
47
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'JPY')).to eql('JPY ¥3,017,593')
|
48
|
+
|
49
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ALL')).to eql('ALL L30,175.93')
|
50
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'HNL')).to eql('HNL L30,175.93')
|
51
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'LSL')).to eql('LSL L30,175.93')
|
52
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MDL')).to eql('MDL L30,175.93')
|
53
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MYR')).to eql('MYR RM30,175.93')
|
54
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'RON')).to eql('RON Lei30.175,93')
|
55
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SZL')).to eql('SZL E30,175.93')
|
56
|
+
|
57
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ANG')).to eql('ANG ƒ30.175,93')
|
58
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AWG')).to eql('AWG ƒ30,175.93')
|
59
|
+
|
60
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BWP')).to eql('BWP P30,175.93')
|
61
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MOP')).to eql('MOP P30,175.93')
|
62
|
+
|
63
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'CRC')).to eql('CRC ₡30.175,93')
|
64
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SVC')).to eql('SVC ₡30,175.93')
|
65
|
+
|
66
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MUR')).to eql('MUR ₨30,175.93')
|
67
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'NPR')).to eql('NPR Rs.30,175.93')
|
68
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'PKR')).to eql('PKR ₨30,175.93')
|
69
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SCR')).to eql('SCR ₨30,175.93')
|
70
|
+
|
71
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AMD')).to eql('AMD դր.30,175.93')
|
72
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BDT')).to eql('BDT ৳30,175.93')
|
73
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BRL')).to eql('BRL R$30.175,93')
|
74
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GEL')).to eql('GEL ლ30,175.93')
|
75
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GHS')).to eql('GHS ₵30,175.93')
|
76
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GMD')).to eql('GMD D30,175.93')
|
77
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'GTQ')).to eql('GTQ Q30,175.93')
|
78
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'HTG')).to eql('HTG G30,175.93')
|
79
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'IDR')).to eql('IDR Rp30.175,93')
|
80
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ILS')).to eql('ILS ₪30,175.93')
|
81
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'INR')).to eql('INR ₹30,175.93')
|
82
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'KHR')).to eql('KHR ៛30,175.93')
|
83
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'KPW')).to eql('KPW ₩30,175.93')
|
84
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'LAK')).to eql('LAK ₭30,175.93')
|
85
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MNT')).to eql('MNT ₮30,175.93')
|
86
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'NGN')).to eql('NGN ₦30,175.93')
|
87
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'NIO')).to eql('NIO C$30,175.93')
|
88
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'PGK')).to eql('PGK K30,175.93')
|
89
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'PHP')).to eql('PHP ₱30,175.93')
|
90
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'PYG')).to eql('PYG ₲3,017,593')
|
91
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'RUB')).to eql('RUB ₽30.175,93')
|
92
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'THB')).to eql('THB ฿30,175.93')
|
93
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TMT')).to eql('TMT T30,175.93')
|
94
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TOP')).to eql('TOP T$30,175.93')
|
95
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TRY')).to eql('TRY ₺30.175,93')
|
96
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'UAH')).to eql('UAH ₴30,175.93')
|
97
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'VND')).to eql('VND ₫3.017.593')
|
98
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'WST')).to eql('WST T30,175.93')
|
99
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'ZAR')).to eql('ZAR R30,175.93')
|
100
|
+
end
|
101
|
+
|
102
|
+
it "respects currency's thousands separator and decimal mark" do
|
103
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'USD')).to eql('USD $30,175.93')
|
104
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EUR')).to eql('EUR €30.175,93')
|
105
|
+
end
|
106
|
+
|
107
|
+
it "converts from currency's minor unit to major unit" do
|
108
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'USD')).to eql('USD $30,175.93')
|
109
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'JPY')).to eql('JPY ¥3,017,593')
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'displays LTR for RTL symbols' do
|
113
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AFN')).to eql('AFN ؋30,175.93')
|
114
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'DZD')).to eql('DZD د.ج30,175.93')
|
115
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'BHD')).to eql('BHD د.ب3,017.593')
|
116
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EGP')).to eql('EGP ج.م30,175.93')
|
117
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'IRR')).to eql('IRR ﷼30,175.93')
|
118
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'IQD')).to eql('IQD ع.د3,017.593')
|
119
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'JOD')).to eql('JOD د.ا3,017.593')
|
120
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'LYD')).to eql('LYD ل.د3,017.593')
|
121
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'MAD')).to eql('MAD د.م.30,175.93')
|
122
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'QAR')).to eql('QAR ر.ق30,175.93')
|
123
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'SYP')).to eql('SYP £S30,175.93')
|
124
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'TND')).to eql('TND د.ت3,017.593')
|
125
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AED')).to eql('AED د.إ30,175.93')
|
126
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'YER')).to eql('YER ﷼30,175.93')
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'defaults to USD' do
|
130
|
+
expect(MoneyHelper.money_to_text(30_175_93)).to eql('USD $30,175.93')
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'omits ISO code when with_currency is false' do
|
134
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EUR', with_currency: false)).to eql('€30.175,93')
|
135
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AUD', with_currency: false)).to eql('$30,175.93')
|
136
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AMD', with_currency: false)).to eql('դր.30,175.93')
|
137
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AFN', with_currency: false)).to eql('؋30,175.93')
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'omits symbol when with_symbol is false' do
|
141
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EUR', with_symbol: false)).to eql('EUR 30.175,93')
|
142
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AUD', with_symbol: false)).to eql('AUD 30,175.93')
|
143
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AMD', with_symbol: false)).to eql('AMD 30,175.93')
|
144
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AFN', with_symbol: false)).to eql('AFN 30,175.93')
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'omits ISO code and symbol when both with_currency and with_symbol are false' do
|
148
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'EUR', with_currency: false, with_symbol: false)).to eql('30.175,93')
|
149
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AUD', with_currency: false, with_symbol: false)).to eql('30,175.93')
|
150
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AMD', with_currency: false, with_symbol: false)).to eql('30,175.93')
|
151
|
+
expect(MoneyHelper.money_to_text(30_175_93, currency: 'AFN', with_currency: false, with_symbol: false)).to eql('30,175.93')
|
152
|
+
end
|
153
|
+
|
154
|
+
it 'returns an empty string if amount passed in is whitespace, empty string, or nil' do
|
155
|
+
expect(MoneyHelper.money_to_text(' ')).to eql('')
|
156
|
+
expect(MoneyHelper.money_to_text('')).to eql('')
|
157
|
+
expect(MoneyHelper.money_to_text(nil)).to eql('')
|
158
|
+
end
|
159
|
+
|
160
|
+
it "raises an exception when currency can't be found" do
|
161
|
+
expect do
|
162
|
+
MoneyHelper.money_to_text(30_175_93, currency: 'AAA')
|
163
|
+
end.to raise_error(Money::Currency::UnknownCurrency, "Unknown currency 'aaa'")
|
149
164
|
end
|
150
165
|
end
|
166
|
+
|
151
167
|
describe 'symbol_with_optional_iso_code' do
|
152
168
|
it 'just includes the symbol for USD GBP EUR and MYR' do
|
153
169
|
expect(MoneyHelper.symbol_with_optional_iso_code('EUR')).to eql('€')
|
@@ -155,51 +171,64 @@ describe MoneyHelper do
|
|
155
171
|
expect(MoneyHelper.symbol_with_optional_iso_code('MYR')).to eql('RM')
|
156
172
|
expect(MoneyHelper.symbol_with_optional_iso_code('USD')).to eql('$')
|
157
173
|
end
|
174
|
+
|
158
175
|
it 'includes the iso code as well for other currencies' do
|
159
176
|
expect(MoneyHelper.symbol_with_optional_iso_code('AUD')).to eql('AUD $')
|
160
177
|
expect(MoneyHelper.symbol_with_optional_iso_code('UZS')).to eql('UZS')
|
161
178
|
expect(MoneyHelper.symbol_with_optional_iso_code('JPY')).to eql('JPY ¥')
|
162
179
|
end
|
163
180
|
end
|
181
|
+
|
164
182
|
describe 'money_range_to_text' do
|
165
183
|
it 'includes no indicator for currency for the upper amount in range' do
|
166
|
-
expect(MoneyHelper.money_range_to_text(
|
167
|
-
expect(MoneyHelper.money_range_to_text(
|
168
|
-
expect(MoneyHelper.money_range_to_text(
|
169
|
-
expect(MoneyHelper.money_range_to_text(
|
184
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'USD')).to eql('USD $30,175.93 - 40,983.27')
|
185
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AUD')).to eql('AUD $30,175.93 - 40,983.27')
|
186
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AMD')).to eql('AMD դր.30,175.93 - 40,983.27')
|
187
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AFN')).to eql('AFN ؋30,175.93 - 40,983.27')
|
170
188
|
end
|
189
|
+
|
171
190
|
it 'uses the special range amount delimeter when supplied' do
|
172
|
-
expect(MoneyHelper.money_range_to_text(
|
173
|
-
expect(MoneyHelper.money_range_to_text(
|
174
|
-
expect(MoneyHelper.money_range_to_text(
|
175
|
-
expect(MoneyHelper.money_range_to_text(
|
191
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'USD', delimiter: '-')).to eql('USD $30,175.93-40,983.27')
|
192
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AUD', delimiter: '-')).to eql('AUD $30,175.93-40,983.27')
|
193
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AMD', delimiter: '-')).to eql('AMD դր.30,175.93-40,983.27')
|
194
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 40_983_27, currency: 'AFN', delimiter: '-')).to eql('AFN ؋30,175.93-40,983.27')
|
176
195
|
end
|
196
|
+
|
177
197
|
it "prefixes the text 'Under ' when low amount not given" do
|
178
|
-
expect(MoneyHelper.money_range_to_text(nil,
|
198
|
+
expect(MoneyHelper.money_range_to_text(nil, 40_983_27, currency: 'USD')).to eql('Under USD $40,983.27')
|
179
199
|
end
|
200
|
+
|
180
201
|
it "appends the text ' and up' when high amount not given" do
|
181
|
-
expect(MoneyHelper.money_range_to_text(
|
202
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, nil, currency: 'USD')).to eql('USD $30,175.93 and up')
|
182
203
|
end
|
204
|
+
|
183
205
|
it 'treats as a single price when low amount and high amount are identical' do
|
184
|
-
expect(MoneyHelper.money_range_to_text(
|
206
|
+
expect(MoneyHelper.money_range_to_text(30_175_93, 30_175_93, currency: 'USD')).to eql('USD $30,175.93')
|
185
207
|
end
|
186
|
-
|
187
|
-
|
208
|
+
|
209
|
+
it 'returns empty string when both amounts are nil' do
|
210
|
+
expect(MoneyHelper.money_range_to_text(nil, nil, currency: 'USD')).to eql('')
|
188
211
|
end
|
189
|
-
|
190
|
-
|
212
|
+
|
213
|
+
it "raises an exception when currency can't be found" do
|
214
|
+
expect do
|
215
|
+
MoneyHelper.money_range_to_text(10_000, 20_000, currency: 'ITL')
|
216
|
+
end.to raise_error(Money::Currency::UnknownCurrency, "Unknown currency 'itl'")
|
191
217
|
end
|
192
218
|
end
|
219
|
+
|
193
220
|
describe 'symbol_with_optional_iso_code' do
|
194
221
|
it 'returns the symbol only if currency is in SYMBOL_ONLY list' do
|
195
222
|
expect(MoneyHelper.symbol_with_optional_iso_code('EUR')).to eql('€')
|
196
223
|
expect(MoneyHelper.symbol_with_optional_iso_code('USD')).to eql('$')
|
197
224
|
end
|
225
|
+
|
198
226
|
it 'returns iso code and symbol if symbol is in OK_SYMBOLS' do
|
199
227
|
expect(MoneyHelper.symbol_with_optional_iso_code('INR')).to eql('INR ₹')
|
200
228
|
expect(MoneyHelper.symbol_with_optional_iso_code('KHR')).to eql('KHR ៛')
|
201
229
|
expect(MoneyHelper.symbol_with_optional_iso_code('KPW')).to eql('KPW ₩')
|
202
230
|
end
|
231
|
+
|
203
232
|
it 'returns only the iso code if symbol is not in OK_SYMBOLS' do
|
204
233
|
expect(MoneyHelper.symbol_with_optional_iso_code('CHF')).to eql('CHF')
|
205
234
|
expect(MoneyHelper.symbol_with_optional_iso_code('YER')).to eql('YER')
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sahil Yakhmi
|
8
8
|
- Joey Aghion
|
9
9
|
- Matt Zikherman
|
10
10
|
- Sarah Weir
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -31,16 +31,16 @@ dependencies:
|
|
31
31
|
name: money
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- -
|
34
|
+
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 6.16.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 6.16.0
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: appraisal
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,10 +76,10 @@ executables: []
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
+
- ".circleci/config.yml"
|
79
80
|
- ".gitignore"
|
80
81
|
- ".rubocop.yml"
|
81
82
|
- ".rubocop_todo.yml"
|
82
|
-
- ".travis.yml"
|
83
83
|
- Appraisals
|
84
84
|
- CHANGELOG.md
|
85
85
|
- Gemfile
|
@@ -104,7 +104,7 @@ homepage: https://github.com/artsy/money_helper
|
|
104
104
|
licenses:
|
105
105
|
- MIT
|
106
106
|
metadata: {}
|
107
|
-
post_install_message:
|
107
|
+
post_install_message:
|
108
108
|
rdoc_options: []
|
109
109
|
require_paths:
|
110
110
|
- lib
|
@@ -119,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: 1.3.6
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
123
|
-
signing_key:
|
122
|
+
rubygems_version: 3.1.4
|
123
|
+
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: MoneyHelper international price formatting utility.
|
126
126
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
cache: bundler
|
4
|
-
|
5
|
-
sudo: false
|
6
|
-
|
7
|
-
rvm:
|
8
|
-
- 2.3.4
|
9
|
-
- 2.4.1
|
10
|
-
- 2.5
|
11
|
-
- ruby-head
|
12
|
-
|
13
|
-
matrix:
|
14
|
-
allow_failures:
|
15
|
-
- rvm: ruby-head
|
16
|
-
include:
|
17
|
-
- rvm: 2.5
|
18
|
-
gemfile: gemfiles/activesupport_40.gemfile
|
19
|
-
- rvm: 2.5
|
20
|
-
gemfile: gemfiles/activesupport_41.gemfile
|
21
|
-
- rvm: 2.5
|
22
|
-
gemfile: gemfiles/activesupport_42.gemfile
|
23
|
-
- rvm: 2.5
|
24
|
-
gemfile: gemfiles/activesupport_50.gemfile
|
25
|
-
- rvm: 2.5
|
26
|
-
gemfile: gemfiles/activesupport_51.gemfile
|
27
|
-
- rvm: 2.5
|
28
|
-
gemfile: gemfiles/activesupport_52.gemfile
|
29
|
-
- rvm: 2.5
|
30
|
-
gemfile: gemfiles/activesupport_edge.gemfile
|