woothee 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/woothee/browser.rb +10 -1
  3. data/woothee.gemspec +1 -1
  4. metadata +10 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 293cb8f78ebc0c1574d15cf9cc2dbff5853e77b8
4
- data.tar.gz: 937d2f2a43b03435c6e510b7237ea416a93ee8e2
3
+ metadata.gz: 8a565b2886d6072100bd0b2c1833f8c82b89d9b6
4
+ data.tar.gz: ca106f430b55eb12cf970df40fc94719553c1845
5
5
  SHA512:
6
- metadata.gz: 8045da2d01daa3a40107e62622f5570014cc5ec9fcd08d8a7e11b8dea101818581d7df28fdad4bdf052636594472901871bdd4b1c2ecdc785f06b772c3dac382
7
- data.tar.gz: 3a6d5a8cce7a643e21ceced0d1861d7d774de2e3b6b0662338c105593e1988ccbdd3404516c82dd509c908ca523f18610d26955ccbb24b2f48b425e202bdbfed
6
+ metadata.gz: b42cfda798635d9eaf4a165fc6b6c948ce7096f2613148b0b96d03dda7d3cc25fef20d60f4ab68a99601729d12a089e0896b47a6b20f3ebd54558c52e65991a4
7
+ data.tar.gz: e25e0baa635756652abe851aad4331bb03d5380cc6206eb4fcf2211a18458a61b2326c9db73084c5740e1cd6f91336ebbc7998b56a9583a4389356f6e405dde5
@@ -27,8 +27,17 @@ module Woothee::Browser
27
27
  version = Woothee::VALUE_UNKNOWN
28
28
 
29
29
  if ua =~ /(?:Chrome|CrMo|CriOS)\/([.0-9]+)/o
30
+ chrome_version = $1
31
+
32
+ if ua =~ /OPR\/([.0-9]+)/o
33
+ version = $1
34
+ update_map(result, Woothee::DataSet.get('Opera'))
35
+ update_version(result, version)
36
+ return true
37
+ end
38
+
30
39
  # Chrome
31
- version = $1
40
+ version = chrome_version
32
41
  update_map(result, Woothee::DataSet.get('Chrome'))
33
42
  update_version(result, version)
34
43
  return true
data/woothee.gemspec CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
5
5
  gem.description = "Cross-language UserAgent classifier library, ruby implementation"
6
6
  gem.homepage = "https://github.com/woothee/woothee-ruby"
7
7
  gem.summary = gem.description
8
- gem.version = "0.3.8"
8
+ gem.version = "0.3.9"
9
9
  gem.authors = ["TAGOMORI Satoshi"]
10
10
  gem.email = "tagomoris@gmail.com"
11
11
  gem.has_rdoc = false
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woothee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-07 00:00:00.000000000 Z
11
+ date: 2014-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.8.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
26
  version: 2.8.0
27
27
  description: Cross-language UserAgent classifier library, ruby implementation
@@ -30,9 +30,9 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
- - .gitignore
34
- - .gitmodules
35
- - .travis.yml
33
+ - ".gitignore"
34
+ - ".gitmodules"
35
+ - ".travis.yml"
36
36
  - Gemfile
37
37
  - LICENSE.txt
38
38
  - Makefile
@@ -61,17 +61,17 @@ require_paths:
61
61
  - lib
62
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.0.3
74
+ rubygems_version: 2.2.2
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Cross-language UserAgent classifier library, ruby implementation
@@ -79,4 +79,3 @@ test_files:
79
79
  - spec/00_valid_spec.rb
80
80
  - spec/01_dataset_spec.rb
81
81
  - spec/02_run_testsets_spec.rb
82
- has_rdoc: false