rambling-trie 0.8.0 → 0.8.1

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: 4d281908146ad7997bb01e3765836bb2053d7251
4
- data.tar.gz: b3811b63c5d068e49e207849ca90083fe4ca95a1
3
+ metadata.gz: c7aefe84824bbbfa09b239caca901b1e8022e33a
4
+ data.tar.gz: e7e22e2ac50d2f8be672063efb5bcae8342369b7
5
5
  SHA512:
6
- metadata.gz: a28530aa9cd4c0d3276c351e6f275e4c24566a9b1f7b87a35377f55287fd35affb5c25b12daf3642aa6e621876be44987df4322f428dc784017bbb621bbb761f
7
- data.tar.gz: 2c17da1286a41d083f2bb2a38a4152b682097f980f426e06fa83181707725b5963acbbc214e32d0f7584635ff195321c0ceffe6e9a3586211c4019070f11256e
6
+ metadata.gz: 6d15a5de1d200e156fae33ca82e25b5be1d43d4916be1e88761ce0142c6c7002985164c2e2b95bf1c95f0e04b108f9f11671d3e50028e397d5f9520f996a8efe
7
+ data.tar.gz: ea776aaf5b0a0ecefc1ba7626a5d2676b04499f268e5acf39c7bd8b45f17160acd170358d7b2b52eb8c6022431696fc04dcaa2ab8f016cb4a2b31224ec824191
data/.travis.yml CHANGED
@@ -4,7 +4,12 @@ before_install:
4
4
  install:
5
5
  - bundle install --without test
6
6
  rvm:
7
+ - 2.3.3
8
+ - 2.3.2
9
+ - 2.3.1
7
10
  - 2.3.0
11
+ - 2.2.6
12
+ - 2.2.5
8
13
  - 2.2.4
9
14
  - 2.2.3
10
15
  - 2.2.2
@@ -126,7 +126,7 @@ module Rambling
126
126
  end
127
127
 
128
128
  def current_key letter
129
- current_key_string = current_key = nil
129
+ current_key_string = current_key = ''
130
130
 
131
131
  children_tree.keys.each do |key|
132
132
  key_string = key.to_s
@@ -1,6 +1,6 @@
1
1
  module Rambling
2
2
  module Trie
3
3
  # Current version of the rambling-trie.
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
6
6
  end
data/reports/performance CHANGED
@@ -440,3 +440,31 @@ help - true 3.280000 0.030000 3.310000 ( 3.344987)
440
440
  beautiful - true 4.290000 0.030000 4.320000 ( 4.337935)
441
441
  impressionism - true 6.680000 0.040000 6.720000 ( 6.748263)
442
442
  anthropological - true 6.450000 0.050000 6.500000 ( 6.536386)
443
+
444
+ Report for rambling-trie version 0.8.1
445
+ ==> Uncompressed
446
+ `word?`:
447
+ hi - true 0.410000 0.000000 0.410000 ( 0.414203)
448
+ help - true 0.670000 0.000000 0.670000 ( 0.675591)
449
+ beautiful - true 1.090000 0.010000 1.100000 ( 1.092454)
450
+ impressionism - true 1.440000 0.000000 1.440000 ( 1.443477)
451
+ anthropological - true 1.620000 0.000000 1.620000 ( 1.631072)
452
+ `partial_word?`:
453
+ hi - true 0.440000 0.000000 0.440000 ( 0.438317)
454
+ help - true 0.680000 0.010000 0.690000 ( 0.685167)
455
+ beautiful - true 1.150000 0.000000 1.150000 ( 1.153350)
456
+ impressionism - true 1.470000 0.000000 1.470000 ( 1.491155)
457
+ anthropological - true 1.590000 0.010000 1.600000 ( 1.603410)
458
+ ==> Compressed
459
+ `word?`:
460
+ hi - true 0.470000 0.000000 0.470000 ( 0.467284)
461
+ help - true 0.690000 0.000000 0.690000 ( 0.697836)
462
+ beautiful - true 1.310000 0.010000 1.320000 ( 1.325097)
463
+ impressionism - true 1.670000 0.000000 1.670000 ( 1.690640)
464
+ anthropological - true 1.740000 0.010000 1.750000 ( 1.750960)
465
+ `partial_word?`:
466
+ hi - true 1.160000 0.010000 1.170000 ( 1.171711)
467
+ help - true 2.270000 0.010000 2.280000 ( 2.282692)
468
+ beautiful - true 2.830000 0.010000 2.840000 ( 2.861623)
469
+ impressionism - true 4.290000 0.010000 4.300000 ( 4.308389)
470
+ anthropological - true 4.480000 0.010000 4.490000 ( 4.505348)
@@ -202,6 +202,7 @@ module Rambling
202
202
 
203
203
  it 'does not match the whole word' do
204
204
  expect(subject.word? 'halt').to be false
205
+ expect(subject.word? 'al').to be false
205
206
  end
206
207
 
207
208
  it 'is aliased as #include?' do
@@ -215,6 +216,7 @@ module Rambling
215
216
 
216
217
  it 'does not match the whole word' do
217
218
  expect(subject.word? 'halt').to be false
219
+ expect(subject.word? 'al').to be false
218
220
  end
219
221
  end
220
222
  end
@@ -264,6 +266,7 @@ module Rambling
264
266
  it 'does not match any part of the word' do
265
267
  expect(subject.partial_word? 'ha').to be false
266
268
  expect(subject.partial_word? 'hal').to be false
269
+ expect(subject.partial_word? 'al').to be false
267
270
  end
268
271
 
269
272
  context 'and the root has been compressed' do
@@ -274,6 +277,7 @@ module Rambling
274
277
  it 'does not match any part of the word' do
275
278
  expect(subject.partial_word? 'ha').to be false
276
279
  expect(subject.partial_word? 'hal').to be false
280
+ expect(subject.partial_word? 'al').to be false
277
281
  end
278
282
  end
279
283
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'simplecov'
2
2
  require 'coveralls'
3
3
 
4
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [
5
5
  SimpleCov::Formatter::HTMLFormatter,
6
6
  Coveralls::SimpleCov::Formatter
7
7
  ]
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: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Gonzalez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-08 00:00:00.000000000 Z
12
+ date: 2016-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.5.1
150
+ rubygems_version: 2.5.2
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: A custom implementation of the trie data structure.
@@ -162,4 +162,3 @@ test_files:
162
162
  - spec/lib/rambling/trie/root_spec.rb
163
163
  - spec/lib/rambling/trie_spec.rb
164
164
  - spec/spec_helper.rb
165
- has_rdoc: