yahoo_content_analysis 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YWYwNzlhZDZkZjc3N2VhYjJlOWQ4ODA0NDA1YTllNGNmNDI2ZjZhOA==
5
- data.tar.gz: !binary |-
6
- N2RiYjk0NzQ0ODdjYWMzMjY1Y2RhODZjYmU0NzBiMjM1ZGJkZjA1NQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NzI4ZjNkOTk4MTNmNmYyOTc0YTY4YWUyNjk4MTdmN2Y2ZDg5OWI3MmYwNjMy
10
- MTVlMDFmMjE1ZGJmNGQ0MjZjMTczYWI4MTU4OTM4YzczNDg0NDgxY2YzMjIy
11
- ZmI2MmQ0MmRmNDA1Njg3YmJmZjA1NzBjNGQxYWEyYmQyYWQ0ZTQ=
12
- data.tar.gz: !binary |-
13
- YTA1ZDU0NjgwZGJiOGNiN2VjZTg0MDNjZTAwN2VhYjE3MWI5MDQ3ZWZjNDNi
14
- ZmZiYzEzMzA5ZmZlZTcyY2MwODViZDIyOTA2Y2VkM2RiODA2YmNiYmIyNjA1
15
- OGJmMjk4MmFjM2NhNTMwYjc4ODBiMzY2OWRhMzYzNWQ4YzQxOGY=
2
+ SHA1:
3
+ metadata.gz: ebe24840ce7a9b91217908445e58acb314271055
4
+ data.tar.gz: 72a5f8b5fe8f93f60b4b78e4e9036f70997243c2
5
+ SHA512:
6
+ metadata.gz: 2dce3172f79367d081f82574b68cc8a266c1c0bff3b3f7025cbe01c3392858190b8d2d039c41ed3cec67bcdc0f38e40be2acc17dd98429c0b065efdabf4d7138
7
+ data.tar.gz: 329470cde277adb4fdeb08e6e193833e9c5e4955264eba0b18697ede148108b1b0c2c22f5887bd1859c5336446fd499f062dc1fcf7d49a46ed2a10bbea6952df
@@ -45,7 +45,7 @@ module YahooContentAnalysis
45
45
  end
46
46
 
47
47
  def condition(content)
48
- content.is_a?(URI) ? url(content) : text(content)
48
+ uri?(content) ? url(content) : text(content)
49
49
  end
50
50
 
51
51
  def url(content)
@@ -66,5 +66,14 @@ module YahooContentAnalysis
66
66
  }
67
67
  end
68
68
 
69
+ def uri?(string)
70
+ uri = URI.parse(string)
71
+ %w( http https ).include?(uri.scheme)
72
+ rescue URI::BadURIError
73
+ false
74
+ rescue URI::InvalidURIError
75
+ false
76
+ end
77
+
69
78
  end
70
79
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module YahooContentAnalysis
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_runtime_dependency('faraday', ['>= 0.7.4', '< 0.9'])
20
+ gem.add_runtime_dependency('faraday', ['>= 0.7.4', '~> 0.9'])
21
21
  gem.add_runtime_dependency('faraday_middleware', '~> 0.9')
22
22
  gem.add_runtime_dependency('multi_json', '>= 1.0.3', '~> 1.0')
23
23
  gem.add_runtime_dependency('excon')
metadata CHANGED
@@ -1,33 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_content_analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-10 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.7.4
20
- - - <
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: '0.9'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ! '>='
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.7.4
30
- - - <
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0.9'
33
33
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ dependencies:
48
48
  name: multi_json
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ! '>='
51
+ - - '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.0.3
54
54
  - - ~>
@@ -58,7 +58,7 @@ dependencies:
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ! '>='
61
+ - - '>='
62
62
  - !ruby/object:Gem::Version
63
63
  version: 1.0.3
64
64
  - - ~>
@@ -68,112 +68,112 @@ dependencies:
68
68
  name: excon
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ! '>='
71
+ - - '>='
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  type: :runtime
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ! '>='
78
+ - - '>='
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: hashie
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: 0.4.0
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ! '>='
92
+ - - '>='
93
93
  - !ruby/object:Gem::Version
94
94
  version: 0.4.0
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: simple_oauth
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ! '>='
99
+ - - '>='
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ! '>='
106
+ - - '>='
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: language_list
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ! '>='
113
+ - - '>='
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  type: :runtime
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ! '>='
120
+ - - '>='
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: activesupport
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ! '>='
127
+ - - '>='
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  type: :runtime
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ! '>='
134
+ - - '>='
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: stringex
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ! '>='
141
+ - - '>='
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ! '>='
148
+ - - '>='
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: rake
153
153
  requirement: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ! '>='
155
+ - - '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - ! '>='
162
+ - - '>='
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: minitest
167
167
  requirement: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - ! '>='
169
+ - - '>='
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - ! '>='
176
+ - - '>='
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  description: Use the Yahoo! Content Analysis API to extract topics and entities.
@@ -205,17 +205,17 @@ require_paths:
205
205
  - lib
206
206
  required_ruby_version: !ruby/object:Gem::Requirement
207
207
  requirements:
208
- - - ! '>='
208
+ - - '>='
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ! '>='
213
+ - - '>='
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
- rubygems_version: 2.0.6
218
+ rubygems_version: 2.1.11
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Use the Yahoo! Content Analysis API to extract topics and entities.