useragent 0.16.10 → 0.16.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/lib/user_agent/browsers/base.rb +4 -0
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3eb2e82ae2033d18f9fe740b3a93acd0c7b715130e564b22eaf8e028ad1c0c6c
|
4
|
+
data.tar.gz: fa730ecf9e1e343dda54bc4821e146fb3282fd1aeebb418ca616b9b30007210f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a91566fee86b814ac22ccb2ebe6fc2018526f5436c26632cebd1a9bbcb48b9960277453c9c63535522ed45ab445056ae2511fac1a69e74719d37bea051e6585
|
7
|
+
data.tar.gz: 93a249a6b915c16781189b09b3a263a61f9dc7af53c1b13687e957e26ba0973f26ad0d202da9bf75d01d224deedd6f8e929cec57bfa19947942d73defb2b8d5d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# UserAgent
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/gshutler/useragent/actions/workflows/test.yml/badge.svg)](https://github.com/gshutler/useragent/actions/workflows/test.yml)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/useragent.svg)](http://badge.fury.io/rb/useragent)
|
5
5
|
|
6
6
|
UserAgent is a Ruby library that parses and compares HTTP User Agents.
|
@@ -39,4 +39,4 @@ user_agent = UserAgent.parse(request.user_agent)
|
|
39
39
|
SupportedBrowsers.detect { |browser| user_agent >= browser }
|
40
40
|
```
|
41
41
|
|
42
|
-
Copyright (c) 2015 Garry Shutler, released under the MIT license
|
42
|
+
Copyright (c) 2015-2019 Garry Shutler, released under the MIT license
|
@@ -78,6 +78,10 @@ class UserAgent
|
|
78
78
|
# list will be rejected.
|
79
79
|
elsif detect_comment_match(/bot/i)
|
80
80
|
true
|
81
|
+
# Google PageSpeed Insights adds "Chrome-Lighthouse" to the user agent
|
82
|
+
# https://stackoverflow.com/questions/16403295/what-is-the-name-of-the-google-pagespeed-user-agent
|
83
|
+
elsif detect_product("Chrome-Lighthouse")
|
84
|
+
true
|
81
85
|
elsif product = application.product
|
82
86
|
product.include?('bot')
|
83
87
|
else
|
metadata
CHANGED
@@ -1,42 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: useragent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
- Garry Shutler
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-12-04 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
|
-
version: '
|
20
|
+
version: '13.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
|
-
version: '
|
27
|
+
version: '13.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
|
@@ -72,24 +72,23 @@ homepage: https://github.com/gshutler/useragent
|
|
72
72
|
licenses:
|
73
73
|
- MIT
|
74
74
|
metadata: {}
|
75
|
-
post_install_message:
|
75
|
+
post_install_message:
|
76
76
|
rdoc_options: []
|
77
77
|
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
|
-
|
91
|
-
|
92
|
-
signing_key:
|
90
|
+
rubygems_version: 3.5.11
|
91
|
+
signing_key:
|
93
92
|
specification_version: 4
|
94
93
|
summary: HTTP User Agent parser
|
95
94
|
test_files: []
|