bank-validator 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bank-validator.gemspec +2 -2
- data/lib/active_model/routing_number_validator.rb +1 -1
- data/test/dummy/Gemfile.lock +1 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ce9dfb2ac40f6e67a817150ced7e267876b20d0
|
4
|
+
data.tar.gz: 96f37413314b55d0dcaba4a0368527c1b05a7bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 547219217a8979c3e97530aa50fcd3bf7c0a278972fa3cba0db314b1452c5057b64871a857dcc23211818a9ea14999d4dfc033439268d5695dcae394b989ed43
|
7
|
+
data.tar.gz: 7a1cad541fad80d485d205e189844d583316cdc13d6b627d13173dc65b14a46be909f75e55befaa924ab0f983ff30f99f97698afd16f4f16ab603fd172b2e2ad
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
data/bank-validator.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bank-validator 0.2.
|
5
|
+
# stub: bank-validator 0.2.6 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bank-validator"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.6"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -17,7 +17,7 @@ class RoutingNumberValidator < ActiveModel::EachValidator
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def valid_routing_number?(route_number)
|
20
|
-
d = route_number.
|
20
|
+
d = route_number.each_char.to_a
|
21
21
|
|
22
22
|
((3 * (d[0].to_i + d[3].to_i + d[6].to_i)) + (7 * (d[1].to_i + d[4].to_i + d[7].to_i)) + (d[2].to_i + d[5].to_i + d[8].to_i)) % 10 == 0
|
23
23
|
end
|
data/test/dummy/Gemfile.lock
CHANGED