bigcommerce 0.9.0 → 0.10.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 +7 -0
- data/LICENSE +1 -1
- data/README.md +52 -73
- data/bigcommerce.gemspec +53 -25
- data/lib/bigcommerce.rb +2 -0
- data/lib/bigcommerce/api.rb +139 -114
- data/lib/bigcommerce/connection.rb +100 -33
- data/lib/bigcommerce/product.rb +13 -0
- data/lib/bigcommerce/resource.rb +50 -0
- data/lib/bigcommerce/version.rb +1 -1
- data/spec/integration/orders_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/api_request_spec.rb +6 -6
- data/spec/unit/api_spec.rb +30 -3
- data/spec/unit/connection_spec.rb +1 -30
- metadata +148 -155
@@ -1,5 +1,6 @@
|
|
1
1
|
module Bigcommerce
|
2
2
|
class Connection
|
3
|
+
attr_reader :configuration, :remaining_rate_limit
|
3
4
|
|
4
5
|
def initialize(configuration)
|
5
6
|
@configuration = {}
|
@@ -8,8 +9,16 @@ module Bigcommerce
|
|
8
9
|
end
|
9
10
|
end
|
10
11
|
|
11
|
-
def
|
12
|
-
@configuration
|
12
|
+
def store_hash=(store_hash)
|
13
|
+
@configuration[:store_hash] = store_hash
|
14
|
+
end
|
15
|
+
|
16
|
+
def client_id=(client_id)
|
17
|
+
@configuration[:client_id] = client_id
|
18
|
+
end
|
19
|
+
|
20
|
+
def access_token=(access_token)
|
21
|
+
@configuration[:access_token] = access_token
|
13
22
|
end
|
14
23
|
|
15
24
|
def store_url=(store_url)
|
@@ -61,44 +70,102 @@ module Bigcommerce
|
|
61
70
|
request(:delete, path, options, headers)
|
62
71
|
end
|
63
72
|
|
73
|
+
# Make a request to the bigcommerce API using either Legacy or OAuth
|
64
74
|
def request(method, path, options,headers={})
|
75
|
+
if oauth?
|
76
|
+
request_oauth(method, path, options, headers)
|
77
|
+
else
|
78
|
+
request_legacy(method, path, options, headers)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def oauth?
|
85
|
+
@configuration[:store_hash] && @configuration[:client_id] && @configuration[:access_token]
|
86
|
+
end
|
87
|
+
|
88
|
+
def request_oauth(method, path, options, headers={})
|
89
|
+
uri = File.join((ENV['BC_API_ENDPOINT'] || 'https://api.bigcommerce.com'), '/stores', @configuration[:store_hash], '/v2', path)
|
90
|
+
|
91
|
+
rest_client = RestClient::Resource.new uri.to_s, {
|
92
|
+
headers: headers.merge({
|
93
|
+
'X-Auth-Client' => @configuration[:client_id],
|
94
|
+
'X-Auth-Token' => @configuration[:access_token],
|
95
|
+
:accept => :json,
|
96
|
+
:content_type => :json
|
97
|
+
})
|
98
|
+
}
|
99
|
+
|
100
|
+
response = case method
|
101
|
+
when :get then
|
102
|
+
rest_client.get :params => options
|
103
|
+
when :post then
|
104
|
+
rest_client.post(options.to_json)
|
105
|
+
when :put then
|
106
|
+
rest_client.put(options.to_json)
|
107
|
+
when :delete then
|
108
|
+
rest_client.delete
|
109
|
+
when :head then
|
110
|
+
rest_client.head
|
111
|
+
when :options then
|
112
|
+
rest_client.options
|
113
|
+
else
|
114
|
+
raise 'Unsupported method!'
|
115
|
+
end
|
116
|
+
|
117
|
+
if (200..201) === response.code
|
118
|
+
JSON.parse response
|
119
|
+
elsif response.code == 204
|
120
|
+
{}
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def request_legacy(method, path, options, headers={})
|
65
125
|
resource_options = {
|
66
|
-
|
67
|
-
|
68
|
-
|
126
|
+
:user => @configuration[:username],
|
127
|
+
:password => @configuration[:api_key],
|
128
|
+
:headers => headers
|
69
129
|
}
|
70
|
-
|
130
|
+
|
131
|
+
rest_client = RestClient::Resource.new "#{@configuration[:store_url]}/api/v2#{path}.json", resource_options
|
132
|
+
|
71
133
|
if @configuration[:ssl_client_key] && @configuration[:ssl_client_cert] && @configuration[:ssl_ca_file]
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
134
|
+
rest_client = RestClient::Resource.new(
|
135
|
+
"#{@configuration[:store_url]}/api/v2#{path}.json",
|
136
|
+
:username => @configuration[:username],
|
137
|
+
:password => @configuration[:api_key],
|
138
|
+
:ssl_client_cert => @configuration[:ssl_client_cert],
|
139
|
+
:ssl_client_key => @configuration[:ssl_client_key],
|
140
|
+
:ssl_ca_file => @configuration[:ssl_ca_file],
|
141
|
+
:verify_ssl => @configuration[:verify_ssl]
|
80
142
|
)
|
81
143
|
end
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
144
|
+
|
145
|
+
response = case method
|
146
|
+
when :get then
|
147
|
+
rest_client.get :params => options, :accept => :json, :content_type => :json
|
148
|
+
when :post then
|
149
|
+
rest_client.post(options.to_json, :content_type => :json, :accept => :json)
|
150
|
+
when :put then
|
151
|
+
rest_client.put(options.to_json, :content_type => :json, :accept => :json)
|
152
|
+
when :delete then
|
153
|
+
rest_client.delete
|
154
|
+
when :head then
|
155
|
+
rest_client.head
|
156
|
+
when :options then
|
157
|
+
rest_client.options
|
158
|
+
else
|
159
|
+
raise 'Unsupported method!'
|
160
|
+
end
|
161
|
+
|
162
|
+
@remaining_rate_limit = response.headers[:x_bc_apilimit_remaining]
|
163
|
+
if (200..201) === response.code
|
164
|
+
JSON.parse response
|
165
|
+
elsif response.code == 204
|
166
|
+
{}
|
100
167
|
end
|
101
168
|
end
|
102
|
-
|
169
|
+
|
103
170
|
end
|
104
171
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Bigcommerce
|
2
|
+
class Product < Resource
|
3
|
+
|
4
|
+
# Here we memoize brand, so we can re-use it across different products
|
5
|
+
# Note we store this across the class
|
6
|
+
def brand
|
7
|
+
key = @hash["brand"]["resource"]
|
8
|
+
@@some_method ||= {}
|
9
|
+
@@some_method[key] ||= @connection.get(@hash["brand"]["resource"])
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Bigcommerce
|
2
|
+
class Resource
|
3
|
+
|
4
|
+
def metaclass
|
5
|
+
class << self; self; end
|
6
|
+
end
|
7
|
+
|
8
|
+
def initialize hash, connection
|
9
|
+
@connection = connection
|
10
|
+
@hash = hash
|
11
|
+
@hash.each do |key, value|
|
12
|
+
if (value.class == Hash)
|
13
|
+
self.resourceify(key, value)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
@full_hash = @hash
|
17
|
+
end
|
18
|
+
|
19
|
+
def [](key)
|
20
|
+
@hash[key]
|
21
|
+
end
|
22
|
+
|
23
|
+
def []=(key,value)
|
24
|
+
@hash[key] = value
|
25
|
+
end
|
26
|
+
|
27
|
+
def resourceify(name, data)
|
28
|
+
if (!self.respond_to?(name.to_sym))
|
29
|
+
self.metaclass.send(:define_method, name) do
|
30
|
+
@connection.get data["resource"]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def load(*sub_resources)
|
36
|
+
sub_resources.each do |sub_resource|
|
37
|
+
begin
|
38
|
+
@full_hash[sub_resource.to_s] = self.send(sub_resource)
|
39
|
+
rescue RuntimeError => e
|
40
|
+
puts e
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_json
|
46
|
+
@full_hash.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
data/lib/bigcommerce/version.rb
CHANGED
@@ -4,13 +4,13 @@ describe "/api/v2/orders" do
|
|
4
4
|
include_context "integration"
|
5
5
|
|
6
6
|
it "gets the orders collection", :vcr do
|
7
|
-
orders = api.
|
7
|
+
orders = api.orders
|
8
8
|
orders.should be_a_kind_of(Enumerable)
|
9
9
|
orders.size.should be > 0
|
10
10
|
end
|
11
11
|
|
12
12
|
it "filters orders by date", :vcr do
|
13
|
-
orders = api.
|
13
|
+
orders = api.orders_by_date('2013-03-01')
|
14
14
|
orders.should be_a_kind_of(Enumerable)
|
15
15
|
orders.size.should be > 0
|
16
16
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,32 +3,32 @@ describe "API request delegation" do
|
|
3
3
|
|
4
4
|
it "requests a resource" do
|
5
5
|
api.connection.should_receive(:get).once.with("/time")
|
6
|
-
api.
|
6
|
+
api.time
|
7
7
|
end
|
8
8
|
|
9
9
|
it "requests a resource by id" do
|
10
10
|
api.connection.should_receive(:get).once.with("/products/333", {})
|
11
|
-
api.
|
11
|
+
api.product(333)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "requests a compound resource by ids" do
|
15
15
|
api.connection.should_receive(:get).once.with("/orders/999/products/333", {})
|
16
|
-
api.
|
16
|
+
api.orders_product(999, 333)
|
17
17
|
end
|
18
18
|
|
19
19
|
it "requests a resource with pagination" do
|
20
20
|
api.connection.should_receive(:get).once.with("/orders", {:page => 2})
|
21
|
-
api.
|
21
|
+
api.orders(:page => 2)
|
22
22
|
end
|
23
23
|
|
24
24
|
it "requests a resource with limit" do
|
25
25
|
api.connection.should_receive(:get).once.with("/categories", {:limit => 10})
|
26
|
-
api.
|
26
|
+
api.categories(:limit => 10)
|
27
27
|
end
|
28
28
|
|
29
29
|
it "request a resource with pagination and limit" do
|
30
30
|
api.connection.should_receive(:get).once.with("/customers", {:limit => 10, :page => 2})
|
31
|
-
api.
|
31
|
+
api.customers(:limit => 10, :page => 2)
|
32
32
|
end
|
33
33
|
|
34
34
|
end
|
data/spec/unit/api_spec.rb
CHANGED
@@ -3,20 +3,47 @@ require 'spec_helper'
|
|
3
3
|
describe Bigcommerce::Api do
|
4
4
|
include_context "mock api"
|
5
5
|
|
6
|
-
describe "
|
6
|
+
describe "orders_by_date" do
|
7
7
|
it "should accept a valid Date object" do
|
8
8
|
date = DateTime.now
|
9
9
|
parsed_date = described_class.new.to_rfc2822(date)
|
10
10
|
api.connection.should_receive(:get).once.with("/orders",
|
11
11
|
{:min_date_created => parsed_date})
|
12
|
-
api.
|
12
|
+
api.orders_by_date(date)
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should parse a valid date string" do
|
16
16
|
date = described_class.new.to_rfc2822(DateTime.parse('2012-1-1'))
|
17
17
|
api.connection.should_receive(:get).once.with("/orders",
|
18
18
|
{:min_date_created => date})
|
19
|
-
api.
|
19
|
+
api.orders_by_date('2012-1-1')
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
describe "#create-orders-shipments" do
|
24
|
+
it "should accept an order id parameter" do
|
25
|
+
api.connection.should_receive(:post).once.with("/orders/123/shipments", {})
|
26
|
+
api.create_orders_shipments(123)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should accept an order id parameter and an options hash" do
|
30
|
+
options = Hash[*('A'..'Z').to_a.flatten]
|
31
|
+
api.connection.should_receive(:post).once.with("/orders/123/shipments", options)
|
32
|
+
api.create_orders_shipments(123, options)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "#get-options-value" do
|
37
|
+
it "should accept an option id parameter" do
|
38
|
+
api.connection.should_receive(:get).once.with("/options/123/values", {})
|
39
|
+
api.options_value(123)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should accept an option id parameter and an options hash" do
|
43
|
+
options = Hash[*('A'..'Z').to_a.flatten]
|
44
|
+
api.connection.should_receive(:get).once.with("/options/123/values", options)
|
45
|
+
api.options_value(123, options)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
22
49
|
end
|
@@ -15,38 +15,9 @@ shared_examples_for "request method accepting optional params and headers" do
|
|
15
15
|
connection.should_receive(:request).once.with(http_method, "/orders", {}, {'Some-Header' => 'abc'})
|
16
16
|
connection.send(http_method, path, {}, {'Some-Header' => 'abc'})
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
it "sends request with params and headers" do
|
20
20
|
connection.should_receive(:request).once.with(http_method, "/orders", {:page => 6}, {'Some-Header' => 'abc'})
|
21
21
|
connection.send(http_method, path, {:page => 6}, {'Some-Header' => 'abc'})
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
25
|
-
describe Bigcommerce::Connection do
|
26
|
-
describe "#request" do
|
27
|
-
let(:configuration) { { :username => "test", :api_key => "12345", :store_url => "http://a.bigcommerce.com" } }
|
28
|
-
let(:connection) { Bigcommerce::Connection.new(configuration) }
|
29
|
-
let(:expected_url) { "#{configuration[:store_url]}/api/v2/orders.json" }
|
30
|
-
let(:expected_params) { { :user => "test", :password => "12345", :headers => {} } }
|
31
|
-
let(:mock_resource) { double("RestClient::Resource") }
|
32
|
-
let(:mock_response) { double }
|
33
|
-
let(:path) { "/orders" }
|
34
|
-
|
35
|
-
before do
|
36
|
-
mock_response.stub(:code).and_return(204)
|
37
|
-
mock_resource.stub(:get).and_return(mock_response)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should set up the expected url, user and password" do
|
41
|
-
RestClient::Resource.should_receive(:new).once.with(expected_url, expected_params).and_return(mock_resource)
|
42
|
-
connection.request(:get, path, {})
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should pass through headers to RestClient::Resource" do
|
46
|
-
params_with_headers = expected_params.merge(:headers => {"Some-Header" => "abc"})
|
47
|
-
RestClient::Resource.should_receive(:new).once.with(expected_url, params_with_headers).and_return(mock_resource)
|
48
|
-
|
49
|
-
connection.request(:get, "/orders", {}, {"Some-Header" => "abc"})
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
metadata
CHANGED
@@ -1,15 +1,9 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigcommerce
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 0
|
10
|
-
version: 0.9.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Mark Rickerby
|
14
8
|
- Rob Howard
|
15
9
|
- Saranyan Vigraham
|
@@ -17,151 +11,158 @@ authors:
|
|
17
11
|
autorequire:
|
18
12
|
bindir: bin
|
19
13
|
cert_chain: []
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
dependencies:
|
24
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
25
17
|
name: activesupport
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
hash: 3
|
33
|
-
segments:
|
34
|
-
- 0
|
35
|
-
version: "0"
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
36
23
|
type: :runtime
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: json
|
40
24
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
50
37
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: rest-client
|
54
38
|
prerelease: false
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: rest-client
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
64
51
|
type: :runtime
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: ci_reporter
|
68
52
|
prerelease: false
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: coveralls
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
78
65
|
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: mocha
|
82
66
|
prerelease: false
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: ci_reporter_rspec
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
92
79
|
type: :development
|
93
|
-
version_requirements: *id005
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: rake
|
96
80
|
prerelease: false
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: mocha
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
106
93
|
type: :development
|
107
|
-
version_requirements: *id006
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
name: rspec
|
110
94
|
prerelease: false
|
111
|
-
|
112
|
-
|
113
|
-
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: rake
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
type: :development
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rspec
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
114
118
|
- - ~>
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
|
117
|
-
segments:
|
118
|
-
- 2
|
119
|
-
- 11
|
120
|
-
version: "2.11"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '2.11'
|
121
121
|
type: :development
|
122
|
-
version_requirements: *id007
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: vcr
|
125
122
|
prerelease: false
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ~>
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '2.11'
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: vcr
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
135
|
type: :development
|
136
|
-
version_requirements: *id008
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: webmock
|
139
136
|
prerelease: false
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: webmock
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - '='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '1.9'
|
150
149
|
type: :development
|
151
|
-
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - '='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '1.9'
|
152
156
|
description: Enables Ruby applications to communicate with the Bigcommerce API V2.
|
153
|
-
email:
|
157
|
+
email:
|
154
158
|
- mark.rickerby@bigcommerce.com
|
155
159
|
- rob.howard@bigcommerce.com
|
156
160
|
- saranyan.vigraham@bigcommerce.com
|
157
161
|
- sasha.gerrand@bigcommerce.com
|
158
162
|
executables: []
|
159
|
-
|
160
163
|
extensions: []
|
161
|
-
|
162
164
|
extra_rdoc_files: []
|
163
|
-
|
164
|
-
files:
|
165
|
+
files:
|
165
166
|
- LICENSE
|
166
167
|
- Rakefile
|
167
168
|
- README.md
|
@@ -170,6 +171,8 @@ files:
|
|
170
171
|
- ./lib/bigcommerce/api.rb
|
171
172
|
- ./lib/bigcommerce/connection.rb
|
172
173
|
- ./lib/bigcommerce/version.rb
|
174
|
+
- ./lib/bigcommerce/resource.rb
|
175
|
+
- ./lib/bigcommerce/product.rb
|
173
176
|
- ./lib/bigcommerce.rb
|
174
177
|
- ./spec/big_commerce_spec.rb
|
175
178
|
- ./spec/integration/orders_spec.rb
|
@@ -188,41 +191,31 @@ files:
|
|
188
191
|
- spec/unit/connection_spec.rb
|
189
192
|
- spec/unit/date_time_spec.rb
|
190
193
|
- spec/unit/version_spec.rb
|
191
|
-
has_rdoc: true
|
192
194
|
homepage: http://github.com/bigcommerce/bigcommerce-api-ruby
|
193
|
-
licenses:
|
194
|
-
|
195
|
+
licenses:
|
196
|
+
- MIT
|
197
|
+
metadata: {}
|
195
198
|
post_install_message:
|
196
199
|
rdoc_options: []
|
197
|
-
|
198
|
-
require_paths:
|
200
|
+
require_paths:
|
199
201
|
- lib
|
200
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
none: false
|
211
|
-
requirements:
|
212
|
-
- - ">="
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
hash: 3
|
215
|
-
segments:
|
216
|
-
- 0
|
217
|
-
version: "0"
|
202
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - '>='
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
207
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
|
+
requirements:
|
209
|
+
- - '>='
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '0'
|
218
212
|
requirements: []
|
219
|
-
|
220
213
|
rubyforge_project:
|
221
|
-
rubygems_version:
|
214
|
+
rubygems_version: 2.0.14
|
222
215
|
signing_key:
|
223
|
-
specification_version:
|
216
|
+
specification_version: 4
|
224
217
|
summary: Enables Ruby applications to communicate with the Bigcommerce API
|
225
|
-
test_files:
|
218
|
+
test_files:
|
226
219
|
- spec/big_commerce_spec.rb
|
227
220
|
- spec/integration/orders_spec.rb
|
228
221
|
- spec/unit/api_request_spec.rb
|