codecal 0.3.2 → 0.3.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 +4 -4
- data/codecal.gemspec +1 -1
- data/lib/codecal/version.rb +1 -1
- data/lib/codecal.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9c545e36614879325414a9e4b348a2acb0ca47d
|
4
|
+
data.tar.gz: 39ddff4a0a0e1a6c9681db20128abd0563a13d56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0e27195c9c68d39a2ddb0f0c40995d437c29e272dcedf6aa814bb8057bbf12bbc409a3f13b54b0c848c175efe20c313f9180d77ec3693e9071d24085c0ec5ea
|
7
|
+
data.tar.gz: 29690214957bea08af8df8c619e936b79c50a5ec90c789d35a6e621696074a9c5d377babf7273c2688a2f5c20f3ff12e672f6b76c9df34babca023d132d5e5a6
|
data/codecal.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["roger.fang@acx.io"]
|
11
11
|
|
12
12
|
spec.summary = %q{calculate a string for parameters.}
|
13
|
-
spec.description = %q{return a string according to 2
|
13
|
+
spec.description = %q{return a string according to parameters(1/2) and a seed.}
|
14
14
|
spec.homepage = ""
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/lib/codecal/version.rb
CHANGED
data/lib/codecal.rb
CHANGED
@@ -3,7 +3,7 @@ require_relative "./code"
|
|
3
3
|
|
4
4
|
module Codecal
|
5
5
|
@@generate_seed = [2,7,5,3,8,9,5,9,1,6,7,3,5]
|
6
|
-
@@simple_seed = [
|
6
|
+
@@simple_seed = [5,4,6,2,3,1,5,4,6,2,3,1]
|
7
7
|
class<<self
|
8
8
|
def bank_customer_code_generate(account_id, currency)
|
9
9
|
errormsg = ""
|
@@ -63,7 +63,7 @@ module Codecal
|
|
63
63
|
|
64
64
|
def simple_code_calculate(array, seed)
|
65
65
|
code = array.reverse.each_with_index.inject(0){|count, (i, index)| count += i*seed.reverse[index + 1]}
|
66
|
-
return (array.join + ( code %
|
66
|
+
return (array.join + ( code % 7 ).to_s).to_i.to_s
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codecal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Fang
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description: return a string according to 2
|
55
|
+
description: return a string according to parameters(1/2) and a seed.
|
56
56
|
email:
|
57
57
|
- roger.fang@acx.io
|
58
58
|
executables: []
|