LittleWeasel 3.0.4 → 4.0.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.
Files changed (152) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.reek.yml +17 -0
  4. data/.rspec +4 -2
  5. data/.rubocop.yml +187 -0
  6. data/.ruby-version +1 -1
  7. data/.yardopts +2 -0
  8. data/Gemfile +3 -1
  9. data/LittleWeasel.gemspec +31 -18
  10. data/README.md +408 -42
  11. data/Rakefile +296 -3
  12. data/lib/LittleWeasel.rb +5 -184
  13. data/lib/LittleWeasel/block_results.rb +81 -0
  14. data/lib/LittleWeasel/configure.rb +98 -0
  15. data/lib/LittleWeasel/dictionary.rb +125 -0
  16. data/lib/LittleWeasel/dictionary_key.rb +48 -0
  17. data/lib/LittleWeasel/dictionary_manager.rb +85 -0
  18. data/lib/LittleWeasel/errors/dictionary_file_already_loaded_error.rb +9 -0
  19. data/lib/LittleWeasel/errors/dictionary_file_empty_error.rb +8 -0
  20. data/lib/LittleWeasel/errors/dictionary_file_not_found_error.rb +8 -0
  21. data/lib/LittleWeasel/errors/dictionary_file_too_large_error.rb +16 -0
  22. data/lib/LittleWeasel/errors/language_required_error.rb +8 -0
  23. data/lib/LittleWeasel/errors/must_override_error.rb +8 -0
  24. data/lib/LittleWeasel/filters/en_us/currency_filter.rb +19 -0
  25. data/lib/LittleWeasel/filters/en_us/numeric_filter.rb +19 -0
  26. data/lib/LittleWeasel/filters/en_us/single_character_word_filter.rb +21 -0
  27. data/lib/LittleWeasel/filters/word_filter.rb +59 -0
  28. data/lib/LittleWeasel/filters/word_filter_managable.rb +80 -0
  29. data/lib/LittleWeasel/filters/word_filter_validatable.rb +31 -0
  30. data/lib/LittleWeasel/filters/word_filterable.rb +19 -0
  31. data/lib/LittleWeasel/filters/word_filters_validatable.rb +29 -0
  32. data/lib/LittleWeasel/metadata/dictionary_metadata.rb +145 -0
  33. data/lib/LittleWeasel/metadata/invalid_words_metadata.rb +134 -0
  34. data/lib/LittleWeasel/metadata/invalid_words_service_results.rb +45 -0
  35. data/lib/LittleWeasel/metadata/metadata_observable_validatable.rb +22 -0
  36. data/lib/LittleWeasel/metadata/metadata_observerable.rb +90 -0
  37. data/lib/LittleWeasel/metadata/metadatable.rb +136 -0
  38. data/lib/LittleWeasel/modules/class_name_to_symbol.rb +26 -0
  39. data/lib/LittleWeasel/modules/configurable.rb +26 -0
  40. data/lib/LittleWeasel/modules/deep_dup.rb +11 -0
  41. data/lib/LittleWeasel/modules/dictionary_cache_keys.rb +34 -0
  42. data/lib/LittleWeasel/modules/dictionary_cache_servicable.rb +26 -0
  43. data/lib/LittleWeasel/modules/dictionary_cache_validatable.rb +20 -0
  44. data/lib/LittleWeasel/modules/dictionary_creator_servicable.rb +27 -0
  45. data/lib/LittleWeasel/modules/dictionary_file_loader.rb +67 -0
  46. data/lib/LittleWeasel/modules/dictionary_key_validatable.rb +19 -0
  47. data/lib/LittleWeasel/modules/dictionary_keyable.rb +24 -0
  48. data/lib/LittleWeasel/modules/dictionary_loader_servicable.rb +27 -0
  49. data/lib/LittleWeasel/modules/dictionary_metadata_servicable.rb +29 -0
  50. data/lib/LittleWeasel/modules/dictionary_metadata_validatable.rb +17 -0
  51. data/lib/LittleWeasel/modules/dictionary_sourceable.rb +26 -0
  52. data/lib/LittleWeasel/modules/dictionary_validatable.rb +30 -0
  53. data/lib/LittleWeasel/modules/language.rb +23 -0
  54. data/lib/LittleWeasel/modules/language_validatable.rb +16 -0
  55. data/lib/LittleWeasel/modules/locale.rb +40 -0
  56. data/lib/LittleWeasel/modules/order_validatable.rb +18 -0
  57. data/lib/LittleWeasel/modules/orderable.rb +17 -0
  58. data/lib/LittleWeasel/modules/region.rb +23 -0
  59. data/lib/LittleWeasel/modules/region_validatable.rb +16 -0
  60. data/lib/LittleWeasel/modules/tag_validatable.rb +16 -0
  61. data/lib/LittleWeasel/modules/taggable.rb +31 -0
  62. data/lib/LittleWeasel/modules/word_results_validatable.rb +28 -0
  63. data/lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor.rb +22 -0
  64. data/lib/LittleWeasel/preprocessors/preprocessed_word.rb +28 -0
  65. data/lib/LittleWeasel/preprocessors/preprocessed_word_validatable.rb +55 -0
  66. data/lib/LittleWeasel/preprocessors/preprocessed_words.rb +55 -0
  67. data/lib/LittleWeasel/preprocessors/preprocessed_words_validatable.rb +27 -0
  68. data/lib/LittleWeasel/preprocessors/word_preprocessable.rb +19 -0
  69. data/lib/LittleWeasel/preprocessors/word_preprocessor.rb +122 -0
  70. data/lib/LittleWeasel/preprocessors/word_preprocessor_managable.rb +114 -0
  71. data/lib/LittleWeasel/preprocessors/word_preprocessor_validatable.rb +40 -0
  72. data/lib/LittleWeasel/preprocessors/word_preprocessors_validatable.rb +24 -0
  73. data/lib/LittleWeasel/services/dictionary_cache_service.rb +262 -0
  74. data/lib/LittleWeasel/services/dictionary_creator_service.rb +94 -0
  75. data/lib/LittleWeasel/services/dictionary_file_loader_service.rb +37 -0
  76. data/lib/LittleWeasel/services/dictionary_killer_service.rb +35 -0
  77. data/lib/LittleWeasel/services/dictionary_loader_service.rb +59 -0
  78. data/lib/LittleWeasel/services/dictionary_metadata_service.rb +114 -0
  79. data/lib/LittleWeasel/services/invalid_words_service.rb +59 -0
  80. data/lib/LittleWeasel/version.rb +3 -1
  81. data/lib/LittleWeasel/word_results.rb +146 -0
  82. data/spec/factories/dictionary.rb +43 -0
  83. data/spec/factories/dictionary_cache_service.rb +95 -0
  84. data/spec/factories/dictionary_creator_service.rb +16 -0
  85. data/spec/factories/dictionary_file_loader_service.rb +13 -0
  86. data/spec/factories/dictionary_hash.rb +39 -0
  87. data/spec/factories/dictionary_key.rb +14 -0
  88. data/spec/factories/dictionary_killer_service.rb +14 -0
  89. data/spec/factories/dictionary_loader_service.rb +14 -0
  90. data/spec/factories/dictionary_manager.rb +10 -0
  91. data/spec/factories/dictionary_metadata.rb +16 -0
  92. data/spec/factories/dictionary_metadata_service.rb +16 -0
  93. data/spec/factories/numeric_filter.rb +12 -0
  94. data/spec/factories/preprocessed_word.rb +16 -0
  95. data/spec/factories/preprocessed_words.rb +41 -0
  96. data/spec/factories/single_character_word_filter.rb +12 -0
  97. data/spec/factories/word_results.rb +16 -0
  98. data/spec/lib/LittleWeasel/block_results_spec.rb +248 -0
  99. data/spec/lib/LittleWeasel/configure_spec.rb +74 -0
  100. data/spec/lib/LittleWeasel/dictionary_key_spec.rb +118 -0
  101. data/spec/lib/LittleWeasel/dictionary_manager_spec.rb +116 -0
  102. data/spec/lib/LittleWeasel/dictionary_spec.rb +289 -0
  103. data/spec/lib/LittleWeasel/filters/en_us/currency_filter_spec.rb +80 -0
  104. data/spec/lib/LittleWeasel/filters/en_us/numeric_filter_spec.rb +66 -0
  105. data/spec/lib/LittleWeasel/filters/en_us/single_character_word_filter_spec.rb +58 -0
  106. data/spec/lib/LittleWeasel/filters/word_filter_managable_spec.rb +180 -0
  107. data/spec/lib/LittleWeasel/filters/word_filter_spec.rb +151 -0
  108. data/spec/lib/LittleWeasel/filters/word_filter_validatable_spec.rb +94 -0
  109. data/spec/lib/LittleWeasel/filters/word_filters_validatable_spec.rb +48 -0
  110. data/spec/lib/LittleWeasel/integraton_tests/dictionary_integration_spec.rb +201 -0
  111. data/spec/lib/LittleWeasel/metadata/dictionary_creator_servicable_spec.rb +54 -0
  112. data/spec/lib/LittleWeasel/metadata/dictionary_metadata_spec.rb +209 -0
  113. data/spec/lib/LittleWeasel/metadata/invalid_words_metadata_spec.rb +155 -0
  114. data/spec/lib/LittleWeasel/metadata/metadata_observerable_spec.rb +31 -0
  115. data/spec/lib/LittleWeasel/metadata/metadatable_spec.rb +35 -0
  116. data/spec/lib/LittleWeasel/modules/class_name_to_symbol_spec.rb +21 -0
  117. data/spec/lib/LittleWeasel/modules/dictionary_file_loader_spec.rb +125 -0
  118. data/spec/lib/LittleWeasel/modules/dictionary_sourceable_spec.rb +44 -0
  119. data/spec/lib/LittleWeasel/modules/language_spec.rb +52 -0
  120. data/spec/lib/LittleWeasel/modules/locale_spec.rb +140 -0
  121. data/spec/lib/LittleWeasel/modules/region_spec.rb +52 -0
  122. data/spec/lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor_spec.rb +34 -0
  123. data/spec/lib/LittleWeasel/preprocessors/preprocessed_word_spec.rb +105 -0
  124. data/spec/lib/LittleWeasel/preprocessors/preprocessed_word_validatable_spec.rb +143 -0
  125. data/spec/lib/LittleWeasel/preprocessors/preprocessed_words_spec.rb +77 -0
  126. data/spec/lib/LittleWeasel/preprocessors/preprocessed_words_validatable_spec.rb +58 -0
  127. data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_managable_spec.rb +216 -0
  128. data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_spec.rb +175 -0
  129. data/spec/lib/LittleWeasel/preprocessors/word_preprocessor_validatable_spec.rb +109 -0
  130. data/spec/lib/LittleWeasel/preprocessors/word_preprocessors_validatable_spec.rb +49 -0
  131. data/spec/lib/LittleWeasel/services/dictionary_cache_service_spec.rb +444 -0
  132. data/spec/lib/LittleWeasel/services/dictionary_creator_service_spec.rb +119 -0
  133. data/spec/lib/LittleWeasel/services/dictionary_file_loader_service_spec.rb +71 -0
  134. data/spec/lib/LittleWeasel/services/dictionary_loader_service_spec.rb +50 -0
  135. data/spec/lib/LittleWeasel/services/dictionary_metadata_service_spec.rb +279 -0
  136. data/spec/lib/LittleWeasel/word_results_spec.rb +275 -0
  137. data/spec/lib/LittleWeasel/workflow/workflow_spec.rb +20 -0
  138. data/spec/spec_helper.rb +117 -6
  139. data/spec/support/factory_bot.rb +15 -0
  140. data/spec/support/file_helpers.rb +32 -0
  141. data/spec/support/files/empty-dictionary.txt +0 -0
  142. data/{lib/dictionary → spec/support/files/en-US-big.txt} +262156 -31488
  143. data/spec/support/files/en-US-tagged.txt +26 -0
  144. data/spec/support/files/en-US.txt +26 -0
  145. data/spec/support/files/en.txt +26 -0
  146. data/spec/support/files/es-ES.txt +27 -0
  147. data/spec/support/files/es.txt +27 -0
  148. data/spec/support/general_helpers.rb +68 -0
  149. data/spec/support/shared_contexts.rb +108 -0
  150. data/spec/support/shared_examples.rb +105 -0
  151. metadata +408 -65
  152. data/spec/checker/checker_spec.rb +0 -286
@@ -0,0 +1,26 @@
1
+ a
2
+ better
3
+ cat
4
+ dog
5
+ everyone
6
+ fat
7
+ game
8
+ help
9
+ italic
10
+ jasmine
11
+ kelp
12
+ love
13
+ man
14
+ nope
15
+ octopus
16
+ popeye
17
+ queue
18
+ ruby
19
+ stop
20
+ top
21
+ ultimate
22
+ very
23
+ was
24
+ xylophone
25
+ yes
26
+ zebra
@@ -0,0 +1,26 @@
1
+ apple
2
+ better
3
+ cat
4
+ dog
5
+ everyone
6
+ fat
7
+ game
8
+ help
9
+ italic
10
+ jasmine
11
+ kelp
12
+ love
13
+ man
14
+ nope
15
+ octopus
16
+ popeye
17
+ queue
18
+ ruby
19
+ stop
20
+ top
21
+ ultimate
22
+ very
23
+ was
24
+ xylophone
25
+ yes
26
+ zebra
@@ -0,0 +1,26 @@
1
+ a
2
+ better
3
+ cat
4
+ dog
5
+ everyone
6
+ fat
7
+ game
8
+ help
9
+ italic
10
+ jasmine
11
+ kelp
12
+ love
13
+ man
14
+ nope
15
+ octopus
16
+ popeye
17
+ queue
18
+ ruby
19
+ stop
20
+ top
21
+ ultimate
22
+ very
23
+ was
24
+ xylophone
25
+ yes
26
+ zebra
@@ -0,0 +1,27 @@
1
+ armadillo
2
+ biblioteca
3
+ carcajada
4
+ decidir
5
+ elefante
6
+ falsificar
7
+ gigante
8
+ hechizo
9
+ iniciar
10
+ jajajear
11
+ kaki
12
+ labial
13
+ mamá
14
+ nene
15
+ ñoño
16
+ coco
17
+ papá
18
+ quiquiriquí
19
+ ronronear
20
+ sisear
21
+ tetera
22
+ ulular
23
+ vivir
24
+ wifi
25
+ sexto
26
+ yoyó
27
+ zarzamora
@@ -0,0 +1,27 @@
1
+ armadillo
2
+ biblioteca
3
+ carcajada
4
+ decidir
5
+ elefante
6
+ falsificar
7
+ gigante
8
+ hechizo
9
+ iniciar
10
+ jajajear
11
+ kaki
12
+ labial
13
+ mamá
14
+ nene
15
+ ñoño
16
+ coco
17
+ papá
18
+ quiquiriquí
19
+ ronronear
20
+ sisear
21
+ tetera
22
+ ulular
23
+ vivir
24
+ wifi
25
+ sexto
26
+ yoyó
27
+ zarzamora
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Support
4
+ # Provides miscellaneous help methods for use in specs.
5
+ module GeneralHelpers
6
+ # For some reason, passing create(described_class) raises
7
+ # a "KeyError: Factory not registered: LittleWeasel::Klass"
8
+ # error where Klass == (for example) any Dictionary or
9
+ # subclass. This creates a symbol from the class name that
10
+ # factory_bot will like.
11
+
12
+ # :reek:UtilityFunction - ignored, this is only spec support.
13
+ def sym_for(klass)
14
+ klass.name.demodulize.underscore.to_sym
15
+ end
16
+
17
+ module DictionaryResultsHelpers
18
+ module_function
19
+
20
+ def print_word_results(word, word_results, comments = nil)
21
+ puts "# Comments: #{comments}" unless comments.nil?
22
+ puts "# Results of calling #word_results for '#{word}'..."
23
+ print_results(word: word, results: word_results, indent: 1)
24
+ end
25
+
26
+ def print_block_results(word_block, block_results, comments = nil)
27
+ puts "# Comments: #{comments}" unless comments.nil?
28
+ puts '# Results of calling #word_block with:'
29
+ puts "# \"#{word_block}\"..."
30
+ puts
31
+ puts 'block_results #=>'
32
+ puts " #preprocessed_words_or_original_words #=> #{block_results.preprocessed_words_or_original_words}"
33
+
34
+ puts 'word_results #=>'
35
+ block_results.word_results.each do |word_results|
36
+ print_results(word: word_results.original_word, results: word_results, indent: 1)
37
+ end
38
+ end
39
+
40
+ def print_results(word:, results:, indent: 0)
41
+ indent = ' ' * indent
42
+ puts "#{indent}word_results #=>"
43
+ puts "#{indent * 2}original_word #=> \"#{results.original_word}\""
44
+ puts "#{indent * 2}preprocessed_word #=> #{string_or_nil results.preprocessed_word}"
45
+ puts "#{indent * 2}success? #=> #{results.success?}"
46
+ puts "#{indent * 2}word_valid? #=> #{results.word_valid?}"
47
+ puts "#{indent * 2}word_cached? #=> #{results.word_cached?}"
48
+ puts "#{indent * 2}preprocessed_word? #=> #{results.preprocessed_word?}"
49
+ puts "#{indent * 2}preprocessed_word_or_original_word #=> #{string_or_nil results.preprocessed_word_or_original_word}"
50
+ puts "#{indent * 2}filter_match? #=> #{results.filter_match?}"
51
+ puts "#{indent * 2}filters_matched: #=> #{results.filters_matched}"
52
+ puts "#{indent * 2}preprocessed_words #=>"
53
+ results.preprocessed_words&.preprocessed_words.each_with_index do |preprocessed_word, index|
54
+ puts "#{indent * 3}preprocessed_words[#{index}] #=>"
55
+ puts "#{indent * 4}preprocessed_word #=>"
56
+ puts "#{indent * 5}preprocessor: :#{preprocessed_word.preprocessor}"
57
+ puts "#{indent * 5}preprocessor_order: #{preprocessed_word.preprocessor_order}"
58
+ end
59
+ puts
60
+ end
61
+
62
+ def string_or_nil(value)
63
+ return 'nil' if value.nil?
64
+ "\"#{value}\""
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,108 @@
1
+ RSpec.shared_context 'dictionary cache' do
2
+ def dictionary_cache_for(dictionary_key:, dictionary_file_source: true, load: false)
3
+ dictionary_cache_from(dictionary_keys: [{ dictionary_key: dictionary_key, dictionary_file_source: dictionary_file_source, load: load }])
4
+ end
5
+
6
+ # This method simple returns a snapshot of what the dictionary cache would
7
+ # look like if the given dictionary_key(s) were added as a dictionary reference.
8
+ # This method expects an Array of Hashes having the following format; if
9
+ # load is omitted, 'load: false' is the default:
10
+ #
11
+ # [
12
+ # {
13
+ # dictionary_key: <dictionary_key>
14
+ # dictionary_file_source: nil | true | false | <file name minus extension>,
15
+ # dictionary_memory_source: nil | true | false |,
16
+ # [, load: true | false]
17
+ # }
18
+ # ]
19
+ def dictionary_cache_from(dictionary_keys:)
20
+ raise ArgumentError, 'Argument dictionary_keys is not an Array' unless dictionary_keys.is_a? Array
21
+
22
+ dictionary_cache = {}
23
+
24
+ dictionary_keys.each do |hash|
25
+ raise ArgumentError, "Expected required Hash key :dictionary_key but it was not found" unless hash.key? :dictionary_key
26
+
27
+ create(:dictionary_cache_service,
28
+ dictionary_cache: dictionary_cache,
29
+ dictionary_key: hash[:dictionary_key],
30
+ dictionary_file_source: hash[:dictionary_file_source],
31
+ dictionary_memory_source: hash[:dictionary_memory_source],
32
+ load: hash.fetch(:load, false))
33
+ end
34
+
35
+ dictionary_cache
36
+ end
37
+ end
38
+
39
+ RSpec.shared_context 'dictionary keys' do
40
+ def dictionary_key_for(language:, region: nil, tag: nil)
41
+ create(:dictionary_key, language: language, region: region, tag: tag)
42
+ end
43
+ end
44
+
45
+ RSpec.shared_context 'mock word filters' do
46
+
47
+ unless Object.const_defined?('WordFilter01')
48
+ class WordFilter01 < LittleWeasel::Filters::WordFilter
49
+ class << self
50
+ def filter_match?(word)
51
+ true
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ unless Object.const_defined?('WordFilter02')
58
+ class WordFilter02 < LittleWeasel::Filters::WordFilter
59
+ class << self
60
+ def filter_match?(word)
61
+ true
62
+ end
63
+ end
64
+ end
65
+ end
66
+
67
+ unless Object.const_defined?('DollarSignFilter')
68
+ class DollarSignFilter < LittleWeasel::Filters::WordFilter
69
+ class << self
70
+ def filter_match?(word)
71
+ word == '$'
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+
78
+ RSpec.shared_context 'mock word preprocessors' do
79
+ class UpcaseWordPreprocessor < LittleWeasel::Preprocessors::WordPreprocessor
80
+ class << self
81
+ def preprocess(word)
82
+ [true, word.upcase];
83
+ end
84
+ end
85
+ end
86
+
87
+ class DowncaseWordPreprocessor < LittleWeasel::Preprocessors::WordPreprocessor
88
+ class << self
89
+ def preprocess(word)
90
+ [true, word.downcase];
91
+ end
92
+ end
93
+ end
94
+ end
95
+
96
+ RSpec.shared_context 'dictionary sourceable' do
97
+ def memory_source
98
+ LittleWeasel::Modules::DictionarySourceable.memory_source
99
+ end
100
+ end
101
+
102
+ RSpec.configure do |config|
103
+ config.include_context 'dictionary cache', include_shared: true
104
+ config.include_context 'dictionary keys', include_shared: true
105
+ config.include_context 'dictionary sourceable', include_shared: true
106
+ config.include_context 'mock word filters', include_shared: true
107
+ config.include_context 'mock word preprocessors', include_shared: true
108
+ end
@@ -0,0 +1,105 @@
1
+ RSpec.shared_examples 'the dictionary_key is invalid' do
2
+ context 'when the dictionary_key is nil' do
3
+ let(:dictionary_key) {}
4
+
5
+ it 'raises an error' do
6
+ expect { subject }.to raise_error "Argument dictionary_key is not a valid DictionaryKey object: #{dictionary_key.class}"
7
+ end
8
+ end
9
+
10
+ context 'when the dictionary_key is the wrong type' do
11
+ let(:dictionary_key) { :bad_dictionary_key }
12
+
13
+ it 'raises an error' do
14
+ expect { subject }.to raise_error "Argument dictionary_key is not a valid DictionaryKey object: #{dictionary_key.class}"
15
+ end
16
+ end
17
+ end
18
+
19
+ RSpec.shared_examples 'the dictionary_cache is invalid' do
20
+ context 'when the dictionary_cache is nil' do
21
+ let(:dictionary_cache) {}
22
+
23
+ it 'raises an error' do
24
+ expect { subject }.to raise_error "Argument dictionary_cache is not a valid Hash object: #{dictionary_cache.class}"
25
+ end
26
+ end
27
+
28
+ context 'when the dictionary_cache is the wrong type' do
29
+ let(:dictionary_cache) { :bad_dictionary_cache }
30
+
31
+ it 'raises an error' do
32
+ expect { subject }.to raise_error "Argument dictionary_cache is not a valid Hash object: #{dictionary_cache.class}"
33
+ end
34
+ end
35
+ end
36
+
37
+ RSpec.shared_examples 'the dictionary_metadata is invalid' do
38
+ context 'when the dictionary_metadata is nil' do
39
+ let(:dictionary_metadata) {}
40
+
41
+ it 'raises an error' do
42
+ expect { subject }.to raise_error "Argument dictionary_metadata is not a valid Hash object: #{dictionary_metadata.class}"
43
+ end
44
+ end
45
+
46
+ context 'when the dictionary_metadata is the wrong type' do
47
+ let(:dictionary_metadata) { :bad_dictionary_metadata }
48
+
49
+ it 'raises an error' do
50
+ expect { subject }.to raise_error "Argument dictionary_metadata is not a valid Hash object: #{dictionary_metadata.class}"
51
+ end
52
+ end
53
+ end
54
+
55
+ # Word filter shared examples
56
+
57
+ RSpec.shared_examples 'the filter matches and #filter_on? is true' do
58
+ it 'returns true' do
59
+ expect(subject.filter_match? word).to eq true
60
+ end
61
+ end
62
+
63
+ RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is true' do
64
+ it 'returns false' do
65
+ expect(subject.filter_match? word).to eq false
66
+ end
67
+ end
68
+
69
+ RSpec.shared_examples 'the filter matches and #filter_on? is false' do
70
+ it 'returns false' do
71
+ expect(subject.filter_match? word).to eq false
72
+ end
73
+ end
74
+
75
+ RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is false' do
76
+ it 'returns false' do
77
+ expect(subject.filter_match? word).to eq false
78
+ end
79
+ end
80
+
81
+ # Preprocessor shared examples
82
+
83
+ RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is true' do
84
+ it 'returns true' do
85
+ expect(subject.preprocess? word).to eq true
86
+ end
87
+ end
88
+
89
+ RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is true' do
90
+ it 'returns false' do
91
+ expect(subject.preprocess? word).to eq false
92
+ end
93
+ end
94
+
95
+ RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is false' do
96
+ it 'returns false' do
97
+ expect(subject.preprocess? word).to eq false
98
+ end
99
+ end
100
+
101
+ RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is false' do
102
+ it 'returns false' do
103
+ expect(subject.preprocess? word).to eq false
104
+ end
105
+ end
metadata CHANGED
@@ -1,117 +1,255 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: LittleWeasel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2021-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
20
- - - '>='
19
+ version: '6.1'
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 4.1.1
22
+ version: 6.1.3.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '4.1'
30
- - - '>='
29
+ version: '6.1'
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 4.1.1
32
+ version: 6.1.3.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: benchmark-ips
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.3'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.3'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: bundler
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
- - - ~>
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '2.2'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 2.2.17
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '2.2'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.2.17
67
+ - !ruby/object:Gem::Dependency
68
+ name: factory_bot
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '6.2'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '6.2'
81
+ - !ruby/object:Gem::Dependency
82
+ name: pry-byebug
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
38
86
  - !ruby/object:Gem::Version
39
- version: '1.3'
87
+ version: '3.9'
40
88
  type: :development
41
89
  prerelease: false
42
90
  version_requirements: !ruby/object:Gem::Requirement
43
91
  requirements:
44
- - - ~>
92
+ - - "~>"
45
93
  - !ruby/object:Gem::Version
46
- version: '1.3'
94
+ version: '3.9'
47
95
  - !ruby/object:Gem::Dependency
48
96
  name: rake
49
97
  requirement: !ruby/object:Gem::Requirement
50
98
  requirements:
51
- - - ~>
99
+ - - "~>"
52
100
  - !ruby/object:Gem::Version
53
101
  version: '0'
54
102
  type: :development
55
103
  prerelease: false
56
104
  version_requirements: !ruby/object:Gem::Requirement
57
105
  requirements:
58
- - - ~>
106
+ - - "~>"
59
107
  - !ruby/object:Gem::Version
60
108
  version: '0'
61
109
  - !ruby/object:Gem::Dependency
62
- name: rspec
110
+ name: redcarpet
63
111
  requirement: !ruby/object:Gem::Requirement
64
112
  requirements:
65
- - - ~>
113
+ - - "~>"
66
114
  - !ruby/object:Gem::Version
67
- version: '3.0'
68
- - - '>='
115
+ version: '3.5'
116
+ - - ">="
69
117
  - !ruby/object:Gem::Version
70
- version: 3.0.0
118
+ version: 3.5.1
71
119
  type: :development
72
120
  prerelease: false
73
121
  version_requirements: !ruby/object:Gem::Requirement
74
122
  requirements:
75
- - - ~>
123
+ - - "~>"
76
124
  - !ruby/object:Gem::Version
77
- version: '3.0'
78
- - - '>='
125
+ version: '3.5'
126
+ - - ">="
79
127
  - !ruby/object:Gem::Version
80
- version: 3.0.0
128
+ version: 3.5.1
81
129
  - !ruby/object:Gem::Dependency
82
- name: yard
130
+ name: reek
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '6.0'
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 6.0.4
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '6.0'
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 6.0.4
149
+ - !ruby/object:Gem::Dependency
150
+ name: rspec
83
151
  requirement: !ruby/object:Gem::Requirement
84
152
  requirements:
85
- - - '='
153
+ - - "~>"
86
154
  - !ruby/object:Gem::Version
87
- version: 0.8.6.1
155
+ version: '3.10'
88
156
  type: :development
89
157
  prerelease: false
90
158
  version_requirements: !ruby/object:Gem::Requirement
91
159
  requirements:
92
- - - '='
160
+ - - "~>"
93
161
  - !ruby/object:Gem::Version
94
- version: 0.8.6.1
162
+ version: '3.10'
95
163
  - !ruby/object:Gem::Dependency
96
- name: redcarpet
164
+ name: rubocop
97
165
  requirement: !ruby/object:Gem::Requirement
98
166
  requirements:
99
- - - ~>
167
+ - - "~>"
100
168
  - !ruby/object:Gem::Version
101
- version: '2.3'
102
- - - '>='
169
+ version: 1.9.1
170
+ type: :development
171
+ prerelease: false
172
+ version_requirements: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - "~>"
175
+ - !ruby/object:Gem::Version
176
+ version: 1.9.1
177
+ - !ruby/object:Gem::Dependency
178
+ name: rubocop-performance
179
+ requirement: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - "~>"
182
+ - !ruby/object:Gem::Version
183
+ version: '1.11'
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: 1.11.3
187
+ type: :development
188
+ prerelease: false
189
+ version_requirements: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: '1.11'
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: 1.11.3
197
+ - !ruby/object:Gem::Dependency
198
+ name: rubocop-rspec
199
+ requirement: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
103
202
  - !ruby/object:Gem::Version
104
- version: 2.3.0
203
+ version: '2.3'
105
204
  type: :development
106
205
  prerelease: false
107
206
  version_requirements: !ruby/object:Gem::Requirement
108
207
  requirements:
109
- - - ~>
208
+ - - "~>"
110
209
  - !ruby/object:Gem::Version
111
210
  version: '2.3'
112
- - - '>='
211
+ - !ruby/object:Gem::Dependency
212
+ name: simplecov
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - "~>"
216
+ - !ruby/object:Gem::Version
217
+ version: 0.21.2
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "~>"
223
+ - !ruby/object:Gem::Version
224
+ version: 0.21.2
225
+ - !ruby/object:Gem::Dependency
226
+ name: webrick
227
+ requirement: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - "~>"
230
+ - !ruby/object:Gem::Version
231
+ version: '1.7'
232
+ type: :development
233
+ prerelease: false
234
+ version_requirements: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - "~>"
237
+ - !ruby/object:Gem::Version
238
+ version: '1.7'
239
+ - !ruby/object:Gem::Dependency
240
+ name: yard
241
+ requirement: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - "~>"
113
244
  - !ruby/object:Gem::Version
114
- version: 2.3.0
245
+ version: 0.9.26
246
+ type: :development
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ requirements:
250
+ - - "~>"
251
+ - !ruby/object:Gem::Version
252
+ version: 0.9.26
115
253
  description: Simple spellchecker for single, or multiple word blocks.
116
254
  email:
117
255
  - public.gma@gmail.com
@@ -119,21 +257,24 @@ executables: []
119
257
  extensions: []
120
258
  extra_rdoc_files: []
121
259
  files:
122
- - .gitignore
123
- - .idea/.name
124
- - .idea/.rakeTasks
125
- - .idea/LittleWeasel.iml
126
- - .idea/dictionaries/gangelo.xml
127
- - .idea/encodings.xml
128
- - .idea/misc.xml
129
- - .idea/modules.xml
130
- - .idea/runConfigurations/Start_Yard_Server.xml
131
- - .idea/runConfigurations/checker_spec.xml
132
- - .idea/scopes/scope_settings.xml
133
- - .idea/vcs.xml
134
- - .idea/workspace.xml
135
- - .rspec
136
- - .ruby-version
260
+ - ".gitignore"
261
+ - ".idea/.name"
262
+ - ".idea/.rakeTasks"
263
+ - ".idea/LittleWeasel.iml"
264
+ - ".idea/dictionaries/gangelo.xml"
265
+ - ".idea/encodings.xml"
266
+ - ".idea/misc.xml"
267
+ - ".idea/modules.xml"
268
+ - ".idea/runConfigurations/Start_Yard_Server.xml"
269
+ - ".idea/runConfigurations/checker_spec.xml"
270
+ - ".idea/scopes/scope_settings.xml"
271
+ - ".idea/vcs.xml"
272
+ - ".idea/workspace.xml"
273
+ - ".reek.yml"
274
+ - ".rspec"
275
+ - ".rubocop.yml"
276
+ - ".ruby-version"
277
+ - ".yardopts"
137
278
  - CHANGELOG.md
138
279
  - Gemfile
139
280
  - LICENSE.txt
@@ -141,36 +282,238 @@ files:
141
282
  - README.md
142
283
  - Rakefile
143
284
  - lib/LittleWeasel.rb
285
+ - lib/LittleWeasel/block_results.rb
286
+ - lib/LittleWeasel/configure.rb
287
+ - lib/LittleWeasel/dictionary.rb
288
+ - lib/LittleWeasel/dictionary_key.rb
289
+ - lib/LittleWeasel/dictionary_manager.rb
290
+ - lib/LittleWeasel/errors/dictionary_file_already_loaded_error.rb
291
+ - lib/LittleWeasel/errors/dictionary_file_empty_error.rb
292
+ - lib/LittleWeasel/errors/dictionary_file_not_found_error.rb
293
+ - lib/LittleWeasel/errors/dictionary_file_too_large_error.rb
294
+ - lib/LittleWeasel/errors/language_required_error.rb
295
+ - lib/LittleWeasel/errors/must_override_error.rb
296
+ - lib/LittleWeasel/filters/en_us/currency_filter.rb
297
+ - lib/LittleWeasel/filters/en_us/numeric_filter.rb
298
+ - lib/LittleWeasel/filters/en_us/single_character_word_filter.rb
299
+ - lib/LittleWeasel/filters/word_filter.rb
300
+ - lib/LittleWeasel/filters/word_filter_managable.rb
301
+ - lib/LittleWeasel/filters/word_filter_validatable.rb
302
+ - lib/LittleWeasel/filters/word_filterable.rb
303
+ - lib/LittleWeasel/filters/word_filters_validatable.rb
304
+ - lib/LittleWeasel/metadata/dictionary_metadata.rb
305
+ - lib/LittleWeasel/metadata/invalid_words_metadata.rb
306
+ - lib/LittleWeasel/metadata/invalid_words_service_results.rb
307
+ - lib/LittleWeasel/metadata/metadata_observable_validatable.rb
308
+ - lib/LittleWeasel/metadata/metadata_observerable.rb
309
+ - lib/LittleWeasel/metadata/metadatable.rb
310
+ - lib/LittleWeasel/modules/class_name_to_symbol.rb
311
+ - lib/LittleWeasel/modules/configurable.rb
312
+ - lib/LittleWeasel/modules/deep_dup.rb
313
+ - lib/LittleWeasel/modules/dictionary_cache_keys.rb
314
+ - lib/LittleWeasel/modules/dictionary_cache_servicable.rb
315
+ - lib/LittleWeasel/modules/dictionary_cache_validatable.rb
316
+ - lib/LittleWeasel/modules/dictionary_creator_servicable.rb
317
+ - lib/LittleWeasel/modules/dictionary_file_loader.rb
318
+ - lib/LittleWeasel/modules/dictionary_key_validatable.rb
319
+ - lib/LittleWeasel/modules/dictionary_keyable.rb
320
+ - lib/LittleWeasel/modules/dictionary_loader_servicable.rb
321
+ - lib/LittleWeasel/modules/dictionary_metadata_servicable.rb
322
+ - lib/LittleWeasel/modules/dictionary_metadata_validatable.rb
323
+ - lib/LittleWeasel/modules/dictionary_sourceable.rb
324
+ - lib/LittleWeasel/modules/dictionary_validatable.rb
325
+ - lib/LittleWeasel/modules/language.rb
326
+ - lib/LittleWeasel/modules/language_validatable.rb
327
+ - lib/LittleWeasel/modules/locale.rb
328
+ - lib/LittleWeasel/modules/order_validatable.rb
329
+ - lib/LittleWeasel/modules/orderable.rb
330
+ - lib/LittleWeasel/modules/region.rb
331
+ - lib/LittleWeasel/modules/region_validatable.rb
332
+ - lib/LittleWeasel/modules/tag_validatable.rb
333
+ - lib/LittleWeasel/modules/taggable.rb
334
+ - lib/LittleWeasel/modules/word_results_validatable.rb
335
+ - lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor.rb
336
+ - lib/LittleWeasel/preprocessors/preprocessed_word.rb
337
+ - lib/LittleWeasel/preprocessors/preprocessed_word_validatable.rb
338
+ - lib/LittleWeasel/preprocessors/preprocessed_words.rb
339
+ - lib/LittleWeasel/preprocessors/preprocessed_words_validatable.rb
340
+ - lib/LittleWeasel/preprocessors/word_preprocessable.rb
341
+ - lib/LittleWeasel/preprocessors/word_preprocessor.rb
342
+ - lib/LittleWeasel/preprocessors/word_preprocessor_managable.rb
343
+ - lib/LittleWeasel/preprocessors/word_preprocessor_validatable.rb
344
+ - lib/LittleWeasel/preprocessors/word_preprocessors_validatable.rb
345
+ - lib/LittleWeasel/services/dictionary_cache_service.rb
346
+ - lib/LittleWeasel/services/dictionary_creator_service.rb
347
+ - lib/LittleWeasel/services/dictionary_file_loader_service.rb
348
+ - lib/LittleWeasel/services/dictionary_killer_service.rb
349
+ - lib/LittleWeasel/services/dictionary_loader_service.rb
350
+ - lib/LittleWeasel/services/dictionary_metadata_service.rb
351
+ - lib/LittleWeasel/services/invalid_words_service.rb
144
352
  - lib/LittleWeasel/version.rb
145
- - lib/dictionary
146
- - spec/checker/checker_spec.rb
353
+ - lib/LittleWeasel/word_results.rb
354
+ - spec/factories/dictionary.rb
355
+ - spec/factories/dictionary_cache_service.rb
356
+ - spec/factories/dictionary_creator_service.rb
357
+ - spec/factories/dictionary_file_loader_service.rb
358
+ - spec/factories/dictionary_hash.rb
359
+ - spec/factories/dictionary_key.rb
360
+ - spec/factories/dictionary_killer_service.rb
361
+ - spec/factories/dictionary_loader_service.rb
362
+ - spec/factories/dictionary_manager.rb
363
+ - spec/factories/dictionary_metadata.rb
364
+ - spec/factories/dictionary_metadata_service.rb
365
+ - spec/factories/numeric_filter.rb
366
+ - spec/factories/preprocessed_word.rb
367
+ - spec/factories/preprocessed_words.rb
368
+ - spec/factories/single_character_word_filter.rb
369
+ - spec/factories/word_results.rb
370
+ - spec/lib/LittleWeasel/block_results_spec.rb
371
+ - spec/lib/LittleWeasel/configure_spec.rb
372
+ - spec/lib/LittleWeasel/dictionary_key_spec.rb
373
+ - spec/lib/LittleWeasel/dictionary_manager_spec.rb
374
+ - spec/lib/LittleWeasel/dictionary_spec.rb
375
+ - spec/lib/LittleWeasel/filters/en_us/currency_filter_spec.rb
376
+ - spec/lib/LittleWeasel/filters/en_us/numeric_filter_spec.rb
377
+ - spec/lib/LittleWeasel/filters/en_us/single_character_word_filter_spec.rb
378
+ - spec/lib/LittleWeasel/filters/word_filter_managable_spec.rb
379
+ - spec/lib/LittleWeasel/filters/word_filter_spec.rb
380
+ - spec/lib/LittleWeasel/filters/word_filter_validatable_spec.rb
381
+ - spec/lib/LittleWeasel/filters/word_filters_validatable_spec.rb
382
+ - spec/lib/LittleWeasel/integraton_tests/dictionary_integration_spec.rb
383
+ - spec/lib/LittleWeasel/metadata/dictionary_creator_servicable_spec.rb
384
+ - spec/lib/LittleWeasel/metadata/dictionary_metadata_spec.rb
385
+ - spec/lib/LittleWeasel/metadata/invalid_words_metadata_spec.rb
386
+ - spec/lib/LittleWeasel/metadata/metadata_observerable_spec.rb
387
+ - spec/lib/LittleWeasel/metadata/metadatable_spec.rb
388
+ - spec/lib/LittleWeasel/modules/class_name_to_symbol_spec.rb
389
+ - spec/lib/LittleWeasel/modules/dictionary_file_loader_spec.rb
390
+ - spec/lib/LittleWeasel/modules/dictionary_sourceable_spec.rb
391
+ - spec/lib/LittleWeasel/modules/language_spec.rb
392
+ - spec/lib/LittleWeasel/modules/locale_spec.rb
393
+ - spec/lib/LittleWeasel/modules/region_spec.rb
394
+ - spec/lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor_spec.rb
395
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_word_spec.rb
396
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_word_validatable_spec.rb
397
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_words_spec.rb
398
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_words_validatable_spec.rb
399
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_managable_spec.rb
400
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_spec.rb
401
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_validatable_spec.rb
402
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessors_validatable_spec.rb
403
+ - spec/lib/LittleWeasel/services/dictionary_cache_service_spec.rb
404
+ - spec/lib/LittleWeasel/services/dictionary_creator_service_spec.rb
405
+ - spec/lib/LittleWeasel/services/dictionary_file_loader_service_spec.rb
406
+ - spec/lib/LittleWeasel/services/dictionary_loader_service_spec.rb
407
+ - spec/lib/LittleWeasel/services/dictionary_metadata_service_spec.rb
408
+ - spec/lib/LittleWeasel/word_results_spec.rb
409
+ - spec/lib/LittleWeasel/workflow/workflow_spec.rb
147
410
  - spec/spec_helper.rb
411
+ - spec/support/factory_bot.rb
412
+ - spec/support/file_helpers.rb
413
+ - spec/support/files/empty-dictionary.txt
414
+ - spec/support/files/en-US-big.txt
415
+ - spec/support/files/en-US-tagged.txt
416
+ - spec/support/files/en-US.txt
417
+ - spec/support/files/en.txt
418
+ - spec/support/files/es-ES.txt
419
+ - spec/support/files/es.txt
420
+ - spec/support/general_helpers.rb
421
+ - spec/support/shared_contexts.rb
422
+ - spec/support/shared_examples.rb
148
423
  homepage: http://www.geneangelo.com
149
424
  licenses:
150
425
  - MIT
151
426
  metadata: {}
152
- post_install_message:
427
+ post_install_message:
153
428
  rdoc_options: []
154
429
  require_paths:
155
430
  - lib
156
431
  required_ruby_version: !ruby/object:Gem::Requirement
157
432
  requirements:
158
- - - ~>
433
+ - - "~>"
434
+ - !ruby/object:Gem::Version
435
+ version: '3.0'
436
+ - - ">="
159
437
  - !ruby/object:Gem::Version
160
- version: '2.0'
438
+ version: 3.0.1
161
439
  required_rubygems_version: !ruby/object:Gem::Requirement
162
440
  requirements:
163
- - - '>='
441
+ - - ">="
164
442
  - !ruby/object:Gem::Version
165
443
  version: '0'
166
444
  requirements: []
167
- rubyforge_project:
168
- rubygems_version: 2.0.14
169
- signing_key:
445
+ rubygems_version: 3.2.15
446
+ signing_key:
170
447
  specification_version: 4
171
448
  summary: Simply checks a word or group of words for validity against an english dictionary
172
449
  file.
173
450
  test_files:
174
- - spec/checker/checker_spec.rb
451
+ - spec/factories/dictionary.rb
452
+ - spec/factories/dictionary_cache_service.rb
453
+ - spec/factories/dictionary_creator_service.rb
454
+ - spec/factories/dictionary_file_loader_service.rb
455
+ - spec/factories/dictionary_hash.rb
456
+ - spec/factories/dictionary_key.rb
457
+ - spec/factories/dictionary_killer_service.rb
458
+ - spec/factories/dictionary_loader_service.rb
459
+ - spec/factories/dictionary_manager.rb
460
+ - spec/factories/dictionary_metadata.rb
461
+ - spec/factories/dictionary_metadata_service.rb
462
+ - spec/factories/numeric_filter.rb
463
+ - spec/factories/preprocessed_word.rb
464
+ - spec/factories/preprocessed_words.rb
465
+ - spec/factories/single_character_word_filter.rb
466
+ - spec/factories/word_results.rb
467
+ - spec/lib/LittleWeasel/block_results_spec.rb
468
+ - spec/lib/LittleWeasel/configure_spec.rb
469
+ - spec/lib/LittleWeasel/dictionary_key_spec.rb
470
+ - spec/lib/LittleWeasel/dictionary_manager_spec.rb
471
+ - spec/lib/LittleWeasel/dictionary_spec.rb
472
+ - spec/lib/LittleWeasel/filters/en_us/currency_filter_spec.rb
473
+ - spec/lib/LittleWeasel/filters/en_us/numeric_filter_spec.rb
474
+ - spec/lib/LittleWeasel/filters/en_us/single_character_word_filter_spec.rb
475
+ - spec/lib/LittleWeasel/filters/word_filter_managable_spec.rb
476
+ - spec/lib/LittleWeasel/filters/word_filter_spec.rb
477
+ - spec/lib/LittleWeasel/filters/word_filter_validatable_spec.rb
478
+ - spec/lib/LittleWeasel/filters/word_filters_validatable_spec.rb
479
+ - spec/lib/LittleWeasel/integraton_tests/dictionary_integration_spec.rb
480
+ - spec/lib/LittleWeasel/metadata/dictionary_creator_servicable_spec.rb
481
+ - spec/lib/LittleWeasel/metadata/dictionary_metadata_spec.rb
482
+ - spec/lib/LittleWeasel/metadata/invalid_words_metadata_spec.rb
483
+ - spec/lib/LittleWeasel/metadata/metadata_observerable_spec.rb
484
+ - spec/lib/LittleWeasel/metadata/metadatable_spec.rb
485
+ - spec/lib/LittleWeasel/modules/class_name_to_symbol_spec.rb
486
+ - spec/lib/LittleWeasel/modules/dictionary_file_loader_spec.rb
487
+ - spec/lib/LittleWeasel/modules/dictionary_sourceable_spec.rb
488
+ - spec/lib/LittleWeasel/modules/language_spec.rb
489
+ - spec/lib/LittleWeasel/modules/locale_spec.rb
490
+ - spec/lib/LittleWeasel/modules/region_spec.rb
491
+ - spec/lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor_spec.rb
492
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_word_spec.rb
493
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_word_validatable_spec.rb
494
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_words_spec.rb
495
+ - spec/lib/LittleWeasel/preprocessors/preprocessed_words_validatable_spec.rb
496
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_managable_spec.rb
497
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_spec.rb
498
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessor_validatable_spec.rb
499
+ - spec/lib/LittleWeasel/preprocessors/word_preprocessors_validatable_spec.rb
500
+ - spec/lib/LittleWeasel/services/dictionary_cache_service_spec.rb
501
+ - spec/lib/LittleWeasel/services/dictionary_creator_service_spec.rb
502
+ - spec/lib/LittleWeasel/services/dictionary_file_loader_service_spec.rb
503
+ - spec/lib/LittleWeasel/services/dictionary_loader_service_spec.rb
504
+ - spec/lib/LittleWeasel/services/dictionary_metadata_service_spec.rb
505
+ - spec/lib/LittleWeasel/word_results_spec.rb
506
+ - spec/lib/LittleWeasel/workflow/workflow_spec.rb
175
507
  - spec/spec_helper.rb
176
- has_rdoc:
508
+ - spec/support/factory_bot.rb
509
+ - spec/support/file_helpers.rb
510
+ - spec/support/files/empty-dictionary.txt
511
+ - spec/support/files/en-US-big.txt
512
+ - spec/support/files/en-US-tagged.txt
513
+ - spec/support/files/en-US.txt
514
+ - spec/support/files/en.txt
515
+ - spec/support/files/es-ES.txt
516
+ - spec/support/files/es.txt
517
+ - spec/support/general_helpers.rb
518
+ - spec/support/shared_contexts.rb
519
+ - spec/support/shared_examples.rb