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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cf033cc654dff84bed444330cf7d072b32dc0293
4
- data.tar.gz: '096ac9e8880a0bf1cc824901a905d88f0b86225d'
2
+ SHA256:
3
+ metadata.gz: 54581761d65c647fadd686bbf33ef750e2a7baef8d8c17d5ad972e0247f4d8d8
4
+ data.tar.gz: 00576a56f63e866bd9a887f231fe40159be142a978c855ce58e7f315cd25b232
5
5
  SHA512:
6
- metadata.gz: 9f505b862e380c86fbe8bb5642298ecf9726215725ce1efb9b90fb921549363c505da096691d6f73cf51babc11d0f6b481e5bb6db3fca7ef8af9e685083e44ff
7
- data.tar.gz: 5c44d0be93014a810d7183eac1fc4ed0fc81669b943bfde6ee3e4cf8988b319cc61e5c83b96717b0fe9692ece44b72ad43ee5652e137500f1d7a3348d92aca19
6
+ metadata.gz: def03033a32783bac770738b6195a9a2f8ce4837ca467f89a13babce04e3035e092a476ae31247a401d438347c2fc584a4d1fe044d2252a49ed6f03bc4c6359a
7
+ data.tar.gz: 62f2d75552256242418a85e31d90e3b17457949bd14b32eb375afaf41faf88939d60ca4b3df4ef33e81bb4fd6176a8eb848ffb3305f2e3b134f420382cdf028c
@@ -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", "~> 1.3"
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\.]+ \(.* Simulator\/.*\/([\d\.]+)\)}i
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
@@ -1,3 +1,3 @@
1
1
  class BrowserSniffer
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -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.0
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: 2018-11-12 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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.14
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.