browser 2.5.0 → 2.5.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
2
  SHA1:
3
- metadata.gz: dfb0f67e4198ff39314ea0fb6d61f74e6e7e87e0
4
- data.tar.gz: f306ab70e7d0c09b6762518a45575cc6174da730
3
+ metadata.gz: 66e04380da3de6adea143b32e6ac5137ea652078
4
+ data.tar.gz: 16f915156b2a6381355704120702e1a4f8c02f1b
5
5
  SHA512:
6
- metadata.gz: a735e5313563172b76f9c86a28390755caaaf0f359c135743795f90f7c33df849cb041be3ebdb943101e4f46aefbc6d4ea2e1c6d5c564d43092974676d55614e
7
- data.tar.gz: fd6438932dbab1676ceed16b454c746b4d2177f0651aff4ecc1205b392ce7663c894e0e4b4e6ca7435b6b85348921973733a225ed6e2ad910dde3b4a4b72e672
6
+ metadata.gz: 00a69f903e31b7f9e805407ea7d3c2dbda2dd21400437b3f1dfa258a4606c8d32326aea6b27f3e8fcb8c025f49f5bc133aabfea80a92b15eb85dceb20e4c7790
7
+ data.tar.gz: 70ea6e7a2f34833af794008ead8fdd9f0c2feabff183ef5de3bac928622bc88668e1eb99b3e5fd311760858f9f71bf49d7146a88eec39e4c55288bf41ab0a164
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.5.1
4
+
5
+ - Add Android Oreo detection
6
+
3
7
  ## v2.5.0
4
8
 
5
9
  - Add support for QQ Browser Mac & Mac Lite.
@@ -15,7 +15,7 @@ module Browser
15
15
  end
16
16
 
17
17
  def match?
18
- ua =~ /(Opera|OPR)/
18
+ ua =~ /(Opera|OPR\/)/
19
19
  end
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Browser
4
- VERSION = "2.5.0".freeze
4
+ VERSION = "2.5.1".freeze
5
5
  end
@@ -16,6 +16,7 @@ ANDROID_KITKAT: Mozilla/5.0 (Linux; Android 4.4; Nexus 7 Build/KOT24) AppleWebKi
16
16
  ANDROID_LOLLIPOP_50: Mozilla/5.0 (Linux; Android 5.0; Nexus 5 Build/LPX13D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.102 Mobile Safari/537.36
17
17
  ANDROID_LOLLIPOP_51: Mozilla/5.0 (Linux; Android 5.1; Nexus 5 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.0.0 Mobile Safari/537.36; DailymotionEmbedSDK 1.0
18
18
  ANDROID_NEXUS_PLAYER: Mozilla/5.0 (Linux; Android 5.0; Nexus Player Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.0
19
+ ANDROID_OREO: Mozilla/5.0 (Linux; Android 8.0.0; Pixel Build/OPR6.170623.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.03112.107 Mobile Safari/537.36
19
20
  ANDROID_TV: Mozilla/5.0 (Linux; Android 5.0; ADT-1 Build/LRW87K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36
20
21
  ANDROID_WEBVIEW: Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36
21
22
  ANDROID_WITH_SAFARI: 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SCH-I535 Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'
@@ -81,6 +81,12 @@ class AndroidTest < Minitest::Test
81
81
  assert browser.platform.android?(5.1)
82
82
  end
83
83
 
84
+ test "detect android oreo (8.0)" do
85
+ browser = Browser.new(Browser["ANDROID_OREO"])
86
+ assert browser.platform.android?
87
+ assert browser.platform.android?(8.0)
88
+ end
89
+
84
90
  test "detect android tv" do
85
91
  browser = Browser.new(Browser["ANDROID_TV"])
86
92
  assert browser.platform.android?
@@ -71,6 +71,12 @@ class ChromeTest < Minitest::Test
71
71
  assert_equal "26", browser.version
72
72
  end
73
73
 
74
+ test "detects chrome not opera when android build number contains 'OPR'" do
75
+ browser = Browser.new(Browser["ANDROID_OREO"])
76
+
77
+ assert browser.chrome?
78
+ end
79
+
74
80
  test "detects version by range" do
75
81
  browser = Browser.new(Browser["CHROME"])
76
82
  assert browser.chrome?(%w[>=5 <6])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler