regexp_trie 1.0.0 → 1.0.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
- SHA1:
3
- metadata.gz: 6f450dfb8edc505285c6a6a7558139b05bf68892
4
- data.tar.gz: 81bb161f664b59f34c4515af86fe5580a0c445ef
2
+ SHA256:
3
+ metadata.gz: c224ed8fe77a7b37a2c640fe5fc162c768e45a0c5c305e710b31a9b07e4f3efe
4
+ data.tar.gz: e3a2799dfdef72cda95ae4be4c42f51139c5b9f3c325d480af001939deb5f987
5
5
  SHA512:
6
- metadata.gz: 598aaa75d15f81c979fc475000a379223b1e62a1dc332d255ad350fcf70cfff7064e81257e919f4bf6160981b666d5bc5b18dd12dde624fd3f7008e41ac2c84f
7
- data.tar.gz: 57e92cb52bcc506f94f622e46e9d43857352ad692ad6229d639d42c308ec510fce16bed64dcc000e15fbba18b57ff1ec681a5938a021774636820283d786c5e5
6
+ metadata.gz: c659358d1ee657e8c085e5ea7649b1043876db05a8e14edb9b176e67ffc1af7477813f78d00a07ed402186f82177a2dc11f670a2a1fce0e452d89aec75342b18
7
+ data.tar.gz: 217b2b2c9d9e16f2547b499668b0402ad9f542a77878c8705cacdb771900641ab24c4935fabf4611803231f1c7d79e1a2f9fef2867a63344315284ce3dc39cc7
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  Revision history of the RegexpTrie gem
2
2
 
3
+ ## v1.0.1 - 2018/10/09
4
+
5
+ * Add `# frozen_string_literal: true` to source files
6
+
3
7
  ## v1.0.0 - 2016/11/14
4
8
 
5
9
  - Add a method to get the union pattern as `String`, not as `Regexp`
data/README.md CHANGED
@@ -22,9 +22,9 @@ See also the original [Regexp::Trie in Perl](https://metacpan.org/pod/Regexp::Tr
22
22
 
23
23
  ## Description
24
24
 
25
- RegexpTrie takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match.
25
+ `RegexpTrie` takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match.
26
26
 
27
- In other words, this library provides a limited but optimized version of `Regexp.union()`.
27
+ In other words, this library provides a limited but optimized version of `Regexp.union()`, even thouh there are some incompatibilities with it.
28
28
 
29
29
  ## Installation
30
30
 
@@ -34,9 +34,13 @@ Add this line to your application's Gemfile:
34
34
  gem 'regexp_trie'
35
35
  ```
36
36
 
37
- ## Known Issues
37
+ ## Incompatibilities with the built-in `Regexp.union()`
38
38
 
39
- This is not perfectly compatible with `Regexp.union()`.
39
+ * `RegexpTrie` handles only literals. i.e. `RegexpTrie.union("foo.*bar")` produces `/foo\.\*bar/`, not `/foo.*bar/`
40
+ * `RegexpTrie` cannot handle empty strings.
41
+ * The order of words does not matter:
42
+ * `Regexp.union("foo", "foobar").match("foobar") # => #<MatchData "foo">`
43
+ * `RegexpTrie.union("foo", "foobar").match("foobar") # => #<MatchData "foobar">`
40
44
 
41
45
  ## Development
42
46
 
data/lib/regexp_trie.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal
2
+
1
3
  require_relative "regexp_trie/version"
2
4
 
3
5
  class RegexpTrie
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class RegexpTrie
2
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regexp_trie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - FUJI Goro (gfx)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.5.1
126
+ rubygems_version: 2.7.6
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Optimized Regexp builder with Trie