rambling-trie 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/README.md +16 -10
  4. data/lib/rambling/trie/compressor.rb +2 -0
  5. data/lib/rambling/trie/configuration/properties.rb +5 -2
  6. data/lib/rambling/trie/configuration/provider_collection.rb +2 -2
  7. data/lib/rambling/trie/container.rb +12 -1
  8. data/lib/rambling/trie/enumerable.rb +1 -1
  9. data/lib/rambling/trie/nodes/node.rb +4 -4
  10. data/lib/rambling/trie/nodes/raw.rb +2 -1
  11. data/lib/rambling/trie/readers/plain_text.rb +1 -1
  12. data/lib/rambling/trie/serializers/file.rb +1 -3
  13. data/lib/rambling/trie/serializers/marshal.rb +3 -3
  14. data/lib/rambling/trie/serializers/yaml.rb +2 -2
  15. data/lib/rambling/trie/serializers/zip.rb +2 -0
  16. data/lib/rambling/trie/version.rb +1 -1
  17. data/lib/rambling/trie.rb +1 -1
  18. data/rambling-trie.gemspec +3 -9
  19. metadata +7 -122
  20. data/spec/assets/test_words.en_US.txt +0 -23
  21. data/spec/assets/test_words.es_DO.txt +0 -24
  22. data/spec/integration/rambling/trie_spec.rb +0 -116
  23. data/spec/lib/rambling/trie/comparable_spec.rb +0 -87
  24. data/spec/lib/rambling/trie/compressor_spec.rb +0 -111
  25. data/spec/lib/rambling/trie/configuration/properties_spec.rb +0 -75
  26. data/spec/lib/rambling/trie/configuration/provider_collection_spec.rb +0 -177
  27. data/spec/lib/rambling/trie/container_spec.rb +0 -466
  28. data/spec/lib/rambling/trie/enumerable_spec.rb +0 -50
  29. data/spec/lib/rambling/trie/inspectable_spec.rb +0 -62
  30. data/spec/lib/rambling/trie/nodes/compressed_spec.rb +0 -43
  31. data/spec/lib/rambling/trie/nodes/node_spec.rb +0 -9
  32. data/spec/lib/rambling/trie/nodes/raw_spec.rb +0 -184
  33. data/spec/lib/rambling/trie/readers/plain_text_spec.rb +0 -26
  34. data/spec/lib/rambling/trie/readers/reader_spec.rb +0 -14
  35. data/spec/lib/rambling/trie/serializers/file_spec.rb +0 -11
  36. data/spec/lib/rambling/trie/serializers/marshal_spec.rb +0 -10
  37. data/spec/lib/rambling/trie/serializers/serializer_spec.rb +0 -21
  38. data/spec/lib/rambling/trie/serializers/yaml_spec.rb +0 -10
  39. data/spec/lib/rambling/trie/serializers/zip_spec.rb +0 -36
  40. data/spec/lib/rambling/trie/stringifyable_spec.rb +0 -89
  41. data/spec/lib/rambling/trie_spec.rb +0 -244
  42. data/spec/spec_helper.rb +0 -42
  43. data/spec/support/config.rb +0 -15
  44. data/spec/support/helpers/add_word.rb +0 -20
  45. data/spec/support/helpers/one_line_heredoc.rb +0 -11
  46. data/spec/support/shared_examples/a_compressible_trie.rb +0 -46
  47. data/spec/support/shared_examples/a_container_partial_word.rb +0 -17
  48. data/spec/support/shared_examples/a_container_scan.rb +0 -14
  49. data/spec/support/shared_examples/a_container_word.rb +0 -43
  50. data/spec/support/shared_examples/a_container_words_within.rb +0 -44
  51. data/spec/support/shared_examples/a_serializable_trie.rb +0 -26
  52. data/spec/support/shared_examples/a_serializer.rb +0 -60
  53. data/spec/support/shared_examples/a_trie_data_structure.rb +0 -45
  54. data/spec/support/shared_examples/a_trie_node.rb +0 -135
  55. data/spec/support/shared_examples/a_trie_node_implementation.rb +0 -149
  56. data/spec/tmp/.gitkeep +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25c794ace94646da9b2892ea80c8df575cb3c95fc870790df2b50edde7fbb91e
4
- data.tar.gz: e2be8d009e65109b52a1f36f524701b2d9452855aeceb8870e02fe7db52b150f
3
+ metadata.gz: 0a489fbd736614f76449e3f4254d798e759e120985a1b141fbae17ec12330c2f
4
+ data.tar.gz: e92201410e743a5660fcbbb9703f68ee4e41366b9c4ee987a65f8fd78ea46d0f
5
5
  SHA512:
6
- metadata.gz: cc61981cb9a93450b0f6159adb497f30de7fa7a7ddf98c69a3baa64ed9cd8757aa035d3f818b080822714b2b5505ed5cefbff7217ce952856630bacab2dc3afd
7
- data.tar.gz: 1afc2883a31ee9bbf63172c20d806ed952d40bc65527f582308fbe61b8c83dddc3aa3b3ab1b300ded46bf7dbd2f6e73340d22019de4ca82e0587a81bb789725c
6
+ metadata.gz: a0c8f6af0ce43902f5292829e48dfa86e3ca1b623a0742ac129af57bc10209249879f5bdf7ecb4feb65f03da6986748e8cc77f1c458816b8e1aa96063372fc5b
7
+ data.tar.gz: 1cc6eb48bf18cdace40358e3ed9371f012f164d5fb6f37e7ff99ce01a4ed0a71d18b21821c3cfef324ebf0ae59c18c2a4fe11e2c8a12044de649c75772221fcb
data/Gemfile CHANGED
@@ -11,8 +11,11 @@ group :development do
11
11
  gem 'flamegraph'
12
12
  gem 'memory_profiler'
13
13
  gem 'pry'
14
+ gem 'rake'
15
+ gem 'rspec'
14
16
  gem 'ruby-prof'
15
17
  gem 'stackprof'
18
+ gem 'yard'
16
19
  end
17
20
 
18
21
  group :test do
data/README.md CHANGED
@@ -21,7 +21,7 @@ and is designed to be very fast to traverse.
21
21
 
22
22
  You will need:
23
23
 
24
- * Ruby 2.7.0 or up
24
+ * Ruby 3.1.0 or up
25
25
  * RubyGems
26
26
 
27
27
  See [RVM][rvm], [rbenv][rbenv] or [chruby][chruby] for more information on how to manage Ruby versions.
@@ -90,10 +90,16 @@ trie.add 'word'
90
90
  trie << 'word'
91
91
  ```
92
92
 
93
- Or if you have multiple words to add, you can use `#concat`:
93
+ Or if you have multiple words to add, you can use `#concat` or `#push`:
94
94
 
95
95
  ``` ruby
96
96
  trie.concat %w(a collection of words)
97
+ trie.push 'a', 'collection', 'of', 'words'
98
+
99
+ # or
100
+ words = %w(a collection of words)
101
+ trie.concat words
102
+ trie.push *words
97
103
  ```
98
104
 
99
105
  And to find out if a word already exists in the trie, use `#word?` or its alias `#include?`:
@@ -271,11 +277,11 @@ The Rambling Trie has been tested with the following Ruby versions:
271
277
  * 3.3.x
272
278
  * 3.2.x
273
279
  * 3.1.x
274
- * 3.0.x
275
- * 2.7.x
276
280
 
277
281
  **No longer supported**:
278
282
 
283
+ * 3.0.x (EOL'ed)
284
+ * 2.7.x (EOL'ed)
279
285
  * 2.6.x (EOL'ed)
280
286
  * 2.5.x (EOL'ed)
281
287
  * 2.4.x (EOL'ed)
@@ -310,7 +316,7 @@ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEM
310
316
  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
311
317
  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
312
318
 
313
- [badge_fury_badge]: https://badge.fury.io/rb/rambling-trie.svg?version=2.4.0
319
+ [badge_fury_badge]: https://badge.fury.io/rb/rambling-trie.svg?version=2.5.0
314
320
  [badge_fury_link]: https://badge.fury.io/rb/rambling-trie
315
321
  [chruby]: https://github.com/postmodern/chruby
316
322
  [code_climate_grade_badge]: https://codeclimate.com/github/gonzedge/rambling-trie/badges/gpa.svg
@@ -327,17 +333,17 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
327
333
  [github_action_codeql_badge]: https://github.com/gonzedge/rambling-trie/actions/workflows/codeql.yml/badge.svg
328
334
  [github_action_codeql_link]: https://github.com/gonzedge/rambling-trie/actions/workflows/codeql.yml
329
335
  [github_user_gonzedge]: https://github.com/gonzedge
330
- [inch_ci_badge]: https://inch-ci.org/github/gonzedge/rambling-trie.svg?branch=master
336
+ [inch_ci_badge]: https://inch-ci.org/github/gonzedge/rambling-trie.svg?branch=main
331
337
  [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
332
338
  [license_link]: https://opensource.org/licenses/mit-license.php
333
- [marshal]: https://ruby-doc.org/core-2.7.0/Marshal.html
339
+ [marshal]: https://ruby-doc.org/3.3.0/Marshal.html
334
340
  [rambling_trie_configuration]: https://github.com/gonzedge/rambling-trie#configuration
335
- [rambling_trie_contributing_guide]: https://github.com/gonzedge/rambling-trie/blob/master/CONTRIBUTING.md
336
- [rambling_trie_plain_text_reader]: https://github.com/gonzedge/rambling-trie/blob/master/lib/rambling/trie/readers/plain_text.rb
341
+ [rambling_trie_contributing_guide]: https://github.com/gonzedge/rambling-trie/blob/main/CONTRIBUTING.md
342
+ [rambling_trie_plain_text_reader]: https://github.com/gonzedge/rambling-trie/blob/main/lib/rambling/trie/readers/plain_text.rb
337
343
  [rbenv]: https://github.com/sstephenson/rbenv
338
344
  [rubydoc]: http://rubydoc.info/gems/rambling-trie
339
345
  [rubydoc_github]: http://rubydoc.info/github/gonzedge/rambling-trie
340
346
  [rubyzip]: https://github.com/rubyzip/rubyzip
341
347
  [rvm]: https://rvm.io
342
348
  [trie_wiki]: https://en.wikipedia.org/wiki/Trie
343
- [yaml]: https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html
349
+ [yaml]: https://ruby-doc.org/3.3.0/stdlibs/yaml/YAML.html
@@ -22,6 +22,8 @@ module Rambling
22
22
  end
23
23
 
24
24
  def merge node, other
25
+ return new_compressed_node node.letter, node.parent, node.children_tree, node.terminal? if other.nil?
26
+
25
27
  letter = node.letter.to_s << other.letter.to_s
26
28
 
27
29
  new_compressed_node letter.to_sym, node.parent, other.children_tree, other.terminal?
@@ -46,8 +46,11 @@ module Rambling
46
46
  attr_writer :readers, :serializers
47
47
 
48
48
  def reset_readers
49
- plain_text_reader = Rambling::Trie::Readers::PlainText.new
50
- @readers = Rambling::Trie::Configuration::ProviderCollection.new :reader, txt: plain_text_reader
49
+ @readers = Rambling::Trie::Configuration::ProviderCollection.new :reader, default_reader_providers
50
+ end
51
+
52
+ def default_reader_providers
53
+ { txt: Rambling::Trie::Readers::PlainText.new }
51
54
  end
52
55
 
53
56
  def reset_serializers
@@ -71,7 +71,7 @@ module Rambling
71
71
 
72
72
  # Get provider corresponding to a given format.
73
73
  # @return [Array<Symbol>] the provider corresponding to that format.
74
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-5B-5D
74
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-5B-5D
75
75
  # Hash#keys
76
76
  def formats
77
77
  providers.keys
@@ -80,7 +80,7 @@ module Rambling
80
80
  # Get provider corresponding to a given format.
81
81
  # @param [Symbol] format the format to search for in the collection.
82
82
  # @return [TProvider] the provider corresponding to that format.
83
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-5B-5D Hash#[]
83
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-5B-5D Hash#[]
84
84
  def [] format
85
85
  providers[format]
86
86
  end
@@ -68,6 +68,17 @@ module Rambling
68
68
  root.partial_word? word.chars
69
69
  end
70
70
 
71
+ # Adds all provided words to the trie.
72
+ # @param [Array<String>] words the words to add the branch from.
73
+ # @return [Array<Nodes::Node>] the collection of nodes added.
74
+ # @raise [InvalidOperation] if the trie is already compressed.
75
+ # @see #concat
76
+ # @see Nodes::Raw#add
77
+ # @see Nodes::Compressed#add
78
+ def push *words
79
+ concat words
80
+ end
81
+
71
82
  # Checks if a whole word exists in the trie.
72
83
  # @param [String] word the word to look for in the trie.
73
84
  # @return [Boolean] +true+ only if the word is found and the last character corresponds to a terminal node,
@@ -155,7 +166,7 @@ module Rambling
155
166
 
156
167
  # Array of words contained in the root {Nodes::Node Node}.
157
168
  # @return [Array<String>] all words contained in this trie.
158
- # @see https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-to_a Enumerable#to_a
169
+ # @see https://ruby-doc.org/3.3.0/Enumerable.html#method-i-to_a Enumerable#to_a
159
170
  def to_a
160
171
  root.to_a
161
172
  end
@@ -7,7 +7,7 @@ module Rambling
7
7
  include ::Enumerable
8
8
 
9
9
  # Returns number of words contained in the trie
10
- # @see https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-count Enumerable#count
10
+ # @see https://ruby-doc.org/3.3.0/Enumerable.html#method-i-count Enumerable#count
11
11
  alias_method :size, :count
12
12
 
13
13
  # Iterates over the words contained in the trie.
@@ -122,7 +122,7 @@ module Rambling
122
122
  # Get {Node Node} corresponding to a given letter.
123
123
  # @param [Symbol] letter the letter to search for in the node.
124
124
  # @return [Node] the node corresponding to that letter.
125
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-5B-5D Hash#[]
125
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-5B-5D Hash#[]
126
126
  def [] letter
127
127
  children_tree[letter]
128
128
  end
@@ -131,7 +131,7 @@ module Rambling
131
131
  # @param [Symbol] letter the letter to insert or update in the node's
132
132
  # @param [Node] node the {Node Node} to assign to that letter.
133
133
  # @return [Node] the node corresponding to the inserted or updated letter.
134
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-5B-5D Hash#[]
134
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-5B-5D Hash#[]
135
135
  def []= letter, node
136
136
  children_tree[letter] = node
137
137
  end
@@ -139,7 +139,7 @@ module Rambling
139
139
  # Check if a {Node Node}'s children tree contains a given letter.
140
140
  # @param [Symbol] letter the letter to search for in the node.
141
141
  # @return [Boolean] +true+ if the letter is present, +false+ otherwise.
142
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-has_key-3F Hash#key?
142
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-has_key-3F Hash#key?
143
143
  def key? letter
144
144
  children_tree.key? letter
145
145
  end
@@ -148,7 +148,7 @@ module Rambling
148
148
  # this {Node Node}'s children tree.
149
149
  # @param [Symbol] letter the letter to delete from the node's children tree.
150
150
  # @return [Node] the node corresponding to the deleted letter.
151
- # @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-delete Hash#delete
151
+ # @see https://ruby-doc.org/3.3.0/Hash.html#method-i-delete Hash#delete
152
152
  def delete letter
153
153
  children_tree.delete letter
154
154
  end
@@ -11,7 +11,8 @@ module Rambling
11
11
  # @note This method clears the contents of the chars variable.
12
12
  def add chars
13
13
  if chars.empty?
14
- terminal!
14
+ terminal! unless root?
15
+ self
15
16
  else
16
17
  add_to_children_tree chars
17
18
  end
@@ -10,7 +10,7 @@ module Rambling
10
10
  # @yield [String] Each line read from the file.
11
11
  # @return [self]
12
12
  def each_word filepath
13
- return enum_for :each_word unless block_given?
13
+ return enum_for :each_word, filepath unless block_given?
14
14
 
15
15
  ::File.foreach(filepath) { |line| yield line.chomp! }
16
16
 
@@ -17,9 +17,7 @@ module Rambling
17
17
  # @param [String] filepath the filepath to dump the contents to.
18
18
  # @return [Numeric] number of bytes written to disk.
19
19
  def dump contents, filepath
20
- ::File.open filepath, 'w+' do |f|
21
- f.write contents
22
- end
20
+ ::File.write filepath, contents
23
21
  end
24
22
  end
25
23
  end
@@ -15,8 +15,8 @@ module Rambling
15
15
  # Loads marshaled object from contents in filepath and deserializes it into a {Nodes::Node Node}.
16
16
  # @param [String] filepath the full path of the file to load the marshaled object from.
17
17
  # @return [Nodes::Node] The deserialized {Nodes::Node Node}.
18
- # @see https://ruby-doc.org/core-2.7.0/Marshal.html#method-c-load Marshal.load
19
- # @note Use of {https://ruby-doc.org/core-2.7.0/Marshal.html#method-c-load Marshal.load} is generally
18
+ # @see https://ruby-doc.org/3.3.0/Marshal.html#method-c-load Marshal.load
19
+ # @note Use of {https://ruby-doc.org/3.3.0/Marshal.html#method-c-load Marshal.load} is generally
20
20
  # discouraged. Only use this with trusted input.
21
21
  def load filepath
22
22
  ::Marshal.load serializer.load filepath
@@ -26,7 +26,7 @@ module Rambling
26
26
  # @param [Nodes::Node] node the node to serialize
27
27
  # @param [String] filepath the full path of the file to dump the marshaled object into.
28
28
  # @return [Numeric] number of bytes written to disk.
29
- # @see https://ruby-doc.org/core-2.7.0/Marshal.html#method-c-dump Marshal.dump
29
+ # @see https://ruby-doc.org/3.3.0/Marshal.html#method-c-dump Marshal.dump
30
30
  def dump node, filepath
31
31
  serializer.dump ::Marshal.dump(node), filepath
32
32
  end
@@ -15,7 +15,7 @@ module Rambling
15
15
  # Loads serialized object from YAML file in filepath and deserializes it into a {Nodes::Node Node}.
16
16
  # @param [String] filepath the full path of the file to load the serialized YAML object from.
17
17
  # @return [Nodes::Node] The deserialized {Nodes::Node Node}.
18
- # @see https://ruby-doc.org/stdlib-2.7.0/libdoc/psych/rdoc/Psych.html#method-c-safe_load Psych.safe_load
18
+ # @see https://ruby-doc.org/3.3.0/exts/psych/Psych.html#method-c-safe_load Psych.safe_load
19
19
  def load filepath
20
20
  require 'yaml'
21
21
  ::YAML.safe_load(
@@ -33,7 +33,7 @@ module Rambling
33
33
  # @param [Nodes::Node] node the node to serialize
34
34
  # @param [String] filepath the full path of the file to dump the YAML object into.
35
35
  # @return [Numeric] number of bytes written to disk.
36
- # @see https://ruby-doc.org/stdlib-2.7.0/libdoc/psych/rdoc/Psych.html#method-c-dump Psych.dump
36
+ # @see https://ruby-doc.org/3.3.0/exts/psych/Psych.html#method-c-dump Psych.dump
37
37
  def dump node, filepath
38
38
  require 'yaml'
39
39
  serializer.dump ::YAML.dump(node), filepath
@@ -26,6 +26,8 @@ module Rambling
26
26
 
27
27
  ::Zip::File.open filepath do |zip|
28
28
  entry = zip.entries.first
29
+ return nil if entry.nil?
30
+
29
31
  entry_path = path entry.name
30
32
  entry.extract entry_path
31
33
 
@@ -3,6 +3,6 @@
3
3
  module Rambling
4
4
  module Trie
5
5
  # Current version of the rambling-trie.
6
- VERSION = '2.4.0'
6
+ VERSION = '2.5.0'
7
7
  end
8
8
  end
data/lib/rambling/trie.rb CHANGED
@@ -44,7 +44,7 @@ module Rambling
44
44
  # @return [Container] the trie just loaded.
45
45
  # @yield [Container] the trie just loaded.
46
46
  # @see Rambling::Trie::Serializers Serializers.
47
- # @note Use of # {https://ruby-doc.org/core-2.7.0/Marshal.html#method-c-load Marshal.load} is generally
47
+ # @note Use of # {https://ruby-doc.org/3.3.0/Marshal.html#method-c-load Marshal.load} is generally
48
48
  # discouraged. Only use the +.marshal+ format with trusted input.
49
49
  def load filepath, serializer = nil
50
50
  serializer ||= serializers.resolve filepath
@@ -14,28 +14,22 @@ Gem::Specification.new do |gem|
14
14
 
15
15
  gem.summary = 'A Ruby implementation of the trie data structure.'
16
16
  gem.homepage = 'https://github.com/gonzedge/rambling-trie'
17
- gem.date = Time.now.strftime '%Y-%m-%d'
18
17
  gem.metadata = {
19
- 'changelog_uri' => 'https://github.com/gonzedge/rambling-trie/blob/master/CHANGELOG.md',
18
+ 'changelog_uri' => 'https://github.com/gonzedge/rambling-trie/blob/main/CHANGELOG.md',
20
19
  'documentation_uri' => 'https://www.rubydoc.info/gems/rambling-trie',
20
+ 'rubygems_mfa_required' => 'true',
21
21
  }
22
22
 
23
23
  executables = `git ls-files -- bin/*`.split "\n"
24
24
  files = `git ls-files -- {lib,*file,*.gemspec,LICENSE*,README*}`.split "\n"
25
- test_files = `git ls-files -- {test,spec,features}/*`.split "\n"
26
25
 
27
26
  gem.executables = executables.map { |f| File.basename f }
28
27
  gem.files = files
29
- gem.test_files = test_files
30
28
  gem.require_paths = %w(lib)
31
29
 
32
30
  gem.name = 'rambling-trie'
33
31
  gem.license = 'MIT'
34
32
  gem.version = Rambling::Trie::VERSION
35
33
  gem.platform = Gem::Platform::RUBY
36
- gem.required_ruby_version = '>= 2.7', '< 4'
37
-
38
- gem.add_development_dependency 'rake', '~> 13.1'
39
- gem.add_development_dependency 'rspec', '~> 3.12'
40
- gem.add_development_dependency 'yard', '~> 0.9.34'
34
+ gem.required_ruby_version = '>= 3.1', '< 4'
41
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rambling-trie
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Gonzalez
@@ -9,50 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-27 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '13.1'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '13.1'
28
- - !ruby/object:Gem::Dependency
29
- name: rspec
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '3.12'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '3.12'
42
- - !ruby/object:Gem::Dependency
43
- name: yard
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: 0.9.34
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 0.9.34
12
+ date: 2024-11-30 00:00:00.000000000 Z
13
+ dependencies: []
56
14
  description: 'The Rambling Trie is a Ruby implementation of the trie data structure,
57
15
  which includes compression abilities and is designed to be very fast to traverse. '
58
16
  email:
@@ -96,49 +54,13 @@ files:
96
54
  - lib/rambling/trie/stringifyable.rb
97
55
  - lib/rambling/trie/version.rb
98
56
  - rambling-trie.gemspec
99
- - spec/assets/test_words.en_US.txt
100
- - spec/assets/test_words.es_DO.txt
101
- - spec/integration/rambling/trie_spec.rb
102
- - spec/lib/rambling/trie/comparable_spec.rb
103
- - spec/lib/rambling/trie/compressor_spec.rb
104
- - spec/lib/rambling/trie/configuration/properties_spec.rb
105
- - spec/lib/rambling/trie/configuration/provider_collection_spec.rb
106
- - spec/lib/rambling/trie/container_spec.rb
107
- - spec/lib/rambling/trie/enumerable_spec.rb
108
- - spec/lib/rambling/trie/inspectable_spec.rb
109
- - spec/lib/rambling/trie/nodes/compressed_spec.rb
110
- - spec/lib/rambling/trie/nodes/node_spec.rb
111
- - spec/lib/rambling/trie/nodes/raw_spec.rb
112
- - spec/lib/rambling/trie/readers/plain_text_spec.rb
113
- - spec/lib/rambling/trie/readers/reader_spec.rb
114
- - spec/lib/rambling/trie/serializers/file_spec.rb
115
- - spec/lib/rambling/trie/serializers/marshal_spec.rb
116
- - spec/lib/rambling/trie/serializers/serializer_spec.rb
117
- - spec/lib/rambling/trie/serializers/yaml_spec.rb
118
- - spec/lib/rambling/trie/serializers/zip_spec.rb
119
- - spec/lib/rambling/trie/stringifyable_spec.rb
120
- - spec/lib/rambling/trie_spec.rb
121
- - spec/spec_helper.rb
122
- - spec/support/config.rb
123
- - spec/support/helpers/add_word.rb
124
- - spec/support/helpers/one_line_heredoc.rb
125
- - spec/support/shared_examples/a_compressible_trie.rb
126
- - spec/support/shared_examples/a_container_partial_word.rb
127
- - spec/support/shared_examples/a_container_scan.rb
128
- - spec/support/shared_examples/a_container_word.rb
129
- - spec/support/shared_examples/a_container_words_within.rb
130
- - spec/support/shared_examples/a_serializable_trie.rb
131
- - spec/support/shared_examples/a_serializer.rb
132
- - spec/support/shared_examples/a_trie_data_structure.rb
133
- - spec/support/shared_examples/a_trie_node.rb
134
- - spec/support/shared_examples/a_trie_node_implementation.rb
135
- - spec/tmp/.gitkeep
136
57
  homepage: https://github.com/gonzedge/rambling-trie
137
58
  licenses:
138
59
  - MIT
139
60
  metadata:
140
- changelog_uri: https://github.com/gonzedge/rambling-trie/blob/master/CHANGELOG.md
61
+ changelog_uri: https://github.com/gonzedge/rambling-trie/blob/main/CHANGELOG.md
141
62
  documentation_uri: https://www.rubydoc.info/gems/rambling-trie
63
+ rubygems_mfa_required: 'true'
142
64
  post_install_message:
143
65
  rdoc_options: []
144
66
  require_paths:
@@ -147,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
69
  requirements:
148
70
  - - ">="
149
71
  - !ruby/object:Gem::Version
150
- version: '2.7'
72
+ version: '3.1'
151
73
  - - "<"
152
74
  - !ruby/object:Gem::Version
153
75
  version: '4'
@@ -161,41 +83,4 @@ rubygems_version: 3.5.3
161
83
  signing_key:
162
84
  specification_version: 4
163
85
  summary: A Ruby implementation of the trie data structure.
164
- test_files:
165
- - spec/assets/test_words.en_US.txt
166
- - spec/assets/test_words.es_DO.txt
167
- - spec/integration/rambling/trie_spec.rb
168
- - spec/lib/rambling/trie/comparable_spec.rb
169
- - spec/lib/rambling/trie/compressor_spec.rb
170
- - spec/lib/rambling/trie/configuration/properties_spec.rb
171
- - spec/lib/rambling/trie/configuration/provider_collection_spec.rb
172
- - spec/lib/rambling/trie/container_spec.rb
173
- - spec/lib/rambling/trie/enumerable_spec.rb
174
- - spec/lib/rambling/trie/inspectable_spec.rb
175
- - spec/lib/rambling/trie/nodes/compressed_spec.rb
176
- - spec/lib/rambling/trie/nodes/node_spec.rb
177
- - spec/lib/rambling/trie/nodes/raw_spec.rb
178
- - spec/lib/rambling/trie/readers/plain_text_spec.rb
179
- - spec/lib/rambling/trie/readers/reader_spec.rb
180
- - spec/lib/rambling/trie/serializers/file_spec.rb
181
- - spec/lib/rambling/trie/serializers/marshal_spec.rb
182
- - spec/lib/rambling/trie/serializers/serializer_spec.rb
183
- - spec/lib/rambling/trie/serializers/yaml_spec.rb
184
- - spec/lib/rambling/trie/serializers/zip_spec.rb
185
- - spec/lib/rambling/trie/stringifyable_spec.rb
186
- - spec/lib/rambling/trie_spec.rb
187
- - spec/spec_helper.rb
188
- - spec/support/config.rb
189
- - spec/support/helpers/add_word.rb
190
- - spec/support/helpers/one_line_heredoc.rb
191
- - spec/support/shared_examples/a_compressible_trie.rb
192
- - spec/support/shared_examples/a_container_partial_word.rb
193
- - spec/support/shared_examples/a_container_scan.rb
194
- - spec/support/shared_examples/a_container_word.rb
195
- - spec/support/shared_examples/a_container_words_within.rb
196
- - spec/support/shared_examples/a_serializable_trie.rb
197
- - spec/support/shared_examples/a_serializer.rb
198
- - spec/support/shared_examples/a_trie_data_structure.rb
199
- - spec/support/shared_examples/a_trie_node.rb
200
- - spec/support/shared_examples/a_trie_node_implementation.rb
201
- - spec/tmp/.gitkeep
86
+ test_files: []
@@ -1,23 +0,0 @@
1
- are
2
- beautiful
3
- course
4
- false
5
- hello
6
- hi
7
- is
8
- it
9
- mine
10
- my
11
- no
12
- of
13
- ours
14
- today
15
- true
16
- truth
17
- whatever
18
- where
19
- who
20
- yeah
21
- you
22
- your
23
- yours
@@ -1,24 +0,0 @@
1
- claro
2
- donde
3
- dónde
4
- eres
5
- es
6
- eso
7
- falso
8
- hermoso
9
- hola
10
- hoy
11
- mi
12
- mío
13
- no
14
- nuestro
15
- ola
16
- quien
17
- quién
18
- si
19
- tu
20
- tus
21
- tuyos
22
- verdad
23
- verdadero
24
- 🙃