spree-api-client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-version +1 -0
- data/.travis.yml +7 -5
- data/Gemfile +6 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/fixtures/cassette_library/addresss.yml +46 -0
- data/fixtures/cassette_library/countries.yml +52 -0
- data/fixtures/cassette_library/orders.yml +48 -0
- data/fixtures/cassette_library/payments.yml +48 -0
- data/fixtures/cassette_library/products.yml +66 -0
- data/fixtures/cassette_library/properties.yml +48 -0
- data/fixtures/cassette_library/request.yml +46 -0
- data/fixtures/cassette_library/return_authorizations.yml +48 -0
- data/fixtures/cassette_library/shipment_ready.yml +46 -0
- data/fixtures/cassette_library/taxonomies.yml +48 -0
- data/fixtures/cassette_library/taxons.yml +48 -0
- data/fixtures/cassette_library/variants.yml +63 -0
- data/fixtures/cassette_library/zones.yml +49 -0
- data/lib/spree-api-client/connection.rb +2 -1
- data/lib/spree-api-client/error.rb +47 -0
- data/lib/spree-api-client/orders.rb +2 -1
- data/lib/spree-api-client/request.rb +25 -18
- data/lib/spree-api-client/version.rb +1 -1
- data/spec/addresses_spec.rb +1 -0
- data/spec/client_spec.rb +1 -0
- data/spec/countries_spec.rb +1 -0
- data/spec/orders_spec.rb +1 -0
- data/spec/payments_spec.rb +1 -0
- data/spec/products_spec.rb +1 -0
- data/spec/properties_spec.rb +1 -0
- data/spec/return_authorizations_spec.rb +1 -0
- data/spec/shipments_spec.rb +1 -0
- data/spec/spec_helper.rb +6 -1
- data/spec/support/vcr.rb +9 -0
- data/spec/taxonomies_spec.rb +1 -0
- data/spec/taxons_spec.rb +1 -0
- data/spec/variants_spec.rb +1 -0
- data/spec/zones_spec.rb +1 -0
- data/spree-api-client.gemspec +3 -1
- metadata +96 -16
data/spec/products_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Products do
|
4
|
+
use_vcr_cassette "products", :record => :new_episodes
|
4
5
|
describe 'products' do
|
5
6
|
it 'should load products' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/properties_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Properties do
|
4
|
+
use_vcr_cassette "properties", :record => :new_episodes
|
4
5
|
describe 'properties' do
|
5
6
|
it 'should load properties' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::ReturnAuthorizations do
|
4
|
+
use_vcr_cassette "return_authorizations", :record => :new_episodes
|
4
5
|
describe 'return_authorizations' do
|
5
6
|
it 'should load return_authorizations' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/shipments_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Shipments do
|
4
|
+
use_vcr_cassette "shipment_ready", :record => :new_episodes
|
4
5
|
describe 'shipment_ready' do
|
5
6
|
it 'should set a shipment to ready' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/vcr.rb
ADDED
data/spec/taxonomies_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Taxonomies do
|
4
|
+
use_vcr_cassette "taxonomies", :record => :new_episodes
|
4
5
|
describe 'taxonomies' do
|
5
6
|
it 'should load taxonomies' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/taxons_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Taxons do
|
4
|
+
use_vcr_cassette "taxons", :record => :new_episodes
|
4
5
|
describe 'taxons' do
|
5
6
|
it 'should load taxons' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/variants_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Variants do
|
4
|
+
use_vcr_cassette "variants", :record => :new_episodes
|
4
5
|
describe 'variants' do
|
5
6
|
it 'should load variants' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spec/zones_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::API::Client::Zones do
|
4
|
+
use_vcr_cassette "zones", :record => :new_episodes
|
4
5
|
describe 'zones' do
|
5
6
|
it 'should load zones' do
|
6
7
|
client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
|
data/spree-api-client.gemspec
CHANGED
@@ -20,8 +20,10 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency 'faraday', '~> 0.8'
|
21
21
|
gem.add_dependency 'faraday_middleware', '~> 0.9'
|
22
22
|
gem.add_dependency 'hashie', '~> 1.2'
|
23
|
-
gem.add_dependency 'multi_json', '~> 1.
|
23
|
+
gem.add_dependency 'multi_json', '~> 1.4'
|
24
24
|
|
25
|
+
gem.add_development_dependency 'webmock'
|
26
|
+
gem.add_development_dependency 'vcr'
|
25
27
|
gem.add_development_dependency 'rake'
|
26
28
|
gem.add_development_dependency 'rspec'
|
27
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0.8'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.8'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: faraday_middleware
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0.9'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.9'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: hashie
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,21 +53,63 @@ dependencies:
|
|
43
53
|
version: '1.2'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: multi_json
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
69
|
+
version: '1.4'
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.4'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: webmock
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: vcr
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
58
110
|
- !ruby/object:Gem::Dependency
|
59
111
|
name: rake
|
60
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
61
113
|
none: false
|
62
114
|
requirements:
|
63
115
|
- - ! '>='
|
@@ -65,10 +117,15 @@ dependencies:
|
|
65
117
|
version: '0'
|
66
118
|
type: :development
|
67
119
|
prerelease: false
|
68
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
69
126
|
- !ruby/object:Gem::Dependency
|
70
127
|
name: rspec
|
71
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
72
129
|
none: false
|
73
130
|
requirements:
|
74
131
|
- - ! '>='
|
@@ -76,7 +133,12 @@ dependencies:
|
|
76
133
|
version: '0'
|
77
134
|
type: :development
|
78
135
|
prerelease: false
|
79
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
80
142
|
description: A rubygem for interacting with the Spree API
|
81
143
|
email:
|
82
144
|
- andrewnez@gmail.com
|
@@ -85,16 +147,31 @@ extensions: []
|
|
85
147
|
extra_rdoc_files: []
|
86
148
|
files:
|
87
149
|
- .gitignore
|
150
|
+
- .ruby-version
|
88
151
|
- .travis.yml
|
89
152
|
- CONTRIBUTING.md
|
90
153
|
- Gemfile
|
91
154
|
- LICENSE
|
92
155
|
- README.md
|
93
156
|
- Rakefile
|
157
|
+
- fixtures/cassette_library/addresss.yml
|
158
|
+
- fixtures/cassette_library/countries.yml
|
159
|
+
- fixtures/cassette_library/orders.yml
|
160
|
+
- fixtures/cassette_library/payments.yml
|
161
|
+
- fixtures/cassette_library/products.yml
|
162
|
+
- fixtures/cassette_library/properties.yml
|
163
|
+
- fixtures/cassette_library/request.yml
|
164
|
+
- fixtures/cassette_library/return_authorizations.yml
|
165
|
+
- fixtures/cassette_library/shipment_ready.yml
|
166
|
+
- fixtures/cassette_library/taxonomies.yml
|
167
|
+
- fixtures/cassette_library/taxons.yml
|
168
|
+
- fixtures/cassette_library/variants.yml
|
169
|
+
- fixtures/cassette_library/zones.yml
|
94
170
|
- lib/spree-api-client.rb
|
95
171
|
- lib/spree-api-client/addresses.rb
|
96
172
|
- lib/spree-api-client/connection.rb
|
97
173
|
- lib/spree-api-client/countries.rb
|
174
|
+
- lib/spree-api-client/error.rb
|
98
175
|
- lib/spree-api-client/line_items.rb
|
99
176
|
- lib/spree-api-client/orders.rb
|
100
177
|
- lib/spree-api-client/payments.rb
|
@@ -118,6 +195,7 @@ files:
|
|
118
195
|
- spec/return_authorizations_spec.rb
|
119
196
|
- spec/shipments_spec.rb
|
120
197
|
- spec/spec_helper.rb
|
198
|
+
- spec/support/vcr.rb
|
121
199
|
- spec/taxonomies_spec.rb
|
122
200
|
- spec/taxons_spec.rb
|
123
201
|
- spec/variants_spec.rb
|
@@ -143,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
221
|
version: '0'
|
144
222
|
requirements: []
|
145
223
|
rubyforge_project:
|
146
|
-
rubygems_version: 1.8.
|
224
|
+
rubygems_version: 1.8.23
|
147
225
|
signing_key:
|
148
226
|
specification_version: 3
|
149
227
|
summary: A rubygem for interacting with the Spree API
|
@@ -158,7 +236,9 @@ test_files:
|
|
158
236
|
- spec/return_authorizations_spec.rb
|
159
237
|
- spec/shipments_spec.rb
|
160
238
|
- spec/spec_helper.rb
|
239
|
+
- spec/support/vcr.rb
|
161
240
|
- spec/taxonomies_spec.rb
|
162
241
|
- spec/taxons_spec.rb
|
163
242
|
- spec/variants_spec.rb
|
164
243
|
- spec/zones_spec.rb
|
244
|
+
has_rdoc:
|