aho_corasick_matcher 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/aho_corasick_matcher.rb +4 -0
- data/spec/aho_corasick_matcher_spec.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a302a00edf6cdbf600bd736affae7b8008261e
|
4
|
+
data.tar.gz: 731478e4b330885cccdcdae4cda90cc3c2cd8930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 502d463348364a262c4f0628faa5607175162a91675ed316c660e96daad7f8c85152dc73cc22676fcf56769c6b3b3eeec62510880e506ac4234518da198a9aa7
|
7
|
+
data.tar.gz: b5ee40192e1d4eb11ef7ec5ae1997037b3bad5039c3b1f7ad25ac06756573275e97c469394969c58b2f1e91c4b346e1c34b208a12a298e455edc1d5e5533d227
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ increases only linearly.
|
|
10
10
|
It's quite memory-intensive, and building a matcher is expensive – but once it's
|
11
11
|
been built, matching terms is very fast.
|
12
12
|
|
13
|
-
**Current version:** 1.0.
|
13
|
+
**Current version:** 1.0.2
|
14
14
|
**Supported Ruby versions:** 1.8.7, 1.9.2, 1.9.3, 2.0, 2.1, 2.2, jruby-1.7, rbx-2.5
|
15
15
|
|
16
16
|
## Usage
|
@@ -33,6 +33,6 @@ Loosely based on [Tim Cowlishaw's implementation of the same algorithm](https://
|
|
33
33
|
|
34
34
|
## License
|
35
35
|
|
36
|
-
Copyright © 2015 Altmetric LLP
|
36
|
+
Copyright © 2015-2016 Altmetric LLP
|
37
37
|
|
38
38
|
Distributed under the MIT License.
|
data/lib/aho_corasick_matcher.rb
CHANGED
@@ -78,4 +78,12 @@ RSpec.describe AhoCorasickMatcher do
|
|
78
78
|
).to eq(%w(Test TestString String Test))
|
79
79
|
end
|
80
80
|
end
|
81
|
+
|
82
|
+
describe '#inspect' do
|
83
|
+
let(:dict) { ('aaa'...'bbb').to_a }
|
84
|
+
|
85
|
+
it 'does not include instance variables to prevent stack explosions' do
|
86
|
+
expect(matcher.inspect).not_to include('@child_map')
|
87
|
+
end
|
88
|
+
end
|
81
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aho_corasick_matcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew MacLeod
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.
|
60
|
+
rubygems_version: 2.5.1
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: A library to search text for occurrences of a list of strings
|