browserino 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cda06c7f0ef3f1ee788b9bb19b4ebbeb89295fc3
4
- data.tar.gz: 31bb3575df03d13697302fedf897ebb2018c3389
3
+ metadata.gz: 4d42fcb6e27f419709670519bb4fec4730be0498
4
+ data.tar.gz: eb6c9b68a6778652e9e541121d938deea327df8a
5
5
  SHA512:
6
- metadata.gz: 134840ea0b376bbc780aba84526584cdaa20f3be195991fbe4dfe4caa3572c97b54586a5aea1523f9bf4d9a1b63952108c4c5bc77f1b1da9934b03a506d9089b
7
- data.tar.gz: 240cbddb276e5d864d64f4d88db2866538c19f7b63d56f6615467b85968de43cef08f18ab457daca935f4f93497abc55f5abe3d2ca3739bc38cf8971e6e4b667
6
+ metadata.gz: d339b3f44a2e19604a4b0b3ebf29b71495e9a1bafde4b9921832013fdd0b586fb2ffbb1ae2ce2d7492efe06f43ff62e1d9922b5dece1240bc74da369a40ed910
7
+ data.tar.gz: 9bd3aa28a228157f41afd6d9d2a7c8f76c237ddf8c1f0cbf154b45736ce2bf9f269cdf76f9d3a48d0b970f2fb7f96daeece2d14a5ac49a6a0ee4b2c735e05ff9
data/README.md CHANGED
@@ -9,6 +9,11 @@ This gem aims to provide information about the browser that your visitor is usin
9
9
  ## Changelog
10
10
  _dates are in dd-mm-yyyy format_
11
11
 
12
+ #### 31-12-2015 VERSION 1.5.3
13
+
14
+ - Added blackberry support
15
+ - Added tests for blackberry user agent strings
16
+
12
17
  #### 31-12-2015 VERSION 1.5.2
13
18
 
14
19
  - Added user agents
@@ -148,6 +148,8 @@ module Browserino
148
148
  system_version.split('.').first(2).join.to_i
149
149
  elsif name.match(/win|android/i)
150
150
  system_version.gsub('.', '').to_i
151
+ else
152
+ system_version.to_i
151
153
  end
152
154
  if version && defined? const
153
155
  version_names = Browserino::Mapping.const_get(const).select do |_, versions|
@@ -0,0 +1,10 @@
1
+ module Browserino
2
+ module Mapping
3
+ BLACKBERRY = {
4
+ '9900' => [9900],
5
+ '9860' => [9860],
6
+ '9800' => [9800],
7
+ '9700' => [9700]
8
+ }
9
+ end
10
+ end
@@ -43,8 +43,8 @@ module Browserino
43
43
  },
44
44
 
45
45
  operating_system: {
46
- name: /(?<name>windows|macintosh|android|ios|linux|ubuntu|x11)/i,
47
- version: /(?:nt|mac\sos\sx|android|(cpu\s|i)os)\s(?<version>[\d\._]+)/i,
46
+ name: /(?<name>windows|macintosh|android|ios|blackberry|linux|ubuntu|x11)/i,
47
+ version: /(?:nt|mac\sos\sx|android|(cpu\s|i)os|blackberry)\s(?<version>[\d\._]+)/i,
48
48
  architecture: /(?<architecture>((?:x|x86_|amd|wow)64)|i(3|6)86)/i
49
49
  }
50
50
  }
@@ -1,3 +1,3 @@
1
1
  module Browserino
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
data/lib/browserino.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "browserino/maps/osx"
1
+ require "browserino/maps/macintosh"
2
+ require "browserino/maps/blackberry"
2
3
  require "browserino/maps/ios"
3
4
  require "browserino/maps/linux"
4
5
  require "browserino/maps/android"
@@ -16,8 +17,6 @@ require "browserino/browser"
16
17
  require "browserino/engine"
17
18
  require "browserino/operating_system"
18
19
 
19
- # require_relative "../spec/user_agents.rb"
20
-
21
20
  module Browserino
22
21
  def self.parse(ua, unknown_alt = Browserino::UNKNOWN)
23
22
  ua = AgentManipulator.new(ua).ua
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: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidney Liebrand
@@ -135,9 +135,10 @@ files:
135
135
  - lib/browserino/browser.rb
136
136
  - lib/browserino/engine.rb
137
137
  - lib/browserino/maps/android.rb
138
+ - lib/browserino/maps/blackberry.rb
138
139
  - lib/browserino/maps/ios.rb
139
140
  - lib/browserino/maps/linux.rb
140
- - lib/browserino/maps/osx.rb
141
+ - lib/browserino/maps/macintosh.rb
141
142
  - lib/browserino/maps/windows.rb
142
143
  - lib/browserino/match_extractor.rb
143
144
  - lib/browserino/operating_system.rb
File without changes