confidential_info_redactor_lite 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f4f178e9f12c2b63b517cb83c476e4bba526f60
4
- data.tar.gz: 3724ad4b679f8c56f27a23893d6a6b2e58f47d27
3
+ metadata.gz: 682e05652920a3ab0cf26e3f456f37ede910c268
4
+ data.tar.gz: 31d2cc997634e60820697d9d5574300c70e1db6e
5
5
  SHA512:
6
- metadata.gz: 370acfe9773d924906cd8fc5bb133cab78d605ced79cdfd317dbc7fe78d441c138e1c9df93710b9e4e608487f3647e18c4e1dc4a009fed8ca79762e0afd4d2b6
7
- data.tar.gz: 51eda51e3bb37741e950be881473335680c2269c08378a42a63e25fc8d632527c0351c72f4a114fab43c97dc963f39c677dc7a6a266c1e65472cba405fc45f5a
6
+ metadata.gz: 5a18daa3439b0aa335231bfc8a0cdcb1500097ad00a291928e397271ff491f7a2a49e25c9e14803cfd3366d750e77cf387a22413fbd0c56a212e1b1eeaf54ba0
7
+ data.tar.gz: dd11d3fabbddc375d91069447441952183d5dc443bfac00573066405a81fad8cb396d420af2546c250de48aeb697f74c53752a5433f700796b6f66c272ecd339
@@ -49,6 +49,7 @@ module ConfidentialInfoRedactorLite
49
49
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
50
50
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
51
51
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
52
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
52
53
  end
53
54
  months_abbr.each do |month|
54
55
  new_string = new_string.gsub(/#{Regexp.escape(day)}(,)*\s#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*(,)*\s\d{4}/i, ' <redacted date> ')
@@ -57,6 +58,7 @@ module ConfidentialInfoRedactorLite
57
58
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
58
59
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
59
60
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
61
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
60
62
  end
61
63
  end
62
64
  else
@@ -68,6 +70,7 @@ module ConfidentialInfoRedactorLite
68
70
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
69
71
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
70
72
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
73
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
71
74
  end
72
75
  months_abbr.each do |month|
73
76
  new_string = new_string.gsub(/#{Regexp.escape(day)}(,)*\s#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*(,)*\s\d{4}/i, ' <redacted date> ')
@@ -76,6 +79,7 @@ module ConfidentialInfoRedactorLite
76
79
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
77
80
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
78
81
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
82
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
79
83
  end
80
84
  end
81
85
  dow_abbr.each do |day|
@@ -1,3 +1,3 @@
1
1
  module ConfidentialInfoRedactorLite
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
@@ -270,6 +270,12 @@ RSpec.describe ConfidentialInfoRedactorLite::Date do
270
270
  ws = ConfidentialInfoRedactorLite::Date.new(string: string, dow: de_dow, dow_abbr: de_dow_abbr, months: de_months, months_abbr: de_month_abbr)
271
271
  expect(ws.replace).to eq(' <redacted date> ')
272
272
  end
273
+
274
+ it 'replaces the date occurences in a string #002' do
275
+ string = 'Oktober de 15'
276
+ ws = ConfidentialInfoRedactorLite::Date.new(string: string, dow: de_dow, dow_abbr: de_dow_abbr, months: de_months, months_abbr: de_month_abbr)
277
+ expect(ws.replace).to eq(' <redacted date> ')
278
+ end
273
279
  end
274
280
  end
275
281
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidential_info_redactor_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias