array_trie 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15499f92722e8290a8de0c8c2a17f3bae3d77102
4
- data.tar.gz: fc76470fe8932414955e48ab9099ede0548fda50
3
+ metadata.gz: f8dbfc9bc8ef73ed3cd47aa2feee35ca5b8b9e3c
4
+ data.tar.gz: 5ad90e8b9ec083ac0fd0f45456becc7a06ef45cc
5
5
  SHA512:
6
- metadata.gz: 59ef3cff51b614e7a4928ebae233c7113c5aaf657a0012e9f8063fed6f10f0710bbb1c7ac58815882d9d9d1c7eb563144d18034f161aefe069daf64018d3f072
7
- data.tar.gz: 36488d8d2ff5ff712b01944b101f01c0bc12ca6e95cc80f91bc3729763e5d758873e1e56c7def000ef22ced7065fba58359dd40dedae6c28d55638ad376eb9d2
6
+ metadata.gz: 87135d9e0a3e8c5ebc2d8c2a551bb587585f11f679c9321ced3a4f55c05630606a7b635ad9534cd54f535d6983a98e74ca54be9387cfb65256d7be1ec8d8b670
7
+ data.tar.gz: 61f33cd1e4d74e03fd072dc4e15ca2f4e3b6cf1e0999fceb603dba1f8a1feda4e7340a1b95488d6efe396cddd2406bd5246a308cc254bf62cdc5473950a2118c
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ArrayTrie
2
2
 
3
3
  [![Ruby gem](https://img.shields.io/gem/v/array_trie.svg)](https://rubygems.org/gems/array_trie)
4
- [API docs](https://www.rubydoc.info/gems/array_trie)
4
+ [API docs](http://www.rubydoc.info/gems/array_trie)
5
5
 
6
6
  Trie-like, prefix-tree data structures. First, a prefix-tree based on Arrays, which differs from a traditional trie, which maps strings to values. Second, a more general prefix-tree data structure that works for any type of keys, provided those keys can be transformed to and from an array.
7
7
 
@@ -52,11 +52,11 @@ paths.count_prefix('/usr/local')
52
52
  # You can obtain a subtrie to operate on a subsection of your trie
53
53
  usr_local = paths.subtrie('/usr/local')
54
54
  usr_local['bin/ruby']
55
- # => 'executable'
55
+ # => "executable"
56
56
 
57
57
  usr_local['bin/fish'] = 'executable'
58
58
  paths['/usr/local/bin/fish']
59
- # => executable
59
+ # => "executable"
60
60
 
61
61
  # Use #breadth_first and #depth_first to enumarate your keys and values
62
62
  paths.breadth_first do |k, v|
@@ -69,10 +69,11 @@ end
69
69
  # These methods return Enumerators, so you can use them with #map, etc.
70
70
  enum = paths.depth_first
71
71
  as_hash = Hash[enum.to_a]
72
- # => {
73
- # "/usr/local/bin/ruby"=>"executable",
74
- # "/usr/local/etc/nginx/nginx.cfg"=>"config file",
75
- # "/bin/bash"=>"executable"}
72
+ # => {
73
+ # ... "/usr/local/bin/ruby"=>"executable",
74
+ # ... "/usr/local/etc/nginx/nginx.cfg"=>"config file",
75
+ # ... "/bin/bash"=>"executable"
76
+ # ... }
76
77
  ```
77
78
 
78
79
  ## Development
@@ -17,7 +17,7 @@ Trie-like, prefix-tree data structures. First, a prefix-tree based on Arrays, wh
17
17
 
18
18
  Both of these data structures are implemented in terms of hashes.
19
19
  EOS
20
- spec.homepage = "https://github.com/justjake/array-trie"
20
+ spec.homepage = "https://github.com/justjake/ruby-array-trie"
21
21
 
22
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
23
  f.match(%r{^(test|spec|features)/})
@@ -29,4 +29,5 @@ Both of these data structures are implemented in terms of hashes.
29
29
  spec.add_development_dependency "bundler", "~> 1.15"
30
30
  spec.add_development_dependency "rake", "~> 10.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.7"
32
+ spec.add_development_dependency "pry"
32
33
  end
@@ -7,8 +7,5 @@ require "array_trie"
7
7
  # with your gem easier. You can also use a different console, if you like.
8
8
 
9
9
  # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
10
+ require "pry"
11
+ Pry.start
@@ -1,3 +1,3 @@
1
1
  class ArrayTrie
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: array_trie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Teton-Landis
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: |
56
70
  Trie-like, prefix-tree data structures. First, a prefix-tree based on Arrays, which differs from a traditional trie, which maps strings to values. Second, a more general prefix-tree data structure that works for any type of keys, provided those keys can be transformed to and from an array.
57
71
 
@@ -74,7 +88,7 @@ files:
74
88
  - lib/array_trie.rb
75
89
  - lib/array_trie/prefix_trie.rb
76
90
  - lib/array_trie/version.rb
77
- homepage: https://github.com/justjake/array-trie
91
+ homepage: https://github.com/justjake/ruby-array-trie
78
92
  licenses: []
79
93
  metadata: {}
80
94
  post_install_message: