LittleWeasel 5.0.4 → 5.0.6
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 +4 -4
- data/.github/dependabot.yml +16 -0
- data/.rubocop.yml +9 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +44 -32
- data/LittleWeasel.gemspec +5 -5
- data/lib/LittleWeasel/dictionary.rb +1 -1
- data/lib/LittleWeasel/errors/dictionary_file_too_large_error.rb +1 -1
- data/lib/LittleWeasel/metadata/metadata_observable_validatable.rb +1 -1
- data/lib/LittleWeasel/version.rb +1 -1
- data/spec/factories/dictionary.rb +27 -27
- data/spec/factories/dictionary_cache_service.rb +4 -6
- data/spec/factories/dictionary_creator_service.rb +1 -1
- data/spec/factories/dictionary_file_loader_service.rb +1 -1
- data/spec/factories/dictionary_hash.rb +26 -26
- data/spec/factories/dictionary_key.rb +1 -1
- data/spec/factories/dictionary_killer_service.rb +1 -1
- data/spec/factories/dictionary_manager.rb +1 -1
- data/spec/factories/dictionary_metadata.rb +1 -1
- data/spec/factories/dictionary_metadata_service.rb +1 -1
- data/spec/factories/numeric_filter.rb +1 -1
- data/spec/factories/preprocessed_word.rb +1 -1
- data/spec/factories/preprocessed_words.rb +1 -1
- data/spec/factories/single_character_word_filter.rb +1 -1
- data/spec/factories/word_results.rb +1 -1
- data/spec/lib/LittleWeasel/block_results_spec.rb +23 -23
- data/spec/lib/LittleWeasel/configure_spec.rb +3 -3
- data/spec/lib/LittleWeasel/dictionary_key_spec.rb +9 -9
- data/spec/lib/LittleWeasel/dictionary_manager_spec.rb +29 -29
- data/spec/lib/LittleWeasel/dictionary_spec.rb +30 -29
- data/spec/lib/LittleWeasel/filters/en_us/currency_filter_spec.rb +26 -26
- data/spec/lib/LittleWeasel/filters/en_us/numeric_filter_spec.rb +17 -17
- data/spec/lib/LittleWeasel/filters/en_us/single_character_word_filter_spec.rb +8 -8
- data/spec/lib/LittleWeasel/filters/word_filter_managable_spec.rb +19 -19
- data/spec/lib/LittleWeasel/filters/word_filter_spec.rb +17 -17
- data/spec/lib/LittleWeasel/filters/word_filter_validatable_spec.rb +27 -12
- data/spec/lib/LittleWeasel/filters/word_filters_validatable_spec.rb +6 -6
- data/spec/lib/LittleWeasel/integraton_tests/dictionary_integration_spec.rb +23 -23
- data/spec/lib/LittleWeasel/metadata/dictionary_creator_servicable_spec.rb +7 -6
- data/spec/lib/LittleWeasel/metadata/dictionary_metadata_spec.rb +13 -13
- data/spec/lib/LittleWeasel/metadata/invalid_words_metadata_spec.rb +17 -17
- data/spec/lib/LittleWeasel/metadata/metadata_observerable_spec.rb +1 -1
- data/spec/lib/LittleWeasel/modules/dictionary_file_loader_spec.rb +30 -30
- data/spec/lib/LittleWeasel/modules/dictionary_sourceable_spec.rb +21 -21
- data/spec/lib/LittleWeasel/modules/language_spec.rb +5 -5
- data/spec/lib/LittleWeasel/modules/locale_spec.rb +1 -1
- data/spec/lib/LittleWeasel/modules/region_spec.rb +5 -5
- data/spec/lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor_spec.rb +8 -6
- data/spec/lib/LittleWeasel/preprocessors/preprocessed_word_spec.rb +3 -3
- data/spec/lib/LittleWeasel/preprocessors/preprocessed_word_validatable_spec.rb +14 -3
- data/spec/lib/LittleWeasel/preprocessors/preprocessed_words_spec.rb +8 -10
- data/spec/lib/LittleWeasel/preprocessors/preprocessed_words_validatable_spec.rb +6 -4
- data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_managable_spec.rb +27 -28
- data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_spec.rb +25 -29
- data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_validatable_spec.rb +10 -2
- data/spec/lib/LittleWeasel/preprocessors/word_preprocessors_validatable_spec.rb +4 -6
- data/spec/lib/LittleWeasel/services/dictionary_cache_service_spec.rb +51 -49
- data/spec/lib/LittleWeasel/services/dictionary_creator_service_spec.rb +14 -14
- data/spec/lib/LittleWeasel/services/dictionary_file_loader_service_spec.rb +30 -30
- data/spec/lib/LittleWeasel/services/dictionary_metadata_service_spec.rb +22 -22
- data/spec/lib/LittleWeasel/word_results_spec.rb +29 -32
- data/spec/lib/LittleWeasel/workflow/workflow_spec.rb +2 -2
- data/spec/spec_helper.rb +56 -56
- data/spec/support/factory_bot.rb +1 -2
- data/spec/support/file_helpers.rb +2 -2
- data/spec/support/general_helpers.rb +2 -1
- data/spec/support/shared_contexts.rb +13 -9
- data/spec/support/shared_examples.rb +10 -8
- metadata +26 -19
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.shared_examples 'the dictionary_key is invalid' do
|
2
4
|
context 'when the dictionary_key is nil' do
|
3
5
|
let(:dictionary_key) {}
|
@@ -56,25 +58,25 @@ end
|
|
56
58
|
|
57
59
|
RSpec.shared_examples 'the filter matches and #filter_on? is true' do
|
58
60
|
it 'returns true' do
|
59
|
-
expect(subject.filter_match?
|
61
|
+
expect(subject.filter_match?(word)).to be true
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
63
65
|
RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is true' do
|
64
66
|
it 'returns false' do
|
65
|
-
expect(subject.filter_match?
|
67
|
+
expect(subject.filter_match?(word)).to be false
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
69
71
|
RSpec.shared_examples 'the filter matches and #filter_on? is false' do
|
70
72
|
it 'returns false' do
|
71
|
-
expect(subject.filter_match?
|
73
|
+
expect(subject.filter_match?(word)).to be false
|
72
74
|
end
|
73
75
|
end
|
74
76
|
|
75
77
|
RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is false' do
|
76
78
|
it 'returns false' do
|
77
|
-
expect(subject.filter_match?
|
79
|
+
expect(subject.filter_match?(word)).to be false
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
@@ -82,24 +84,24 @@ end
|
|
82
84
|
|
83
85
|
RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is true' do
|
84
86
|
it 'returns true' do
|
85
|
-
expect(subject.preprocess?
|
87
|
+
expect(subject.preprocess?(word)).to be true
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
89
91
|
RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is true' do
|
90
92
|
it 'returns false' do
|
91
|
-
expect(subject.preprocess?
|
93
|
+
expect(subject.preprocess?(word)).to be false
|
92
94
|
end
|
93
95
|
end
|
94
96
|
|
95
97
|
RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is false' do
|
96
98
|
it 'returns false' do
|
97
|
-
expect(subject.preprocess?
|
99
|
+
expect(subject.preprocess?(word)).to be false
|
98
100
|
end
|
99
101
|
end
|
100
102
|
|
101
103
|
RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is false' do
|
102
104
|
it 'returns false' do
|
103
|
-
expect(subject.preprocess?
|
105
|
+
expect(subject.preprocess?(word)).to be false
|
104
106
|
end
|
105
107
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LittleWeasel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gene M. Angelo, Jr.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -158,76 +158,82 @@ dependencies:
|
|
158
158
|
requirements:
|
159
159
|
- - "~>"
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: '3.
|
161
|
+
version: '3.12'
|
162
162
|
type: :development
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - "~>"
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: '3.
|
168
|
+
version: '3.12'
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: rubocop
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
173
|
- - "~>"
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 1.
|
175
|
+
version: '1.56'
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 1.56.2
|
176
179
|
type: :development
|
177
180
|
prerelease: false
|
178
181
|
version_requirements: !ruby/object:Gem::Requirement
|
179
182
|
requirements:
|
180
183
|
- - "~>"
|
181
184
|
- !ruby/object:Gem::Version
|
182
|
-
version: 1.
|
185
|
+
version: '1.56'
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 1.56.2
|
183
189
|
- !ruby/object:Gem::Dependency
|
184
190
|
name: rubocop-performance
|
185
191
|
requirement: !ruby/object:Gem::Requirement
|
186
192
|
requirements:
|
187
193
|
- - "~>"
|
188
194
|
- !ruby/object:Gem::Version
|
189
|
-
version: '1.
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 1.11.3
|
195
|
+
version: '1.19'
|
193
196
|
type: :development
|
194
197
|
prerelease: false
|
195
198
|
version_requirements: !ruby/object:Gem::Requirement
|
196
199
|
requirements:
|
197
200
|
- - "~>"
|
198
201
|
- !ruby/object:Gem::Version
|
199
|
-
version: '1.
|
200
|
-
- - ">="
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version: 1.11.3
|
202
|
+
version: '1.19'
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
204
|
name: rubocop-rspec
|
205
205
|
requirement: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - "~>"
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: '2.
|
209
|
+
version: '2.23'
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 2.23.2
|
210
213
|
type: :development
|
211
214
|
prerelease: false
|
212
215
|
version_requirements: !ruby/object:Gem::Requirement
|
213
216
|
requirements:
|
214
217
|
- - "~>"
|
215
218
|
- !ruby/object:Gem::Version
|
216
|
-
version: '2.
|
219
|
+
version: '2.23'
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 2.23.2
|
217
223
|
- !ruby/object:Gem::Dependency
|
218
224
|
name: simplecov
|
219
225
|
requirement: !ruby/object:Gem::Requirement
|
220
226
|
requirements:
|
221
227
|
- - "~>"
|
222
228
|
- !ruby/object:Gem::Version
|
223
|
-
version: 0.
|
229
|
+
version: 0.22.0
|
224
230
|
type: :development
|
225
231
|
prerelease: false
|
226
232
|
version_requirements: !ruby/object:Gem::Requirement
|
227
233
|
requirements:
|
228
234
|
- - "~>"
|
229
235
|
- !ruby/object:Gem::Version
|
230
|
-
version: 0.
|
236
|
+
version: 0.22.0
|
231
237
|
- !ruby/object:Gem::Dependency
|
232
238
|
name: webrick
|
233
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,6 +270,7 @@ executables: []
|
|
264
270
|
extensions: []
|
265
271
|
extra_rdoc_files: []
|
266
272
|
files:
|
273
|
+
- ".github/dependabot.yml"
|
267
274
|
- ".github/workflows/codeql-analysis.yml"
|
268
275
|
- ".gitignore"
|
269
276
|
- ".idea/.name"
|
@@ -449,7 +456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
449
456
|
- !ruby/object:Gem::Version
|
450
457
|
version: '0'
|
451
458
|
requirements: []
|
452
|
-
rubygems_version: 3.
|
459
|
+
rubygems_version: 3.2.15
|
453
460
|
signing_key:
|
454
461
|
specification_version: 4
|
455
462
|
summary: Checks a word or group of words for validity against a dictionary/ies provided.
|