browserino 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: 2154862ebf93207956b1180fb504e6fc3cb2efd7
4
- data.tar.gz: 3260046c27e73c1ea236f1af819290b6777f85e4
3
+ metadata.gz: 8174f4d5d67aa2a3e8d67fa4bc68f0a6507ff6ce
4
+ data.tar.gz: 796ee7682e4d20750377ca2259845ccb0898e46f
5
5
  SHA512:
6
- metadata.gz: 84e21cba9010e33635e6d58cda913519248e495bd230f9d8347a800c5b55aff6d15ddde3ca383ebef8ce9409b86f3297ea617e586806b9780eeefabb4d961c3c
7
- data.tar.gz: 766ca8f0f6ec8d4e55a7c272b34c245d7f6b868f1c9c7042c531418b935ed20a087993d0495e245fe41d3e6b99d641efa84f36a1ebe8d8e9951c0c029407d398
6
+ metadata.gz: 9f2fecfa569f5a93d3284409326ebc5f3e3dd55aa1e76253c8802b1ef85c5b8896204272a81d84a7247e0f48adbdf5cdd3af24e2e1944c1156da987328a7feac
7
+ data.tar.gz: 1c131875416bbe641f9a71a552ec790ba864a9c32aafd1a51959a72dcf68aa81acd57da679ee9aabb6f1daafbed87a875f2b5b354c90b5812b0db6dd0f7455e9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ## CHANGELOG
2
2
  _dates are in dd-mm-yyyy format_
3
3
 
4
+ #### 10-01-2016 VERSION 2.4.0
5
+
6
+ - Added rails integration
7
+
4
8
  #### 06-01-2016 VERSION 2.3.0
5
9
 
6
10
  - Added `#compat?` method to test if IE is in compatibility mode
data/README.md CHANGED
@@ -10,6 +10,10 @@ This gem aims to provide information about the browser that your visitor is usin
10
10
  _dates are in dd-mm-yyyy format_
11
11
  _older changes can be found in the [CHANGELOG.md](https://github.com/SidOfc/browserino/blob/master/CHANGELOG.md)_
12
12
 
13
+ #### 12-01-2016 VERSION 2.5.1
14
+
15
+ - Patched blackberry mapping, this used to be done by model number instead but is now corrected
16
+
13
17
  #### 12-01-2016 VERSION 2.5.0
14
18
 
15
19
  - Added support for the Vivaldi browser
@@ -23,10 +27,6 @@ _older changes can be found in the [CHANGELOG.md](https://github.com/SidOfc/brow
23
27
  - Caching the agent object in Rails
24
28
  - **DEPRECATE** Using a custom return value for when a property isn't found
25
29
 
26
- #### 10-01-2016 VERSION 2.4.0
27
-
28
- - Added rails integration
29
-
30
30
  ## Installation
31
31
 
32
32
  *supports ruby 1.9.3+*
@@ -246,7 +246,7 @@ module Browserino
246
246
  name.downcase!
247
247
  version = if system_version == @unknown
248
248
  nil
249
- elsif name.match(/mac|ios/i)
249
+ elsif name.match(/mac|ios|blackberry/i)
250
250
  system_version.split('.').first(2).join.to_i
251
251
  elsif name.match(/win|android/i)
252
252
  system_version.gsub('.', '').to_i
@@ -257,7 +257,7 @@ module Browserino
257
257
  version_names = Browserino::Mapping.const_get(const).select do |_, versions|
258
258
  true if versions.include?(version)
259
259
  end
260
- version_names.keys.first
260
+ version_names.keys.first || system_version.split('.').first(2).join('.')
261
261
  else
262
262
  @unknown
263
263
  end
@@ -1,26 +1,5 @@
1
1
  module Browserino
2
2
  module Mapping
3
- BLACKBERRY = {
4
- '9900' => [9900],
5
- '9860' => [9860],
6
- '9810' => [9810],
7
- '9800' => [9800],
8
- '9790' => [9790],
9
- '9780' => [9780],
10
- '9700' => [9700],
11
- '9650' => [9650],
12
- '9380' => [9380],
13
- '9360' => [9360],
14
- '9320' => [9320],
15
- '9300' => [9300],
16
- '9220' => [9220],
17
- '9000' => [9000],
18
- '8900' => [8900],
19
- '8800' => [8800],
20
- '8530' => [8530],
21
- '8520' => [8520],
22
- '8320' => [8320],
23
- '8300' => [8300]
24
- }
3
+ BLACKBERRY = {}
25
4
  end
26
5
  end
@@ -85,7 +85,7 @@ module Browserino
85
85
 
86
86
  operating_system: {
87
87
  name: /(?<name>windows|macintosh|android|ios|blackberry|linux|ubuntu|x11|bsd)/i,
88
- version: /(?:nt|mac\sos\sx|android|(cpu\s|i)os|blackberry)\s?(?<version>[\d\._]+)/i,
88
+ version: /(?:nt|mac\sos\sx|android|(cpu\s|i)os|blackberry.*?version\/|bb)\s?(?<version>[\d\._]+)/i,
89
89
  architecture: /(?<architecture>((?:x|x86_|amd|wow)64)|i(3|6)86)/i,
90
90
  mobile: /bolt|nokia|samsung|mobi(?:le)?|android|ip(?:[ao]d|hone)|bb\d+|blackberry|iemobile|fennec|bada|meego|vodafone|t\-mobile|opera\sm(?:ob|in)i/i,
91
91
  locale: /\s(?<locale>\w{2}(?:\-\w{2})?)[;\)]/
@@ -1,3 +1,3 @@
1
1
  module Browserino
2
- VERSION = "2.5.0"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browserino
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
  - Sidney Liebrand