codecal 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 27912b584dd61aca4541940371ae4fcea0e60922
4
- data.tar.gz: 746fb64a0e9c692f39130a3226f5cf8c24eabf1d
3
+ metadata.gz: 6df72edfd99e5aae4c757a243a55e61f2a5ae24f
4
+ data.tar.gz: 33cb3d394bb1d6d27b514c4092b25139947c583d
5
5
  SHA512:
6
- metadata.gz: e90940d1943d1279bbda723244ffc826f40eb5c60a176156b211023fc840507feb7d1423ec59afcaf525ff494600c30bef4a4c499482d44a477ea204eb956861
7
- data.tar.gz: 5bba0739de9d30cda1662ae1e312a5e2f8394600fe0ef7ad7d4b391284bddcf92db80712055a9fc57eb6325fd84a446140609a993829b3c27070dce4dd0a3a65
6
+ metadata.gz: 1de146a6d24fe5cd27d0b6ac0f32bb91ee72d0019537f3cb58541f5a7fc3ffccb5c9523ae6fb94369412949d003e1b7ddb677e8733b81967814ecb2da791ebd7
7
+ data.tar.gz: fa5fff1e23abc5352602ffaa4e1d8a2792d5bf03ecb2fc2cf321292942c3b5b110b85198d2d3a58b053b6a4df83f5f75b9a90037b6e9b7f109a25d0854f5c4ea
@@ -1,3 +1,3 @@
1
1
  module Codecal
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
data/lib/codecal.rb CHANGED
@@ -7,7 +7,7 @@ module Codecal
7
7
  def bank_customer_code_generate(account_id, currency)
8
8
  raise "parameter 1 type should be Integer and length not longer than 9" unless account_id.is_a?(Integer) && account_id.to_s.size <= 9
9
9
  raise "parameter 2 type should be String" unless currency.is_a?(String)
10
- currency_code = Code.new[currency]
10
+ currency_code = Code.new[currency.upcase]
11
11
  raise "currency not found" unless currency_code
12
12
  cal_array = ("%09d" % account_id + "%04d" % currency_code.to_i).split("").map! {|i| i.to_i}
13
13
  return code_calculate(cal_array, @@generate_seed)
@@ -26,4 +26,3 @@ module Codecal
26
26
  end
27
27
  end
28
28
  end
29
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codecal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Fang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-11 00:00:00.000000000 Z
11
+ date: 2017-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler