credit_card_validations 8.0.0 → 8.1.0

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
  SHA256:
3
- metadata.gz: a0ae5fba9ad995519d40f9d8468530f6e8bdb3e05914faa808ea4c61e21d6273
4
- data.tar.gz: dd7573a8bc538fefd33091bbd93e32a7f9d038dc94ac84215ac128d830569855
3
+ metadata.gz: 2ea48b31cccd9e050dd0e59cdd71bb784cf319d355dfa2eb0a185635308b1b81
4
+ data.tar.gz: 3c0358bce72eeb6f265ffb0130dc3a5a843dbf326ef989c118d827c025b8e0c3
5
5
  SHA512:
6
- metadata.gz: 0d014063aa741929ce377320512b2f13b041d824087328aea8bbdbb0c7aa70ebcaab0e1dfbbaba16273defe63074cd26a7b96c044045b99651701bcfd5272dfc
7
- data.tar.gz: 367f8adf1f14dd8b589711ae6d18043c2a355be1e61796b693509b635e49b6f04ba02c237fa29526cfb3e14b42a68e6adffbe4c00fac00278d3d548d5211ac65
6
+ metadata.gz: 62586d60302f937ec7f47a98440d89767fba557506a5568733e498e2c41d491d5d8f283923590808abc4f1ab3ebe3466dcadb8fbd4a21b721d07337ea4e34133
7
+ data.tar.gz: 366c5f5239778f08035b207b9d1e88e2f3c5f747913b3d86c79b1555fd571a640d16eca7121e78b62fe93f87298a05b9bb9161c7acfe1dcdad2e6a6b100662b2
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/credit_card_validations.svg)](https://rubygems.org/gems/credit_card_validations)
4
4
  [![License](http://img.shields.io/:license-mit-blue.svg)](http://didww.mit-license.org)
5
+ ![Coverage](https://didww.github.io/credit_card_validations/badge.svg)
5
6
 
6
7
 
7
8
  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.
@@ -55,11 +56,22 @@ The following issuing institutes are accepted:
55
56
 
56
57
  The following are supported with plugins
57
58
 
58
- | Name | Key |
59
- --------------------- | ------------|
60
- [Diners Club US](http://en.wikipedia.org/wiki/Diners_Club_International#MasterCard_alliance) | :diners_us
59
+ | Name | Key |
60
+ --------------------- | ------------|
61
+ [Cabal](https://en.wikipedia.org/wiki/Cabal_(debit_card)) | :cabal
62
+ [DinaCard](https://en.wikipedia.org/wiki/DinaCard) | :dinacard
63
+ [Diners Club US](http://en.wikipedia.org/wiki/Diners_Club_International#MasterCard_alliance) | :diners_us
61
64
  [EnRoute](https://en.wikipedia.org/wiki/EnRoute_(credit_card)) | :en_route
65
+ [Girocard](https://en.wikipedia.org/wiki/Girocard) | :girocard
66
+ [Hiper](https://en.wikipedia.org/wiki/Itau_Unibanco) | :hiper
67
+ [Humo](https://en.wikipedia.org/wiki/Humo_(payment_system)) | :humocard
62
68
  [Laser](https://en.wikipedia.org/wiki/Laser_%28debit_card%29) | :laser
69
+ [Troy](https://en.wikipedia.org/wiki/Troy_(payment_system)) | :troy
70
+ [UATP](https://en.wikipedia.org/wiki/Universal_Air_Travel_Plan) | :uatp
71
+ [Uzcard](https://en.wikipedia.org/wiki/Uzcard) | :uzcard
72
+ [V Pay](https://en.wikipedia.org/wiki/V_Pay) | :vpay
73
+ [Verve](https://en.wikipedia.org/wiki/Verve_(payment_card)) | :verve
74
+ [Voyager](https://en.wikipedia.org/wiki/Voyager_card) | :voyager
63
75
 
64
76
 
65
77
 
@@ -144,6 +156,18 @@ CreditCardValidations::Factory.random(:maestro)
144
156
  require 'credit_card_validations/plugins/en_route'
145
157
  require 'credit_card_validations/plugins/laser'
146
158
  require 'credit_card_validations/plugins/diners_us'
159
+
160
+ require 'credit_card_validations/plugins/cabal'
161
+ require 'credit_card_validations/plugins/dinacard'
162
+ require 'credit_card_validations/plugins/girocard'
163
+ require 'credit_card_validations/plugins/hiper'
164
+ require 'credit_card_validations/plugins/humocard'
165
+ require 'credit_card_validations/plugins/troy'
166
+ require 'credit_card_validations/plugins/uatp'
167
+ require 'credit_card_validations/plugins/uzcard'
168
+ require 'credit_card_validations/plugins/verve'
169
+ require 'credit_card_validations/plugins/voyager'
170
+ require 'credit_card_validations/plugins/vpay'
147
171
  ```
148
172
 
149
173
 
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :cabal,
3
+ { length: 16, prefixes: %w(589657 603522 627170) },
4
+ brand_name: 'Cabal'
5
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :dinacard,
3
+ { length: 16, prefixes: %w(9891) },
4
+ brand_name: 'DinaCard'
5
+ )
@@ -0,0 +1,8 @@
1
+ CreditCardValidations.add_brand(
2
+ :girocard,
3
+ {
4
+ length: 16,
5
+ prefixes: %w(6800 6801 6802 6803 6804 6805 6806 6807 6808 6809)
6
+ },
7
+ brand_name: 'Girocard'
8
+ )
@@ -0,0 +1,8 @@
1
+ CreditCardValidations.add_brand(
2
+ :hiper,
3
+ {
4
+ length: 16,
5
+ prefixes: %w(637095 63737423 63743358 637568 637599 637609 637612)
6
+ },
7
+ brand_name: 'Hiper'
8
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :humocard,
3
+ { length: 16, prefixes: %w(9860) },
4
+ brand_name: 'Humo'
5
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :troy,
3
+ { length: 16, prefixes: %w(9792) },
4
+ brand_name: 'Troy'
5
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :uatp,
3
+ { length: 15, prefixes: %w(1) },
4
+ brand_name: 'UATP'
5
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :uzcard,
3
+ { length: 16, prefixes: %w(8600 5614 277707) },
4
+ brand_name: 'Uzcard'
5
+ )
@@ -0,0 +1,13 @@
1
+ CreditCardValidations.add_brand(
2
+ :verve,
3
+ {
4
+ length: [16, 18, 19],
5
+ prefixes: %w(
6
+ 506099 506100 506101 506102 506103 506104 506105 506106 506107 506108 506109
7
+ 50611 50612 50613 50614 50615 50616 50617 50618
8
+ 506190 506191 506192 506193 506194 506195 506196 506197 506198
9
+ 650002 650003 650004 650005
10
+ )
11
+ },
12
+ brand_name: 'Verve'
13
+ )
@@ -0,0 +1,5 @@
1
+ CreditCardValidations.add_brand(
2
+ :voyager,
3
+ { length: 15, prefixes: %w(7088) },
4
+ brand_name: 'Voyager'
5
+ )
@@ -0,0 +1,8 @@
1
+ CreditCardValidations.add_brand(
2
+ :vpay,
3
+ {
4
+ length: 16,
5
+ prefixes: %w(6310 6382 7389 7582 7628 7748 8820 8987 9451 9820 9887)
6
+ },
7
+ brand_name: 'V Pay'
8
+ )
@@ -1,3 +1,3 @@
1
1
  module CreditCardValidations
2
- VERSION = '8.0.0'
2
+ VERSION = '8.1.0'
3
3
  end
data/lib/data/brands.yaml CHANGED
@@ -34,6 +34,7 @@
34
34
  - '24'
35
35
  - '25'
36
36
  - '26'
37
+ - '270'
37
38
  - '271'
38
39
  - '2720'
39
40
  - '51'
@@ -222,6 +223,8 @@
222
223
  :unionpay:
223
224
  :rules:
224
225
  - :length:
226
+ - 14
227
+ - 15
225
228
  - 16
226
229
  - 17
227
230
  - 18
@@ -304,6 +307,30 @@
304
307
  - '6069'
305
308
  - '607'
306
309
  - '608'
310
+ - '8170'
311
+ - '8171'
312
+ - '8172'
313
+ - '8173'
314
+ - '8174'
315
+ - '8175'
316
+ - '8176'
317
+ - '8177'
318
+ - '8178'
319
+ - '8179'
320
+ - '8180'
321
+ - '8181'
322
+ - '8182'
323
+ - '8192'
324
+ - '8193'
325
+ - '8194'
326
+ - '8195'
327
+ - '8196'
328
+ - '8197'
329
+ - '8198'
330
+ - '8199'
331
+ - '8200'
332
+ - '8201'
333
+ - '8202'
307
334
  :options:
308
335
  :skip_luhn: true
309
336
  :hipercard:
@@ -490,19 +517,7 @@
490
517
  - '36'
491
518
  - '38'
492
519
  - '39'
493
- - '60110'
494
- - '60112'
495
- - '60113'
496
- - '60114'
497
- - '601174'
498
- - '601177'
499
- - '601178'
500
- - '601179'
501
- - '601186'
502
- - '601187'
503
- - '601188'
504
- - '601189'
505
- - '60119'
520
+ - '6011'
506
521
  - '644'
507
522
  - '645'
508
523
  - '646'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credit_card_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor
@@ -111,9 +111,20 @@ files:
111
111
  - lib/credit_card_validations/factory.rb
112
112
  - lib/credit_card_validations/luhn.rb
113
113
  - lib/credit_card_validations/mmi.rb
114
+ - lib/credit_card_validations/plugins/cabal.rb
115
+ - lib/credit_card_validations/plugins/dinacard.rb
114
116
  - lib/credit_card_validations/plugins/diners_us.rb
115
117
  - lib/credit_card_validations/plugins/en_route.rb
118
+ - lib/credit_card_validations/plugins/girocard.rb
119
+ - lib/credit_card_validations/plugins/hiper.rb
120
+ - lib/credit_card_validations/plugins/humocard.rb
116
121
  - lib/credit_card_validations/plugins/laser.rb
122
+ - lib/credit_card_validations/plugins/troy.rb
123
+ - lib/credit_card_validations/plugins/uatp.rb
124
+ - lib/credit_card_validations/plugins/uzcard.rb
125
+ - lib/credit_card_validations/plugins/verve.rb
126
+ - lib/credit_card_validations/plugins/voyager.rb
127
+ - lib/credit_card_validations/plugins/vpay.rb
117
128
  - lib/credit_card_validations/string.rb
118
129
  - lib/credit_card_validations/version.rb
119
130
  - lib/data/brands.yaml
@@ -138,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
149
  - !ruby/object:Gem::Version
139
150
  version: '0'
140
151
  requirements: []
141
- rubygems_version: 4.0.4
152
+ rubygems_version: 3.7.1
142
153
  specification_version: 4
143
154
  summary: gem should be used for credit card numbers validation, card brands detections,
144
155
  luhn checks