shipstation 0.14.5 → 0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE +0 -0
- data/Rakefile +1 -5
- data/lib/shipstation.rb +74 -51
- data/lib/shipstation/api_operations/create.rb +7 -7
- data/lib/shipstation/api_operations/delete.rb +9 -9
- data/lib/shipstation/api_operations/list.rb +7 -7
- data/lib/shipstation/api_operations/retrieve.rb +7 -7
- data/lib/shipstation/api_operations/update.rb +9 -9
- data/lib/shipstation/api_resource.rb +4 -4
- data/lib/shipstation/carrier.rb +8 -7
- data/lib/shipstation/customer.rb +4 -4
- data/lib/shipstation/order.rb +40 -26
- data/lib/shipstation/product.rb +5 -5
- data/lib/shipstation/shipment.rb +14 -8
- data/lib/shipstation/store.rb +10 -10
- data/lib/shipstation/tag.rb +8 -8
- data/lib/shipstation/version.rb +1 -1
- data/lib/shipstation/warehouse.rb +10 -10
- data/lib/tasks/shipstation_tasks.rake +0 -0
- data/test/dummy/Gemfile +3 -4
- data/test/dummy/Gemfile.lock +3 -3
- data/test/dummy/README.rdoc +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +4 -4
- data/test/dummy/bin/setup +1 -1
- data/test/dummy/bin/spring +1 -1
- data/test/dummy/config.ru +0 -0
- data/test/dummy/config/application.rb +0 -0
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/initializers/assets.rb +0 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/shipstation.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/db/seeds.rb +0 -0
- data/test/dummy/public/404.html +52 -52
- data/test/dummy/public/422.html +52 -52
- data/test/dummy/public/500.html +51 -51
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +0 -0
- data/test/dummy/test/test_helper.rb +0 -0
- data/test/shipstation_test.rb +0 -0
- data/test/test_helper.rb +2 -2
- metadata +27 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe71077558f3724730188ad4a60e856634889a7b8ee3800609c967f0bf7873a1
|
4
|
+
data.tar.gz: f42db728139bc16c78f045ac6bad23f44501bc1938517b8a9421dd2804b0e7ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f131c227fa6a7993ca355e5da0624609170fc0d06881a47697292deeeafb8864f6b0103a7a37e72ef460e2bf862f84f035a548d714bececa58913933f15d00c1
|
7
|
+
data.tar.gz: 2313f8c0078b3fc4dcdf275914573e6b8bfee237fa9ea993bc37515f0ec9b5b46812a2d9d4c86e05fe2e2720fa68613b53391c056f54575824b5dd65cf22ff51
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/Rakefile
CHANGED
@@ -8,17 +8,13 @@ require 'rdoc/task'
|
|
8
8
|
|
9
9
|
RDoc::Task.new(:rdoc) do |rdoc|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title
|
11
|
+
rdoc.title = 'Shipstation'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
13
|
rdoc.rdoc_files.include('README.rdoc')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
18
|
Bundler::GemHelper.install_tasks
|
23
19
|
|
24
20
|
require 'rake/testtask'
|
data/lib/shipstation.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rest-client'
|
2
4
|
|
3
5
|
require 'shipstation/api_operations/list'
|
@@ -17,63 +19,84 @@ require 'shipstation/product'
|
|
17
19
|
require 'shipstation/tag'
|
18
20
|
|
19
21
|
module Shipstation
|
20
|
-
API_BASE = "https://ssapi.shipstation.com/"
|
21
22
|
|
22
|
-
|
23
|
+
API_BASE = "https://ssapi.shipstation.com/"
|
24
|
+
|
25
|
+
class ShipstationError < StandardError
|
26
|
+
end
|
27
|
+
|
28
|
+
class AuthenticationError < ShipstationError;
|
29
|
+
end
|
30
|
+
class ConfigurationError < ShipstationError;
|
31
|
+
end
|
32
|
+
class ApiRequestError < ShipstationError
|
33
|
+
attr_reader :response_code, :response_headers, :response_body
|
34
|
+
|
35
|
+
def initialize(response_code:, response_headers:, response_body:)
|
36
|
+
@response_code = response_code
|
37
|
+
@response_headers = response_headers
|
38
|
+
@response_body = response_body
|
23
39
|
end
|
40
|
+
end
|
24
41
|
|
25
|
-
|
26
|
-
|
42
|
+
class << self
|
43
|
+
def username
|
44
|
+
defined? @username and @username or raise(
|
45
|
+
ConfigurationError, "Shipstation username not configured"
|
46
|
+
)
|
47
|
+
end
|
27
48
|
|
28
|
-
|
29
|
-
def username
|
30
|
-
defined? @username and @username or raise(
|
31
|
-
ConfigurationError, "Shipstation username not configured"
|
32
|
-
)
|
33
|
-
end
|
34
|
-
attr_writer :username
|
49
|
+
attr_writer :username
|
35
50
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
params.except!(:username, :password)
|
48
|
-
|
49
|
-
defined? method or raise(
|
50
|
-
ArgumentError, "Request method has not been specified"
|
51
|
-
)
|
52
|
-
defined? resource or raise(
|
53
|
-
ArgumentError, "Request resource has not been specified"
|
54
|
-
)
|
55
|
-
if method == :get
|
56
|
-
headers = { :accept => :json, content_type: :json }.merge({params: params})
|
57
|
-
payload = nil
|
58
|
-
else
|
59
|
-
headers = { :accept => :json, content_type: :json }
|
60
|
-
payload = params
|
61
|
-
end
|
62
|
-
RestClient::Request.new({
|
63
|
-
method: method,
|
64
|
-
url: API_BASE + resource,
|
65
|
-
user: ss_username,
|
66
|
-
password: ss_password,
|
67
|
-
payload: payload ? payload.to_json : nil,
|
68
|
-
headers: headers
|
69
|
-
}).execute do |response, request, result|
|
70
|
-
str_response = response.to_str
|
71
|
-
str_response.blank? ? '' : JSON.parse(str_response)
|
72
|
-
end
|
73
|
-
end
|
51
|
+
def password
|
52
|
+
defined? @password and @password or raise(
|
53
|
+
ConfigurationError, "Shipstation password not configured"
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
attr_writer :password
|
58
|
+
|
59
|
+
def request method, resource, params = {}
|
60
|
+
ss_username = params[:username] || Shipstation.username
|
61
|
+
ss_password = params[:password] || Shipstation.password
|
74
62
|
|
75
|
-
|
76
|
-
|
63
|
+
params.except!(:username, :password)
|
64
|
+
|
65
|
+
defined? method or raise(
|
66
|
+
ArgumentError, "Request method has not been specified"
|
67
|
+
)
|
68
|
+
defined? resource or raise(
|
69
|
+
ArgumentError, "Request resource has not been specified"
|
70
|
+
)
|
71
|
+
if method == :get
|
72
|
+
headers = {:accept => :json, content_type: :json}.merge({params: params})
|
73
|
+
payload = nil
|
74
|
+
else
|
75
|
+
headers = {:accept => :json, content_type: :json}
|
76
|
+
payload = params
|
77
|
+
end
|
78
|
+
RestClient::Request.new({
|
79
|
+
method: method,
|
80
|
+
url: API_BASE + resource,
|
81
|
+
user: ss_username,
|
82
|
+
password: ss_password,
|
83
|
+
payload: payload ? payload.to_json : nil,
|
84
|
+
headers: headers
|
85
|
+
}).execute do |response, request, result|
|
86
|
+
if response.code != 200
|
87
|
+
raise ApiRequestError.new(
|
88
|
+
response_code: response.code,
|
89
|
+
response_headers: response.headers,
|
90
|
+
response_body: response.to_str
|
91
|
+
)
|
77
92
|
end
|
93
|
+
str_response = response.to_str
|
94
|
+
str_response.blank? ? '' : JSON.parse(str_response)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def datetime_format datetime
|
99
|
+
datetime.strftime("%Y-%m-%d %T")
|
78
100
|
end
|
101
|
+
end
|
79
102
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
2
|
+
module APIOperations
|
3
|
+
module Create
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
5
|
+
def create params = {}
|
6
|
+
response = Shipstation.request(:post, "#{class_name.downcase.pluralize}/create#{class_name.downcase}", params)
|
7
|
+
return response
|
8
|
+
end
|
10
9
|
end
|
10
|
+
end
|
11
11
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
module APIOperations
|
3
|
+
module Delete
|
4
|
+
|
5
|
+
def delete object_id, params = {}
|
6
|
+
Shipstation.request(:delete, "#{class_name.downcase.pluralize}/#{object_id}", params)
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
end
|
11
11
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
2
|
+
module APIOperations
|
3
|
+
module List
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
def list params = {}
|
6
|
+
response = Shipstation.request(:get, class_name.downcase.pluralize, params)
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
end
|
8
|
+
return response
|
9
|
+
end
|
11
10
|
end
|
11
|
+
end
|
12
12
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
2
|
+
module APIOperations
|
3
|
+
module Retrieve
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
5
|
+
def retrieve object_id, params = {}
|
6
|
+
response = Shipstation.request(:get, "#{class_name.downcase.pluralize}/#{object_id}", params)
|
7
|
+
return response
|
8
|
+
end
|
10
9
|
end
|
10
|
+
end
|
11
11
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
module APIOperations
|
3
|
+
module Update
|
4
|
+
|
5
|
+
def update object_id, params = {}
|
6
|
+
Shipstation.request(:put, "#{class_name.downcase.pluralize}/#{object_id}", params)
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
end
|
11
11
|
end
|
data/lib/shipstation/carrier.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
2
|
+
class Carrier < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
5
|
+
class << self
|
6
|
+
def list_services(params = {})
|
7
|
+
response = Shipstation.request(:get, 'carriers/listservices', params)
|
8
|
+
return response
|
9
|
+
end
|
10
10
|
end
|
11
|
+
end
|
11
12
|
end
|
data/lib/shipstation/customer.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
class Customer < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
4
|
+
extend Shipstation::APIOperations::Retrieve
|
5
|
+
end
|
6
6
|
end
|
data/lib/shipstation/order.rb
CHANGED
@@ -1,28 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
4
|
+
class Order < ApiResource
|
5
|
+
extend Shipstation::APIOperations::List
|
6
|
+
extend Shipstation::APIOperations::Create
|
7
|
+
extend Shipstation::APIOperations::Retrieve
|
8
|
+
extend Shipstation::APIOperations::Delete
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def create_label(params = {})
|
12
|
+
response = Shipstation.request(:post, 'orders/createlabelfororder', params)
|
13
|
+
|
14
|
+
response
|
15
|
+
end
|
16
|
+
|
17
|
+
def assign_tag(params = {})
|
18
|
+
response = Shipstation.request(:post, 'orders/addtag', params)
|
19
|
+
|
20
|
+
response
|
21
|
+
end
|
22
|
+
|
23
|
+
def remove_tag(params = {})
|
24
|
+
response = Shipstation.request(:post, 'orders/removetag', params)
|
25
|
+
|
26
|
+
response
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_bulk(params = {})
|
30
|
+
response = Shipstation.request(:post, 'orders/createorders', params)
|
31
|
+
|
32
|
+
response
|
33
|
+
end
|
34
|
+
|
35
|
+
# params: { [:username], [:password], input: [ {:order_number, ... }, { :order_number, ... } ] }
|
36
|
+
# todo: complete in future phase
|
37
|
+
# def create_update_orders params
|
38
|
+
# Shipstation.request(:post, "orders/createorders", params)
|
39
|
+
# end
|
27
40
|
end
|
28
|
-
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/shipstation/product.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
class Product < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
4
|
+
extend Shipstation::APIOperations::Retrieve
|
5
|
+
extend Shipstation::APIOperations::Update
|
6
|
+
end
|
7
7
|
end
|
data/lib/shipstation/shipment.rb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
2
|
+
class Shipment < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
class << self
|
6
|
+
def get_rates(params = {})
|
7
|
+
Shipstation.request(:post, "shipments/getrates", params)
|
8
|
+
end
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
def create_label(params = {})
|
11
|
+
Shipstation.request(:post, 'shipments/createlabel', params)
|
12
|
+
end
|
13
|
+
|
14
|
+
def void_label(params = {})
|
15
|
+
Shipstation.request(:post, 'shipments/voidlabel', params)
|
16
|
+
end
|
12
17
|
end
|
18
|
+
end
|
13
19
|
end
|
data/lib/shipstation/store.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
class Store < ApiResource
|
3
|
+
extend Shipstation::APIOperations::Retrieve
|
4
|
+
extend Shipstation::APIOperations::Update
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
6
|
+
class << self
|
7
|
+
def list
|
8
|
+
response = Shipstation.request(:get, 'stores')
|
9
|
+
|
10
|
+
return response
|
11
|
+
end
|
13
12
|
end
|
13
|
+
end
|
14
14
|
end
|
data/lib/shipstation/tag.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
2
|
+
class Tag < ApiResource
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
4
|
+
class << self
|
5
|
+
def list
|
6
|
+
response = Shipstation.request(:get, 'accounts/listtags')
|
7
|
+
|
8
|
+
return response
|
9
|
+
end
|
11
10
|
end
|
11
|
+
end
|
12
12
|
end
|
data/lib/shipstation/version.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
module Shipstation
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
class Warehouse < ApiResource
|
3
|
+
extend Shipstation::APIOperations::Create
|
4
|
+
extend Shipstation::APIOperations::Retrieve
|
5
|
+
extend Shipstation::APIOperations::Update
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
class << self
|
8
|
+
def list
|
9
|
+
response = Shipstation.request(:get, 'warehouses')
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
end
|
11
|
+
return response
|
12
|
+
end
|
14
13
|
end
|
14
|
+
end
|
15
15
|
end
|
File without changes
|
data/test/dummy/Gemfile
CHANGED
@@ -26,14 +26,13 @@ gem 'sdoc', '~> 0.4.0', group: :doc
|
|
26
26
|
gem 'ffi', '~> 1.9.24'
|
27
27
|
gem 'sprockets', '~> 3.7.2'
|
28
28
|
|
29
|
-
gem 'rest-client'
|
30
|
-
gem 'shipstation'
|
29
|
+
gem 'rest-client'
|
30
|
+
gem 'shipstation'
|
31
31
|
|
32
|
-
|
33
32
|
|
34
33
|
# Use ActiveModel has_secure_password
|
35
34
|
# gem 'bcrypt', '~> 3.1.7'
|
36
|
-
|
35
|
+
|
37
36
|
# Use Unicorn as the app server
|
38
37
|
# gem 'unicorn'
|
39
38
|
|
data/test/dummy/Gemfile.lock
CHANGED
@@ -79,12 +79,12 @@ GEM
|
|
79
79
|
mime-types-data (~> 3.2015)
|
80
80
|
mime-types-data (3.2018.0812)
|
81
81
|
mini_mime (1.0.1)
|
82
|
-
mini_portile2 (2.
|
82
|
+
mini_portile2 (2.4.0)
|
83
83
|
minitest (5.11.3)
|
84
84
|
multi_json (1.13.1)
|
85
85
|
netrc (0.11.0)
|
86
|
-
nokogiri (1.
|
87
|
-
mini_portile2 (~> 2.
|
86
|
+
nokogiri (1.10.4)
|
87
|
+
mini_portile2 (~> 2.4.0)
|
88
88
|
rack (1.6.10)
|
89
89
|
rack-test (0.6.3)
|
90
90
|
rack (>= 1.0)
|
data/test/dummy/README.rdoc
CHANGED
File without changes
|
data/test/dummy/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
10
|
|
data/test/dummy/bin/setup
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'pathname'
|
3
3
|
|
4
4
|
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
6
|
|
7
7
|
Dir.chdir APP_ROOT do
|
8
8
|
# This script is a starting point to setup your application.
|
data/test/dummy/bin/spring
CHANGED
@@ -8,7 +8,7 @@ unless defined?(Spring)
|
|
8
8
|
require 'bundler'
|
9
9
|
|
10
10
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
11
|
-
spring = lockfile.specs.detect {
|
11
|
+
spring = lockfile.specs.detect {|spec| spec.name == "spring"}
|
12
12
|
if spring
|
13
13
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
14
14
|
gem 'spring', spring.version
|
data/test/dummy/config.ru
CHANGED
File without changes
|
File without changes
|
data/test/dummy/config/boot.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -10,7 +10,7 @@ Rails.application.configure do
|
|
10
10
|
config.eager_load = false
|
11
11
|
|
12
12
|
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local
|
13
|
+
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
16
|
# Don't care if the mailer can't send.
|
@@ -11,7 +11,7 @@ Rails.application.configure do
|
|
11
11
|
config.eager_load = true
|
12
12
|
|
13
13
|
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local
|
14
|
+
config.consider_all_requests_local = false
|
15
15
|
config.action_controller.perform_caching = true
|
16
16
|
|
17
17
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
@@ -13,11 +13,11 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static file server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_files
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local
|
20
|
+
config.consider_all_requests_local = true
|
21
21
|
config.action_controller.perform_caching = false
|
22
22
|
|
23
23
|
# Raise exceptions instead of rendering exception templates.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config/routes.rb
CHANGED
File without changes
|
File without changes
|
data/test/dummy/db/seeds.rb
CHANGED
File without changes
|
data/test/dummy/public/404.html
CHANGED
@@ -1,67 +1,67 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
55
|
</head>
|
56
56
|
|
57
57
|
<body>
|
58
|
-
|
59
|
-
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
60
|
<div>
|
61
|
-
|
62
|
-
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
63
|
</div>
|
64
64
|
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
|
65
|
+
</div>
|
66
66
|
</body>
|
67
67
|
</html>
|
data/test/dummy/public/422.html
CHANGED
@@ -1,67 +1,67 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
55
|
</head>
|
56
56
|
|
57
57
|
<body>
|
58
|
-
|
59
|
-
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
60
|
<div>
|
61
|
-
|
62
|
-
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
63
|
</div>
|
64
64
|
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
|
65
|
+
</div>
|
66
66
|
</body>
|
67
67
|
</html>
|
data/test/dummy/public/500.html
CHANGED
@@ -1,66 +1,66 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
55
|
</head>
|
56
56
|
|
57
57
|
<body>
|
58
|
-
|
59
|
-
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
60
|
<div>
|
61
|
-
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
62
|
</div>
|
63
63
|
<p>If you are the application owner check the logs for more information.</p>
|
64
|
-
|
64
|
+
</div>
|
65
65
|
</body>
|
66
66
|
</html>
|
File without changes
|
File without changes
|
File without changes
|
data/test/shipstation_test.rb
CHANGED
File without changes
|
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Configure Rails Environment
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
3
|
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb",
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
5
|
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
6
|
require "rails/test_help"
|
7
7
|
|
@@ -10,7 +10,7 @@ require "rails/test_help"
|
|
10
10
|
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
11
|
|
12
12
|
# Load support files
|
13
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
14
14
|
|
15
15
|
# Load fixtures from the engine
|
16
16
|
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipstation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.18'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Dallimore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -112,52 +112,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
|
116
|
-
rubygems_version: 2.5.1
|
115
|
+
rubygems_version: 3.1.2
|
117
116
|
signing_key:
|
118
117
|
specification_version: 4
|
119
118
|
summary: A Ruby wrapper for the Shipstation API
|
120
119
|
test_files:
|
121
|
-
- test/dummy/app/controllers/application_controller.rb
|
122
|
-
- test/dummy/app/views/layouts/application.html.erb
|
123
120
|
- test/dummy/app/assets/javascripts/application.js
|
124
121
|
- test/dummy/app/assets/stylesheets/application.css
|
122
|
+
- test/dummy/app/controllers/application_controller.rb
|
125
123
|
- test/dummy/app/helpers/application_helper.rb
|
126
|
-
- test/dummy/
|
124
|
+
- test/dummy/app/views/layouts/application.html.erb
|
125
|
+
- test/dummy/bin/bundle
|
126
|
+
- test/dummy/bin/rails
|
127
127
|
- test/dummy/bin/rake
|
128
128
|
- test/dummy/bin/setup
|
129
|
-
- test/dummy/bin/bundle
|
130
129
|
- test/dummy/bin/spring
|
131
|
-
- test/dummy/bin/rails
|
132
|
-
- test/dummy/config/secrets.yml
|
133
|
-
- test/dummy/config/routes.rb
|
134
|
-
- test/dummy/config/locales/en.yml
|
135
|
-
- test/dummy/config/environments/production.rb
|
136
|
-
- test/dummy/config/environments/development.rb
|
137
|
-
- test/dummy/config/environments/test.rb
|
138
|
-
- test/dummy/config/environment.rb
|
139
130
|
- test/dummy/config/application.rb
|
140
|
-
- test/dummy/config/database.yml
|
141
131
|
- test/dummy/config/boot.rb
|
132
|
+
- test/dummy/config/database.yml
|
133
|
+
- test/dummy/config/environment.rb
|
134
|
+
- test/dummy/config/environments/development.rb
|
135
|
+
- test/dummy/config/environments/production.rb
|
136
|
+
- test/dummy/config/environments/test.rb
|
137
|
+
- test/dummy/config/initializers/assets.rb
|
142
138
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
143
|
-
- test/dummy/config/initializers/
|
139
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
144
140
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
141
|
+
- test/dummy/config/initializers/inflections.rb
|
142
|
+
- test/dummy/config/initializers/mime_types.rb
|
145
143
|
- test/dummy/config/initializers/session_store.rb
|
146
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
147
|
-
- test/dummy/config/initializers/assets.rb
|
148
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
149
144
|
- test/dummy/config/initializers/shipstation.rb
|
150
|
-
- test/dummy/config/initializers/
|
145
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
146
|
+
- test/dummy/config/locales/en.yml
|
147
|
+
- test/dummy/config/routes.rb
|
148
|
+
- test/dummy/config/secrets.yml
|
151
149
|
- test/dummy/config.ru
|
152
|
-
- test/dummy/Rakefile
|
153
|
-
- test/dummy/public/favicon.ico
|
154
|
-
- test/dummy/public/422.html
|
155
|
-
- test/dummy/public/500.html
|
156
|
-
- test/dummy/public/404.html
|
157
|
-
- test/dummy/public/robots.txt
|
158
150
|
- test/dummy/db/seeds.rb
|
159
151
|
- test/dummy/Gemfile
|
160
152
|
- test/dummy/Gemfile.lock
|
153
|
+
- test/dummy/public/404.html
|
154
|
+
- test/dummy/public/422.html
|
155
|
+
- test/dummy/public/500.html
|
156
|
+
- test/dummy/public/favicon.ico
|
157
|
+
- test/dummy/public/robots.txt
|
158
|
+
- test/dummy/Rakefile
|
161
159
|
- test/dummy/README.rdoc
|
160
|
+
- test/dummy/test/test_helper.rb
|
162
161
|
- test/shipstation_test.rb
|
163
162
|
- test/test_helper.rb
|