voight_kampff 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/README.md +1 -1
- data/lib/voight_kampff.rb +1 -1
- data/lib/voight_kampff/version.rb +3 -1
- data/spec/lib/voight_kampff/test_spec.rb +5 -1
- data/voight_kampff.gemspec +3 -3
- metadata +12 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 19ad3aa404672dc068c184cd9541f8f077a80e7ca6413d35d1985784ca341af9
|
4
|
+
data.tar.gz: 0060d30f9b84a024887e30006d7d1803d19e389289c6f783004586264694e5d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b87e14633463da571b04f75fe620d7230dc987b213ff9d8f157ccc169c27cecc5d5d9ada43ac1345f51d8a95c955f13f1f155776543437598e4ee8ef7a4adbb
|
7
|
+
data.tar.gz: b94935484b1d50cd93af4086a64884f02e701b790267b6187cae76acc5db80a47030ed0714228ac35b0cb2f7446142c10b85b5e3cf345a6eb26bf7e4230a0570
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.5
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ Also, the gem no longer extends `ActionDispatch::Request` instead it extends `Ra
|
|
52
52
|
FAQ
|
53
53
|
---
|
54
54
|
__Q:__ __What's with the name?__
|
55
|
-
__A:__ It's the [machine in Blade Runner](
|
55
|
+
__A:__ It's the [machine in Blade Runner](https://en.wikipedia.org/wiki/Blade_Runner#Voight-Kampff_machine) that is used to test whether someone is a human or a replicant.
|
56
56
|
|
57
57
|
__Q:__ __I've found a bot that isn't being matched__
|
58
58
|
__A:__ The list is being pulled from [github.com/monperrus/crawler-user-agents](https://github.com/monperrus/crawler-user-agents).
|
data/lib/voight_kampff.rb
CHANGED
@@ -3,7 +3,7 @@ require 'json'
|
|
3
3
|
require 'voight_kampff/test'
|
4
4
|
require 'voight_kampff/methods'
|
5
5
|
require 'voight_kampff/rack_request' if defined?(Rack::Request)
|
6
|
-
require 'voight_kampff/engine' if defined?(Rails)
|
6
|
+
require 'voight_kampff/engine' if defined?(Rails::Engine)
|
7
7
|
|
8
8
|
module VoightKampff
|
9
9
|
class << self
|
@@ -30,7 +30,11 @@ describe VoightKampff::Test do
|
|
30
30
|
before { VoightKampff::Test.new('anything').bot? }
|
31
31
|
|
32
32
|
it 'is fast' do
|
33
|
-
expect(
|
33
|
+
expect(
|
34
|
+
Benchmark.realtime do
|
35
|
+
20.times { VoightKampff::Test.new('anything').bot? }
|
36
|
+
end
|
37
|
+
).to be < 0.003
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|
data/voight_kampff.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
s.add_dependency 'rack', ['>= 1.4', '< 3.0']
|
25
25
|
|
26
|
-
s.add_development_dependency '
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency '
|
26
|
+
s.add_development_dependency 'combustion', '~> 1.1'
|
27
|
+
s.add_development_dependency 'rails', '~> 5.2'
|
28
|
+
s.add_development_dependency 'rspec-rails', '~> 3.8'
|
29
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voight_kampff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -31,47 +31,47 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '3.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: combustion
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '1.1'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '1.1'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: rails
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '5.2'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '5.2'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: rspec-rails
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '3.8'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '3.8'
|
75
75
|
description: Voight-Kampff detects bots, spiders, crawlers and replicants
|
76
76
|
email: adam@codenoble.com
|
77
77
|
executables: []
|
@@ -123,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
|
127
|
-
rubygems_version: 2.5.1
|
126
|
+
rubygems_version: 3.0.3
|
128
127
|
signing_key:
|
129
128
|
specification_version: 4
|
130
129
|
summary: Voight-Kampff bot detection
|