useragent 0.16.8 → 0.16.9

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: 794ed3a8f61a1981fef4a6a41f308dc7b5e64d83
4
- data.tar.gz: 2d08c890bb2b5cc9ed55a28e0ebdcc9acc3e925a
2
+ SHA256:
3
+ metadata.gz: 64bfee85542d4ece03b3cfadba380ee0c3c2c818156819b9b232efc8cfc667f2
4
+ data.tar.gz: 6100170424fff8e81d6c5bcf172082e437678001d31dd2bfd53c4c7e71b4b68d
5
5
  SHA512:
6
- metadata.gz: 3bdbad422b7325093c694d0c09b17b575770849443bd58b1b77b1572e6b85f3336e25352545299686585fda6019e09b5a8521036039204e58d9fa73a8f1fdb0d
7
- data.tar.gz: 1c4a25d6443319c91d9644fc6b1dbbbb491c6fccc0317117fd4950a29e35bb0d5de0327cf8d04a4c901a09808478eb04575822b72d1ce6ebd3881756c40b5fb3
6
+ metadata.gz: e48abbfba06c115f025b7391d3221dcdf6911f6c551e7cc448dad342ece1a3f14fa765272b39c9b5515bc926d4420ebfbc03e76c90dbdbdc8c67e5df4a1a37a5
7
+ data.tar.gz: 8c8df910df7390a378770eef344416bf88ba578c5c43f7ac6c306548e243c07eb1005598e34bfe55f15070e86ece85099309cd77f31d17929055a56a81e397b3
@@ -69,7 +69,6 @@ class UserAgent
69
69
  # shitty bot.
70
70
  if application.nil?
71
71
  true
72
-
73
72
  # Match common case when bots refer to themselves as bots in
74
73
  # the application comment. There are no standards for how bots
75
74
  # should call themselves so its not an exhaustive method.
@@ -77,8 +76,8 @@ class UserAgent
77
76
  # If you want to expand the scope, override the method and
78
77
  # provide your own regexp. Any patches to future extend this
79
78
  # list will be rejected.
80
- elsif comment = application.comment
81
- comment.any? { |c| c =~ /bot/i }
79
+ elsif detect_comment_match(/bot/i)
80
+ true
82
81
  elsif product = application.product
83
82
  product.include?('bot')
84
83
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useragent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.8
4
+ version: 0.16.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Peek
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-05 00:00:00.000000000 Z
12
+ date: 2018-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '10.0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '10.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '3.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.0'
42
42
  description: HTTP User Agent parser
@@ -78,17 +78,17 @@ require_paths:
78
78
  - lib
79
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.4.8
91
+ rubygems_version: 2.7.3
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: HTTP User Agent parser