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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a8f09fb64413bb4f5a1a6aaee714da4c3bd1083
4
- data.tar.gz: 2012053f1446ddd7877a2bfafcdbffc9dc47aa3d
3
+ metadata.gz: 9cd84ea6750dd3090ec24f2675afce80bf01c79d
4
+ data.tar.gz: 160d90a091231343e606087baba391704997fce2
5
5
  SHA512:
6
- metadata.gz: 33f486a66c52ab80b38cc8c1481c934d8f3869c5a3f04d2974f7f00ffb8e4d596c62ea448fb0d3e94ae5a9c92ae45f106e8a4cc9ed07bfb93f40bc3cb1080a51
7
- data.tar.gz: a25d7a7df05ce0e3f5622838c526d29bb0a2f340cdf5067234f627db227110b4118c492eccb03c80726864e1d4f79507ea9e2473ab9e76a6f5dc77ec0fecfb10
6
+ metadata.gz: 0de822e9c1f39fd382b9cace5747eec947d165fdc1009e82dcfbc477b211e5ca1b304a32a8fc46bd2266a5535835e6619d986607964faef201a2cde46aef97d5
7
+ data.tar.gz: 47e5968cc10abca1a296c1be9c2d038e516ee872a7d5fe74d44eb251c7abdcee773b90616ea2ef9967e0b6cbc9824fdeda754aefcb314973907f36f89f040283
@@ -11,7 +11,7 @@ module Woothee::Browser
11
11
 
12
12
  version = if ua =~ /MSIE ([.0-9]+);/o
13
13
  $1
14
- elsif ua =~ /Trident\/([.0-9]+); rv:([.0-9]+)/o
14
+ elsif ua =~ /Trident\/([.0-9]+);(?: BOIE[0-9]+;[A-Z]+;)? rv:([.0-9]+)/o
15
15
  $2
16
16
  else
17
17
  Woothee::VALUE_UNKNOWN
@@ -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
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  module Woothee::DataSet
35
35
  DATASET = {}
36
- # GENERATED from dataset.yaml at Fri Apr 25 12:56:38 JST 2014 by tagomoris
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
@@ -1,3 +1,3 @@
1
1
  module Woothee
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -6,18 +6,18 @@ require 'woothee/dataset'
6
6
 
7
7
  describe Woothee::DataSet do
8
8
  it "contains constants" do
9
- lambda { Woothee::ATTRIBUTE_NAME }.should_not raise_error()
10
- Woothee::ATTRIBUTE_NAME.should eql(: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
- lambda { Woothee::ATTRIBUTE_LIST }.should_not raise_error()
15
- lambda { Woothee::CATEGORY_LIST }.should_not raise_error()
16
- Woothee::ATTRIBUTE_LIST.should eql([
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.should eql([
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].should eql('Googlebot')
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.should eql(e[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
@@ -19,5 +19,6 @@ Gem::Specification.new do |gem|
19
19
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  gem.require_paths = ['lib']
21
21
 
22
+ gem.add_development_dependency "rake"
22
23
  gem.add_development_dependency "rspec", ">= 2.8.0"
23
24
  end
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.1
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-04-25 00:00:00.000000000 Z
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