browser_sniffer 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/browser_sniffer.gemspec +1 -1
- data/lib/browser_sniffer/patterns.rb +1 -1
- data/lib/browser_sniffer/version.rb +1 -1
- data/test/shopify_agents_test.rb +22 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 54581761d65c647fadd686bbf33ef750e2a7baef8d8c17d5ad972e0247f4d8d8
|
4
|
+
data.tar.gz: 00576a56f63e866bd9a887f231fe40159be142a978c855ce58e7f315cd25b232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def03033a32783bac770738b6195a9a2f8ce4837ca467f89a13babce04e3035e092a476ae31247a401d438347c2fc584a4d1fe044d2252a49ed6f03bc4c6359a
|
7
|
+
data.tar.gz: 62f2d75552256242418a85e31d90e3b17457949bd14b32eb375afaf41faf88939d60ca4b3df4ef33e81bb4fd6176a8eb848ffb3305f2e3b134f420382cdf028c
|
data/browser_sniffer.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.required_ruby_version = ">= 1.9.3"
|
19
19
|
|
20
|
-
spec.add_development_dependency "bundler"
|
20
|
+
spec.add_development_dependency "bundler"
|
21
21
|
spec.add_development_dependency "minitest"
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
end
|
@@ -280,7 +280,7 @@ class BrowserSniffer
|
|
280
280
|
%r{^(Shopify Mobile)\/(?:iPhone\sOS|iOS)[\/\d\.]* \((iPhone|iPad|iPod).*\/([\d\.]+)}i
|
281
281
|
], [[:type, :ios], [:name, 'iOS'], :version], [
|
282
282
|
# Shopify Ping for iOS
|
283
|
-
%r{^Shopify Ping\/(iOS)\/[\d\.]+ \(
|
283
|
+
%r{^Shopify Ping\/(iOS)\/[\d\.]+ \(.*\/([\d\.]+)\)}i
|
284
284
|
], [[:type, :ios], :version, [:name, 'iOS']], [
|
285
285
|
# Shopify Mobile for Android
|
286
286
|
%r{^Shopify Mobile\/(Android)\/[\d\.]+ }i
|
data/test/shopify_agents_test.rb
CHANGED
@@ -342,7 +342,7 @@ describe "Shopify agents" do
|
|
342
342
|
assert_equal sniffer.os_info, sniffer_with_suffix.os_info
|
343
343
|
end
|
344
344
|
|
345
|
-
it "Shopify Ping on iOS can be sniffed" do
|
345
|
+
it "Shopify Ping on iOS simulator can be sniffed" do
|
346
346
|
user_agent = "Shopify Ping/iOS/1.0.0 (iPhone9,1 Simulator/com.shopify.ping/11.1.0)"
|
347
347
|
sniffer = BrowserSniffer.new(user_agent)
|
348
348
|
|
@@ -362,4 +362,25 @@ describe "Shopify agents" do
|
|
362
362
|
name: 'iOS',
|
363
363
|
}), sniffer.os_info
|
364
364
|
end
|
365
|
+
|
366
|
+
it "Shopify Ping on iOS can be sniffed" do
|
367
|
+
user_agent = "Shopify Ping/iOS/1.0.0 (iPhone9,1/com.jadedlabs.ping/11.1.0)"
|
368
|
+
sniffer = BrowserSniffer.new(user_agent)
|
369
|
+
|
370
|
+
assert_equal ({
|
371
|
+
name: 'Shopify Ping',
|
372
|
+
version: '1.0.0',
|
373
|
+
}), sniffer.browser_info
|
374
|
+
|
375
|
+
assert_equal ({
|
376
|
+
type: :handheld,
|
377
|
+
model: '9,1',
|
378
|
+
}), sniffer.device_info
|
379
|
+
|
380
|
+
assert_equal ({
|
381
|
+
type: :ios,
|
382
|
+
version: '11.1.0',
|
383
|
+
name: 'iOS',
|
384
|
+
}), sniffer.os_info
|
385
|
+
end
|
365
386
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browser_sniffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.6
|
99
|
+
rubygems_version: 2.7.6
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Parses user agent strings and boils it all down to a few simple classifications.
|