woothee 1.5.0 → 1.7.0

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: 21b96b5d04362a693958c23564f0873de45656f2
4
- data.tar.gz: a044248d037573d4d00b684f3bc761ec39599296
3
+ metadata.gz: 75fbedaeb0a5bfd189803a040fbafbb58a997c2b
4
+ data.tar.gz: 8fe27707e281642e70de3f5807fe50b67ee05ed1
5
5
  SHA512:
6
- metadata.gz: 325663ea1ced610e66491a82628a77e71046993540c436861ccd3676ea442a2ce3f5bdab35e5360863f08183a340786ddf6121f54944363095cc889672af1807
7
- data.tar.gz: 520b5db8c95e5fe77b6c4cad7c2f941416bf4f4e7e12dd557d7aed4e7b6b3d4343d37d5af92b9bfaafb92b7253a67b17adb4a28f309695b7e7be4b878053603a
6
+ metadata.gz: 69dc257d2c9a05fc680edec8c7d742ae595d71b3d94d16b4d5dc3582ba45c03d88827f80ba7b0ffa4c56b40a0fbc91faaffd2936d2d42276feb0de5e6251e2c7
7
+ data.tar.gz: 8bd673b6a3de030d3b1a4e3daa6a5986c2ea8af10f821defb16f8672b8dae840ef65f884adb83bf94310b7c7c1652ce97777417deff0b16797aa5b46e9dba2b2
@@ -1,10 +1,9 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - "2.0"
5
- - "2.1"
6
4
  - "2.2"
7
- - "2.3.1"
5
+ - "2.3.3"
6
+ - "2.4.1"
8
7
  - "jruby-19mode"
9
8
  before_script:
10
9
  - git submodule update --init
@@ -25,6 +25,7 @@ module Woothee::Browser
25
25
 
26
26
  def self.challenge_safari_chrome(ua, result)
27
27
  return false if ua.index('Safari/').nil?
28
+ return false if ua.index('Chrome') && ua.index('wv')
28
29
 
29
30
  version = Woothee::VALUE_UNKNOWN
30
31
 
@@ -98,7 +99,18 @@ module Woothee::Browser
98
99
  end
99
100
 
100
101
  def self.challenge_webview(ua, result)
101
- version = Woothee::DataSet.get('VALUE_UNKNOWN')
102
+ # Android(Lollipop and Above)
103
+ if ua.index('Chrome') && ua.index('wv')
104
+ version = if ua =~ /Version\/([.0-9]+)/
105
+ $1
106
+ else
107
+ Woothee::VALUE_UNKNOWN
108
+ end
109
+
110
+ update_map(result, Woothee::DataSet.get('Webview'))
111
+ update_version(result, version)
112
+ return true
113
+ end
102
114
 
103
115
  # iOS
104
116
  if ua =~ /iP(?:hone;|ad;|od) .*like Mac OS X/
@@ -88,7 +88,7 @@ module Woothee::Crawler
88
88
  end
89
89
  end
90
90
  if ua.index('Yeti')
91
- if ua.index('http://help.naver.com/robots')
91
+ if ua.index('http://help.naver.com/robots') || ua.index('http://help.naver.com/support/robots.html') || ua.index('http://naver.me/bot')
92
92
  update_map(result, Woothee::DataSet.get('Yeti'))
93
93
  return true
94
94
  end
@@ -159,6 +159,10 @@ module Woothee::Crawler
159
159
  return true
160
160
  end
161
161
  end
162
+ if ua.index('trendictionbot')
163
+ update_map(result, Woothee::DataSet.get('trendictionbot'))
164
+ return true
165
+ end
162
166
 
163
167
  false
164
168
  end
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  module Woothee::DataSet
37
37
  DATASET = {}
38
- # GENERATED from dataset.yaml at Mon Aug 15 16:50:36 JST 2016 by taise
38
+ # GENERATED from dataset.yaml at Sat Apr 29 16:14:32 JST 2017 by yuya
39
39
  obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
40
40
  obj[:vendor] = 'Microsoft'
41
41
  DATASET[obj[:label]] = obj
@@ -303,6 +303,9 @@ module Woothee::DataSet
303
303
  obj = {:label => 'twitter', :name => 'twitter', :type => :full}
304
304
  obj[:category] = :crawler
305
305
  DATASET[obj[:label]] = obj
306
+ obj = {:label => 'trendictionbot', :name => 'trendiction', :type => :full}
307
+ obj[:category] = :crawler
308
+ DATASET[obj[:label]] = obj
306
309
  obj = {:label => 'mixi', :name => 'mixi', :type => :full}
307
310
  obj[:category] = :crawler
308
311
  DATASET[obj[:label]] = obj
@@ -46,6 +46,8 @@ module Woothee::Misc
46
46
  [Woothee::DataSet.get('HTTPLibrary'), 'python']
47
47
  when ua =~ /^(?:PHP|WordPress|CakePHP|PukiWiki|PECL::HTTP)(?:\/| |$)/o || ua =~ /(?:PEAR |)HTTP_Request(?: class|2)/o
48
48
  [Woothee::DataSet.get('HTTPLibrary'), 'php']
49
+ when ua.index('curl/') == 0
50
+ [Woothee::DataSet.get('HTTPLibrary'), 'curl']
49
51
  else [nil,nil]
50
52
  end
51
53
  return false unless data
@@ -1,3 +1,3 @@
1
1
  module Woothee
2
- VERSION = "1.5.0"
2
+ VERSION = "1.7.0"
3
3
  end
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: 1.5.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.5.1
89
+ rubygems_version: 2.6.11
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Cross-language UserAgent classifier library, ruby implementation
@@ -94,4 +94,3 @@ test_files:
94
94
  - spec/00_valid_spec.rb
95
95
  - spec/01_dataset_spec.rb
96
96
  - spec/02_run_testsets_spec.rb
97
- has_rdoc: false