ssn_obfuscater 1.02 → 2.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: 1d08a2ff3622fd25c1bc248a3987457cb1a5792a09252f45b90ceac18f37bb35
4
- data.tar.gz: d7f14c6f60290c2bf18e5b33123754be1ea067309a5e371a46ddc282f927a1c4
3
+ metadata.gz: d1037476f058b837dcfaba69ce21ff0eab141b1138fe961003d4d6947a6cbf3e
4
+ data.tar.gz: 11fa2a0251763d4416700284d26432b35e465b0a2b5af00d67991281323ce93b
5
5
  SHA512:
6
- metadata.gz: 9deb0825185c8543f583767ae461a1f307063ee131371f3920f9f1bccc44ff38577113053ba83b314b93627059d29431a77a800b3418332d2b771231fd21dc6d
7
- data.tar.gz: c3719b538afe83863844ab2c0e4fd92de57a60766178212c206a4fbacff2b1fbbadee1f4d73cb3f59b65a6cd7ad915fcb493e2bf9b49c0c7882606db4b2364b8
6
+ metadata.gz: 257bcf0416352cd1b030f0466b95edd7f85a703175e3375ea5b27fd98f4e67158fe414367268d045f687f39c0595d3cc05b8123f4ea14199b3a552d881236045
7
+ data.tar.gz: 278f82d4d4e9887896764756a6b70840bbeec8c0f0d370686e32ee7d59376ad56c70b6971949c514de0f1d460752d43ab31d441b0129df06bfcfc765ba7e1d2a
@@ -2,7 +2,7 @@ require "ssn_obfuscater/version"
2
2
 
3
3
  require "ssn_obfuscater/solver"
4
4
  # require 'mechanizer'
5
- require 'faker'
5
+ # require 'faker'
6
6
  require 'pry'
7
7
 
8
8
  module SsnObfuscater
@@ -9,18 +9,18 @@ module SsnObfuscater
9
9
  result_hash = find_ssn_in_string(text)
10
10
  result_hash.is_a?(::Hash) ? result_hash : nil
11
11
  # safe_string_block = make_string_block_safe(result_hash, text)
12
- result_hash
13
12
  end
14
13
 
15
14
 
16
- def parse_string_block(text)
17
- strings = text.split(/\.\s+|!|\?/)
18
- strings = strings.map { |str| str.squeeze(' ') }
19
- strings = strings.map(&:strip)
20
- end
15
+ # def parse_string_block(text)
16
+ # strings = text.split(/\.\s+|!|\?/)
17
+ # strings = strings.map { |str| str.squeeze(' ') }
18
+ # strings = strings.map(&:strip)
19
+ # end
21
20
 
22
21
 
23
22
  def find_ssn_in_string(string)
23
+ result_hash = {}
24
24
  if string.present?
25
25
  ssn = string.scan(/\d{3}-\d{2}-\d{4}/).join(', ')
26
26
  if ssn.present?
@@ -29,16 +29,17 @@ module SsnObfuscater
29
29
  result_hash = { ssn_alert: ssn.present?, ssn: ssn, ssn_obf: ssn_obf, safe_text: string }
30
30
  end
31
31
  end
32
+ result_hash
32
33
  end
33
34
 
34
35
 
35
- def make_string_block_safe(result_hashes, text)
36
- result_hashes.map do |hsh|
37
- ssn = hsh[:ssn]
38
- text.gsub!(ssn, hsh[:ssn_obf])
39
- end
40
- text
41
- end
36
+ # def make_string_block_safe(result_hashes, text)
37
+ # result_hashes.map do |hsh|
38
+ # ssn = hsh[:ssn]
39
+ # text.gsub!(ssn, hsh[:ssn_obf])
40
+ # end
41
+ # text
42
+ # end
42
43
 
43
44
 
44
45
  # Obfuscate all Social Security Numbers. Example: XXX-XX-4430.
@@ -1,3 +1,3 @@
1
1
  module SsnObfuscater
2
- VERSION = "1.02"
2
+ VERSION = "2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssn_obfuscater
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.02'
4
+ version: '2.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Booth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport