woothee 0.3.3 → 0.3.4

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: c9a5c3078285a34a3f7d67fe200d7277c3c5284a
4
- data.tar.gz: 93a32166115fcc0e3d1654e3e3e16f8132a826f4
3
+ metadata.gz: 09b0e8a02cd881ceac57d76d909c60037a27fbfd
4
+ data.tar.gz: 1f85b6347a45c3d5ecf630fa7752e5f2dd9b31d4
5
5
  SHA512:
6
- metadata.gz: cdae3c0a784faeeb9d389c43f9426681c4b97eb1bf5e430be936629b07be05452ea21132af9688cb170281549d767cb94001e7bee49a14c76e454bca1ce252ac
7
- data.tar.gz: d7dc70ec8d0a9a5e1737a592622a0224e827a6313719f1537ca6f9c6158725256707f692d4a8cd20e0a4df93e6542c0ed953d8379906c9a1b0521fd788137a41
6
+ metadata.gz: 8cda7085ef3464be2cd9eb540bc9e92e40a6b800fa302a59e84b52817d64e0829d21ac5e5c65086e03779d6cf1044e4e15596c61e1c5e7750e1df8612685ae02
7
+ data.tar.gz: daa17937da05ce2f9b5e8c25e3e0f37921bf0a435382d24ed5a26456c9d270f135ffb64e12713f945f2020dd21a57ecff5fba1d0c9a27442fd25b0d3f46e8e90
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  module Woothee::DataSet
35
35
  DATASET = {}
36
- # GENERATED from dataset.yaml at Mon Sep 2 19:55:04 JST 2013 by tagomoris
36
+ # GENERATED from dataset.yaml at Tue Sep 10 14:45:24 JST 2013 by tagomoris
37
37
  obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
38
38
  obj[:vendor] = 'Microsoft'
39
39
  DATASET[obj[:label]] = obj
@@ -118,6 +118,9 @@ module Woothee::DataSet
118
118
  obj = {:label => 'iOS', :name => 'iOS', :type => :os}
119
119
  obj[:category] = :smartphone
120
120
  DATASET[obj[:label]] = obj
121
+ obj = {:label => 'FirefoxOS', :name => 'Firefox OS', :type => :os}
122
+ obj[:category] = :smartphone
123
+ DATASET[obj[:label]] = obj
121
124
  obj = {:label => 'BlackBerry', :name => 'BlackBerry', :type => :os}
122
125
  obj[:category] = :smartphone
123
126
  DATASET[obj[:label]] = obj
data/lib/woothee/os.rb CHANGED
@@ -78,6 +78,15 @@ module Woothee::OS
78
78
  when ua.index('BlackBerry') then Woothee::DataSet.get('BlackBerry')
79
79
  else nil
80
80
  end
81
+
82
+ if result[Woothee::KEY_NAME] && result[Woothee::KEY_NAME] == Woothee::DataSet.get('Firefox')[Woothee::KEY_NAME]
83
+ # Firefox OS specific pattern
84
+ # http://lawrencemandel.com/2012/07/27/decision-made-firefox-os-user-agent-string/
85
+ if ua =~ /^Mozilla\/[.0-9]+ \(Mobile;(.*;)? rv:[.0-9]+\) Gecko\/[.0-9]+ Firefox\/[.0-9]+$/
86
+ data = Woothee::DataSet.get('FirefoxOS')
87
+ end
88
+ end
89
+
81
90
  return false unless data
82
91
 
83
92
  update_category(result, data[Woothee::KEY_CATEGORY])
data/woothee.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.description = "Cross-language UserAgent classifier library, ruby implementation"
7
7
  gem.homepage = "https://github.com/tagomoris/woothee"
8
8
  gem.summary = gem.description
9
- gem.version = "0.3.3"
9
+ gem.version = "0.3.4"
10
10
  gem.authors = ["TAGOMORI Satoshi"]
11
11
  gem.email = "tagomoris@gmail.com"
12
12
  gem.has_rdoc = false
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-02 00:00:00.000000000 Z
11
+ date: 2013-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec