credit_card_validations 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTBhM2E0ZjA4MzE0ODhlMDBhZjUyMjAzZjg4NDE1YWYxODk3ZmE1MQ==
4
+ ODhlZDJiZjYyYTZlZTIzMWI1ZjU3MGYyNmMyOGQ1M2FhODllYWI1NQ==
5
5
  data.tar.gz: !binary |-
6
- NWU2OGEzNDg0OGU2M2ZkZmQ2ZTcxYTE1MjA5MzdiMDgwNjI0NTY2Yg==
6
+ MzJhZGYyODUzYjE5MzY0NTZmMmFlYzM3ZGQ2OWFmODBkZDViZGY1MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTI5MjA5MDIwN2RhYzY4YzBlZDQ2MjlmYzdhZDQ1MjBiYTFmOWY4ZjA3OTli
10
- NjQ3YjJmZjhiZDUwZDc5MGJhZjkxMDY5YmEwZTkwNDIzMzM3ZDU3OGEzMTkw
11
- ZGQxODU5NWFiMmY4Zjg5NzUzYzc3MzllZGY4MmZkMmUzNDAyYWI=
9
+ ZjdjZWJmNzkxODQ3NzUyZDFkNmFjMTRmZjJiYTgzNjBkNGQwM2M2NzRjY2Yx
10
+ MzRkZTJjOWQ0NmUwZDM0Y2ZjMzgwNjRjZDM4MTM4N2FkNzAwODFjMzc1MDc0
11
+ MTc3ZGU1ZGJjYjBjZjc5M2E3Y2U4ZjA0NDUwMmU1N2U0YWExNWU=
12
12
  data.tar.gz: !binary |-
13
- ZDFlNzc4MTBmZGU3YWJjYWI4ZTJjMTczYTRkYzNhMmQ2NzA0NTgzZDZjODNh
14
- NjYwYmM0NDVjNmQ4ZjNmOTI1NzY4MGIxYTY5MjEzMzBhNTQ0MzY5MTljN2Fh
15
- ZGZjZmU2N2FlMzliMTk2ODRmYjJjM2FhNWQ5ZmNhZDQ4ZmZjYzk=
13
+ YmUwNzlmNTlhOTA0MDZkODdhNTFhM2RiOTlhNTI0Y2VkMDk4YjE5N2Q3MzM3
14
+ NjcwZmM4Mjg2MWM1YmY5ZWQ5NjIyOWUwMGZlMTRlYTk4NGZmMWJjODI3OTll
15
+ YWZmZDdkZWU4YWFmYWJmZDFmOWJlZWY5ZmY3MDE2ODBkZDIzMjg=
@@ -12,3 +12,15 @@ module CreditCardValidations
12
12
  autoload :Detector , 'credit_card_validations/detector'
13
13
  autoload :Mmi, 'credit_card_validations/mmi'
14
14
  end
15
+
16
+
17
+ CreditCardValidations::CardRules.rules.each do |name, rules|
18
+ rules.each do |rule_value|
19
+ CreditCardValidations::Detector.add_rule(name,
20
+ rule_value[:length],
21
+ rule_value[:prefixes],
22
+ rule_value[:skip_validation])
23
+ end
24
+
25
+ end
26
+
@@ -5,7 +5,7 @@ module CreditCardValidations
5
5
 
6
6
  self.rules = {
7
7
  visa: [
8
- {length: [16], prefixes: ['4']}
8
+ {length: [13, 16], prefixes: ['4']}
9
9
  ],
10
10
  mastercard: [
11
11
  {length: [16], prefixes: ['51', '52', '53', '54', '55']}
@@ -62,12 +62,7 @@ module CreditCardValidations
62
62
  end
63
63
  end
64
64
 
65
- CardRules.rules.each do |name, rules|
66
- rules.each do |rule_value|
67
- self.add_rule(name, rule_value[:length], rule_value[:prefixes], rule_value[:skip_validation])
68
- end
69
65
 
70
- end
71
66
  end
72
67
 
73
68
 
@@ -1,3 +1,3 @@
1
1
  module CreditCardValidations
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credit_card_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel