ship_compliant 0.1.2 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +16 -4
- data/Rakefile +1 -1
- data/features/search_more_sales_orders.feature +12 -0
- data/features/step_definitions/search_more_orders_steps.rb +24 -0
- data/features/support/env.rb +1 -0
- data/fixtures/vcr_cassettes/sales_order_more.yml +1141 -0
- data/fixtures/vcr_cassettes/search_more_orders_invalid_cookie.yml +1034 -0
- data/lib/ship_compliant/search_more_sales_orders.rb +38 -0
- data/lib/ship_compliant/version.rb +1 -1
- data/lib/ship_compliant.rb +2 -0
- data/ship_compliant.gemspec +1 -0
- data/spec/lib/ship_compliant/search_more_sales_orders_spec.rb +29 -0
- data/spec/spec_helper.rb +1 -0
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f443106337d6607f7f5acbc873e53f0c0a0a4d93
|
4
|
+
data.tar.gz: 146bd1895326a8d9498e8eab4e2eda79972a37dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fe4a7762c4bd76c5ad638d5953f544a7b2762a11995ab8c3ccf591fb65f58ddd4d275a5767d8e38e4f7fd6b357cd912244e218045787d744bb0be45e38c3042
|
7
|
+
data.tar.gz: e0b51b47750b3d30968f5062a968bd3d19ecf574ea51cbadd68b7bb8320ac59a571abfe820b88f4e0705931debfe92c1ccf43e10f0237af41bb77f2ec86672f2
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ the 9 main API calls.
|
|
6
6
|
|
7
7
|
[Documentation][documentation_path] | [RDoc][rdoc_path] | [CoreService V1.2][core_service_path]
|
8
8
|
|
9
|
-
[![Coverage Status]
|
9
|
+
[![Coverage Status]][coveralls_status] [![Build Status]][travis_status] [![Code Climate]][code_gpa]
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -38,13 +38,25 @@ TODO: Coming soon...
|
|
38
38
|
|
39
39
|
## Contributing
|
40
40
|
|
41
|
-
1. Fork it ( http://github.com/
|
41
|
+
1. Fork it ( http://github.com/ShipCompliant/ship_compliant-ruby/fork )
|
42
42
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
45
45
|
5. Create new Pull Request
|
46
46
|
|
47
47
|
[soap_wiki]: http://en.wikipedia.org/wiki/SOAP
|
48
|
-
|
49
|
-
|
48
|
+
|
49
|
+
<!-- Documenation Links -->
|
50
|
+
[documentation_path]: http://shipcompliant.github.io/ship_compliant-ruby/documentation/
|
51
|
+
[rdoc_path]: http://shipcompliant.github.io/ship_compliant-ruby/rdoc/
|
50
52
|
[core_service_path]: https://shipcompliant.desk.com/customer/portal/articles/1451976-api-coreservice-v1-2?b_id=2759
|
53
|
+
|
54
|
+
<!-- Status Badges -->
|
55
|
+
[Coverage Status]: https://coveralls.io/repos/ShipCompliant/ship_compliant-ruby/badge.png?branch=master
|
56
|
+
[coveralls_status]: https://coveralls.io/r/ShipCompliant/ship_compliant-ruby?branch=master
|
57
|
+
|
58
|
+
[Build Status]: https://travis-ci.org/ShipCompliant/ship_compliant-ruby.png?branch=master
|
59
|
+
[travis_status]: https://travis-ci.org/ShipCompliant/ship_compliant-ruby
|
60
|
+
|
61
|
+
[Code Climate]: https://codeclimate.com/github/ShipCompliant/ship_compliant-ruby.png
|
62
|
+
[code_gpa]: https://codeclimate.com/github/ShipCompliant/ship_compliant-ruby
|
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ class RDoc::Generator::SDoc
|
|
21
21
|
protected
|
22
22
|
### Create class tree structure and write it as json
|
23
23
|
def generate_class_tree
|
24
|
-
my_topclasses = %W(SearchSalesOrders VoidSalesOrder AddUpdateProduct CheckCompliance CommitSalesOrder GetInventoryDetails GetSalesOrderExtended AddUpdateBrand)
|
24
|
+
my_topclasses = %W(SearchSalesOrders VoidSalesOrder AddUpdateProduct CheckCompliance CommitSalesOrder GetInventoryDetails GetSalesOrderExtended AddUpdateBrand SearchMoreSalesOrders)
|
25
25
|
|
26
26
|
debug_msg "Generating class tree"
|
27
27
|
topclasses = @classes.select do |klass|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Search More Sales Orders
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I've added my credentials
|
5
|
+
|
6
|
+
Scenario: I get second page of orders
|
7
|
+
When I search for second page
|
8
|
+
Then I should have orders
|
9
|
+
|
10
|
+
Scenario: Invalid paging cookie
|
11
|
+
When I search with invalid paging cookie
|
12
|
+
Then I should receive an invalid cookie error
|
@@ -0,0 +1,24 @@
|
|
1
|
+
When(/^I search for second page$/) do
|
2
|
+
VCR.use_cassette('sales_order_more') do
|
3
|
+
@orders_result = ShipCompliant::SearchMoreSalesOrders.paging_cookie('33d2c6d7-212c-46fd-9712-d4a5ca1f4f2f')
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
When(/^I search with invalid paging cookie$/) do
|
8
|
+
VCR.use_cassette('search_more_orders_invalid_cookie') do
|
9
|
+
@orders_result = ShipCompliant::SearchMoreSalesOrders.paging_cookie('invalid-cookie')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Then(/^I should have orders$/) do
|
14
|
+
@orders_result.success?.should be_true
|
15
|
+
@orders_result.length.should == 100
|
16
|
+
end
|
17
|
+
|
18
|
+
Then(/^I should receive an invalid cookie error$/) do
|
19
|
+
@orders_result.failure?.should be_true
|
20
|
+
error = @orders_result.errors.first
|
21
|
+
|
22
|
+
error.message.should == 'PagingCookie was not found [00000000-0000-0000-0000-000000000000].'
|
23
|
+
error.code.should == 236
|
24
|
+
end
|