yahoo_content_analysis 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
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=
@@ -19,7 +19,7 @@ module YahooContentAnalysis
19
19
  end
20
20
 
21
21
  def humanize_topic(topic)
22
- topic.titleize.remove_formatting
22
+ (topic || '').titleize.remove_formatting
23
23
  end
24
24
 
25
25
  def parse(response=raw)
@@ -76,7 +76,7 @@ module YahooContentAnalysis
76
76
  return nil unless (h && h['type'])
77
77
  type = h['type'].is_a?(Array) ? h['type'].first : h['type']
78
78
  content = (type['content'] || '').split('/')
79
- content = (content[1] || content[0]).remove_formatting.titleize
79
+ content = (content[1] || content[0] || '').remove_formatting.titleize
80
80
  content.blank? ? nil : content
81
81
  end
82
82
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module YahooContentAnalysis
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/test/client_test.rb CHANGED
@@ -5,3 +5,4 @@ YahooContentAnalysis.configure{|y|
5
5
  }
6
6
 
7
7
  r = YahooContentAnalysis::Client.new.analyze('Italian sculptors and painters of the renaissance favored the Virgin Mary for inspiration.')
8
+ puts r.inspect
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_content_analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andrew Kuklewicz
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2013-12-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -25,7 +23,6 @@ dependencies:
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
27
  - - ! '>='
31
28
  - !ruby/object:Gem::Version
@@ -36,7 +33,6 @@ dependencies:
36
33
  - !ruby/object:Gem::Dependency
37
34
  name: faraday_middleware
38
35
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ~>
42
38
  - !ruby/object:Gem::Version
@@ -44,7 +40,6 @@ dependencies:
44
40
  type: :runtime
45
41
  prerelease: false
46
42
  version_requirements: !ruby/object:Gem::Requirement
47
- none: false
48
43
  requirements:
49
44
  - - ~>
50
45
  - !ruby/object:Gem::Version
@@ -52,7 +47,6 @@ dependencies:
52
47
  - !ruby/object:Gem::Dependency
53
48
  name: multi_json
54
49
  requirement: !ruby/object:Gem::Requirement
55
- none: false
56
50
  requirements:
57
51
  - - ! '>='
58
52
  - !ruby/object:Gem::Version
@@ -63,7 +57,6 @@ dependencies:
63
57
  type: :runtime
64
58
  prerelease: false
65
59
  version_requirements: !ruby/object:Gem::Requirement
66
- none: false
67
60
  requirements:
68
61
  - - ! '>='
69
62
  - !ruby/object:Gem::Version
@@ -74,7 +67,6 @@ dependencies:
74
67
  - !ruby/object:Gem::Dependency
75
68
  name: excon
76
69
  requirement: !ruby/object:Gem::Requirement
77
- none: false
78
70
  requirements:
79
71
  - - ! '>='
80
72
  - !ruby/object:Gem::Version
@@ -82,7 +74,6 @@ dependencies:
82
74
  type: :runtime
83
75
  prerelease: false
84
76
  version_requirements: !ruby/object:Gem::Requirement
85
- none: false
86
77
  requirements:
87
78
  - - ! '>='
88
79
  - !ruby/object:Gem::Version
@@ -90,7 +81,6 @@ dependencies:
90
81
  - !ruby/object:Gem::Dependency
91
82
  name: hashie
92
83
  requirement: !ruby/object:Gem::Requirement
93
- none: false
94
84
  requirements:
95
85
  - - ! '>='
96
86
  - !ruby/object:Gem::Version
@@ -98,7 +88,6 @@ dependencies:
98
88
  type: :runtime
99
89
  prerelease: false
100
90
  version_requirements: !ruby/object:Gem::Requirement
101
- none: false
102
91
  requirements:
103
92
  - - ! '>='
104
93
  - !ruby/object:Gem::Version
@@ -106,7 +95,6 @@ dependencies:
106
95
  - !ruby/object:Gem::Dependency
107
96
  name: simple_oauth
108
97
  requirement: !ruby/object:Gem::Requirement
109
- none: false
110
98
  requirements:
111
99
  - - ! '>='
112
100
  - !ruby/object:Gem::Version
@@ -114,7 +102,6 @@ dependencies:
114
102
  type: :runtime
115
103
  prerelease: false
116
104
  version_requirements: !ruby/object:Gem::Requirement
117
- none: false
118
105
  requirements:
119
106
  - - ! '>='
120
107
  - !ruby/object:Gem::Version
@@ -122,7 +109,6 @@ dependencies:
122
109
  - !ruby/object:Gem::Dependency
123
110
  name: language_list
124
111
  requirement: !ruby/object:Gem::Requirement
125
- none: false
126
112
  requirements:
127
113
  - - ! '>='
128
114
  - !ruby/object:Gem::Version
@@ -130,7 +116,6 @@ dependencies:
130
116
  type: :runtime
131
117
  prerelease: false
132
118
  version_requirements: !ruby/object:Gem::Requirement
133
- none: false
134
119
  requirements:
135
120
  - - ! '>='
136
121
  - !ruby/object:Gem::Version
@@ -138,7 +123,6 @@ dependencies:
138
123
  - !ruby/object:Gem::Dependency
139
124
  name: activesupport
140
125
  requirement: !ruby/object:Gem::Requirement
141
- none: false
142
126
  requirements:
143
127
  - - ! '>='
144
128
  - !ruby/object:Gem::Version
@@ -146,7 +130,6 @@ dependencies:
146
130
  type: :runtime
147
131
  prerelease: false
148
132
  version_requirements: !ruby/object:Gem::Requirement
149
- none: false
150
133
  requirements:
151
134
  - - ! '>='
152
135
  - !ruby/object:Gem::Version
@@ -154,7 +137,6 @@ dependencies:
154
137
  - !ruby/object:Gem::Dependency
155
138
  name: stringex
156
139
  requirement: !ruby/object:Gem::Requirement
157
- none: false
158
140
  requirements:
159
141
  - - ! '>='
160
142
  - !ruby/object:Gem::Version
@@ -162,7 +144,6 @@ dependencies:
162
144
  type: :runtime
163
145
  prerelease: false
164
146
  version_requirements: !ruby/object:Gem::Requirement
165
- none: false
166
147
  requirements:
167
148
  - - ! '>='
168
149
  - !ruby/object:Gem::Version
@@ -170,7 +151,6 @@ dependencies:
170
151
  - !ruby/object:Gem::Dependency
171
152
  name: rake
172
153
  requirement: !ruby/object:Gem::Requirement
173
- none: false
174
154
  requirements:
175
155
  - - ! '>='
176
156
  - !ruby/object:Gem::Version
@@ -178,7 +158,6 @@ dependencies:
178
158
  type: :development
179
159
  prerelease: false
180
160
  version_requirements: !ruby/object:Gem::Requirement
181
- none: false
182
161
  requirements:
183
162
  - - ! '>='
184
163
  - !ruby/object:Gem::Version
@@ -186,7 +165,6 @@ dependencies:
186
165
  - !ruby/object:Gem::Dependency
187
166
  name: minitest
188
167
  requirement: !ruby/object:Gem::Requirement
189
- none: false
190
168
  requirements:
191
169
  - - ! '>='
192
170
  - !ruby/object:Gem::Version
@@ -194,7 +172,6 @@ dependencies:
194
172
  type: :development
195
173
  prerelease: false
196
174
  version_requirements: !ruby/object:Gem::Requirement
197
- none: false
198
175
  requirements:
199
176
  - - ! '>='
200
177
  - !ruby/object:Gem::Version
@@ -221,33 +198,26 @@ files:
221
198
  - yahoo_content_analysis.gemspec
222
199
  homepage: https://github.com/PRX/yahoo_content_analysis
223
200
  licenses: []
201
+ metadata: {}
224
202
  post_install_message:
225
203
  rdoc_options: []
226
204
  require_paths:
227
205
  - lib
228
206
  required_ruby_version: !ruby/object:Gem::Requirement
229
- none: false
230
207
  requirements:
231
208
  - - ! '>='
232
209
  - !ruby/object:Gem::Version
233
210
  version: '0'
234
- segments:
235
- - 0
236
- hash: -652491989169488750
237
211
  required_rubygems_version: !ruby/object:Gem::Requirement
238
- none: false
239
212
  requirements:
240
213
  - - ! '>='
241
214
  - !ruby/object:Gem::Version
242
215
  version: '0'
243
- segments:
244
- - 0
245
- hash: -652491989169488750
246
216
  requirements: []
247
217
  rubyforge_project:
248
- rubygems_version: 1.8.23
218
+ rubygems_version: 2.0.6
249
219
  signing_key:
250
- specification_version: 3
220
+ specification_version: 4
251
221
  summary: Use the Yahoo! Content Analysis API to extract topics and entities.
252
222
  test_files:
253
223
  - test/client_test.rb