reviewed 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/reviewed/article.rb +3 -1
- data/lib/reviewed/version.rb +1 -1
- data/spec/article_spec.rb +6 -1
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/does_not_have_any_matching_attachments.yml +528 -290
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/finds_attachments_by_tag.yml +578 -319
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/has_many_attachments.yml +528 -290
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/returns_all_attachments.yml +528 -290
- data/spec/fixtures/vcr/Reviewed_Article/associations/attachments/returns_attachments_of_the_correct_class.yml +578 -319
- data/spec/fixtures/vcr/Reviewed_Article/associations/pages/has_many_pages.yml +528 -290
- data/spec/fixtures/vcr/Reviewed_Article/associations/products/has_many_products.yml +559 -340
- data/spec/fixtures/vcr/Reviewed_Article/associations/products/returns_products_of_the_correct_class.yml +528 -290
- data/spec/fixtures/vcr/Reviewed_Article/find_page/finds_a_page_with_a_matching_slug.yml +641 -410
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_a_product_of_the_correct_class.yml +1056 -580
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_nil_if_does_not_respond_to_products.yml +1199 -0
- data/spec/fixtures/vcr/Reviewed_Article/primary_product/returns_the_primary_product.yml +1056 -580
- data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/not_set/has_nil_query_params.yml +181 -297
- data/spec/fixtures/vcr/Reviewed_Client/_perform/request_params/set/merges_quest_params.yml +27 -54
- data/spec/fixtures/vcr/Reviewed_Collection/collection_data/fetches_the_first_page_by_default.yml +112 -58
- data/spec/fixtures/vcr/Reviewed_Collection/collection_data/is_enumerable.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/next_page/fetches_the_next_page_of_results.yml +167 -120
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_if_the_page_number_is_out_of_bounds.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/indicates_whether_this_is_the_first_or_last_page.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_limit_value_max_per_page_.yml +112 -58
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_number_of_entries_on_the_current_page.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_offset.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_item_count.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/page_attributes_pagination_/returns_the_total_number_of_pages.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Collection/previous_page/fetches_the_previous_page_of_results.yml +279 -178
- data/spec/fixtures/vcr/Reviewed_Collection/previous_page/returns_nil_if_there_is_no_previous_page.yml +110 -56
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/does_not_have_any_matching_attachments.yml +43 -54
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/finds_attachments_by_tag.yml +45 -56
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/has_many_attachments.yml +44 -52
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_all_attachments.yml +43 -54
- data/spec/fixtures/vcr/Reviewed_Product/associations/attachments/returns_attachments_of_the_correct_class.yml +45 -53
- data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/has_many_manufacturer_specs.yml +43 -54
- data/spec/fixtures/vcr/Reviewed_Product/manufacturer_specs/returns_attachments_of_the_correct_class.yml +43 -54
- data/spec/fixtures/vcr/Reviewed_Request/_where/filters_collections_using_other_supported_options.yml +39 -46
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_a_collection.yml +181 -297
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_an_empty_set_if_no_matching_data_was_found.yml +12 -20
- data/spec/fixtures/vcr/Reviewed_Request/_where/returns_the_appropriate_page_of_results.yml +215 -325
- data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_a_collection_object.yml +181 -297
- data/spec/fixtures/vcr/Reviewed_Request/collection_from_response/returns_objects_of_the_correct_class.yml +181 -297
- data/spec/fixtures/vcr/Reviewed_Request/object_from_response/returns_an_object_of_the_correct_class.yml +528 -290
- data/spec/spec_helper.rb +1 -1
- metadata +7 -29
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MWM3YWI3Zjg0MDA3N2ZlYzBjZjQ5MmYxNWFiOGY1NzU0YWJlMjlmMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MmZmZTMyMWM2MDg2ZTAzMzM1YWU4OGM5MzdhMDg2YmUxZmY2MzAzNg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTY4NmJmYjYxNmFmYTY3YTU3MDI4ZDg1OGM5MTA3MzY4Y2JkYmJlN2Y0MmZj
|
10
|
+
ZGQyNmVjOTU2YTcyNjFjYjc1ZGFjNDFhNmFiZmExYTQ3YTVkZTBiZjJlMzFl
|
11
|
+
MTI4Mzg0ODZmMDBlNjQwMTFkNzNjYmUxNDU0NDc0YmI2NmFlNWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjMyYThmOGNkY2M0NjBmZDBiN2MwZTI0M2IwMjdhMTM1MTE4OTEzZGRjYWZk
|
14
|
+
ZTJiZmEyMjEwMmQ0NDQ0MDBlNDBjM2EyNTFmZTQzODBiYzYyMDhmODEyMzBk
|
15
|
+
NzlmNDg5ZGRjYzQ5Y2QwZDIyMjQxNmRhYTE0ZGYwNmZlZWE5ODM=
|
data/lib/reviewed/article.rb
CHANGED
data/lib/reviewed/version.rb
CHANGED
data/spec/article_spec.rb
CHANGED
@@ -67,7 +67,7 @@ describe Reviewed::Article, vcr: true do
|
|
67
67
|
|
68
68
|
it 'finds a page with a matching slug' do
|
69
69
|
article = client.articles.find('minden-master-ii-grill-review')
|
70
|
-
article.pages.length.should ==
|
70
|
+
article.pages.length.should == 4
|
71
71
|
page = article.find_page('performance')
|
72
72
|
page.should == article.pages[2]
|
73
73
|
page.name.should == 'Performance'
|
@@ -89,5 +89,10 @@ describe Reviewed::Article, vcr: true do
|
|
89
89
|
it "returns a product of the correct class" do
|
90
90
|
@product.class.should == Reviewed::Product
|
91
91
|
end
|
92
|
+
|
93
|
+
it 'returns nil if does not respond to products' do
|
94
|
+
@article.attributes.delete(:products)
|
95
|
+
@article.primary_product.should be_nil
|
96
|
+
end
|
92
97
|
end
|
93
98
|
end
|