woothee 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/woothee/browser.rb +1 -1
- data/lib/woothee/crawler.rb +4 -0
- data/lib/woothee/dataset.rb +1 -1
- data/lib/woothee/version.rb +1 -1
- data/spec/01_dataset_spec.rb +7 -7
- data/spec/02_run_testsets_spec.rb +1 -1
- data/woothee.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cd84ea6750dd3090ec24f2675afce80bf01c79d
|
4
|
+
data.tar.gz: 160d90a091231343e606087baba391704997fce2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0de822e9c1f39fd382b9cace5747eec947d165fdc1009e82dcfbc477b211e5ca1b304a32a8fc46bd2266a5535835e6619d986607964faef201a2cde46aef97d5
|
7
|
+
data.tar.gz: 47e5968cc10abca1a296c1be9c2d038e516ee872a7d5fe74d44eb251c7abdcee773b90616ea2ef9967e0b6cbc9824fdeda754aefcb314973907f36f89f040283
|
data/lib/woothee/browser.rb
CHANGED
data/lib/woothee/crawler.rb
CHANGED
@@ -58,6 +58,10 @@ module Woothee::Crawler
|
|
58
58
|
update_map(result, Woothee::DataSet.get('YahooJP'))
|
59
59
|
return true
|
60
60
|
end
|
61
|
+
if ua.index('Y!J-BRZ/YATSHA crawler') || ua.index('Y!J-BRY/YATSH crawler')
|
62
|
+
update_map(result, Woothee::DataSet.get('YahooJP'))
|
63
|
+
return true
|
64
|
+
end
|
61
65
|
if ua.index('Yahoo Pipes')
|
62
66
|
update_map(result, Woothee::DataSet.get('YahooPipes'))
|
63
67
|
return true
|
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 Sat Jul 5 01:54:48 JST 2014 by h_nakamura
|
37
37
|
obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
|
38
38
|
obj[:vendor] = 'Microsoft'
|
39
39
|
DATASET[obj[:label]] = obj
|
data/lib/woothee/version.rb
CHANGED
data/spec/01_dataset_spec.rb
CHANGED
@@ -6,18 +6,18 @@ require 'woothee/dataset'
|
|
6
6
|
|
7
7
|
describe Woothee::DataSet do
|
8
8
|
it "contains constants" do
|
9
|
-
|
10
|
-
Woothee::ATTRIBUTE_NAME.
|
9
|
+
expect { Woothee::ATTRIBUTE_NAME }.not_to raise_error()
|
10
|
+
expect(Woothee::ATTRIBUTE_NAME).to eql(:name)
|
11
11
|
end
|
12
12
|
|
13
13
|
it "contains list of categories/attributes" do
|
14
|
-
|
15
|
-
|
16
|
-
Woothee::ATTRIBUTE_LIST.
|
14
|
+
expect { Woothee::ATTRIBUTE_LIST }.not_to raise_error()
|
15
|
+
expect { Woothee::CATEGORY_LIST }.not_to raise_error()
|
16
|
+
expect(Woothee::ATTRIBUTE_LIST).to eql([
|
17
17
|
Woothee::ATTRIBUTE_NAME, Woothee::ATTRIBUTE_CATEGORY, Woothee::ATTRIBUTE_OS,
|
18
18
|
Woothee::ATTRIBUTE_VENDOR, Woothee::ATTRIBUTE_VERSION,
|
19
19
|
])
|
20
|
-
Woothee::CATEGORY_LIST.
|
20
|
+
expect(Woothee::CATEGORY_LIST).to eql([
|
21
21
|
Woothee::CATEGORY_PC, Woothee::CATEGORY_SMARTPHONE, Woothee::CATEGORY_MOBILEPHONE,
|
22
22
|
Woothee::CATEGORY_CRAWLER, Woothee::CATEGORY_APPLIANCE, Woothee::CATEGORY_MISC,
|
23
23
|
Woothee::VALUE_UNKNOWN,
|
@@ -25,6 +25,6 @@ describe Woothee::DataSet do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
it "contains dataset" do
|
28
|
-
Woothee::DataSet.get('GoogleBot')[:name].
|
28
|
+
expect(Woothee::DataSet.get('GoogleBot')[:name]).to eql('Googlebot')
|
29
29
|
end
|
30
30
|
end
|
@@ -28,7 +28,7 @@ describe Woothee do
|
|
28
28
|
[:name, :category, :os, :version, :vendor].each do |attribute|
|
29
29
|
it groupname + ("test(%s): %s" % [attribute, e['target']]) do
|
30
30
|
if [:name, :category].include?(attribute) or ([:os, :version, :vendor].include?(attribute) and e.has_key?(attribute.to_s))
|
31
|
-
r[attribute].to_s.
|
31
|
+
expect(r[attribute].to_s).to eql(e[attribute.to_s])
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
data/woothee.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.2
|
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-
|
11
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|