woothee 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/woothee.rb +3 -1
- data/lib/woothee/browser.rb +12 -0
- data/lib/woothee/dataset.rb +4 -1
- data/lib/woothee/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d213c721164114bb24bf551f2b6d94c30d2984c
|
4
|
+
data.tar.gz: 9626b6eef2d873086f0340fa1b45468008bf780c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8ac65f61d82dc005238538f4da5109cb41fe0cf5eb8fc0d65721093ac80805c21fd9d3d94c255bfdaa3f032cc02cc6fc91205d06c8279552ecb6a743f80b9a
|
7
|
+
data.tar.gz: f09d36c3e3272421931b86de9e75e5bb65a659dac4931154e9777302ba885f8f9e6111a3287cc1b4640317cebb12115bda15465523c9715f4cb234b2eede22aa
|
data/.travis.yml
CHANGED
data/lib/woothee.rb
CHANGED
@@ -13,7 +13,7 @@ require 'woothee/version'
|
|
13
13
|
module Woothee
|
14
14
|
def self.parse(useragent)
|
15
15
|
fill_result(exec_parse(useragent))
|
16
|
-
|
16
|
+
end
|
17
17
|
|
18
18
|
def self.is_crawler(useragent)
|
19
19
|
!!useragent && useragent.length > 0 and useragent != '-' and try_crawler(useragent, {})
|
@@ -71,6 +71,8 @@ module Woothee
|
|
71
71
|
def self.try_browser(useragent, result)
|
72
72
|
return true if Woothee::Browser.challenge_msie(useragent, result)
|
73
73
|
|
74
|
+
return true if Woothee::Browser.challenge_vivaldi(useragent, result)
|
75
|
+
|
74
76
|
return true if Woothee::Browser.challenge_safari_chrome(useragent, result)
|
75
77
|
|
76
78
|
return true if Woothee::Browser.challenge_firefox(useragent, result)
|
data/lib/woothee/browser.rb
CHANGED
@@ -136,4 +136,16 @@ module Woothee::Browser
|
|
136
136
|
|
137
137
|
true
|
138
138
|
end
|
139
|
+
|
140
|
+
def self.challenge_vivaldi(ua, result)
|
141
|
+
return false if ua.index('Vivaldi/').nil?
|
142
|
+
|
143
|
+
version = if ua =~ /Vivaldi\/([.0-9]+)/o
|
144
|
+
$1
|
145
|
+
else
|
146
|
+
Woothee::VALUE_UNKNOWN
|
147
|
+
end
|
148
|
+
update_map(result, Woothee::DataSet.get('Vivaldi'))
|
149
|
+
update_version(result, version)
|
150
|
+
end
|
139
151
|
end
|
data/lib/woothee/dataset.rb
CHANGED
@@ -35,7 +35,7 @@ end
|
|
35
35
|
|
36
36
|
module Woothee::DataSet
|
37
37
|
DATASET = {}
|
38
|
-
# GENERATED from dataset.yaml at Tue
|
38
|
+
# GENERATED from dataset.yaml at Tue May 17 02:25:25 JST 2016 by yuya
|
39
39
|
obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
|
40
40
|
obj[:vendor] = 'Microsoft'
|
41
41
|
DATASET[obj[:label]] = obj
|
@@ -54,6 +54,9 @@ module Woothee::DataSet
|
|
54
54
|
obj = {:label => 'Opera', :name => 'Opera', :type => :browser}
|
55
55
|
obj[:vendor] = 'Opera'
|
56
56
|
DATASET[obj[:label]] = obj
|
57
|
+
obj = {:label => 'Vivaldi', :name => 'Vivaldi', :type => :browser}
|
58
|
+
obj[:vendor] = 'Vivaldi Technologies'
|
59
|
+
DATASET[obj[:label]] = obj
|
57
60
|
obj = {:label => 'Sleipnir', :name => 'Sleipnir', :type => :browser}
|
58
61
|
obj[:vendor] = 'Fenrir Inc.'
|
59
62
|
DATASET[obj[:label]] = obj
|
data/lib/woothee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: woothee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
89
|
+
rubygems_version: 2.5.1
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Cross-language UserAgent classifier library, ruby implementation
|