t-1000 0.1.0 → 0.1.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: 885f3a2a22890b51f2901e751a0e08b6dd42ad7d
4
- data.tar.gz: a4c9deab54bfba06faea2536d110bcf86a6b76e9
3
+ metadata.gz: eb7f12c66f16fdc2ff67954e4a830b3a389ee610
4
+ data.tar.gz: 6ad5038942a255aaa9f2e17ed72156916df58ffd
5
5
  SHA512:
6
- metadata.gz: dae7eddc9fa1124ed7938a68988d0444263b9514adca4627cdb164edd92b76720b3497009f10a503c531242a1050349eef96fe3d66b9476f90be6f10adab365b
7
- data.tar.gz: 830cbe2ba385e70478187d0aca16baf8082364ac1bd00e36e8239f04d189be61c500910c890cc211d820f28ff0a6c77a6091a7fae9f2fcf0992c0d47344c4970
6
+ metadata.gz: 3576757290c804782e34442f181e49cb198cf147f6392b866720d4fbc13cd132534b7f7c923e8b2786e5f2c5c11b4d2701e57af1eda729e933992dac23adcd1c
7
+ data.tar.gz: 9b84f4a56a3373e667d985f5da122948bd5f05cfc7fab338869ca1239be8b4ada0deffe7269ed5dc5caf69919643aaac69b402037306d66243ba7042f729f36c
@@ -1,3 +1,3 @@
1
1
  module T1000
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/t-1000.rb CHANGED
@@ -21,7 +21,14 @@ module T1000
21
21
  module Refinements
22
22
  refine Array do
23
23
  def map_regex
24
- map { |s| Regexp.new s.to_s }
24
+ map do |value|
25
+ case value
26
+ when Regexp
27
+ value
28
+ else
29
+ Regexp.new Regexp.escape value.to_s
30
+ end
31
+ end
25
32
  end
26
33
 
27
34
  def match_any?(string)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t-1000
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Waldrip
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack-attack