wikidata-client 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +3 -2
  4. data/CHANGELOG.md +10 -0
  5. data/config/settings.yml +2 -2
  6. data/lib/wikidata/property.rb +1 -1
  7. data/lib/wikidata/search_response.rb +1 -1
  8. data/lib/wikidata/version.rb +1 -1
  9. data/spec/fixtures/vcr/Wikidata_Entity/properties/entities/should_allow_to_return_only_entities_ids_from_a_key.yml +177 -0
  10. data/spec/fixtures/vcr/Wikidata_Entity/properties/entities/should_allow_to_return_only_entities_ids_from_an_id.yml +177 -0
  11. data/spec/fixtures/vcr/Wikidata_Entity/properties/entities/should_return_entities_property_from_a_key_children_here_.yml +580 -0
  12. data/spec/fixtures/vcr/Wikidata_Entity/properties/entities/should_return_entities_property_from_an_id_P40_for_children_here_.yml +580 -0
  13. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_commons_media/should_return_CommonsMedia_from_a_key_logo_image_here_.yml +93 -0
  14. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_commons_media/should_return_CommonsMedia_from_a_property_id_P154_for_logo_image_here_.yml +93 -0
  15. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_date/should_return_Time_from_a_a_key_date_of_birth_here_.yml +177 -0
  16. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_date/should_return_Time_from_a_property_id_P569_for_date_of_birth_here_.yml +177 -0
  17. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_globe_coordinate/should_return_GlobeCoordinate_from_a_key_coordinate_location_here_.yml +63 -0
  18. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_globe_coordinate/should_return_GlobeCoordinate_from_a_property_id_P625_for_coordinate_location_here_.yml +63 -0
  19. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_string/should_return_String_from_a_key_freebase_identifier_here_.yml +177 -0
  20. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_string/should_return_String_from_a_property_id_P646_for_freebase_identifier_here_.yml +177 -0
  21. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_string/should_return_a_nil_property_id_if_not_an_item.yml +177 -0
  22. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_url/should_return_Url_from_a_key_official_website_here_.yml +93 -0
  23. data/spec/fixtures/vcr/Wikidata_Entity/properties/properties/of_type_url/should_return_Url_from_a_property_id_P856_for_official_website_here_.yml +93 -0
  24. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_aliases.yml +182 -0
  25. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_descriptions.yml +182 -0
  26. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_id.yml +182 -0
  27. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_labels.yml +182 -0
  28. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_sitelinks.yml +182 -0
  29. data/spec/fixtures/vcr/Wikidata_Entity/properties/should_return_url.yml +182 -0
  30. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_find_by_id.yml +363 -0
  31. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_find_by_ids.yml +486 -0
  32. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_find_by_title.yml +363 -0
  33. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_find_by_titles.yml +486 -0
  34. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_return_nil_if_item_not_found.yml +64 -0
  35. data/spec/fixtures/vcr/Wikidata_Item/_find_/should_return_nil_if_item_title_not_found.yml +59 -0
  36. data/spec/fixtures/vcr/Wikidata_Item/_search/should_fetch_all_all_items_of_the_collection.yml +757 -0
  37. data/spec/fixtures/vcr/Wikidata_Item/_search/should_return_a_response_with_an_empty_array_of_results_if_search_missing.yml +63 -0
  38. data/spec/fixtures/vcr/Wikidata_Item/_search/should_return_an_array_of_Wikidata_Item.yml +757 -0
  39. data/spec/fixtures/vcr/Wikidata_Item/_search/should_return_the_next_page_offset.yml +127 -0
  40. data/spec/fixtures/vcr/Wikidata_Item/_search/should_return_the_total_number_of_hits.yml +127 -0
  41. data/spec/wikidata/entity_spec.rb +3 -3
  42. data/spec/wikidata/item_spec.rb +1 -1
  43. metadata +3 -3
@@ -120,4 +120,131 @@ http_interactions:
120
120
  \u00e1lbum de <span class=\"searchmatch\">Michael</span> Jackson","size":2167,"wordcount":217,"timestamp":"2014-08-27T21:11:08Z"}]}}'
121
121
  http_version:
122
122
  recorded_at: Mon, 29 Sep 2014 09:07:30 GMT
123
+ - request:
124
+ method: get
125
+ uri: https://www.wikidata.org/w/api.php?action=query&format=json&list=search&srlimit=10&sroffset=0&srsearch=Michael%20Jackson
126
+ body:
127
+ encoding: US-ASCII
128
+ string: ''
129
+ headers:
130
+ User-Agent:
131
+ - Faraday v0.9.2
132
+ response:
133
+ status:
134
+ code: 200
135
+ message: ''
136
+ headers:
137
+ Server:
138
+ - nginx/1.9.4
139
+ Date:
140
+ - Sat, 12 Mar 2016 14:03:10 GMT
141
+ Content-Type:
142
+ - application/json; charset=utf-8
143
+ Connection:
144
+ - keep-alive
145
+ X-Powered-By:
146
+ - HHVM/3.12.1
147
+ X-Content-Type-Options:
148
+ - nosniff
149
+ Cache-Control:
150
+ - private, must-revalidate, max-age=0
151
+ P3p:
152
+ - CP="This is not a P3P policy! See https://www.wikidata.org/wiki/Special:CentralAutoLogin/P3P
153
+ for more info."
154
+ X-Frame-Options:
155
+ - DENY
156
+ Vary:
157
+ - Accept-Encoding,X-Forwarded-Proto,Cookie,Authorization
158
+ Backend-Timing:
159
+ - D=103841 t=1457791390566069
160
+ X-Varnish:
161
+ - 1111244199, 3118286800, 730053995
162
+ Via:
163
+ - 1.1 varnish, 1.1 varnish, 1.1 varnish
164
+ Age:
165
+ - '0'
166
+ X-Cache:
167
+ - cp1068 pass+chfp(0), cp3030 miss+chfp(0), cp3003 frontend pass+chfp(0)
168
+ Strict-Transport-Security:
169
+ - max-age=31536000; includeSubDomains; preload
170
+ Set-Cookie:
171
+ - WMF-Last-Access=12-Mar-2016;Path=/;HttpOnly;Expires=Wed, 13 Apr 2016 12:00:00
172
+ GMT, GeoIP=:::::v6; Path=/; Domain=.wikidata.org
173
+ X-Analytics:
174
+ - https=1;nocookies=1
175
+ X-Client-Ip:
176
+ - 2a01:e35:8a88:3e50:786:71f9:a797:9048
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"batchcomplete":"","continue":{"sroffset":10,"continue":"-||"},"query":{"searchinfo":{"totalhits":455},"search":[{"ns":0,"title":"Q2831","snippet":"<span
180
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
181
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
182
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
183
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
184
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
185
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
186
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u121b\u12ed\u12ad\u120d
187
+ \u1303\u12ad\u1230\u1295\n<span class=\"searchmatch\">Michael</span> <span
188
+ class=\"searchmatch\">Jackson</span>\n\u0645\u0627\u064a\u0643\u0644 \u062c\u0627\u0643\u0633\u0648\u0646","size":117544,"wordcount":1025,"timestamp":"2016-02-18T16:21:44Z"},{"ns":0,"title":"Q167877","snippet":"<span
189
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
190
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
191
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u041c\u0430\u0439\u043a\u044a\u043b
192
+ \u0414\u0436\u0430\u043a\u0441\u044a\u043d\n<span class=\"searchmatch\">Michael</span>
193
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
194
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
195
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
196
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
197
+ <span class=\"searchmatch\">Jackson</span>\nMichael","size":35724,"wordcount":158,"timestamp":"2016-03-01T09:44:57Z"},{"ns":0,"title":"Q956149","snippet":"Speechless\n<span
198
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nSingle
199
+ von <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
200
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
201
+ song\nchanson de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u062a\u06a9\u200c\u0622\u0647\u0646\u06af\u06cc
202
+ \u0627\u0632 \u0645\u0627\u06cc\u06a9\u0644 \u062c\u06a9\u0633\u0648\u0646\nCanci\u00f3n
203
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nSpeechless","size":9464,"wordcount":87,"timestamp":"2014-11-25T01:29:37Z"},{"ns":0,"title":"Q1308224","snippet":"Experience\n<span
204
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
205
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
206
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
207
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
208
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
209
+ The","size":21159,"wordcount":136,"timestamp":"2015-12-12T20:32:33Z"},{"ns":0,"title":"Q7244161","snippet":"Prince
210
+ <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
211
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
212
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
213
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
214
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
215
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
216
+ I\n\u067e\u0631\u0646\u0633","size":12982,"wordcount":102,"timestamp":"2016-02-01T15:03:07Z"},{"ns":0,"title":"Q92948","snippet":"<span
217
+ class=\"searchmatch\">Michael</span> Anthony <span class=\"searchmatch\">Jackson</span>\n<span
218
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
219
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
220
+ class=\"searchmatch\">Michael</span> A. <span class=\"searchmatch\">Jackson</span>\n<span
221
+ class=\"searchmatch\">Michael</span> Anthony <span class=\"searchmatch\">Jackson</span>\n<span
222
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u0645\u0627\u06cc\u06a9\u0644
223
+ \u0627\u06cc. \u062c\u06a9\u0633\u0648\u0646\n<span class=\"searchmatch\">Michael</span>
224
+ Anthony Jackson","size":16907,"wordcount":92,"timestamp":"2016-01-30T03:31:15Z"},{"ns":0,"title":"Q25158","snippet":"<span
225
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
226
+ Love Songs\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
227
+ Love Songs\nLove Songs\nLove Songs\nLove Songs (musikalbum av <span class=\"searchmatch\">Michael</span>
228
+ <span class=\"searchmatch\">Jackson</span>)\nLove Songs\n<span class=\"searchmatch\">Michael</span>
229
+ <span class=\"searchmatch\">Jackson</span>: Love","size":4525,"wordcount":67,"timestamp":"2016-03-04T14:52:14Z"},{"ns":0,"title":"Q44376","snippet":"<span
230
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nalbum\nalbum
231
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
232
+ del 2001\nalbum by <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nAlbum
233
+ von <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u00e1lbum
234
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u00e1lbum
235
+ de <span class=\"searchmatch\">Michael</span> Jackson","size":22496,"wordcount":229,"timestamp":"2016-03-02T18:08:28Z"},{"ns":0,"title":"Q756785","snippet":"Cry\nCry
236
+ (b\u00e0i h\u00e1t c\u1ee7a <span class=\"searchmatch\">Michael</span> <span
237
+ class=\"searchmatch\">Jackson</span>)\n\u0e04\u0e23\u0e32\u0e22\nCry\nCry\nchanson
238
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsingolo
239
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
240
+ del 2001\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsong
241
+ recorded by American","size":15569,"wordcount":137,"timestamp":"2015-11-15T07:44:23Z"},{"ns":0,"title":"Q732826","snippet":"Nature\nchanson
242
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsingolo
243
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
244
+ del 1983\ndoorverwijspagina\nsong by <span class=\"searchmatch\">Michael</span>
245
+ <span class=\"searchmatch\">Jackson</span>\nSingle von <span class=\"searchmatch\">Michael</span>
246
+ <span class=\"searchmatch\">Jackson</span>\n\u062a\u06a9\u200c\u0622\u0647\u0646\u06af\u06cc
247
+ \u0627\u0632 \u0645\u0627\u06cc\u06a9\u0644","size":14696,"wordcount":188,"timestamp":"2016-01-05T09:20:23Z"}]}}'
248
+ http_version:
249
+ recorded_at: Sat, 12 Mar 2016 14:03:11 GMT
123
250
  recorded_with: VCR 2.9.3
@@ -120,4 +120,131 @@ http_interactions:
120
120
  \u00e1lbum de <span class=\"searchmatch\">Michael</span> Jackson","size":2167,"wordcount":217,"timestamp":"2014-08-27T21:11:08Z"}]}}'
121
121
  http_version:
122
122
  recorded_at: Mon, 29 Sep 2014 09:07:30 GMT
123
+ - request:
124
+ method: get
125
+ uri: https://www.wikidata.org/w/api.php?action=query&format=json&list=search&srlimit=10&sroffset=0&srsearch=Michael%20Jackson
126
+ body:
127
+ encoding: US-ASCII
128
+ string: ''
129
+ headers:
130
+ User-Agent:
131
+ - Faraday v0.9.2
132
+ response:
133
+ status:
134
+ code: 200
135
+ message: ''
136
+ headers:
137
+ Server:
138
+ - nginx/1.9.4
139
+ Date:
140
+ - Sat, 12 Mar 2016 14:03:10 GMT
141
+ Content-Type:
142
+ - application/json; charset=utf-8
143
+ Connection:
144
+ - keep-alive
145
+ X-Powered-By:
146
+ - HHVM/3.12.1
147
+ X-Content-Type-Options:
148
+ - nosniff
149
+ Cache-Control:
150
+ - private, must-revalidate, max-age=0
151
+ P3p:
152
+ - CP="This is not a P3P policy! See https://www.wikidata.org/wiki/Special:CentralAutoLogin/P3P
153
+ for more info."
154
+ X-Frame-Options:
155
+ - DENY
156
+ Vary:
157
+ - Accept-Encoding,X-Forwarded-Proto,Cookie,Authorization
158
+ Backend-Timing:
159
+ - D=118563 t=1457791389936098
160
+ X-Varnish:
161
+ - 1111241030, 3159065174, 730051150
162
+ Via:
163
+ - 1.1 varnish, 1.1 varnish, 1.1 varnish
164
+ Age:
165
+ - '0'
166
+ X-Cache:
167
+ - cp1068 pass+chfp(0), cp3031 miss+chfp(0), cp3003 frontend pass+chfp(0)
168
+ Strict-Transport-Security:
169
+ - max-age=31536000; includeSubDomains; preload
170
+ Set-Cookie:
171
+ - WMF-Last-Access=12-Mar-2016;Path=/;HttpOnly;Expires=Wed, 13 Apr 2016 12:00:00
172
+ GMT, GeoIP=:::::v6; Path=/; Domain=.wikidata.org
173
+ X-Analytics:
174
+ - https=1;nocookies=1
175
+ X-Client-Ip:
176
+ - 2a01:e35:8a88:3e50:786:71f9:a797:9048
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"batchcomplete":"","continue":{"sroffset":10,"continue":"-||"},"query":{"searchinfo":{"totalhits":455},"search":[{"ns":0,"title":"Q2831","snippet":"<span
180
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
181
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
182
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
183
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
184
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
185
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
186
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u121b\u12ed\u12ad\u120d
187
+ \u1303\u12ad\u1230\u1295\n<span class=\"searchmatch\">Michael</span> <span
188
+ class=\"searchmatch\">Jackson</span>\n\u0645\u0627\u064a\u0643\u0644 \u062c\u0627\u0643\u0633\u0648\u0646","size":117544,"wordcount":1025,"timestamp":"2016-02-18T16:21:44Z"},{"ns":0,"title":"Q167877","snippet":"<span
189
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
190
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
191
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u041c\u0430\u0439\u043a\u044a\u043b
192
+ \u0414\u0436\u0430\u043a\u0441\u044a\u043d\n<span class=\"searchmatch\">Michael</span>
193
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
194
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
195
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
196
+ <span class=\"searchmatch\">Jackson</span>\n<span class=\"searchmatch\">Michael</span>
197
+ <span class=\"searchmatch\">Jackson</span>\nMichael","size":35724,"wordcount":158,"timestamp":"2016-03-01T09:44:57Z"},{"ns":0,"title":"Q956149","snippet":"Speechless\n<span
198
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nSingle
199
+ von <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
200
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
201
+ song\nchanson de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u062a\u06a9\u200c\u0622\u0647\u0646\u06af\u06cc
202
+ \u0627\u0632 \u0645\u0627\u06cc\u06a9\u0644 \u062c\u06a9\u0633\u0648\u0646\nCanci\u00f3n
203
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nSpeechless","size":9464,"wordcount":87,"timestamp":"2014-11-25T01:29:37Z"},{"ns":0,"title":"Q1308224","snippet":"Experience\n<span
204
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
205
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
206
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
207
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
208
+ The Experience\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
209
+ The","size":21159,"wordcount":136,"timestamp":"2015-12-12T20:32:33Z"},{"ns":0,"title":"Q7244161","snippet":"Prince
210
+ <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
211
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
212
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
213
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
214
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
215
+ I\nPrince <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
216
+ I\n\u067e\u0631\u0646\u0633","size":12982,"wordcount":102,"timestamp":"2016-02-01T15:03:07Z"},{"ns":0,"title":"Q92948","snippet":"<span
217
+ class=\"searchmatch\">Michael</span> Anthony <span class=\"searchmatch\">Jackson</span>\n<span
218
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
219
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n<span
220
+ class=\"searchmatch\">Michael</span> A. <span class=\"searchmatch\">Jackson</span>\n<span
221
+ class=\"searchmatch\">Michael</span> Anthony <span class=\"searchmatch\">Jackson</span>\n<span
222
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u0645\u0627\u06cc\u06a9\u0644
223
+ \u0627\u06cc. \u062c\u06a9\u0633\u0648\u0646\n<span class=\"searchmatch\">Michael</span>
224
+ Anthony Jackson","size":16907,"wordcount":92,"timestamp":"2016-01-30T03:31:15Z"},{"ns":0,"title":"Q25158","snippet":"<span
225
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
226
+ Love Songs\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>:
227
+ Love Songs\nLove Songs\nLove Songs\nLove Songs (musikalbum av <span class=\"searchmatch\">Michael</span>
228
+ <span class=\"searchmatch\">Jackson</span>)\nLove Songs\n<span class=\"searchmatch\">Michael</span>
229
+ <span class=\"searchmatch\">Jackson</span>: Love","size":4525,"wordcount":67,"timestamp":"2016-03-04T14:52:14Z"},{"ns":0,"title":"Q44376","snippet":"<span
230
+ class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nalbum\nalbum
231
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
232
+ del 2001\nalbum by <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nAlbum
233
+ von <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u00e1lbum
234
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\n\u00e1lbum
235
+ de <span class=\"searchmatch\">Michael</span> Jackson","size":22496,"wordcount":229,"timestamp":"2016-03-02T18:08:28Z"},{"ns":0,"title":"Q756785","snippet":"Cry\nCry
236
+ (b\u00e0i h\u00e1t c\u1ee7a <span class=\"searchmatch\">Michael</span> <span
237
+ class=\"searchmatch\">Jackson</span>)\n\u0e04\u0e23\u0e32\u0e22\nCry\nCry\nchanson
238
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsingolo
239
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
240
+ del 2001\n<span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsong
241
+ recorded by American","size":15569,"wordcount":137,"timestamp":"2015-11-15T07:44:23Z"},{"ns":0,"title":"Q732826","snippet":"Nature\nchanson
242
+ de <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>\nsingolo
243
+ di <span class=\"searchmatch\">Michael</span> <span class=\"searchmatch\">Jackson</span>
244
+ del 1983\ndoorverwijspagina\nsong by <span class=\"searchmatch\">Michael</span>
245
+ <span class=\"searchmatch\">Jackson</span>\nSingle von <span class=\"searchmatch\">Michael</span>
246
+ <span class=\"searchmatch\">Jackson</span>\n\u062a\u06a9\u200c\u0622\u0647\u0646\u06af\u06cc
247
+ \u0627\u0632 \u0645\u0627\u06cc\u06a9\u0644","size":14696,"wordcount":188,"timestamp":"2016-01-05T09:20:23Z"}]}}'
248
+ http_version:
249
+ recorded_at: Sat, 12 Mar 2016 14:03:10 GMT
123
250
  recorded_with: VCR 2.9.3
@@ -13,7 +13,7 @@ describe Wikidata::Entity, :vcr do
13
13
  end
14
14
 
15
15
  it 'should return url' do
16
- sid.url.should eq 'http://www.wikidata.org/wiki/Q47878'
16
+ sid.url.should eq 'https://www.wikidata.org/wiki/Q47878'
17
17
  end
18
18
 
19
19
  it 'should return labels' do
@@ -22,8 +22,8 @@ describe Wikidata::Entity, :vcr do
22
22
  end
23
23
 
24
24
  it 'should return aliases' do
25
- sid.aliases.en.map(&:value).should eq ['John Simon Ritchie', 'Здох через шлюху'] # ?!?
26
- sid.aliases.ja.map(&:value).should eq ['シド・ビシャス']
25
+ sid.aliases.en.map(&:value).should include('John Simon Ritchie', 'Здох через шлюху')
26
+ sid.aliases.ja.map(&:value).should include('シド・ビシャス')
27
27
  end
28
28
 
29
29
  it 'should return descriptions' do
@@ -54,7 +54,7 @@ describe Wikidata::Item, :vcr do
54
54
  end
55
55
 
56
56
  it 'should return the total number of hits' do
57
- search.total_hits.should eq 416
57
+ search.total_hits.should be > 10
58
58
  end
59
59
 
60
60
  it 'should return the next page offset' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikidata-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kévin Lacointe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2016-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubyforge_project:
233
- rubygems_version: 2.4.5.1
233
+ rubygems_version: 2.5.1
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: Wikidata API client