reviewed 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,67 +1,63 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
5
  uri: https://the-guide-staging.herokuapp.com/api/v1/articles?keywords=doesnotcompute
6
- body:
6
+ body:
7
7
  encoding: US-ASCII
8
- string: ""
9
- headers:
10
- X-Reviewed-Authorization:
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.7
12
+ X-Reviewed-Authorization:
11
13
  - 38e397252ec670ec441733a95204f141
12
- Accept-Encoding:
14
+ Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
20
  code: 200
21
21
  message: OK
22
- headers:
23
- Access-Control-Allow-Credentials:
24
- - "true"
25
- Access-Control-Allow-Headers:
26
- - x-pagination, x-requested-with, x-requested-by, x-reviewed-authorization, x-skip-cache, Content-Type
27
- Access-Control-Allow-Methods:
22
+ headers:
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - x-pagination, x-requested-with, x-requested-by, x-reviewed-authorization,
27
+ x-skip-cache, Content-Type
28
+ Access-Control-Allow-Methods:
28
29
  - OPTIONS, GET, POST, PUT, DELETE
29
- Access-Control-Allow-Origin:
30
- - "*"
31
- Access-Control-Max-Age:
32
- - "1000"
33
- Cache-Control:
30
+ Access-Control-Allow-Origin:
31
+ - '*'
32
+ Access-Control-Max-Age:
33
+ - '1000'
34
+ Cache-Control:
34
35
  - no-cache, no-store
35
- Content-Encoding:
36
- - gzip
37
- Content-Type:
36
+ Content-Type:
38
37
  - application/json; charset=utf-8
39
- Date:
40
- - Sat, 27 Apr 2013 01:46:57 GMT
41
- Status:
38
+ Date:
39
+ - Thu, 27 Jun 2013 15:43:03 GMT
40
+ Etag:
41
+ - '"e0aa021e21dddbd6d8cecec71e9cf564"'
42
+ Status:
42
43
  - 200 OK
43
- Strict-Transport-Security:
44
+ Strict-Transport-Security:
44
45
  - max-age=31536000
45
- Vary:
46
+ Vary:
46
47
  - Accept-Encoding
47
- X-Request-Id:
48
- - f9cbd34eb669e9f1a5c7457f32d5920e
49
- X-Runtime:
50
- - "0.194034"
51
- X-Ua-Compatible:
48
+ X-Request-Id:
49
+ - 61583fea337c5d8761b5433947a14712
50
+ X-Runtime:
51
+ - '0.025699'
52
+ X-Ua-Compatible:
52
53
  - IE=Edge,chrome=1
53
- Content-Length:
54
- - "149"
55
- Connection:
54
+ Transfer-Encoding:
55
+ - chunked
56
+ Connection:
56
57
  - keep-alive
57
- body:
58
- encoding: ASCII-8BIT
59
- string: !binary |
60
- H4sIABEue1EAA1yNQQrDMAwE/6KzD2mP/kopRm3kYjBSkKVSCPl7jZMc2pt2
61
- hl2tsOCrMFoRhriCiWGFOIX9St1SGzkXbTYyRFOnABX/wKL0LuLtgOy1BmD6
62
- 2A8QtyQ5PcR5bmdVcm5k49HTVYnPzqXPkh7h2nVXWqgl4QNOW4AZDSHe7tsX
63
- AAD//wMAWfK2cdAAAAA=
64
-
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"pagination":{"total":0,"total_pages":0,"first_page":true,"last_page":true,"previous_page":null,"next_page":null,"out_of_bounds":true,"offset":0,"current_page":1,"per_page":20,"entries_on_page":0},"data":[]}'
65
61
  http_version:
66
- recorded_at: Sat, 27 Apr 2013 01:46:57 GMT
67
- recorded_with: VCR 2.3.0
62
+ recorded_at: Thu, 27 Jun 2013 15:43:04 GMT
63
+ recorded_with: VCR 2.5.0