monetize 0.4.1 → 1.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/lib/monetize/version.rb +1 -1
- data/monetize.gemspec +1 -1
- data/spec/core_extensions_spec.rb +2 -2
- data/spec/monetize_spec.rb +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6302730a9554cb777109e4b35eaaee0da9963dbf
|
4
|
+
data.tar.gz: ce9f0611782915a2aa0f788e2b9ad6a676c4dbaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 183e6584506fe0ff495c2d0d32ea6c3d208f16a9be9d01aec21d4d07f7d5c22218e29062aa09e82fa48d08e485ee8030f9b72d8f690ed3e2f3e83c98501362c3
|
7
|
+
data.tar.gz: 57b26b992ced6c627aa6c346a6c495e91cbef9d3faef1fd9578790346ec8488cb147c2f85d927a09fbda71575c8a844c9b7179667f89a01e5a5f271b29eb0252
|
data/lib/monetize/version.rb
CHANGED
data/monetize.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "money", "~> 6.
|
21
|
+
spec.add_dependency "money", "~> 6.4.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
@@ -29,7 +29,7 @@ describe Monetize, "core extensions" do
|
|
29
29
|
it "respects :subunit_to_unit currency property" do
|
30
30
|
expect(10.to_money('USD')).to eq Money.new(10_00, 'USD')
|
31
31
|
expect(10.to_money('TND')).to eq Money.new(10_000, 'TND')
|
32
|
-
expect(10.to_money('
|
32
|
+
expect(10.to_money('JPY')).to eq Money.new(10, 'JPY')
|
33
33
|
end
|
34
34
|
|
35
35
|
specify "GH-15" do
|
@@ -124,7 +124,7 @@ describe Monetize, "core extensions" do
|
|
124
124
|
it "respects :subunit_to_unit currency property" do
|
125
125
|
expect("1".to_money("USD")).to eq Money.new(1_00, "USD")
|
126
126
|
expect("1".to_money("TND")).to eq Money.new(1_000, "TND")
|
127
|
-
expect("1".to_money("
|
127
|
+
expect("1".to_money("JPY")).to eq Money.new(1, "JPY")
|
128
128
|
expect("1.5".to_money("KWD").cents).to eq 1500
|
129
129
|
end
|
130
130
|
end
|
data/spec/monetize_spec.rb
CHANGED
@@ -189,7 +189,7 @@ describe Monetize do
|
|
189
189
|
it "respects :subunit_to_unit currency property" do
|
190
190
|
expect(Monetize.from_string("1", "USD")).to eq Money.new(1_00, "USD")
|
191
191
|
expect(Monetize.from_string("1", "TND")).to eq Money.new(1_000, "TND")
|
192
|
-
expect(Monetize.from_string("1", "
|
192
|
+
expect(Monetize.from_string("1", "JPY")).to eq Money.new(1, "JPY")
|
193
193
|
end
|
194
194
|
|
195
195
|
it "accepts a currency options" do
|
@@ -214,7 +214,7 @@ describe Monetize do
|
|
214
214
|
it "should respect :subunit_to_unit currency property" do
|
215
215
|
expect(Monetize.from_fixnum(1, "USD")).to eq Money.new(1_00, "USD")
|
216
216
|
expect(Monetize.from_fixnum(1, "TND")).to eq Money.new(1_000, "TND")
|
217
|
-
expect(Monetize.from_fixnum(1, "
|
217
|
+
expect(Monetize.from_fixnum(1, "JPY")).to eq Money.new(1, "JPY")
|
218
218
|
end
|
219
219
|
|
220
220
|
it "accepts a currency options" do
|
@@ -239,7 +239,7 @@ describe Monetize do
|
|
239
239
|
it "respects :subunit_to_unit currency property" do
|
240
240
|
expect(Monetize.from_float(1.2, "USD")).to eq Money.new(1_20, "USD")
|
241
241
|
expect(Monetize.from_float(1.2, "TND")).to eq Money.new(1_200, "TND")
|
242
|
-
expect(Monetize.from_float(1.2, "
|
242
|
+
expect(Monetize.from_float(1.2, "JPY")).to eq Money.new(1, "JPY")
|
243
243
|
end
|
244
244
|
|
245
245
|
it "accepts a currency options" do
|
@@ -264,7 +264,7 @@ describe Monetize do
|
|
264
264
|
it "respects :subunit_to_unit currency property" do
|
265
265
|
expect(Monetize.from_bigdecimal(BigDecimal.new("1"), "USD")).to eq Money.new(1_00, "USD")
|
266
266
|
expect(Monetize.from_bigdecimal(BigDecimal.new("1"), "TND")).to eq Money.new(1_000, "TND")
|
267
|
-
expect(Monetize.from_bigdecimal(BigDecimal.new("1"), "
|
267
|
+
expect(Monetize.from_bigdecimal(BigDecimal.new("1"), "JPY")).to eq Money.new(1, "JPY")
|
268
268
|
end
|
269
269
|
|
270
270
|
it "accepts a currency options" do
|
@@ -317,7 +317,7 @@ describe Monetize do
|
|
317
317
|
it "respects :subunit_to_unit currency property" do
|
318
318
|
expect(Monetize.from_numeric(1, "USD")).to eq Money.new(1_00, "USD")
|
319
319
|
expect(Monetize.from_numeric(1, "TND")).to eq Money.new(1_000, "TND")
|
320
|
-
expect(Monetize.from_numeric(1, "
|
320
|
+
expect(Monetize.from_numeric(1, "JPY")).to eq Money.new(1, "JPY")
|
321
321
|
end
|
322
322
|
|
323
323
|
it "accepts a bank option" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monetize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: money
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.
|
19
|
+
version: 6.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.
|
26
|
+
version: 6.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|