rack-turing-test 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack-turing-test/version.rb +1 -1
- data/lib/rack-turing-test.rb +2 -2
- metadata +3 -3
data/lib/rack-turing-test.rb
CHANGED
@@ -2,7 +2,7 @@ require "rack-turing-test/version"
|
|
2
2
|
|
3
3
|
module Rack
|
4
4
|
module TuringTest
|
5
|
-
PATTERN = Regexp.union(
|
5
|
+
PATTERN = Regexp.union(*[
|
6
6
|
/googlebot/i,
|
7
7
|
/mediapartners-google/i,
|
8
8
|
/slurp/i,
|
@@ -14,7 +14,7 @@ module Rack
|
|
14
14
|
/baidu/i,
|
15
15
|
/yetibot/i,
|
16
16
|
/teoma/i,
|
17
|
-
).freeze
|
17
|
+
]).freeze
|
18
18
|
|
19
19
|
def bot?
|
20
20
|
!!user_agent.match(PATTERN)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-turing-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Genki Takiuchi
|