user_agent_parser 2.5.3 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/vendor/uap-core/regexes.yaml +23 -16
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74b02298a0828b22d71e294ab077e484496ebb8fda03dbf41e3d01db8c2de4ea
4
- data.tar.gz: 005e91640c3294abd45ab9eb31405bf5a5b245606606712da136d959b112b3d3
3
+ metadata.gz: 3064c6d3d2f4ce1c0cfc27261bcf6ff6a6c034efad5f32e7a5de654eba929fdc
4
+ data.tar.gz: 0c5d6247bfd246a9ad885a536a6b4dd4f58bf3eac760f0c2865d0ccbde9ec83d
5
5
  SHA512:
6
- metadata.gz: adf323d558143989636c1635dd97b0559c455aa339a68ca230212be2c34672cc951234fa6db8d2e5d684ab23fe8b04a1927de872da7194219324ad482f325812
7
- data.tar.gz: a4fa3dd7b32670821dfb547f217951ba2e6ecc639327e24e19f805c258881ec55bc681834d42e43b09ab789bd9d5614065ae7eba0501cdcaca1133a87d56602d
6
+ metadata.gz: dbf4da6764707f6ab43a9b7070fb73efe71bdff39c6e51097f58688bacf6556837b43e213be7ce6b44413af22f3d3eb9b9528bcaa13cb13a3d0448054716d293
7
+ data.tar.gz: 568eeacaf99ad147c7c10112df9ca515c790d3813e4f39d8f95d5bf3b7e1cd10d7bf031c47a5f9eefc788a24ddf3e3a22d2c17aff2241fd24d5b3275a8438ba5
@@ -367,7 +367,7 @@ user_agent_parsers:
367
367
  # Google Search App on Android, eg:
368
368
  - regex: 'Mozilla.+Android.+(GSA)/(\d+)\.(\d+)\.(\d+)'
369
369
  family_replacement: 'Google'
370
-
370
+
371
371
  # QQ Browsers
372
372
  - regex: '(MQQBrowser/Mini)(?:(\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
373
373
  family_replacement: 'QQ Browser Mini'
@@ -691,7 +691,7 @@ user_agent_parsers:
691
691
  family_replacement: 'TopBuzz'
692
692
 
693
693
  # @note: iOS / OSX Applications
694
- - regex: '(iPod|iPhone|iPad).+GSA/(\d+)\.(\d+)\.(\d+) Mobile'
694
+ - regex: '(iPod|iPhone|iPad).+GSA/(\d+)\.(\d+)\.(\d+)(?:\.(\d+)|) Mobile'
695
695
  family_replacement: 'Google'
696
696
  - regex: '(iPod|iPhone|iPad).+Version/(\d+)\.(\d+)(?:\.(\d+)|).*[ +]Safari'
697
697
  family_replacement: 'Mobile Safari'
@@ -699,13 +699,9 @@ user_agent_parsers:
699
699
  family_replacement: 'Mobile Safari UI/WKWebView'
700
700
  - regex: '(iPod|iPhone|iPad).+Version/(\d+)\.(\d+)(?:\.(\d+)|)'
701
701
  family_replacement: 'Mobile Safari UI/WKWebView'
702
- - regex: '(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\d+)_(\d+)(?:_(\d+)|).*Mobile.*[ +]Safari'
703
- family_replacement: 'Mobile Safari'
704
- - regex: '(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\d+)_(\d+)(?:_(\d+)|).*Mobile'
705
- family_replacement: 'Mobile Safari UI/WKWebView'
706
- - regex: '(iPod|iPhone|iPad).* Safari'
702
+ - regex: '(iPod|iPod touch|iPhone|iPad).* Safari'
707
703
  family_replacement: 'Mobile Safari'
708
- - regex: '(iPod|iPhone|iPad)'
704
+ - regex: '(iPod|iPod touch|iPhone|iPad)'
709
705
  family_replacement: 'Mobile Safari UI/WKWebView'
710
706
  - regex: '(Watch)(\d+),(\d+)'
711
707
  family_replacement: 'Apple $1 App'
@@ -850,7 +846,7 @@ user_agent_parsers:
850
846
  # Asynchronous HTTP Client/Server for asyncio and Python (https://aiohttp.readthedocs.io/)
851
847
  - regex: '(Python/3\.\d{1,3} aiohttp)/(\d+)\.(\d+)\.(\d+)'
852
848
 
853
- - regex: '(Java)[/ ]{0,1}\d+\.(\d+)\.(\d+)[_-]*([a-zA-Z0-9]+|)'
849
+ - regex: '(Java)[/ ]?\d+\.(\d+)\.(\d+)[_-]*([a-zA-Z0-9]+|)'
854
850
 
855
851
  # Cloud Storage Clients
856
852
  - regex: '^(Cyberduck)/(\d+)\.(\d+)\.(\d+)(?:\.\d+|)'
@@ -976,7 +972,7 @@ os_parsers:
976
972
  os_v1_replacement: '3'
977
973
 
978
974
  # Android 9; Android 10;
979
- - regex: '(Android) (\d+);'
975
+ - regex: '(Android) (\d+);'
980
976
 
981
977
  # UCWEB
982
978
  - regex: '^UCWEB.*; (Adr) (\d+)\.(\d+)(?:[.\-]([a-z0-9]+)|);'
@@ -1576,7 +1572,7 @@ device_parsers:
1576
1572
  # WebBrowser for SmartWatch
1577
1573
  # @ref: https://play.google.com/store/apps/details?id=se.vaggan.webbrowser&hl=en
1578
1574
  #########
1579
- - regex: '\bSmartWatch *\( *([^;]+) *; *([^;]+) *;'
1575
+ - regex: '\bSmartWatch {0,2}\( {0,2}([^;]+) {0,2}; {0,2}([^;]+) {0,2};'
1580
1576
  device_replacement: '$1 $2'
1581
1577
  brand_replacement: '$1'
1582
1578
  model_replacement: '$2'
@@ -2588,7 +2584,7 @@ device_parsers:
2588
2584
  device_replacement: '$1$2'
2589
2585
  brand_replacement: 'Huawei'
2590
2586
  model_replacement: '$2'
2591
- - regex: '; *([^;/]+) Build[/ ]Huawei(MT1-U06|[A-Z]+\d+[^\);]+)[^\);]*\)'
2587
+ - regex: '; *([^;/]+) Build[/ ]Huawei(MT1-U06|[A-Z]+\d+[^\);]+)\)'
2592
2588
  device_replacement: '$1'
2593
2589
  brand_replacement: 'Huawei'
2594
2590
  model_replacement: '$2'
@@ -3523,7 +3519,7 @@ device_parsers:
3523
3519
  # Oppo
3524
3520
  # @ref: http://en.oppo.com/products/
3525
3521
  #########
3526
- - regex: '; *(Find ?(?:5|7a)|R8[012]\d{1,2}|T703\d{0,1}|U70\d{1,2}T?|X90\d{1,2})(?: Build|\) AppleWebKit)'
3522
+ - regex: '; *(Find ?(?:5|7a)|R8[012]\d{1,2}|T703\d?|U70\d{1,2}T?|X90\d{1,2})(?: Build|\) AppleWebKit)'
3527
3523
  device_replacement: 'Oppo $1'
3528
3524
  brand_replacement: 'Oppo'
3529
3525
  model_replacement: '$1'
@@ -4959,7 +4955,7 @@ device_parsers:
4959
4955
  - regex: '(Watch)(\d+,\d+)'
4960
4956
  device_replacement: 'Apple $1'
4961
4957
  brand_replacement: 'Apple'
4962
- model_replacement: 'Apple $1 $2'
4958
+ model_replacement: '$1$2'
4963
4959
  - regex: '(Apple Watch)(?:;| Simulator;)'
4964
4960
  device_replacement: '$1'
4965
4961
  brand_replacement: 'Apple'
@@ -5130,7 +5126,7 @@ device_parsers:
5130
5126
  # HbbTV (European and Australian standard)
5131
5127
  # written before the LG regexes, as LG is making HbbTV too
5132
5128
  ##########
5133
- - regex: '(HbbTV)/[0-9]+\.[0-9]+\.[0-9]+ \([^;]*; *(LG)E *; *([^;]*) *;[^;]*;[^;]*;\)'
5129
+ - regex: '(HbbTV)/[0-9]+\.[0-9]+\.[0-9]+ \( ?;(LG)E ?;([^;]{0,30})'
5134
5130
  device_replacement: '$1'
5135
5131
  brand_replacement: '$2'
5136
5132
  model_replacement: '$3'
@@ -5145,7 +5141,7 @@ device_parsers:
5145
5141
  - regex: '(HbbTV)/1\.1\.1 \(;;;;;\) Maple_2011'
5146
5142
  device_replacement: '$1'
5147
5143
  brand_replacement: 'Samsung'
5148
- - regex: '(HbbTV)/[0-9]+\.[0-9]+\.[0-9]+ \([^;]*; *(?:CUS:([^;]*)|([^;]+)) *; *([^;]*) *;.*;'
5144
+ - regex: '(HbbTV)/[0-9]+\.[0-9]+\.[0-9]+ \([^;]{0,30}; ?(?:CUS:([^;]*)|([^;]+)) ?; ?([^;]{0,30})'
5149
5145
  device_replacement: '$1'
5150
5146
  brand_replacement: '$2$3'
5151
5147
  model_replacement: '$4'
@@ -5471,3 +5467,14 @@ device_parsers:
5471
5467
  device_replacement: 'Generic Feature Phone'
5472
5468
  brand_replacement: 'Generic'
5473
5469
  model_replacement: 'Feature Phone'
5470
+
5471
+ #########
5472
+ # Apple
5473
+ # @ref: https://www.apple.com/mac/
5474
+ # @note: lookup Mac OS, but exclude iPad, Apple TV, a HTC phone, Kindle, LG
5475
+ # @note: put this at the end, since it is hard to implement contains foo, but not contain bar1, bar 2, bar 3 in go's re2
5476
+ #########
5477
+ - regex: 'Mac OS'
5478
+ device_replacement: 'Mac'
5479
+ brand_replacement: 'Apple'
5480
+ model_replacement: 'Mac'
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.5.3
4
+ version: 2.6.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: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2020-03-06 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.0.6
50
+ rubygems_version: 3.1.2
51
51
  signing_key:
52
52
  specification_version: 4
53
53
  summary: A simple, comprehensive Ruby gem for parsing user agent strings with the