useragent 0.16.9 → 0.16.11

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
  SHA256:
3
- metadata.gz: 64bfee85542d4ece03b3cfadba380ee0c3c2c818156819b9b232efc8cfc667f2
4
- data.tar.gz: 6100170424fff8e81d6c5bcf172082e437678001d31dd2bfd53c4c7e71b4b68d
3
+ metadata.gz: 3eb2e82ae2033d18f9fe740b3a93acd0c7b715130e564b22eaf8e028ad1c0c6c
4
+ data.tar.gz: fa730ecf9e1e343dda54bc4821e146fb3282fd1aeebb418ca616b9b30007210f
5
5
  SHA512:
6
- metadata.gz: e48abbfba06c115f025b7391d3221dcdf6911f6c551e7cc448dad342ece1a3f14fa765272b39c9b5515bc926d4420ebfbc03e76c90dbdbdc8c67e5df4a1a37a5
7
- data.tar.gz: 8c8df910df7390a378770eef344416bf88ba578c5c43f7ac6c306548e243c07eb1005598e34bfe55f15070e86ece85099309cd77f31d17929055a56a81e397b3
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://travis-ci.org/gshutler/useragent.svg?branch=master)](https://travis-ci.org/gshutler/useragent)
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
@@ -15,7 +15,7 @@ class UserAgent
15
15
  end
16
16
 
17
17
  def platform
18
- return unless application
18
+ return unless application && application.comment
19
19
 
20
20
  if application.comment[0] =~ /iPhone/
21
21
  'iPhone'
@@ -27,7 +27,7 @@ class UserAgent
27
27
  end
28
28
 
29
29
  def os
30
- return unless application
30
+ return unless application && application.comment
31
31
 
32
32
  if application.comment[0] =~ /Windows NT/
33
33
  OperatingSystems.normalize_os(application.comment[0])
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useragent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.9
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: 2018-01-12 00:00:00.000000000 Z
12
+ date: 2024-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '10.0'
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: '10.0'
27
+ version: '13.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ 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
@@ -87,9 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubyforge_project:
91
- rubygems_version: 2.7.3
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: []