woothee 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/woothee/dataset.rb +4 -1
- data/lib/woothee/os.rb +7 -4
- data/lib/woothee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a8f09fb64413bb4f5a1a6aaee714da4c3bd1083
|
4
|
+
data.tar.gz: 2012053f1446ddd7877a2bfafcdbffc9dc47aa3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33f486a66c52ab80b38cc8c1481c934d8f3869c5a3f04d2974f7f00ffb8e4d596c62ea448fb0d3e94ae5a9c92ae45f106e8a4cc9ed07bfb93f40bc3cb1080a51
|
7
|
+
data.tar.gz: a25d7a7df05ce0e3f5622838c526d29bb0a2f340cdf5067234f627db227110b4118c492eccb03c80726864e1d4f79507ea9e2473ab9e76a6f5dc77ec0fecfb10
|
data/lib/woothee/dataset.rb
CHANGED
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
module Woothee::DataSet
|
35
35
|
DATASET = {}
|
36
|
-
# GENERATED from dataset.yaml at
|
36
|
+
# GENERATED from dataset.yaml at Fri Apr 25 12:56:38 JST 2014 by tagomoris
|
37
37
|
obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
|
38
38
|
obj[:vendor] = 'Microsoft'
|
39
39
|
DATASET[obj[:label]] = obj
|
@@ -103,6 +103,9 @@ module Woothee::DataSet
|
|
103
103
|
obj = {:label => 'BSD', :name => 'BSD', :type => :os}
|
104
104
|
obj[:category] = :pc
|
105
105
|
DATASET[obj[:label]] = obj
|
106
|
+
obj = {:label => 'ChromeOS', :name => 'ChromeOS', :type => :os}
|
107
|
+
obj[:category] = :pc
|
108
|
+
DATASET[obj[:label]] = obj
|
106
109
|
obj = {:label => 'Android', :name => 'Android', :type => :os}
|
107
110
|
obj[:category] = :smartphone
|
108
111
|
DATASET[obj[:label]] = obj
|
data/lib/woothee/os.rb
CHANGED
@@ -58,7 +58,7 @@ module Woothee::OS
|
|
58
58
|
data = case
|
59
59
|
when ua.index('iPhone;') then Woothee::DataSet.get('iPhone')
|
60
60
|
when ua.index('iPad;') then Woothee::DataSet.get('iPad')
|
61
|
-
when ua.index('iPod
|
61
|
+
when ua.index('iPod') then Woothee::DataSet.get('iPod')
|
62
62
|
else data
|
63
63
|
end
|
64
64
|
end
|
@@ -92,9 +92,10 @@ module Woothee::OS
|
|
92
92
|
end
|
93
93
|
|
94
94
|
if result[Woothee::KEY_NAME] && result[Woothee::KEY_NAME] == Woothee::DataSet.get('Firefox')[Woothee::KEY_NAME]
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
# Firefox OS specific pattern
|
96
|
+
# http://lawrencemandel.com/2012/07/27/decision-made-firefox-os-user-agent-string/
|
97
|
+
# https://github.com/woothee/woothee/issues/2
|
98
|
+
if ua =~ /^Mozilla\/[.0-9]+ \((?:Mobile|Tablet);(.*;)? rv:[.0-9]+\) Gecko\/[.0-9]+ Firefox\/[.0-9]+$/
|
98
99
|
data = Woothee::DataSet.get('FirefoxOS')
|
99
100
|
end
|
100
101
|
end
|
@@ -174,6 +175,8 @@ module Woothee::OS
|
|
174
175
|
Woothee::DataSet.get('MacOS')
|
175
176
|
when ua.index('X11; FreeBSD ')
|
176
177
|
Woothee::DataSet.get('BSD')
|
178
|
+
when ua.index('X11; CrOS ')
|
179
|
+
Woothee::DataSet.get('ChromeOS')
|
177
180
|
else
|
178
181
|
nil
|
179
182
|
end
|
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: 0.4.
|
4
|
+
version: 0.4.1
|
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-04-
|
11
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|