reviewed 0.4.6 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -1
- data/lib/reviewed/article.rb +0 -1
- data/lib/reviewed/attachable.rb +14 -7
- data/lib/reviewed/product.rb +0 -1
- data/lib/reviewed/version.rb +1 -1
- data/spec/attachable_spec.rb +22 -0
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/assigns_attachments_to_the_correct_class.yml +338 -289
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/does_not_has_many_attachments.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/does_not_have_any_matching_attachments.yml +280 -289
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/finds_attachments_by_tag.yml +281 -301
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/gets_gallery_attachments.yml +340 -324
- data/spec/fixtures/vcr/Reviewed_Article/associations/deals/has_many_deals.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/associations/pages/has_many_pages.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/associations/products/has_many_products.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/associations/products/returns_products_of_the_correct_class.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/associations/related_articles/has_many_related_articles.yml +237 -245
- data/spec/fixtures/vcr/Reviewed_Article/does_not_request_for_an_attachment_if_it_can_be_found_in_attributes.yml +387 -0
- data/spec/fixtures/vcr/Reviewed_Article/fetches_all_attachments_when_no_tag_is_asked_for.yml +195 -0
- data/spec/fixtures/vcr/Reviewed_Article/fetches_attachments_when_non-existent.yml +137 -0
- data/spec/fixtures/vcr/Reviewed_Article/fetches_when_a_tag_is_not_in_pre-loaded_set.yml +75 -0
- data/spec/fixtures/vcr/Reviewed_Article/fetches_when_an_tag_is_not_in_pre-loaded_set.yml +75 -0
- data/spec/fixtures/vcr/Reviewed_Article/find_page/finds_a_page_with_a_matching_slug.yml +377 -394
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_a_product_of_the_correct_class.yml +471 -487
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_nil_if_does_not_respond_to_products.yml +471 -487
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_the_primary_product.yml +471 -487
- data/spec/fixtures/vcr/Reviewed_Article/returns_local_attachments_when_available.yml +137 -0
- data/spec/fixtures/vcr/Reviewed_Article/sets_DEFAULT_ATTACHMENTS.yml +75 -0
- data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/not_set/has_nil_query_params.yml +138 -195
- data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/set/merges_quest_params.yml +48 -71
- data/spec/fixtures/vcr/Reviewed_Collection/collection_data/fetches_the_first_page_by_default.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/collection_data/is_enumerable.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/next_page/fetches_the_next_page_of_results.yml +140 -197
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_if_the_page_number_is_out_of_bounds.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_whether_this_is_the_first_or_last_page.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_limit_value_max_per_page_.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_number_of_entries_on_the_current_page.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_offset.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_item_count.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_number_of_pages.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Collection/previous_page/fetches_the_previous_page_of_results.yml +210 -307
- data/spec/fixtures/vcr/Reviewed_Collection/previous_page/returns_nil_if_there_is_no_previous_page.yml +73 -113
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/does_not_have_any_matching_attachments.yml +98 -125
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/matches_attachments_by_tag_properly.yml +98 -136
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/no_longer_has_many_attachments.yml +55 -81
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_attachments_by_tag.yml +98 -136
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_attachments_of_the_correct_class.yml +98 -125
- data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/has_many_manufacturer_specs.yml +55 -81
- data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/returns_attachments_of_the_correct_class.yml +55 -81
- data/spec/fixtures/vcr/Reviewed_Request/_where/filters_collections_using_other_supported_options.yml +49 -67
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_a_collection.yml +138 -195
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_an_empty_set_if_no_matching_data_was_found.yml +47 -51
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_the_appropriate_page_of_results.yml +105 -207
- data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_a_collection_object.yml +138 -195
- data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_objects_of_the_correct_class.yml +138 -195
- data/spec/fixtures/vcr/Reviewed_Request/object_from_response/returns_an_object_of_the_correct_class.yml +237 -245
- data/spec/spec_helper.rb +1 -1
- metadata +45 -55
data/spec/fixtures/vcr/Reviewed_Request/_where/filters_collections_using_other_supported_options.yml
CHANGED
@@ -1,84 +1,66 @@
|
|
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=minden
|
6
|
-
body:
|
6
|
+
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string:
|
9
|
-
headers:
|
10
|
-
|
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
|
-
|
17
|
-
|
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
|
-
-
|
25
|
-
Access-Control-Allow-Headers:
|
26
|
-
- x-pagination, x-requested-with, x-requested-by, x-reviewed-authorization,
|
27
|
-
|
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
|
-
-
|
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-
|
36
|
-
- gzip
|
37
|
-
Content-Type:
|
36
|
+
Content-Type:
|
38
37
|
- application/json; charset=utf-8
|
39
|
-
Date:
|
40
|
-
-
|
41
|
-
|
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
|
-
-
|
49
|
-
X-Runtime:
|
50
|
-
-
|
51
|
-
X-Ua-Compatible:
|
48
|
+
X-Request-Id:
|
49
|
+
- 897985607356ec6196f2306684a8f1a8
|
50
|
+
X-Runtime:
|
51
|
+
- '0.000803'
|
52
|
+
X-Ua-Compatible:
|
52
53
|
- IE=Edge,chrome=1
|
53
|
-
Transfer-Encoding:
|
54
|
+
Transfer-Encoding:
|
54
55
|
- chunked
|
55
|
-
Connection:
|
56
|
+
Connection:
|
56
57
|
- keep-alive
|
57
|
-
body:
|
58
|
-
encoding:
|
59
|
-
string:
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
NPrKptFgSBmvCLdKwTA74dUjqGmR4jEeKQGaymG2OK5IzQwj5edXImpSkjxu
|
64
|
-
qhS2VVXH6a6o8zyPk6zIM4LBFTADNWV4F0njJI3iPEryT2lSJnmZFP+gjR3r
|
65
|
-
M5ssipMoS7xNUqaZsxlYj1eTj2KoYbj7iFCAunt4uPtTia67+xuBgK9oVik2
|
66
|
-
8JZO1r03w21t+56pF9zCRQ+G0Ro0V2IMPASgvkKlhQEqHEyfsSgoin29DUVt
|
67
|
-
dhC7T5qRxxVh1rRSnSwbvgEGb8qvNnzvLQ07OBv8xZE/LRrBPfneUYW08XC0
|
68
|
-
VSd0S102J5h2n5J9mW3KOP4jjvEvJs+MYbztHV+n2x34/Bz8YoPG3z/apf5G
|
69
|
-
JRwkdFSyttxFC0SyLN4W+4JV+a6IkyLmW7YFjKVAS6s4UKsEWq65HAxmse49
|
70
|
-
I1GAOhIiOjhGolDafWt69K2F/oIyDZ6BwihQGD08RJ7CaKHwlNBc3vdTenQ5
|
71
|
-
dUE4ygjezczhge7swfH/A7kJTQ30owu0NAfuBSEtO1NS+kzz16C6pfkUZX9F
|
72
|
-
81mUeM3HeZlubmieXK0PT6h5GZ3TB9lDWXpoNX4zjWfuyGP6l5IjGzyEvVYj
|
73
|
-
KTfb/T22+jmO19v68V3N8sPatiOfexHViVI7KFZVoII2nQZthft+GcwcS/Ui
|
74
|
-
3T3Us9aLzKeQblPX8LKGzgH5BsFLOc8Ef6Nn13OKt+IZqDZeJKR6oY68IB7N
|
75
|
-
pRLDgVZMQyeGk4gmr/pSQ1ThABgOcwlYwZNfLo/BaX9BAzDTwYhuGurHGQrn
|
76
|
-
NamEeLNe4Izx0+UVS2T1/FQESS6pBPUtSxyGRsmXaY3R2SgoFvPk43DZdcDn
|
77
|
-
F0t5KNdosX5O1iENJ65WQYMHrTGjLtdr00J0sKKGCFHDF+9w34KST5aN4z2X
|
78
|
-
/aX/8cTIb7zkePSUXYy+GaPKdk/Ujp1k8xj5nwBFBbIBn85FI/Q0Tt6N+OL6
|
79
|
-
s2gsAW5ivvRDnmxxCCRxltQNYGvxynV2Xv3y/dcjI0+Pb1+6iY3fxs974J9G
|
80
|
-
5M/DvwS4Cf9stb7xr9Wv3X89soP/+B8AAAD//wMAMDow8akKAAA=
|
81
|
-
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '{"pagination":{"total":1,"total_pages":1,"first_page":true,"last_page":true,"previous_page":null,"next_page":null,"out_of_bounds":false,"offset":0,"current_page":1,"per_page":20,"entries_on_page":1},"data":[{"id":"50fb2e7bbd0286d555013653","created_at":"2012-05-15T21:15:16Z","updated_at":"2013-01-31T21:11:23Z","name":"Minden
|
61
|
+
Master II Grill Review","branch_name":"master","summary":"","meta_description":null,"website_ids":["50e669d7bd028648e0000023"],"author_ids":["50fc4eaebd0286d5550b4c93"],"tags":[],"classifications":["review"],"publish_on":"2012-05-18T19:34:00+00:00","attachment_ids":["50fb2e7cbd0286d555013664","50fb2e7cbd0286d555013682"],"primary_product_id":"50fa307696ab5860160c7a7e","resource_uri":"/content/minden-master-ii-grill-review.htm","disqus_uri":"Minden-Master-II-Grill-Review","product_ids":["50fa307696ab5860160c7a7e"],"related_article_ids":[],"price_grabber_id":null,"publishable":true,"publishable_on":"2012-05-18T19:34:00+00:00","slug":"minden-master-ii-grill-review.htm","is_template":false,"is_branch":false,"products":[{"id":"50fa307696ab5860160c7a7e","created_at":"2012-05-15T21:12:15Z","updated_at":"2013-03-11T21:05:24Z","name":"Minden
|
62
|
+
Master II","slug":"minden-master-ii","_type":"Home::Grills::Gas","types":["Propane"],"msrp":479.0,"article_ids":["50fb2e7bbd0286d555013653"],"website_ids":["50e669d7bd028648e0000023"],"publish_on":"2012-05-18T19:34:00+00:00","upc":null,"price_grabber_id":"","rubric_id":null,"brand_id":"50f9ed7cbd0286638e000272","model":"Master
|
63
|
+
II","resource_uri":"/products/minden-master-ii","archive_state":"by_date","is_scoring_baseline":false,"archived":false,"product_rating":null,"ranking":{"total":null,"rank":null,"percentile":null},"rubric":{"name":"","permissions":{"read":true,"create":false,"update":false,"destroy":false},"api_links":{"collection":{"rel":"/api/v1/rubrics","href":"https://the-guide-staging.herokuapp.com/api/v1/rubrics"},"resource":{"rel":"/api/v1/rubrics","href":"https://the-guide-staging.herokuapp.com/api/v1/rubrics"}}},"is_primary_product":true,"attachments":[{"id":"50fca08abd02862d77009628","created_at":"2013-01-21T01:57:30Z","updated_at":"2013-01-21T01:57:30Z","name":"Minden-360MD-vanity.jpg","type":"file","tags":["vanity"],"versions":{"s50x50":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s50x50_Minden-360MD-vanity.jpg","s150x150":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s150x150_Minden-360MD-vanity.jpg","s250x250":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s250x250_Minden-360MD-vanity.jpg","s300x150":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s300x150_Minden-360MD-vanity.jpg","s300x112":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s300x112_Minden-360MD-vanity.jpg","s500x500":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s500x500_Minden-360MD-vanity.jpg","s600x400":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s600x400_Minden-360MD-vanity.jpg","s600x600":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s600x600_Minden-360MD-vanity.jpg","s940x400":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s940x400_Minden-360MD-vanity.jpg","s940x350":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s940x350_Minden-360MD-vanity.jpg","s940x110":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/s940x110_Minden-360MD-vanity.jpg","original":"http://reviewed-staging.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/Minden-360MD-vanity.jpg"},"caption":null,"alt_text":null,"data":{"url":"http://reviewed-production.s3.amazonaws.com/attachment/3b2dd14de6c1b9abfafa0df5e479b547ef7c7bbd/Minden-360MD-vanity.jpg","file_size":29538,"content_type":"image/jpeg"},"position":0,"processing":null,"permissions":{"read":true,"create":false,"update":false,"destroy":false},"api_links":{"collection":{"rel":"/api/v1/attachments","href":"https://the-guide-staging.herokuapp.com/api/v1/attachments"},"resource":{"rel":"/api/v1/attachments/50fca08abd02862d77009628","href":"https://the-guide-staging.herokuapp.com/api/v1/attachments/50fca08abd02862d77009628"}}}],"bulk_uploads":[],"permissions":{"read":true,"create":false,"update":false,"destroy":false,"manage_baseline_products":false},"api_links":{"collection":{"rel":"/api/v1/products","href":"https://the-guide-staging.herokuapp.com/api/v1/products"},"resource":{"rel":"/api/v1/products/51cc5d879156bd99c3000065","href":"https://the-guide-staging.herokuapp.com/api/v1/products/51cc5d879156bd99c3000065"}}}],"attachments":[],"bulk_uploads":[],"permissions":{"read":true,"create":false,"update":false,"destroy":false},"api_links":{"collection":{"rel":"/api/v1/articles","href":"https://the-guide-staging.herokuapp.com/api/v1/articles"},"resource":{"rel":"/api/v1/articles/50fb2e7bbd0286d555013653","href":"https://the-guide-staging.herokuapp.com/api/v1/articles/50fb2e7bbd0286d555013653"}}}]}'
|
82
64
|
http_version:
|
83
|
-
recorded_at:
|
84
|
-
recorded_with: VCR 2.
|
65
|
+
recorded_at: Thu, 27 Jun 2013 15:43:04 GMT
|
66
|
+
recorded_with: VCR 2.5.0
|