minting 1.9.0 → 1.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84b163ccea567387ace107bbb07ff1089217eade0bccc9b5272f53727c302220
4
- data.tar.gz: 646e33a6fe8cdb75e6b50cee77954413f9e074788fbc316eb08cba3f4d9d6591
3
+ metadata.gz: ab50e08056b726cc6c721cfc7443c6bddb0eed1ea488d869263a5c2964c3d408
4
+ data.tar.gz: c4e4fb240658b41d3d6ed4817c7ff0aa934797685553732aa7a9752423c54a04
5
5
  SHA512:
6
- metadata.gz: 9813ca14235c64e1893ec13dbd2b911450ab034084f93fbd02a19cac6d6c9b94e1e43c718724b6557b08f8a11bae855ae51f082c59b76432e60a9e069d075d2f
7
- data.tar.gz: 9f56372568a9b0004115181abd47ab2efc0ffc35723bf1037a579ce5830cb88ed0bd10d5bf17a65b26bc323697d38944b997eafc33bae6b6b94c7e238499ec09
6
+ metadata.gz: d4b45c5a5ccfad6d9008218a685b8982bd27e388b32dfd4847393548973eab9d2071bd8bad1141a89f11d3030f78ab816ffc6215a33c83167c46afe9678a982a
7
+ data.tar.gz: 3fb0f12ef494765945f22b4c6c8ad8a9cc59ef85fae47131d65614c9f585b680314a2af11182b32e75daf0fd1c74f223ea866d8fea9064e9a838a7dbb6b4bfbb
@@ -84,14 +84,14 @@ module Mint
84
84
  # "MAX 10.00 USD" where the first uppercase word isn't a currency code.
85
85
  # @private
86
86
  def parse_currency(input, currency = nil)
87
- currency = Currency.resolve(currency)
88
- return currency if currency
89
-
90
87
  input.scan(/\b([A-Z_]+)\b/) do |(code)|
91
- currency = Currency.for_code(code)
92
- return currency if currency
88
+ found = Currency.for_code(code)
89
+ return found if found
93
90
  end
94
91
 
95
- Registry.detect_currency(input)
92
+ found = Registry.detect_currency(input)
93
+ return found if found
94
+
95
+ Currency.resolve(currency)
96
96
  end
97
97
  end
@@ -3,5 +3,5 @@
3
3
  # Root namespace for the Minting library.
4
4
  module Minting
5
5
  # Current version of the Minting gem.
6
- VERSION = '1.9.0'
6
+ VERSION = '1.9.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilson Ferraz