credit_card_validations 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Gemfile +3 -1
- data/README.md +1 -3
- data/credit_card_validations.gemspec +2 -2
- data/lib/credit_card_validations/card_rules.rb +1 -1
- data/lib/credit_card_validations/version.rb +1 -1
- data/test/credit_card_validations_test.rb +2 -8
- data/test/test_helper.rb +15 -0
- metadata +19 -31
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MzJhZGYyODUzYjE5MzY0NTZmMmFlYzM3ZGQ2OWFmODBkZDViZGY1MA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 68abd4bf9b9ed2e5492ec9cc472a2aeafa99f346
|
4
|
+
data.tar.gz: c5be28c3056a743e9c63c344ea3bb2a16f1216b4
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MzRkZTJjOWQ0NmUwZDM0Y2ZjMzgwNjRjZDM4MTM4N2FkNzAwODFjMzc1MDc0
|
11
|
-
MTc3ZGU1ZGJjYjBjZjc5M2E3Y2U4ZjA0NDUwMmU1N2U0YWExNWU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YmUwNzlmNTlhOTA0MDZkODdhNTFhM2RiOTlhNTI0Y2VkMDk4YjE5N2Q3MzM3
|
14
|
-
NjcwZmM4Mjg2MWM1YmY5ZWQ5NjIyOWUwMGZlMTRlYTk4NGZmMWJjODI3OTll
|
15
|
-
YWZmZDdkZWU4YWFmYWJmZDFmOWJlZWY5ZmY3MDE2ODBkZDIzMjg=
|
6
|
+
metadata.gz: cdb14b1f00991ba1a7dd1b7a3c485bceb589dd83929015ea47eabacd427a396d28d0c90de6c7f2bf3a6bf481253884de48b4e5d798b7999d636e0045bfd00d6e
|
7
|
+
data.tar.gz: 7c7fb1325acbfea778e8b937883bc2c6639135419c8ece58d5e53676b265308d028cc35f38ebb9b5a4d6e118aff5eed9305fa560df89e7d8448f9235d4929c55
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem adds validator to check whether or not a given number actually falls within the ranges of possible numbers prior to performing such verification, and, as such, CreditCardValidations simply verifies that the credit card number provided is well-formed.
|
4
4
|
|
5
|
-
|
6
|
-
## Build status
|
7
5
|
[![Build Status](https://travis-ci.org/Fivell/credit_card_validations.png)](https://travis-ci.org/Fivell/credit_card_validations)
|
8
|
-
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/Fivell/credit_card_validations/badge.png)](https://coveralls.io/r/Fivell/credit_card_validations)
|
9
7
|
|
10
8
|
## Installation
|
11
9
|
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_dependency "activemodel", ">= 3", "< 5"
|
23
23
|
gem.add_dependency "activesupport", ">= 3", "< 5"
|
24
24
|
|
25
|
-
|
26
|
-
gem.add_development_dependency "mocha", '0
|
25
|
+
|
26
|
+
gem.add_development_dependency "mocha", '1.1.0'
|
27
27
|
gem.add_development_dependency 'rake', '~> 10'
|
28
28
|
|
29
29
|
end
|
@@ -16,7 +16,7 @@ module CreditCardValidations
|
|
16
16
|
],
|
17
17
|
|
18
18
|
diners: [
|
19
|
-
{length: [14], prefixes: ['300', '301', '302', '303', '304', '305', '36']},
|
19
|
+
{length: [14], prefixes: ['300', '301', '302', '303', '304', '305', '36', '38']},
|
20
20
|
],
|
21
21
|
|
22
22
|
#There are Diners Club (North America) cards that begin with 5. These are a joint venture between Diners Club and MasterCard, and are processed like a MasterCard
|
@@ -1,13 +1,7 @@
|
|
1
|
-
|
2
|
-
require 'mocha'
|
3
|
-
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
|
4
|
-
unit_tests = File.expand_path("#{File.dirname(__FILE__)}/../test")
|
5
|
-
$:.unshift(lib)
|
6
|
-
$:.unshift(unit_tests)
|
1
|
+
require_relative 'test_helper'
|
7
2
|
|
8
|
-
require 'credit_card_validations'
|
9
3
|
|
10
|
-
class CreditCardValidationsTest < Test
|
4
|
+
class CreditCardValidationsTest < MiniTest::Test
|
11
5
|
|
12
6
|
class CreditCardModel
|
13
7
|
attr_accessor :number
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'i18n'
|
5
|
+
require 'mocha/mini_test'
|
6
|
+
|
7
|
+
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
|
8
|
+
unit_tests = File.expand_path("#{File.dirname(__FILE__)}/../test")
|
9
|
+
$:.unshift(lib)
|
10
|
+
$:.unshift(unit_tests)
|
11
|
+
|
12
|
+
I18n.config.enforce_available_locales = true
|
13
|
+
|
14
|
+
|
15
|
+
require 'credit_card_validations'
|
metadata
CHANGED
@@ -1,95 +1,81 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: credit_card_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3'
|
20
|
-
- - <
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3'
|
30
|
-
- - <
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '3'
|
40
|
-
- - <
|
40
|
+
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '3'
|
50
|
-
- - <
|
50
|
+
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '5'
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: test-unit
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - '='
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 2.5.0
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - '='
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 2.5.0
|
67
53
|
- !ruby/object:Gem::Dependency
|
68
54
|
name: mocha
|
69
55
|
requirement: !ruby/object:Gem::Requirement
|
70
56
|
requirements:
|
71
57
|
- - '='
|
72
58
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
59
|
+
version: 1.1.0
|
74
60
|
type: :development
|
75
61
|
prerelease: false
|
76
62
|
version_requirements: !ruby/object:Gem::Requirement
|
77
63
|
requirements:
|
78
64
|
- - '='
|
79
65
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
66
|
+
version: 1.1.0
|
81
67
|
- !ruby/object:Gem::Dependency
|
82
68
|
name: rake
|
83
69
|
requirement: !ruby/object:Gem::Requirement
|
84
70
|
requirements:
|
85
|
-
- - ~>
|
71
|
+
- - "~>"
|
86
72
|
- !ruby/object:Gem::Version
|
87
73
|
version: '10'
|
88
74
|
type: :development
|
89
75
|
prerelease: false
|
90
76
|
version_requirements: !ruby/object:Gem::Requirement
|
91
77
|
requirements:
|
92
|
-
- - ~>
|
78
|
+
- - "~>"
|
93
79
|
- !ruby/object:Gem::Version
|
94
80
|
version: '10'
|
95
81
|
description: A ruby gem for validating credit card numbers (a port of ZF2 Zend\Validator\CreditCard)
|
@@ -99,7 +85,7 @@ executables: []
|
|
99
85
|
extensions: []
|
100
86
|
extra_rdoc_files: []
|
101
87
|
files:
|
102
|
-
- .travis.yml
|
88
|
+
- ".travis.yml"
|
103
89
|
- Gemfile
|
104
90
|
- LICENSE.txt
|
105
91
|
- README.md
|
@@ -114,6 +100,7 @@ files:
|
|
114
100
|
- lib/credit_card_validations/string.rb
|
115
101
|
- lib/credit_card_validations/version.rb
|
116
102
|
- test/credit_card_validations_test.rb
|
103
|
+
- test/test_helper.rb
|
117
104
|
homepage: https://github.com/Fivell/credit_card_validations
|
118
105
|
licenses:
|
119
106
|
- MIT
|
@@ -124,12 +111,12 @@ require_paths:
|
|
124
111
|
- lib
|
125
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
113
|
requirements:
|
127
|
-
- -
|
114
|
+
- - ">="
|
128
115
|
- !ruby/object:Gem::Version
|
129
116
|
version: '0'
|
130
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
118
|
requirements:
|
132
|
-
- -
|
119
|
+
- - ">="
|
133
120
|
- !ruby/object:Gem::Version
|
134
121
|
version: '0'
|
135
122
|
requirements: []
|
@@ -140,3 +127,4 @@ specification_version: 4
|
|
140
127
|
summary: gem for credit card numbers validation, card brands detections
|
141
128
|
test_files:
|
142
129
|
- test/credit_card_validations_test.rb
|
130
|
+
- test/test_helper.rb
|