confidential_info_redactor 0.0.16 → 0.0.17

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: fd49179c366c68c4563353b5f11b5a547086c1e5
4
- data.tar.gz: 91155c7b65e5267084e049b5f6876f5287e3df31
3
+ metadata.gz: ecd015cf09c8a3ba3720771d28d52a4f39335668
4
+ data.tar.gz: 5e165e1a0966908310d313f548262413f82df683
5
5
  SHA512:
6
- metadata.gz: b6b5797b7113e41ad1bda8e1991b6e41939bff11f4ac48b0d0785552d1859b0db0da97551553ef56e97589e93d0446c07f5d747e81fec87692bac8933df211f5
7
- data.tar.gz: f04627d38fd8de849da500afed42194204b6baa2a5fae8505afecebb766bc8f9a425e2281c7be579257711319752e081fe02dc86a47dbc0fa7dc644c0a578c86
6
+ metadata.gz: efeac3a7016d3fd3623083b8690f69acf1329eee2307bbdad43c27d74317a22482f66001f1851aa0851307180f54811640a959760c6bbcb69b181775a6539965
7
+ data.tar.gz: 0ae010f93fa7238ae93ce94813ee2636e9e35bdcce454c38d4cdc76f45b32cf3ed90fadbffccab79741e7f7ef5c9e3c033c3ab9eefc3d3d59c372ac29e24ed84
@@ -71,6 +71,7 @@ module ConfidentialInfoRedactor
71
71
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
72
72
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
73
73
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
74
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
74
75
  end
75
76
  months_abbr.each do |month|
76
77
  new_string = new_string.gsub(/#{Regexp.escape(day)}(,)*\s#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*(,)*\s\d{4}/i, ' <redacted date> ')
@@ -79,6 +80,7 @@ module ConfidentialInfoRedactor
79
80
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
80
81
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
81
82
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
83
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
82
84
  end
83
85
  end
84
86
  else
@@ -90,6 +92,7 @@ module ConfidentialInfoRedactor
90
92
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
91
93
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
92
94
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
95
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
93
96
  end
94
97
  months_abbr.each do |month|
95
98
  new_string = new_string.gsub(/#{Regexp.escape(day)}(,)*\s#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*(,)*\s\d{4}/i, ' <redacted date> ')
@@ -98,6 +101,7 @@ module ConfidentialInfoRedactor
98
101
  .gsub(/\d{4}\.*\s#{Regexp.escape(month)}\s\d+(rd|th|st)*/i, ' <redacted date> ')
99
102
  .gsub(/\d{4}(\.|-|\/)*#{Regexp.escape(month)}(\.|-|\/)*\d+/i, ' <redacted date> ')
100
103
  .gsub(/#{Regexp.escape(month)}(\.)*\s\d+(rd|th|st)*/i, ' <redacted date> ')
104
+ .gsub(/#{Regexp.escape(month)}\sde\s\d+(rd|th|st)*/i, ' <redacted date> ')
101
105
  end
102
106
  end
103
107
  dow_abbr.each do |day|
@@ -1,3 +1,3 @@
1
1
  module ConfidentialInfoRedactor
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -260,6 +260,12 @@ RSpec.describe ConfidentialInfoRedactor::Date do
260
260
  ws = ConfidentialInfoRedactor::Date.new(string: string, language: 'de')
261
261
  expect(ws.replace).to eq(' <redacted date> ')
262
262
  end
263
+
264
+ it 'replaces the date occurences in a string #002' do
265
+ string = 'Oktober de 15'
266
+ ws = ConfidentialInfoRedactor::Date.new(string: string, language: 'de')
267
+ expect(ws.replace).to eq(' <redacted date> ')
268
+ end
263
269
  end
264
270
  end
265
271
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidential_info_redactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias