user_agent_parser 2.8.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/user_agent_parser/version.rb +8 -3
- data/vendor/uap-core/regexes.yaml +8 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b48c15771051ce967fbd02b30cebe742074d6cc363f202f8136d2da8fcb53eae
|
4
|
+
data.tar.gz: cec1845c163e7d79d232b9216182f08e4a4ca25236c06328afd1aa7262c4b0f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c6d56ffe6f50176dd812ca4e717a4c2e63079eae3d91dbadb17fbefe6efa825ae05394c02e3de909c8bd5c76587d41ec33bc5c5fa6b283d5f8d9bc08c081b5
|
7
|
+
data.tar.gz: 8f50066203f91d2ac548db3326944c7bca38bb8fc355c7b34e012287e09c0199ce6da8aee707227e5944e482f11d53decd2afef63ba500d564045d6e01dc2158
|
@@ -1,10 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'rubygems/version'
|
4
|
+
|
3
5
|
module UserAgentParser
|
4
6
|
class Version
|
7
|
+
include Comparable
|
8
|
+
|
5
9
|
# Private: Regex used to split string version string into major, minor,
|
6
10
|
# patch, and patch_minor.
|
7
|
-
SEGMENTS_REGEX = /\d+\-\d+|\d+[a-zA-Z]+$|\d+|[A-Za-z][0-9A-Za-z-]
|
11
|
+
SEGMENTS_REGEX = /\d+\-\d+|\d+[a-zA-Z]+$|\d+|[A-Za-z][0-9A-Za-z-]*$/.freeze
|
8
12
|
|
9
13
|
attr_reader :version
|
10
14
|
alias to_s version
|
@@ -45,9 +49,10 @@ module UserAgentParser
|
|
45
49
|
version == other.version
|
46
50
|
end
|
47
51
|
|
48
|
-
|
52
|
+
def <=>(other)
|
53
|
+
Gem::Version.new(version).<=>(Gem::Version.new(other.to_s))
|
54
|
+
end
|
49
55
|
|
50
|
-
# Private
|
51
56
|
def segments
|
52
57
|
@segments ||= version.scan(SEGMENTS_REGEX)
|
53
58
|
end
|
@@ -138,7 +138,7 @@ user_agent_parsers:
|
|
138
138
|
- regex: '(DAVdroid)/(\d+)\.(\d+)(?:\.(\d+)|)'
|
139
139
|
|
140
140
|
# Downloader ...
|
141
|
-
- regex: '(Google-HTTP-Java-Client|Apache-HttpClient|Go-http-client|scalaj-http|http%20client|Python-urllib|HttpMonitor|TLSProber|WinHTTP|JNLP|okhttp|aihttp|reqwest|axios|unirest-(?:java|python|ruby|nodejs|php|net))(?:[ /](\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
|
141
|
+
- regex: '(Google-HTTP-Java-Client|Apache-HttpClient|PostmanRuntime|Go-http-client|scalaj-http|http%20client|Python-urllib|HttpMonitor|TLSProber|WinHTTP|JNLP|okhttp|aihttp|reqwest|axios|unirest-(?:java|python|ruby|nodejs|php|net))(?:[ /](\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
|
142
142
|
|
143
143
|
# Pinterestbot
|
144
144
|
- regex: '(Pinterest(?:bot|))/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)[;\s(]+\+https://www.pinterest.com/bot.html'
|
@@ -1005,6 +1005,11 @@ user_agent_parsers:
|
|
1005
1005
|
# HTTrack crawler
|
1006
1006
|
- regex: '\b(HTTrack) (\d+)\.(\d+)(?:[\.\-](\d+)|)'
|
1007
1007
|
|
1008
|
+
# SerenityOS (https://serenityos.org)
|
1009
|
+
# https://github.com/SerenityOS/serenity/blob/2e1bbcb0faeae92d7595b8e0b022a8cdcecca07e/Userland/Libraries/LibWeb/Loader/ResourceLoader.h#L27
|
1010
|
+
- regex: 'SerenityOS'
|
1011
|
+
family_replacement: 'SerenityOS Browser'
|
1012
|
+
|
1008
1013
|
os_parsers:
|
1009
1014
|
##########
|
1010
1015
|
# HbbTV vendors
|
@@ -1553,7 +1558,7 @@ os_parsers:
|
|
1553
1558
|
##########
|
1554
1559
|
# Apple Watch
|
1555
1560
|
##########
|
1556
|
-
- regex: '(watchOS)/(\d+)\.(\d+)(?:\.(\d+)|)'
|
1561
|
+
- regex: '(watchOS)[/ ](\d+)\.(\d+)(?:\.(\d+)|)'
|
1557
1562
|
os_replacement: 'WatchOS'
|
1558
1563
|
|
1559
1564
|
##########################
|
@@ -1724,7 +1729,7 @@ os_parsers:
|
|
1724
1729
|
|
1725
1730
|
# just os
|
1726
1731
|
- regex: '(Windows|Android|WeTab|Maemo|Web0S)'
|
1727
|
-
- regex: '(Ubuntu|Kubuntu|Arch Linux|CentOS|Slackware|Gentoo|openSUSE|SUSE|Red Hat|Fedora|PCLinuxOS|Mageia|(?:Free|Open|Net|\b)BSD)'
|
1732
|
+
- regex: '(Ubuntu|Kubuntu|Arch Linux|CentOS|Slackware|Gentoo|openSUSE|SUSE|Red Hat|Fedora|PCLinuxOS|Mageia|SerenityOS|(?:Free|Open|Net|\b)BSD)'
|
1728
1733
|
# Linux + Kernel Version
|
1729
1734
|
- regex: '(Linux)(?:[ /](\d+)\.(\d+)(?:\.(\d+)|)|)'
|
1730
1735
|
- regex: 'SunOS'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_agent_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Lucas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple, comprehensive Ruby gem for parsing user agent strings with
|
14
14
|
the help of BrowserScope's UA database
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.3.11
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: A simple, comprehensive Ruby gem for parsing user agent strings with the
|