monetize 1.9.2 → 1.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e6d46a5e6d4c8b7e1dec430cfeb98a98536bb336
4
- data.tar.gz: 523799519e83fca200b5d813a0ca010ab2ae090e
2
+ SHA256:
3
+ metadata.gz: 9bf6700b6d319c454fcc18dc2ffd9414bd565d5797b456ffbe4db4bd16aa4d53
4
+ data.tar.gz: 11d999ec312805bed1f95b48f283d237785dffc6f64698a4b6c85f5a19f0d1d5
5
5
  SHA512:
6
- metadata.gz: a88d6ce931f8c0d37653c3067a76caa4be8f5adbc10d78e2c1ee5d8b8089163b38926506c5e1a3524192b3d7e745a22f1d48d9773570239ce11f5a0fc122ee1d
7
- data.tar.gz: d83465b93fdf95a3cb25ecfa805e694a775dab789766b046076948382cb01f64aeb78484b53e9afa60fd557a317fbfcd3ac51208559693c8196e9228a27c9ea6
6
+ metadata.gz: 14414941fae908b1ef3e00c6c421f9572cafb159287d78816484dc7c1444078a294a058d9b718b82ecf8a0656db1ecb3f2304c807890d65575a19728c8df5159
7
+ data.tar.gz: fa4bfdf4d423f36b36918d41bdb2e695e8b684c75e195445f01391a94c7d9610777241511a90b8a6165d03fb0fd1a32860e422b644825a80267187eeaa1390fc
@@ -1,15 +1,18 @@
1
1
  sudo: false
2
- language: ruby
2
+ language:
3
+ - ruby
4
+ - java
3
5
  rvm:
4
6
  - 1.9.3
5
7
  - 2.0.0
6
8
  - 2.1.10
7
9
  - 2.2.10
8
- - 2.3.7
9
- - 2.4.4
10
- - 2.5.1
11
- - 2.6.0
10
+ - 2.3.8
11
+ - 2.4.6
12
+ - 2.5.5
13
+ - 2.6.3
12
14
  - jruby-9.0.5.0
15
+ jdk: openjdk8
13
16
  before_install:
14
17
  - gem install bundler --version '~> 1.17'
15
18
  script: bundle exec rspec spec
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.3
4
+ - Fix input parsing when currency symbol after the amount
5
+
3
6
  ## 1.9.2
4
7
  - Respect Money.rounding_mode when parsing strings
5
8
  - Deprecate Monetize.extract_cents
@@ -153,7 +153,7 @@ module Monetize
153
153
  end
154
154
 
155
155
  def currency_symbol_regex
156
- /\A[\+|\-]?(?<symbol>#{regex_safe_symbols})/
156
+ /(?<symbol>#{regex_safe_symbols})/
157
157
  end
158
158
  end
159
159
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Monetize
4
- VERSION = '1.9.2'
4
+ VERSION = '1.9.3'
5
5
  end
@@ -70,6 +70,10 @@ describe Monetize do
70
70
  expect(Monetize.parse("#{symbol}#{amount_in_units}")).to eq Money.new(amount, iso_code)
71
71
  end
72
72
 
73
+ it "parses formatted inputs with #{iso_code} symbol is after the amount" do
74
+ expect(Monetize.parse("#{amount_in_units}#{symbol}")).to eq Money.new(amount, iso_code)
75
+ end
76
+
73
77
  context 'prefix' do
74
78
  it 'parses formatted inputs with plus sign and currency as a symbol' do
75
79
  expect(Monetize.parse("+#{symbol}#{amount_in_units}")).to eq Money.new(amount, iso_code)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monetize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-07-06 00:00:00.000000000 Z
12
+ date: 2020-01-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: money
@@ -122,8 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubyforge_project:
126
- rubygems_version: 2.6.8
125
+ rubygems_version: 3.0.3
127
126
  signing_key:
128
127
  specification_version: 4
129
128
  summary: A library for converting various objects into `Money` objects.