credit_card_sanitizer 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/credit_card_sanitizer.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab76499a05177d3557e10a8daa33089f5682d638
4
- data.tar.gz: 1e3d2588d626178b3507bfbc70e955b27fb6e80b
3
+ metadata.gz: 28ed93f321fb1d41a484c6f85820fc5385770ca2
4
+ data.tar.gz: fb8b5ca8f5e870efe6e9eed5aa5f7faea1bcb007
5
5
  SHA512:
6
- metadata.gz: 6cb01541587c3d0f3d50f52f39dc3b98e1c6bd9bfd0e6e0cda595527af4286e1052f8c2844ff496603a7b4c5ae4115aed7bccaa9aa5902854b4ed2a4ecc7bb91
7
- data.tar.gz: 30d764c928462d178919e4b7b1b82f3e98fd7fa589b7a74716fa8a548f6d04c038e611595ccc57b69cfcef08018262acaf44588c603140bfe28a3de4380c9730
6
+ metadata.gz: b8262f4023050479062a2a2d6b2d96f4139fe0c59a96002770ea6b0f8ea5abdf611dfd8f1f6a04d2e20c17a9e850f573719d6da7e2f5f63301988c2cf1c0bc29
7
+ data.tar.gz: 0eb8614233afc3d5f2edbda167b06f9e12074ac09d6bb6006a3d0c1cd40c55442f79f5a48c43c83f6f78a5b9f62a603cf37f4e8f89185aa7d4019332018af06c
@@ -4,8 +4,9 @@ require 'luhn_checksum'
4
4
 
5
5
  class CreditCardSanitizer
6
6
 
7
+ LINE_NOISE = /[^\w_\n,()]{0,8}/x
7
8
  # 12-19 digits explanation: https://en.wikipedia.org/wiki/Primary_Account_Number#Issuer_identification_number_.28IIN.29
8
- NUMBERS_WITH_LINE_NOISE = /\d(?:[^\w_\n,]{0,8}\d[^\w_\n,]{0,8}){10,17}\d/x
9
+ NUMBERS_WITH_LINE_NOISE = /\d(?:#{LINE_NOISE}\d#{LINE_NOISE}){10,17}\d/x
9
10
 
10
11
  def self.parameter_filter
11
12
  Proc.new { |_, value| new.sanitize!(value) if value.is_a?(String) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credit_card_sanitizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Chapweske
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-09-04 00:00:00.000000000 Z
13
+ date: 2014-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: appraisal