reviewed 0.4.6 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -1
  3. data/lib/reviewed/article.rb +0 -1
  4. data/lib/reviewed/attachable.rb +14 -7
  5. data/lib/reviewed/product.rb +0 -1
  6. data/lib/reviewed/version.rb +1 -1
  7. data/spec/attachable_spec.rb +22 -0
  8. data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/assigns_attachments_to_the_correct_class.yml +338 -289
  9. data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/does_not_has_many_attachments.yml +237 -245
  10. data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/does_not_have_any_matching_attachments.yml +280 -289
  11. data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/finds_attachments_by_tag.yml +281 -301
  12. data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/gets_gallery_attachments.yml +340 -324
  13. data/spec/fixtures/vcr/Reviewed_Article/associations/deals/has_many_deals.yml +237 -245
  14. data/spec/fixtures/vcr/Reviewed_Article/associations/pages/has_many_pages.yml +237 -245
  15. data/spec/fixtures/vcr/Reviewed_Article/associations/products/has_many_products.yml +237 -245
  16. data/spec/fixtures/vcr/Reviewed_Article/associations/products/returns_products_of_the_correct_class.yml +237 -245
  17. data/spec/fixtures/vcr/Reviewed_Article/associations/related_articles/has_many_related_articles.yml +237 -245
  18. data/spec/fixtures/vcr/Reviewed_Article/does_not_request_for_an_attachment_if_it_can_be_found_in_attributes.yml +387 -0
  19. data/spec/fixtures/vcr/Reviewed_Article/fetches_all_attachments_when_no_tag_is_asked_for.yml +195 -0
  20. data/spec/fixtures/vcr/Reviewed_Article/fetches_attachments_when_non-existent.yml +137 -0
  21. data/spec/fixtures/vcr/Reviewed_Article/fetches_when_a_tag_is_not_in_pre-loaded_set.yml +75 -0
  22. data/spec/fixtures/vcr/Reviewed_Article/fetches_when_an_tag_is_not_in_pre-loaded_set.yml +75 -0
  23. data/spec/fixtures/vcr/Reviewed_Article/find_page/finds_a_page_with_a_matching_slug.yml +377 -394
  24. data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_a_product_of_the_correct_class.yml +471 -487
  25. data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_nil_if_does_not_respond_to_products.yml +471 -487
  26. data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_the_primary_product.yml +471 -487
  27. data/spec/fixtures/vcr/Reviewed_Article/returns_local_attachments_when_available.yml +137 -0
  28. data/spec/fixtures/vcr/Reviewed_Article/sets_DEFAULT_ATTACHMENTS.yml +75 -0
  29. data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/not_set/has_nil_query_params.yml +138 -195
  30. data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/set/merges_quest_params.yml +48 -71
  31. data/spec/fixtures/vcr/Reviewed_Collection/collection_data/fetches_the_first_page_by_default.yml +73 -113
  32. data/spec/fixtures/vcr/Reviewed_Collection/collection_data/is_enumerable.yml +73 -113
  33. data/spec/fixtures/vcr/Reviewed_Collection/next_page/fetches_the_next_page_of_results.yml +140 -197
  34. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_if_the_page_number_is_out_of_bounds.yml +73 -113
  35. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_whether_this_is_the_first_or_last_page.yml +73 -113
  36. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_limit_value_max_per_page_.yml +73 -113
  37. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_number_of_entries_on_the_current_page.yml +73 -113
  38. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_offset.yml +73 -113
  39. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_item_count.yml +73 -113
  40. data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_number_of_pages.yml +73 -113
  41. data/spec/fixtures/vcr/Reviewed_Collection/previous_page/fetches_the_previous_page_of_results.yml +210 -307
  42. data/spec/fixtures/vcr/Reviewed_Collection/previous_page/returns_nil_if_there_is_no_previous_page.yml +73 -113
  43. data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/does_not_have_any_matching_attachments.yml +98 -125
  44. data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/matches_attachments_by_tag_properly.yml +98 -136
  45. data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/no_longer_has_many_attachments.yml +55 -81
  46. data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_attachments_by_tag.yml +98 -136
  47. data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_attachments_of_the_correct_class.yml +98 -125
  48. data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/has_many_manufacturer_specs.yml +55 -81
  49. data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/returns_attachments_of_the_correct_class.yml +55 -81
  50. data/spec/fixtures/vcr/Reviewed_Request/_where/filters_collections_using_other_supported_options.yml +49 -67
  51. data/spec/fixtures/vcr/Reviewed_Request/_where/returns_a_collection.yml +138 -195
  52. data/spec/fixtures/vcr/Reviewed_Request/_where/returns_an_empty_set_if_no_matching_data_was_found.yml +47 -51
  53. data/spec/fixtures/vcr/Reviewed_Request/_where/returns_the_appropriate_page_of_results.yml +105 -207
  54. data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_a_collection_object.yml +138 -195
  55. data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_objects_of_the_correct_class.yml +138 -195
  56. data/spec/fixtures/vcr/Reviewed_Request/object_from_response/returns_an_object_of_the_correct_class.yml +237 -245
  57. data/spec/spec_helper.rb +1 -1
  58. metadata +45 -55
data/spec/spec_helper.rb CHANGED
@@ -15,7 +15,7 @@ end
15
15
 
16
16
  VCR.configure do |config|
17
17
  config.ignore_localhost = false
18
- config.default_cassette_options = { :record => :new_episodes, :serialize_with => :syck }
18
+ config.default_cassette_options = { :record => :new_episodes, :serialize_with => :psych }
19
19
  config.cassette_library_dir = 'spec/fixtures/vcr'
20
20
  config.hook_into :webmock
21
21
  config.configure_rspec_metadata!
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
5
- prerelease:
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Nick Plante
@@ -10,76 +9,67 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-06-11 00:00:00.000000000 Z
12
+ date: 2013-06-28 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: activesupport
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '3.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: '3.0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: activemodel
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: '3.0'
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: '3.0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: faraday
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: 0.8.4
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: 0.8.4
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: faraday_middleware
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: 0.9.0
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: 0.9.0
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: hashie
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
@@ -95,113 +84,99 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rack
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: rake
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - '>='
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ! '>='
109
+ - - '>='
125
110
  - !ruby/object:Gem::Version
126
111
  version: '0'
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: rspec
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
- - - ! '>='
116
+ - - '>='
133
117
  - !ruby/object:Gem::Version
134
118
  version: '2.10'
135
119
  type: :development
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
- - - ! '>='
123
+ - - '>='
141
124
  - !ruby/object:Gem::Version
142
125
  version: '2.10'
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: webmock
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
- - - ! '>='
130
+ - - '>='
149
131
  - !ruby/object:Gem::Version
150
132
  version: '1.8'
151
133
  type: :development
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
- - - ! '>='
137
+ - - '>='
157
138
  - !ruby/object:Gem::Version
158
139
  version: '1.8'
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: vcr
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
- - - ! '>='
144
+ - - '>='
165
145
  - !ruby/object:Gem::Version
166
146
  version: '2.1'
167
147
  type: :development
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
- - - ! '>='
151
+ - - '>='
173
152
  - !ruby/object:Gem::Version
174
153
  version: '2.1'
175
154
  - !ruby/object:Gem::Dependency
176
155
  name: guard-rspec
177
156
  requirement: !ruby/object:Gem::Requirement
178
- none: false
179
157
  requirements:
180
- - - ! '>='
158
+ - - '>='
181
159
  - !ruby/object:Gem::Version
182
160
  version: '1.0'
183
161
  type: :development
184
162
  prerelease: false
185
163
  version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
164
  requirements:
188
- - - ! '>='
165
+ - - '>='
189
166
  - !ruby/object:Gem::Version
190
167
  version: '1.0'
191
168
  - !ruby/object:Gem::Dependency
192
169
  name: pry
193
170
  requirement: !ruby/object:Gem::Requirement
194
- none: false
195
171
  requirements:
196
- - - ! '>='
172
+ - - '>='
197
173
  - !ruby/object:Gem::Version
198
174
  version: '0'
199
175
  type: :development
200
176
  prerelease: false
201
177
  version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
178
  requirements:
204
- - - ! '>='
179
+ - - '>='
205
180
  - !ruby/object:Gem::Version
206
181
  version: '0'
207
182
  description: Client library for the Reviewed.com API
@@ -241,6 +216,7 @@ files:
241
216
  - lib/reviewed/website.rb
242
217
  - reviewed.gemspec
243
218
  - spec/article_spec.rb
219
+ - spec/attachable_spec.rb
244
220
  - spec/author_spec.rb
245
221
  - spec/award_spec.rb
246
222
  - spec/base_spec.rb
@@ -260,10 +236,17 @@ files:
260
236
  - spec/fixtures/vcr/Reviewed_Article/associations/products/has_many_products.yml
261
237
  - spec/fixtures/vcr/Reviewed_Article/associations/products/returns_products_of_the_correct_class.yml
262
238
  - spec/fixtures/vcr/Reviewed_Article/associations/related_articles/has_many_related_articles.yml
239
+ - spec/fixtures/vcr/Reviewed_Article/does_not_request_for_an_attachment_if_it_can_be_found_in_attributes.yml
240
+ - spec/fixtures/vcr/Reviewed_Article/fetches_all_attachments_when_no_tag_is_asked_for.yml
241
+ - spec/fixtures/vcr/Reviewed_Article/fetches_attachments_when_non-existent.yml
242
+ - spec/fixtures/vcr/Reviewed_Article/fetches_when_a_tag_is_not_in_pre-loaded_set.yml
243
+ - spec/fixtures/vcr/Reviewed_Article/fetches_when_an_tag_is_not_in_pre-loaded_set.yml
263
244
  - spec/fixtures/vcr/Reviewed_Article/find_page/finds_a_page_with_a_matching_slug.yml
264
245
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_a_product_of_the_correct_class.yml
265
246
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_nil_if_does_not_respond_to_products.yml
266
247
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_the_primary_product.yml
248
+ - spec/fixtures/vcr/Reviewed_Article/returns_local_attachments_when_available.yml
249
+ - spec/fixtures/vcr/Reviewed_Article/sets_DEFAULT_ATTACHMENTS.yml
267
250
  - spec/fixtures/vcr/Reviewed_Client/_perform/request_params/not_set/has_nil_query_params.yml
268
251
  - spec/fixtures/vcr/Reviewed_Client/_perform/request_params/set/merges_quest_params.yml
269
252
  - spec/fixtures/vcr/Reviewed_Collection/collection_data/fetches_the_first_page_by_default.yml
@@ -300,30 +283,30 @@ files:
300
283
  - spec/website_spec.rb
301
284
  homepage: ''
302
285
  licenses: []
286
+ metadata: {}
303
287
  post_install_message:
304
288
  rdoc_options: []
305
289
  require_paths:
306
290
  - lib
307
291
  required_ruby_version: !ruby/object:Gem::Requirement
308
- none: false
309
292
  requirements:
310
- - - ! '>='
293
+ - - '>='
311
294
  - !ruby/object:Gem::Version
312
295
  version: '0'
313
296
  required_rubygems_version: !ruby/object:Gem::Requirement
314
- none: false
315
297
  requirements:
316
- - - ! '>='
298
+ - - '>='
317
299
  - !ruby/object:Gem::Version
318
300
  version: '0'
319
301
  requirements: []
320
302
  rubyforge_project:
321
- rubygems_version: 1.8.25
303
+ rubygems_version: 2.0.2
322
304
  signing_key:
323
- specification_version: 3
305
+ specification_version: 4
324
306
  summary: A Ruby Gem for Accessing the Reviewed.com API
325
307
  test_files:
326
308
  - spec/article_spec.rb
309
+ - spec/attachable_spec.rb
327
310
  - spec/author_spec.rb
328
311
  - spec/award_spec.rb
329
312
  - spec/base_spec.rb
@@ -343,10 +326,17 @@ test_files:
343
326
  - spec/fixtures/vcr/Reviewed_Article/associations/products/has_many_products.yml
344
327
  - spec/fixtures/vcr/Reviewed_Article/associations/products/returns_products_of_the_correct_class.yml
345
328
  - spec/fixtures/vcr/Reviewed_Article/associations/related_articles/has_many_related_articles.yml
329
+ - spec/fixtures/vcr/Reviewed_Article/does_not_request_for_an_attachment_if_it_can_be_found_in_attributes.yml
330
+ - spec/fixtures/vcr/Reviewed_Article/fetches_all_attachments_when_no_tag_is_asked_for.yml
331
+ - spec/fixtures/vcr/Reviewed_Article/fetches_attachments_when_non-existent.yml
332
+ - spec/fixtures/vcr/Reviewed_Article/fetches_when_a_tag_is_not_in_pre-loaded_set.yml
333
+ - spec/fixtures/vcr/Reviewed_Article/fetches_when_an_tag_is_not_in_pre-loaded_set.yml
346
334
  - spec/fixtures/vcr/Reviewed_Article/find_page/finds_a_page_with_a_matching_slug.yml
347
335
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_a_product_of_the_correct_class.yml
348
336
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_nil_if_does_not_respond_to_products.yml
349
337
  - spec/fixtures/vcr/Reviewed_Article/primary_product/returns_the_primary_product.yml
338
+ - spec/fixtures/vcr/Reviewed_Article/returns_local_attachments_when_available.yml
339
+ - spec/fixtures/vcr/Reviewed_Article/sets_DEFAULT_ATTACHMENTS.yml
350
340
  - spec/fixtures/vcr/Reviewed_Client/_perform/request_params/not_set/has_nil_query_params.yml
351
341
  - spec/fixtures/vcr/Reviewed_Client/_perform/request_params/set/merges_quest_params.yml
352
342
  - spec/fixtures/vcr/Reviewed_Collection/collection_data/fetches_the_first_page_by_default.yml