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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 180170853acf22a66e870a16f3081c97ccf1e7c4
4
- data.tar.gz: 5dc60932763444c415f3cbffe1674daf606b9eb1
3
+ metadata.gz: b00f2d802de8c5f0d2800bdf92537e6a1ebafc58
4
+ data.tar.gz: 3293fc88a4aa7581415ae8760b71bb68234285cb
5
5
  SHA512:
6
- metadata.gz: 29f63bd7f1ab24c9f97175354540cbc93a9572217daf94fde33bef40c9091af9dab98c971cd2b50a683e89eea6ffaca24517ab7263df0d2617f4c1a4a7d23d10
7
- data.tar.gz: e81f8f53400e9fef54fe7460bfb7ea46801fccae99bce30d6861e51cd9b269b9c50cbccecfcd8de6dd43e163bd09fe4324aa16075c7e556bbc0a0fb4d3c126e7
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.")
@@ -1,3 +1,3 @@
1
1
  module ActiveUtils
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -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.0
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-08 00:00:00.000000000 Z
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: []