active_utils 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/active_utils.gemspec +1 -0
- data/lib/active_utils/common/currency_code.rb +1 -1
- data/lib/active_utils/version.rb +1 -1
- data/test/unit/currency_code_test.rb +6 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b00f2d802de8c5f0d2800bdf92537e6a1ebafc58
|
4
|
+
data.tar.gz: 3293fc88a4aa7581415ae8760b71bb68234285cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf3783cf1b0b5bd1fec5129e578cd3f3388149b5d01f2c909f0a7ba706e1f234a46e84b79d3d97c9c07b0385c3c44203060c553277a05e634898089bc9f2f99
|
7
|
+
data.tar.gz: 51019d8b03c160c82be259022b7a16123c2ab6133937754a59eefacf6478ed27df46cc511e5c9cebfcdab52210ad8980ef7261c20d7a4c81aa7ae9a37e130c5a
|
data/active_utils.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["developers@jadedpixel.com"]
|
11
11
|
s.homepage = "http://github.com/shopify/active_utils"
|
12
12
|
s.summary = %q{Common utils used by active_merchant, active_fulfillment, and active_shipping}
|
13
|
+
s.license = 'MIT'
|
13
14
|
|
14
15
|
s.rubyforge_project = "active_utils"
|
15
16
|
|
@@ -37,7 +37,7 @@ module ActiveMerchant
|
|
37
37
|
}
|
38
38
|
|
39
39
|
def self.standardize(code)
|
40
|
-
code = code.upcase
|
40
|
+
code = code.upcase unless code.nil?
|
41
41
|
|
42
42
|
return code if is_iso?(code)
|
43
43
|
NON_ISO_TO_ISO[code] || raise(InvalidCurrencyCodeError, "#{code} is not an ISO currency, nor can it be converted to one.")
|
data/lib/active_utils/version.rb
CHANGED
@@ -28,4 +28,10 @@ class CurrencyCodeTest < Test::Unit::TestCase
|
|
28
28
|
CurrencyCode.standardize('Not Real')
|
29
29
|
end
|
30
30
|
end
|
31
|
+
|
32
|
+
def test_nil_code_should_raise_InvalidCurrencyCodeError
|
33
|
+
assert_raise InvalidCurrencyCodeError do
|
34
|
+
CurrencyCode.standardize(nil)
|
35
|
+
end
|
36
|
+
end
|
31
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -103,7 +103,8 @@ files:
|
|
103
103
|
- test/unit/utils_test.rb
|
104
104
|
- test/unit/validateable_test.rb
|
105
105
|
homepage: http://github.com/shopify/active_utils
|
106
|
-
licenses:
|
106
|
+
licenses:
|
107
|
+
- MIT
|
107
108
|
metadata: {}
|
108
109
|
post_install_message:
|
109
110
|
rdoc_options: []
|