woothee 0.2.1 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Makefile +1 -1
- data/lib/woothee/dataset.rb +4 -1
- data/spec/01_dataset_spec.rb +14 -0
- data/woothee.gemspec +1 -1
- metadata +2 -2
data/Makefile
CHANGED
data/lib/woothee/dataset.rb
CHANGED
@@ -26,11 +26,14 @@ module Woothee
|
|
26
26
|
ATTRIBUTE_VERSION = :version
|
27
27
|
|
28
28
|
VALUE_UNKNOWN = "UNKNOWN"
|
29
|
+
|
30
|
+
CATEGORY_LIST = [CATEGORY_PC,CATEGORY_SMARTPHONE,CATEGORY_MOBILEPHONE,CATEGORY_CRAWLER,CATEGORY_APPLIANCE,CATEGORY_MISC,VALUE_UNKNOWN]
|
31
|
+
ATTRIBUTE_LIST = [ATTRIBUTE_NAME,ATTRIBUTE_CATEGORY,ATTRIBUTE_OS,ATTRIBUTE_VENDOR,ATTRIBUTE_VERSION]
|
29
32
|
end
|
30
33
|
|
31
34
|
module Woothee::DataSet
|
32
35
|
DATASET = {}
|
33
|
-
# GENERATED from dataset.yaml at
|
36
|
+
# GENERATED from dataset.yaml at Fri Jul 20 13:14:50 JST 2012 by tagomoris
|
34
37
|
obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
|
35
38
|
obj[:vendor] = 'Microsoft'
|
36
39
|
DATASET[obj[:label]] = obj
|
data/spec/01_dataset_spec.rb
CHANGED
@@ -10,6 +10,20 @@ describe Woothee::DataSet do
|
|
10
10
|
Woothee::ATTRIBUTE_NAME.should eql(:name)
|
11
11
|
end
|
12
12
|
|
13
|
+
it "contains list of categories/attributes" do
|
14
|
+
lambda { Woothee::ATTRIBUTE_LIST }.should_not raise_error(NameError)
|
15
|
+
lambda { Woothee::CATEGORY_LIST }.should_not raise_error(NameError)
|
16
|
+
Woothee::ATTRIBUTE_LIST.should eql([
|
17
|
+
Woothee::ATTRIBUTE_NAME, Woothee::ATTRIBUTE_CATEGORY, Woothee::ATTRIBUTE_OS,
|
18
|
+
Woothee::ATTRIBUTE_VENDOR, Woothee::ATTRIBUTE_VERSION,
|
19
|
+
])
|
20
|
+
Woothee::CATEGORY_LIST.should eql([
|
21
|
+
Woothee::CATEGORY_PC, Woothee::CATEGORY_SMARTPHONE, Woothee::CATEGORY_MOBILEPHONE,
|
22
|
+
Woothee::CATEGORY_CRAWLER, Woothee::CATEGORY_APPLIANCE, Woothee::CATEGORY_MISC,
|
23
|
+
Woothee::VALUE_UNKNOWN,
|
24
|
+
])
|
25
|
+
end
|
26
|
+
|
13
27
|
it "contains dataset" do
|
14
28
|
Woothee::DataSet.get('GoogleBot')[:name].should eql('Googlebot')
|
15
29
|
end
|
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.2.
|
9
|
+
gem.version = "0.2.4"
|
10
10
|
gem.authors = ["TAGOMORI Satoshi"]
|
11
11
|
gem.email = "tagomoris@gmail.com"
|
12
12
|
gem.has_rdoc = false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: woothee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|