browser_sniffer 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/browser_sniffer/patterns.rb +2 -2
- data/lib/browser_sniffer/version.rb +1 -1
- data/test/shopify_agents_test.rb +10 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 245fd450da6d03b745adaa88b6205b4b31c77e1d4b1c9cb8b6dd48608236ca9f
|
4
|
+
data.tar.gz: 04f83a20bdd3ebee8f55db0ff309b1fed91b24a98713cf72717e7b63508c8435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7822eef7d29417d29471dc227397f053027371ff8ef9ca58de46d033366569b29fcfc7cdc9d9aa63471632e70f3c0c303dee30ca6629102713ad9d648c66131
|
7
|
+
data.tar.gz: 05bc07aa67180d1ab9d2eb585733d62867598978d291a57b508b70e10fd970cab65b47413056b56b5e08b5b6df8bd434c78dd9e8fa39d50daccc94f1a8441533
|
@@ -73,8 +73,8 @@ class BrowserSniffer
|
|
73
73
|
%r{.*(Shopify POS Next|Shopify POS)\/(?:iOS)\/([\d\.]+) \((iPhone|iPad|iPod)}i
|
74
74
|
], [[:name, 'Shopify POS'], :version], [
|
75
75
|
# Shopify Mobile for Android
|
76
|
-
%r{.*(Shopify Mobile)\/Android\/([\d\.]+(?: \(debug(?:|-push)\))?
|
77
|
-
], [[:name, 'Shopify Mobile'], :version, :build, :sdk_version], [
|
76
|
+
%r{.*(Shopify Mobile)\/Android\/([\d\.]+)(?: \((debug(?:|-push))\))? \(Build (\d+) with API (\d+)}i
|
77
|
+
], [[:name, 'Shopify Mobile'], :version, :debug_mode, :build, :sdk_version], [
|
78
78
|
# ShopifyFoundation shared library
|
79
79
|
/^(ShopifyFoundation)/i,
|
80
80
|
], [:name], [
|
data/test/shopify_agents_test.rb
CHANGED
@@ -155,6 +155,7 @@ describe "Shopify agents" do
|
|
155
155
|
assert_equal ({
|
156
156
|
name: 'Shopify Mobile',
|
157
157
|
version: '5.4.4',
|
158
|
+
debug_mode: nil,
|
158
159
|
build: '12005',
|
159
160
|
sdk_version: '25',
|
160
161
|
}), sniffer.browser_info
|
@@ -174,10 +175,11 @@ describe "Shopify agents" do
|
|
174
175
|
"MobileMiddlewareSupported Mozilla/5.0 (Linux; Android 9; Android SDK built for x86 Build/PSR1.180720.075; wv) "\
|
175
176
|
"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 Mobile Safari/537.36"
|
176
177
|
sniffer = BrowserSniffer.new(user_agent)
|
177
|
-
|
178
|
+
|
178
179
|
assert_equal ({
|
179
180
|
name: 'Shopify Mobile',
|
180
181
|
version: '8.12.0',
|
182
|
+
debug_mode: nil,
|
181
183
|
build: '12005',
|
182
184
|
sdk_version: '28',
|
183
185
|
}), sniffer.browser_info
|
@@ -203,7 +205,8 @@ describe "Shopify agents" do
|
|
203
205
|
|
204
206
|
assert_equal ({
|
205
207
|
name: 'Shopify Mobile',
|
206
|
-
version: '6.2.0
|
208
|
+
version: '6.2.0',
|
209
|
+
debug_mode: 'debug',
|
207
210
|
build: '1',
|
208
211
|
sdk_version: '25',
|
209
212
|
}), sniffer.browser_info
|
@@ -557,7 +560,8 @@ describe "Shopify agents" do
|
|
557
560
|
|
558
561
|
assert_equal ({
|
559
562
|
name: 'Shopify Mobile',
|
560
|
-
version: '6.0.0
|
563
|
+
version: '6.0.0',
|
564
|
+
debug_mode: 'debug',
|
561
565
|
build: '1',
|
562
566
|
sdk_version: '25',
|
563
567
|
}), sniffer.browser_info
|
@@ -580,7 +584,8 @@ describe "Shopify agents" do
|
|
580
584
|
|
581
585
|
assert_equal ({
|
582
586
|
name: 'Shopify Mobile',
|
583
|
-
version: '6.0.0
|
587
|
+
version: '6.0.0',
|
588
|
+
debug_mode: 'debug-push',
|
584
589
|
build: '1',
|
585
590
|
sdk_version: '25',
|
586
591
|
}), sniffer.browser_info
|
@@ -703,7 +708,7 @@ describe "Shopify agents" do
|
|
703
708
|
COMPATIBLE_USER_AGENTS.each do |user_agent|
|
704
709
|
it "user agent #{user_agent} is correctly marked as compatible" do
|
705
710
|
sniffer = BrowserSniffer.new(user_agent)
|
706
|
-
|
711
|
+
|
707
712
|
assert sniffer.same_site_none_compatible?
|
708
713
|
end
|
709
714
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browser_sniffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|