goca-spree-api 3.1.14.rails.5.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/.gitignore +17 -0
- data/Gemfile +5 -0
- data/LICENSE +26 -0
- data/Rakefile +16 -0
- data/app/controllers/spree/api/base_controller.rb +167 -0
- data/app/controllers/spree/api/v1/addresses_controller.rb +46 -0
- data/app/controllers/spree/api/v1/checkouts_controller.rb +103 -0
- data/app/controllers/spree/api/v1/classifications_controller.rb +20 -0
- data/app/controllers/spree/api/v1/countries_controller.rb +24 -0
- data/app/controllers/spree/api/v1/credit_cards_controller.rb +27 -0
- data/app/controllers/spree/api/v1/images_controller.rb +56 -0
- data/app/controllers/spree/api/v1/inventory_units_controller.rb +54 -0
- data/app/controllers/spree/api/v1/line_items_controller.rb +70 -0
- data/app/controllers/spree/api/v1/option_types_controller.rb +51 -0
- data/app/controllers/spree/api/v1/option_values_controller.rb +60 -0
- data/app/controllers/spree/api/v1/orders_controller.rb +148 -0
- data/app/controllers/spree/api/v1/payments_controller.rb +83 -0
- data/app/controllers/spree/api/v1/product_properties_controller.rb +70 -0
- data/app/controllers/spree/api/v1/products_controller.rb +126 -0
- data/app/controllers/spree/api/v1/promotions_controller.rb +28 -0
- data/app/controllers/spree/api/v1/properties_controller.rb +72 -0
- data/app/controllers/spree/api/v1/return_authorizations_controller.rb +71 -0
- data/app/controllers/spree/api/v1/shipments_controller.rb +163 -0
- data/app/controllers/spree/api/v1/states_controller.rb +37 -0
- data/app/controllers/spree/api/v1/stock_items_controller.rb +77 -0
- data/app/controllers/spree/api/v1/stock_locations_controller.rb +52 -0
- data/app/controllers/spree/api/v1/stock_movements_controller.rb +45 -0
- data/app/controllers/spree/api/v1/stores_controller.rb +57 -0
- data/app/controllers/spree/api/v1/taxonomies_controller.rb +66 -0
- data/app/controllers/spree/api/v1/taxons_controller.rb +95 -0
- data/app/controllers/spree/api/v1/users_controller.rb +60 -0
- data/app/controllers/spree/api/v1/variants_controller.rb +75 -0
- data/app/controllers/spree/api/v1/zones_controller.rb +51 -0
- data/app/helpers/spree/api/api_helpers.rb +173 -0
- data/app/models/spree/api_configuration.rb +5 -0
- data/app/views/spree/api/errors/gateway_error.v1.rabl +2 -0
- data/app/views/spree/api/errors/invalid_api_key.v1.rabl +2 -0
- data/app/views/spree/api/errors/invalid_resource.v1.rabl +3 -0
- data/app/views/spree/api/errors/must_specify_api_key.v1.rabl +2 -0
- data/app/views/spree/api/errors/not_found.v1.rabl +2 -0
- data/app/views/spree/api/errors/unauthorized.v1.rabl +2 -0
- data/app/views/spree/api/v1/addresses/show.v1.rabl +10 -0
- data/app/views/spree/api/v1/adjustments/show.v1.rabl +4 -0
- data/app/views/spree/api/v1/config/money.v1.rabl +2 -0
- data/app/views/spree/api/v1/config/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/countries/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/countries/show.v1.rabl +5 -0
- data/app/views/spree/api/v1/credit_cards/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/credit_cards/show.v1.rabl +3 -0
- data/app/views/spree/api/v1/images/index.v1.rabl +4 -0
- data/app/views/spree/api/v1/images/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/images/show.v1.rabl +6 -0
- data/app/views/spree/api/v1/inventory_units/show.rabl +2 -0
- data/app/views/spree/api/v1/line_items/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/line_items/show.v1.rabl +15 -0
- data/app/views/spree/api/v1/option_types/index.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_types/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_types/show.v1.rabl +5 -0
- data/app/views/spree/api/v1/option_values/index.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_values/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_values/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/orders/address.v1.rabl +0 -0
- data/app/views/spree/api/v1/orders/canceled.v1.rabl +0 -0
- data/app/views/spree/api/v1/orders/cart.v1.rabl +0 -0
- data/app/views/spree/api/v1/orders/complete.v1.rabl +0 -0
- data/app/views/spree/api/v1/orders/could_not_apply_coupon.v1.rabl +2 -0
- data/app/views/spree/api/v1/orders/could_not_transition.v1.rabl +3 -0
- data/app/views/spree/api/v1/orders/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/orders/invalid_shipping_method.v1.rabl +2 -0
- data/app/views/spree/api/v1/orders/mine.v1.rabl +9 -0
- data/app/views/spree/api/v1/orders/order.v1.rabl +10 -0
- data/app/views/spree/api/v1/orders/payment.v1.rabl +3 -0
- data/app/views/spree/api/v1/orders/show.v1.rabl +51 -0
- data/app/views/spree/api/v1/payments/credit_over_limit.v1.rabl +2 -0
- data/app/views/spree/api/v1/payments/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/payments/new.v1.rabl +5 -0
- data/app/views/spree/api/v1/payments/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/payments/update_forbidden.v1.rabl +2 -0
- data/app/views/spree/api/v1/product_properties/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/product_properties/new.v1.rabl +2 -0
- data/app/views/spree/api/v1/product_properties/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/products/index.v1.rabl +9 -0
- data/app/views/spree/api/v1/products/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/products/product.v1.rabl +1 -0
- data/app/views/spree/api/v1/products/show.v1.rabl +32 -0
- data/app/views/spree/api/v1/promotions/handler.v1.rabl +5 -0
- data/app/views/spree/api/v1/promotions/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/properties/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/properties/new.v1.rabl +2 -0
- data/app/views/spree/api/v1/properties/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/return_authorizations/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/return_authorizations/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/return_authorizations/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/shared/stock_location_required.v1.rabl +2 -0
- data/app/views/spree/api/v1/shipments/big.v1.rabl +48 -0
- data/app/views/spree/api/v1/shipments/cannot_ready_shipment.v1.rabl +2 -0
- data/app/views/spree/api/v1/shipments/mine.v1.rabl +9 -0
- data/app/views/spree/api/v1/shipments/show.v1.rabl +32 -0
- data/app/views/spree/api/v1/shipments/small.v1.rabl +37 -0
- data/app/views/spree/api/v1/shipping_rates/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/states/index.v1.rabl +14 -0
- data/app/views/spree/api/v1/states/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/stock_items/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/stock_items/show.v1.rabl +5 -0
- data/app/views/spree/api/v1/stock_locations/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/stock_locations/show.v1.rabl +8 -0
- data/app/views/spree/api/v1/stock_movements/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/stock_movements/show.v1.rabl +5 -0
- data/app/views/spree/api/v1/stores/index.v1.rabl +4 -0
- data/app/views/spree/api/v1/stores/show.v1.rabl +2 -0
- data/app/views/spree/api/v1/taxonomies/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/taxonomies/jstree.rabl +8 -0
- data/app/views/spree/api/v1/taxonomies/nested.v1.rabl +11 -0
- data/app/views/spree/api/v1/taxonomies/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/taxonomies/show.v1.rabl +15 -0
- data/app/views/spree/api/v1/taxons/index.v1.rabl +12 -0
- data/app/views/spree/api/v1/taxons/jstree.rabl +8 -0
- data/app/views/spree/api/v1/taxons/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/taxons/show.v1.rabl +6 -0
- data/app/views/spree/api/v1/taxons/taxons.v1.rabl +5 -0
- data/app/views/spree/api/v1/users/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/users/new.v1.rabl +3 -0
- data/app/views/spree/api/v1/users/show.v1.rabl +10 -0
- data/app/views/spree/api/v1/variants/big.v1.rabl +14 -0
- data/app/views/spree/api/v1/variants/index.v1.rabl +9 -0
- data/app/views/spree/api/v1/variants/new.v1.rabl +2 -0
- data/app/views/spree/api/v1/variants/show.v1.rabl +3 -0
- data/app/views/spree/api/v1/variants/small.v1.rabl +17 -0
- data/app/views/spree/api/v1/zones/index.v1.rabl +7 -0
- data/app/views/spree/api/v1/zones/show.v1.rabl +6 -0
- data/config/initializers/metal_load_paths.rb +1 -0
- data/config/locales/en.yml +27 -0
- data/config/routes.rb +128 -0
- data/db/migrate/20100107141738_add_api_key_to_spree_users.rb +7 -0
- data/db/migrate/20120411123334_resize_api_key_field.rb +7 -0
- data/db/migrate/20120530054546_rename_api_key_to_spree_api_key.rb +7 -0
- data/db/migrate/20131017162334_add_index_to_user_spree_api_key.rb +7 -0
- data/lib/spree/api/controller_setup.rb +20 -0
- data/lib/spree/api/engine.rb +35 -0
- data/lib/spree/api/responders/rabl_template.rb +30 -0
- data/lib/spree/api/responders.rb +11 -0
- data/lib/spree/api/testing_support/caching.rb +10 -0
- data/lib/spree/api/testing_support/helpers.rb +44 -0
- data/lib/spree/api/testing_support/setup.rb +16 -0
- data/lib/spree/api.rb +10 -0
- data/lib/spree_api.rb +2 -0
- data/script/rails +9 -0
- data/spec/fixtures/thinking-cat.jpg +0 -0
- data/spree_api.gemspec +20 -0
- metadata +221 -0
data/config/routes.rb
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
Spree::Core::Engine.add_routes do
|
2
|
+
namespace :api, defaults: { format: 'json' } do
|
3
|
+
namespace :v1 do
|
4
|
+
resources :promotions, only: [:show]
|
5
|
+
|
6
|
+
resources :products do
|
7
|
+
resources :images
|
8
|
+
resources :variants
|
9
|
+
resources :product_properties
|
10
|
+
end
|
11
|
+
|
12
|
+
concern :order_routes do
|
13
|
+
member do
|
14
|
+
put :approve
|
15
|
+
put :cancel
|
16
|
+
put :empty
|
17
|
+
put :apply_coupon_code
|
18
|
+
end
|
19
|
+
|
20
|
+
resources :line_items
|
21
|
+
resources :payments do
|
22
|
+
member do
|
23
|
+
put :authorize
|
24
|
+
put :capture
|
25
|
+
put :purchase
|
26
|
+
put :void
|
27
|
+
put :credit
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
resources :addresses, only: [:show, :update]
|
32
|
+
|
33
|
+
resources :return_authorizations do
|
34
|
+
member do
|
35
|
+
put :add
|
36
|
+
put :cancel
|
37
|
+
put :receive
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
resources :checkouts, only: [:update], concerns: :order_routes do
|
43
|
+
member do
|
44
|
+
put :next
|
45
|
+
put :advance
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
resources :variants do
|
50
|
+
resources :images
|
51
|
+
end
|
52
|
+
|
53
|
+
resources :option_types do
|
54
|
+
resources :option_values
|
55
|
+
end
|
56
|
+
resources :option_values
|
57
|
+
|
58
|
+
resources :option_values, only: :index
|
59
|
+
|
60
|
+
get '/orders/mine', to: 'orders#mine', as: 'my_orders'
|
61
|
+
get "/orders/current", to: "orders#current", as: "current_order"
|
62
|
+
|
63
|
+
resources :orders, concerns: :order_routes
|
64
|
+
|
65
|
+
resources :zones
|
66
|
+
resources :countries, only: [:index, :show] do
|
67
|
+
resources :states, only: [:index, :show]
|
68
|
+
end
|
69
|
+
|
70
|
+
resources :shipments, only: [:create, :update] do
|
71
|
+
collection do
|
72
|
+
post 'transfer_to_location'
|
73
|
+
post 'transfer_to_shipment'
|
74
|
+
get :mine
|
75
|
+
end
|
76
|
+
|
77
|
+
member do
|
78
|
+
put :ready
|
79
|
+
put :ship
|
80
|
+
put :add
|
81
|
+
put :remove
|
82
|
+
end
|
83
|
+
end
|
84
|
+
resources :states, only: [:index, :show]
|
85
|
+
|
86
|
+
resources :taxonomies do
|
87
|
+
member do
|
88
|
+
get :jstree
|
89
|
+
end
|
90
|
+
resources :taxons do
|
91
|
+
member do
|
92
|
+
get :jstree
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
resources :taxons, only: [:index]
|
98
|
+
|
99
|
+
resources :inventory_units, only: [:show, :update]
|
100
|
+
|
101
|
+
resources :users do
|
102
|
+
resources :credit_cards, only: [:index]
|
103
|
+
end
|
104
|
+
|
105
|
+
resources :properties
|
106
|
+
resources :stock_locations do
|
107
|
+
resources :stock_movements
|
108
|
+
resources :stock_items
|
109
|
+
end
|
110
|
+
|
111
|
+
resources :stock_items, only: [:index, :update, :destroy]
|
112
|
+
resources :stores
|
113
|
+
|
114
|
+
put '/classifications', to: 'classifications#update', as: :classifications
|
115
|
+
get '/taxons/products', to: 'taxons#products', as: :taxon_products
|
116
|
+
end
|
117
|
+
|
118
|
+
spree_path = Rails.application.routes.url_helpers.try(:spree_path, trailing_slash: true) || '/'
|
119
|
+
match 'v:api/*path', to: redirect("#{spree_path}api/v1/%{path}"), via: [:get, :post, :put, :patch, :delete]
|
120
|
+
|
121
|
+
match '*path', to: redirect{ |params, request|
|
122
|
+
format = ".#{params[:format]}" unless params[:format].blank?
|
123
|
+
query = "?#{request.query_string}" unless request.query_string.blank?
|
124
|
+
|
125
|
+
"#{spree_path}api/v1/#{params[:path]}#{format}#{query}"
|
126
|
+
}, via: [:get, :post, :put, :patch, :delete]
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spree/api/responders'
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module Api
|
5
|
+
module ControllerSetup
|
6
|
+
def self.included(klass)
|
7
|
+
klass.class_eval do
|
8
|
+
include CanCan::ControllerAdditions
|
9
|
+
include Spree::Core::ControllerHelpers::Auth
|
10
|
+
|
11
|
+
prepend_view_path Rails.root + "app/views"
|
12
|
+
append_view_path File.expand_path("../../../app/views", File.dirname(__FILE__))
|
13
|
+
|
14
|
+
self.responder = Spree::Api::Responders::AppResponder
|
15
|
+
respond_to :json
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rails/engine'
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module Api
|
5
|
+
class Engine < Rails::Engine
|
6
|
+
isolate_namespace Spree
|
7
|
+
engine_name 'spree_api'
|
8
|
+
|
9
|
+
Rabl.configure do |config|
|
10
|
+
config.include_json_root = false
|
11
|
+
config.include_child_root = false
|
12
|
+
|
13
|
+
# Motivation here it make it call as_json when rendering timestamps
|
14
|
+
# and therefore display miliseconds. Otherwise it would fall to
|
15
|
+
# JSON.dump which doesn't display the miliseconds
|
16
|
+
config.json_engine = ActiveSupport::JSON
|
17
|
+
end
|
18
|
+
|
19
|
+
initializer "spree.api.environment", :before => :load_config_initializers do |app|
|
20
|
+
Spree::Api::Config = Spree::ApiConfiguration.new
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.activate
|
24
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../../../app/**/*_decorator*.rb")) do |c|
|
25
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
config.to_prepare &method(:activate).to_proc
|
29
|
+
|
30
|
+
def self.root
|
31
|
+
@root ||= Pathname.new(File.expand_path('../../../../', __FILE__))
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module Responders
|
4
|
+
module RablTemplate
|
5
|
+
def to_format
|
6
|
+
if template
|
7
|
+
render template, :status => options[:status] || 200
|
8
|
+
else
|
9
|
+
super
|
10
|
+
end
|
11
|
+
rescue ActionView::MissingTemplate => e
|
12
|
+
api_behavior
|
13
|
+
end
|
14
|
+
|
15
|
+
def template
|
16
|
+
options[:default_template]
|
17
|
+
end
|
18
|
+
|
19
|
+
def api_behavior
|
20
|
+
if controller.params[:action] == "destroy"
|
21
|
+
# Render a blank template
|
22
|
+
super
|
23
|
+
else
|
24
|
+
# Do nothing and fallback to the default template
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module TestingSupport
|
4
|
+
module Helpers
|
5
|
+
def json_response
|
6
|
+
case body = JSON.parse(response.body)
|
7
|
+
when Hash
|
8
|
+
body.with_indifferent_access
|
9
|
+
when Array
|
10
|
+
body
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def assert_not_found!
|
15
|
+
expect(json_response).to eq({ "error" => "The resource you were looking for could not be found." })
|
16
|
+
expect(response.status).to eq 404
|
17
|
+
end
|
18
|
+
|
19
|
+
def assert_unauthorized!
|
20
|
+
expect(json_response).to eq({ "error" => "You are not authorized to perform that action." })
|
21
|
+
expect(response.status).to eq 401
|
22
|
+
end
|
23
|
+
|
24
|
+
def stub_authentication!
|
25
|
+
allow(Spree.user_class).to receive(:find_by).with(hash_including(:spree_api_key)) { current_api_user }
|
26
|
+
end
|
27
|
+
|
28
|
+
# This method can be overriden (with a let block) inside a context
|
29
|
+
# For instance, if you wanted to have an admin user instead.
|
30
|
+
def current_api_user
|
31
|
+
@current_api_user ||= stub_model(Spree.user_class, email: "spree@example.com")
|
32
|
+
end
|
33
|
+
|
34
|
+
def image(filename)
|
35
|
+
File.open(Spree::Api::Engine.root + "spec/fixtures" + filename)
|
36
|
+
end
|
37
|
+
|
38
|
+
def upload_image(filename)
|
39
|
+
fixture_file_upload(image(filename).path, 'image/jpg')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module TestingSupport
|
4
|
+
module Setup
|
5
|
+
def sign_in_as_admin!
|
6
|
+
let!(:current_api_user) do
|
7
|
+
user = stub_model(Spree.user_class)
|
8
|
+
allow(user).to receive_message_chain(:spree_roles, :pluck).and_return(["admin"])
|
9
|
+
allow(user).to receive(:has_spree_role?).with("admin").and_return(true)
|
10
|
+
user
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/spree/api.rb
ADDED
data/lib/spree_api.rb
ADDED
data/script/rails
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/spree/api/engine', __FILE__)
|
6
|
+
|
7
|
+
require 'rails/all'
|
8
|
+
require 'rails/engine/commands'
|
9
|
+
|
Binary file
|
data/spree_api.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require_relative '../core/lib/spree/core/version.rb'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.authors = ["Ryan Bigg"]
|
6
|
+
s.email = ["ryan@spreecommerce.com"]
|
7
|
+
s.description = %q{Spree's API}
|
8
|
+
s.summary = %q{Spree's API}
|
9
|
+
s.homepage = 'https://spreecommerce.com'
|
10
|
+
s.license = 'BSD-3'
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
13
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
+
s.name = "spree_api"
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
s.version = Spree.version
|
17
|
+
|
18
|
+
s.add_dependency 'goca-spree-core', s.version
|
19
|
+
s.add_dependency 'rabl', '~> 0.12.0'
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: goca-spree-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.1.14.rails.5.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Bigg
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: goca-spree-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.1.14.rails.5.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.1.14.rails.5.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rabl
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.12.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.12.0
|
41
|
+
description: Spree's API
|
42
|
+
email:
|
43
|
+
- ryan@spreecommerce.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE
|
51
|
+
- Rakefile
|
52
|
+
- app/controllers/spree/api/base_controller.rb
|
53
|
+
- app/controllers/spree/api/v1/addresses_controller.rb
|
54
|
+
- app/controllers/spree/api/v1/checkouts_controller.rb
|
55
|
+
- app/controllers/spree/api/v1/classifications_controller.rb
|
56
|
+
- app/controllers/spree/api/v1/countries_controller.rb
|
57
|
+
- app/controllers/spree/api/v1/credit_cards_controller.rb
|
58
|
+
- app/controllers/spree/api/v1/images_controller.rb
|
59
|
+
- app/controllers/spree/api/v1/inventory_units_controller.rb
|
60
|
+
- app/controllers/spree/api/v1/line_items_controller.rb
|
61
|
+
- app/controllers/spree/api/v1/option_types_controller.rb
|
62
|
+
- app/controllers/spree/api/v1/option_values_controller.rb
|
63
|
+
- app/controllers/spree/api/v1/orders_controller.rb
|
64
|
+
- app/controllers/spree/api/v1/payments_controller.rb
|
65
|
+
- app/controllers/spree/api/v1/product_properties_controller.rb
|
66
|
+
- app/controllers/spree/api/v1/products_controller.rb
|
67
|
+
- app/controllers/spree/api/v1/promotions_controller.rb
|
68
|
+
- app/controllers/spree/api/v1/properties_controller.rb
|
69
|
+
- app/controllers/spree/api/v1/return_authorizations_controller.rb
|
70
|
+
- app/controllers/spree/api/v1/shipments_controller.rb
|
71
|
+
- app/controllers/spree/api/v1/states_controller.rb
|
72
|
+
- app/controllers/spree/api/v1/stock_items_controller.rb
|
73
|
+
- app/controllers/spree/api/v1/stock_locations_controller.rb
|
74
|
+
- app/controllers/spree/api/v1/stock_movements_controller.rb
|
75
|
+
- app/controllers/spree/api/v1/stores_controller.rb
|
76
|
+
- app/controllers/spree/api/v1/taxonomies_controller.rb
|
77
|
+
- app/controllers/spree/api/v1/taxons_controller.rb
|
78
|
+
- app/controllers/spree/api/v1/users_controller.rb
|
79
|
+
- app/controllers/spree/api/v1/variants_controller.rb
|
80
|
+
- app/controllers/spree/api/v1/zones_controller.rb
|
81
|
+
- app/helpers/spree/api/api_helpers.rb
|
82
|
+
- app/models/spree/api_configuration.rb
|
83
|
+
- app/views/spree/api/errors/gateway_error.v1.rabl
|
84
|
+
- app/views/spree/api/errors/invalid_api_key.v1.rabl
|
85
|
+
- app/views/spree/api/errors/invalid_resource.v1.rabl
|
86
|
+
- app/views/spree/api/errors/must_specify_api_key.v1.rabl
|
87
|
+
- app/views/spree/api/errors/not_found.v1.rabl
|
88
|
+
- app/views/spree/api/errors/unauthorized.v1.rabl
|
89
|
+
- app/views/spree/api/v1/addresses/show.v1.rabl
|
90
|
+
- app/views/spree/api/v1/adjustments/show.v1.rabl
|
91
|
+
- app/views/spree/api/v1/config/money.v1.rabl
|
92
|
+
- app/views/spree/api/v1/config/show.v1.rabl
|
93
|
+
- app/views/spree/api/v1/countries/index.v1.rabl
|
94
|
+
- app/views/spree/api/v1/countries/show.v1.rabl
|
95
|
+
- app/views/spree/api/v1/credit_cards/index.v1.rabl
|
96
|
+
- app/views/spree/api/v1/credit_cards/show.v1.rabl
|
97
|
+
- app/views/spree/api/v1/images/index.v1.rabl
|
98
|
+
- app/views/spree/api/v1/images/new.v1.rabl
|
99
|
+
- app/views/spree/api/v1/images/show.v1.rabl
|
100
|
+
- app/views/spree/api/v1/inventory_units/show.rabl
|
101
|
+
- app/views/spree/api/v1/line_items/new.v1.rabl
|
102
|
+
- app/views/spree/api/v1/line_items/show.v1.rabl
|
103
|
+
- app/views/spree/api/v1/option_types/index.v1.rabl
|
104
|
+
- app/views/spree/api/v1/option_types/new.v1.rabl
|
105
|
+
- app/views/spree/api/v1/option_types/show.v1.rabl
|
106
|
+
- app/views/spree/api/v1/option_values/index.v1.rabl
|
107
|
+
- app/views/spree/api/v1/option_values/new.v1.rabl
|
108
|
+
- app/views/spree/api/v1/option_values/show.v1.rabl
|
109
|
+
- app/views/spree/api/v1/orders/address.v1.rabl
|
110
|
+
- app/views/spree/api/v1/orders/canceled.v1.rabl
|
111
|
+
- app/views/spree/api/v1/orders/cart.v1.rabl
|
112
|
+
- app/views/spree/api/v1/orders/complete.v1.rabl
|
113
|
+
- app/views/spree/api/v1/orders/could_not_apply_coupon.v1.rabl
|
114
|
+
- app/views/spree/api/v1/orders/could_not_transition.v1.rabl
|
115
|
+
- app/views/spree/api/v1/orders/index.v1.rabl
|
116
|
+
- app/views/spree/api/v1/orders/invalid_shipping_method.v1.rabl
|
117
|
+
- app/views/spree/api/v1/orders/mine.v1.rabl
|
118
|
+
- app/views/spree/api/v1/orders/order.v1.rabl
|
119
|
+
- app/views/spree/api/v1/orders/payment.v1.rabl
|
120
|
+
- app/views/spree/api/v1/orders/show.v1.rabl
|
121
|
+
- app/views/spree/api/v1/payments/credit_over_limit.v1.rabl
|
122
|
+
- app/views/spree/api/v1/payments/index.v1.rabl
|
123
|
+
- app/views/spree/api/v1/payments/new.v1.rabl
|
124
|
+
- app/views/spree/api/v1/payments/show.v1.rabl
|
125
|
+
- app/views/spree/api/v1/payments/update_forbidden.v1.rabl
|
126
|
+
- app/views/spree/api/v1/product_properties/index.v1.rabl
|
127
|
+
- app/views/spree/api/v1/product_properties/new.v1.rabl
|
128
|
+
- app/views/spree/api/v1/product_properties/show.v1.rabl
|
129
|
+
- app/views/spree/api/v1/products/index.v1.rabl
|
130
|
+
- app/views/spree/api/v1/products/new.v1.rabl
|
131
|
+
- app/views/spree/api/v1/products/product.v1.rabl
|
132
|
+
- app/views/spree/api/v1/products/show.v1.rabl
|
133
|
+
- app/views/spree/api/v1/promotions/handler.v1.rabl
|
134
|
+
- app/views/spree/api/v1/promotions/show.v1.rabl
|
135
|
+
- app/views/spree/api/v1/properties/index.v1.rabl
|
136
|
+
- app/views/spree/api/v1/properties/new.v1.rabl
|
137
|
+
- app/views/spree/api/v1/properties/show.v1.rabl
|
138
|
+
- app/views/spree/api/v1/return_authorizations/index.v1.rabl
|
139
|
+
- app/views/spree/api/v1/return_authorizations/new.v1.rabl
|
140
|
+
- app/views/spree/api/v1/return_authorizations/show.v1.rabl
|
141
|
+
- app/views/spree/api/v1/shared/stock_location_required.v1.rabl
|
142
|
+
- app/views/spree/api/v1/shipments/big.v1.rabl
|
143
|
+
- app/views/spree/api/v1/shipments/cannot_ready_shipment.v1.rabl
|
144
|
+
- app/views/spree/api/v1/shipments/mine.v1.rabl
|
145
|
+
- app/views/spree/api/v1/shipments/show.v1.rabl
|
146
|
+
- app/views/spree/api/v1/shipments/small.v1.rabl
|
147
|
+
- app/views/spree/api/v1/shipping_rates/show.v1.rabl
|
148
|
+
- app/views/spree/api/v1/states/index.v1.rabl
|
149
|
+
- app/views/spree/api/v1/states/show.v1.rabl
|
150
|
+
- app/views/spree/api/v1/stock_items/index.v1.rabl
|
151
|
+
- app/views/spree/api/v1/stock_items/show.v1.rabl
|
152
|
+
- app/views/spree/api/v1/stock_locations/index.v1.rabl
|
153
|
+
- app/views/spree/api/v1/stock_locations/show.v1.rabl
|
154
|
+
- app/views/spree/api/v1/stock_movements/index.v1.rabl
|
155
|
+
- app/views/spree/api/v1/stock_movements/show.v1.rabl
|
156
|
+
- app/views/spree/api/v1/stores/index.v1.rabl
|
157
|
+
- app/views/spree/api/v1/stores/show.v1.rabl
|
158
|
+
- app/views/spree/api/v1/taxonomies/index.v1.rabl
|
159
|
+
- app/views/spree/api/v1/taxonomies/jstree.rabl
|
160
|
+
- app/views/spree/api/v1/taxonomies/nested.v1.rabl
|
161
|
+
- app/views/spree/api/v1/taxonomies/new.v1.rabl
|
162
|
+
- app/views/spree/api/v1/taxonomies/show.v1.rabl
|
163
|
+
- app/views/spree/api/v1/taxons/index.v1.rabl
|
164
|
+
- app/views/spree/api/v1/taxons/jstree.rabl
|
165
|
+
- app/views/spree/api/v1/taxons/new.v1.rabl
|
166
|
+
- app/views/spree/api/v1/taxons/show.v1.rabl
|
167
|
+
- app/views/spree/api/v1/taxons/taxons.v1.rabl
|
168
|
+
- app/views/spree/api/v1/users/index.v1.rabl
|
169
|
+
- app/views/spree/api/v1/users/new.v1.rabl
|
170
|
+
- app/views/spree/api/v1/users/show.v1.rabl
|
171
|
+
- app/views/spree/api/v1/variants/big.v1.rabl
|
172
|
+
- app/views/spree/api/v1/variants/index.v1.rabl
|
173
|
+
- app/views/spree/api/v1/variants/new.v1.rabl
|
174
|
+
- app/views/spree/api/v1/variants/show.v1.rabl
|
175
|
+
- app/views/spree/api/v1/variants/small.v1.rabl
|
176
|
+
- app/views/spree/api/v1/zones/index.v1.rabl
|
177
|
+
- app/views/spree/api/v1/zones/show.v1.rabl
|
178
|
+
- config/initializers/metal_load_paths.rb
|
179
|
+
- config/locales/en.yml
|
180
|
+
- config/routes.rb
|
181
|
+
- db/migrate/20100107141738_add_api_key_to_spree_users.rb
|
182
|
+
- db/migrate/20120411123334_resize_api_key_field.rb
|
183
|
+
- db/migrate/20120530054546_rename_api_key_to_spree_api_key.rb
|
184
|
+
- db/migrate/20131017162334_add_index_to_user_spree_api_key.rb
|
185
|
+
- lib/spree/api.rb
|
186
|
+
- lib/spree/api/controller_setup.rb
|
187
|
+
- lib/spree/api/engine.rb
|
188
|
+
- lib/spree/api/responders.rb
|
189
|
+
- lib/spree/api/responders/rabl_template.rb
|
190
|
+
- lib/spree/api/testing_support/caching.rb
|
191
|
+
- lib/spree/api/testing_support/helpers.rb
|
192
|
+
- lib/spree/api/testing_support/setup.rb
|
193
|
+
- lib/spree_api.rb
|
194
|
+
- script/rails
|
195
|
+
- spec/fixtures/thinking-cat.jpg
|
196
|
+
- spree_api.gemspec
|
197
|
+
homepage: https://spreecommerce.com
|
198
|
+
licenses:
|
199
|
+
- BSD-3
|
200
|
+
metadata: {}
|
201
|
+
post_install_message:
|
202
|
+
rdoc_options: []
|
203
|
+
require_paths:
|
204
|
+
- lib
|
205
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">"
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: 1.3.1
|
215
|
+
requirements: []
|
216
|
+
rubyforge_project:
|
217
|
+
rubygems_version: 2.5.2.3
|
218
|
+
signing_key:
|
219
|
+
specification_version: 4
|
220
|
+
summary: Spree's API
|
221
|
+
test_files: []
|