lightweight_user_agent_parser 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9504f42e004a58d9991a9c6e6c1df54453f613db
|
|
4
|
+
data.tar.gz: dec473cd678e3cb90c8c987abf8fc8cc33c4a55b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99cabb4562ef0c805eccc68e2f0763026ed7cbcbd2c6e5713ac8ac8ab616ea340247a663f3f639070e073fdce9e413b65c107105d2bae2840f2b7f02019ef66a
|
|
7
|
+
data.tar.gz: 8ec4f220ee52980893fd7558fdf22f0f96764442c1974d51216f07ec907ca4e8a0b506990eb85f6b953a4c8aa8cd0cfe496abe05c07553f0c599cc67e7109796
|
|
@@ -51,6 +51,7 @@ class LightweightUserAgentParser
|
|
|
51
51
|
MOBILE_REGEXP = /#{mobile_regexp_str}/i.freeze
|
|
52
52
|
|
|
53
53
|
desktop_device_matcher = DEVICES_META.select { |ary| DESKTOP_DEVICES.include?(ary[0]) }.map { |e| e[1] }.join('|')
|
|
54
|
+
desktop_device_matcher << '|Mozilla/\d\.\d.*(compatible.*)'
|
|
54
55
|
DESKTOP_REGEXP = /#{desktop_device_matcher}/i.freeze
|
|
55
56
|
|
|
56
57
|
ANONYMIZED_REGEXP = Regexp.new(DEVICES_META.find { |sym, regex_str| sym == :anonymized }.last, Regexp::IGNORECASE)
|
|
@@ -78,6 +78,11 @@ RSpec.describe LightweightUserAgentParser do
|
|
|
78
78
|
ua_str: 'Firefox/33.1 (x86 de); anonymized by Abelssoft 2048434593',
|
|
79
79
|
mobile: false,
|
|
80
80
|
platform: 'anonymized'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
ua_str: 'Mozilla/4.0 (compatible;)',
|
|
84
|
+
mobile: false,
|
|
85
|
+
platform: 'other'
|
|
81
86
|
}
|
|
82
87
|
]
|
|
83
88
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lightweight_user_agent_parser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emarsys Technologies
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-02-
|
|
13
|
+
date: 2016-02-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|