spree_api 3.0.10 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/base_controller.rb +21 -22
- 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 +137 -0
- data/app/controllers/spree/api/v1/payments_controller.rb +82 -0
- data/app/controllers/spree/api/v1/product_properties_controller.rb +73 -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 +3 -2
- data/app/views/spree/api/{addresses → v1/addresses}/show.v1.rabl +0 -0
- data/app/views/spree/api/{adjustments → v1/adjustments}/show.v1.rabl +0 -0
- data/app/views/spree/api/{config → v1/config}/money.v1.rabl +0 -0
- data/app/views/spree/api/{config → v1/config}/show.v1.rabl +0 -0
- data/app/views/spree/api/{countries → v1/countries}/index.v1.rabl +0 -0
- data/app/views/spree/api/{countries → v1/countries}/show.v1.rabl +0 -0
- data/app/views/spree/api/{credit_cards → v1/credit_cards}/index.v1.rabl +1 -1
- data/app/views/spree/api/{credit_cards → v1/credit_cards}/show.v1.rabl +0 -0
- data/app/views/spree/api/{images → v1/images}/index.v1.rabl +1 -1
- data/app/views/spree/api/v1/images/new.v1.rabl +3 -0
- data/app/views/spree/api/{images → v1/images}/show.v1.rabl +0 -0
- data/app/views/spree/api/{inventory_units → v1/inventory_units}/show.rabl +0 -0
- data/app/views/spree/api/{line_items → v1/line_items}/new.v1.rabl +0 -0
- data/app/views/spree/api/{line_items → v1/line_items}/show.v1.rabl +3 -3
- 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/{option_types → v1/option_types}/show.v1.rabl +0 -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/{option_values → v1/option_values}/show.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/address.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/canceled.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/cart.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/complete.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/could_not_apply_coupon.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/could_not_transition.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/index.v1.rabl +1 -1
- data/app/views/spree/api/{orders → v1/orders}/invalid_shipping_method.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/mine.v1.rabl +1 -1
- data/app/views/spree/api/{orders → v1/orders}/order.v1.rabl +1 -0
- data/app/views/spree/api/{orders → v1/orders}/payment.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/show.v1.rabl +9 -9
- data/app/views/spree/api/{payments → v1/payments}/credit_over_limit.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/index.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/new.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/show.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/update_forbidden.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/index.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/new.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/show.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/index.v1.rabl +1 -1
- data/app/views/spree/api/{products → v1/products}/new.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/product.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/show.v1.rabl +3 -3
- data/app/views/spree/api/{promotions → v1/promotions}/handler.v1.rabl +0 -0
- data/app/views/spree/api/{promotions → v1/promotions}/show.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/index.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/new.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/show.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/index.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/new.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/show.v1.rabl +0 -0
- data/app/views/spree/api/{shared → v1/shared}/stock_location_required.v1.rabl +0 -0
- data/app/views/spree/api/{shipments → v1/shipments}/big.v1.rabl +7 -7
- data/app/views/spree/api/{shipments → v1/shipments}/cannot_ready_shipment.v1.rabl +0 -0
- data/app/views/spree/api/{shipments → v1/shipments}/mine.v1.rabl +1 -1
- data/app/views/spree/api/{shipments → v1/shipments}/show.v1.rabl +3 -3
- data/app/views/spree/api/{shipments → v1/shipments}/small.v1.rabl +3 -3
- data/app/views/spree/api/{shipping_rates → v1/shipping_rates}/show.v1.rabl +0 -0
- data/app/views/spree/api/{states → v1/states}/index.v1.rabl +0 -0
- data/app/views/spree/api/{states → v1/states}/show.v1.rabl +0 -0
- data/app/views/spree/api/{stock_items → v1/stock_items}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_items → v1/stock_items}/show.v1.rabl +1 -1
- data/app/views/spree/api/{stock_locations → v1/stock_locations}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_locations → v1/stock_locations}/show.v1.rabl +0 -0
- data/app/views/spree/api/{stock_movements → v1/stock_movements}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_movements → v1/stock_movements}/show.v1.rabl +1 -1
- data/app/views/spree/api/{stores → v1/stores}/index.v1.rabl +0 -0
- data/app/views/spree/api/{stores → v1/stores}/show.v1.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/index.v1.rabl +1 -1
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/jstree.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/nested.v1.rabl +1 -1
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/new.v1.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/show.v1.rabl +4 -4
- data/app/views/spree/api/{taxons → v1/taxons}/index.v1.rabl +1 -1
- data/app/views/spree/api/{taxons → v1/taxons}/jstree.rabl +0 -0
- data/app/views/spree/api/{taxons → v1/taxons}/new.v1.rabl +0 -0
- data/app/views/spree/api/{taxons → v1/taxons}/show.v1.rabl +0 -0
- data/app/views/spree/api/v1/taxons/taxons.v1.rabl +5 -0
- data/app/views/spree/api/{users → v1/users}/index.v1.rabl +1 -1
- data/app/views/spree/api/{users → v1/users}/new.v1.rabl +0 -0
- data/app/views/spree/api/{users → v1/users}/show.v1.rabl +2 -2
- data/app/views/spree/api/{variants → v1/variants}/big.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/index.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/new.v1.rabl +0 -0
- data/app/views/spree/api/{variants → v1/variants}/show.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/small.v1.rabl +1 -1
- data/app/views/spree/api/{zones → v1/zones}/index.v1.rabl +1 -1
- data/app/views/spree/api/{zones → v1/zones}/show.v1.rabl +0 -0
- data/config/routes.rb +85 -88
- data/spec/controllers/spree/api/base_controller_spec.rb +14 -42
- data/spec/controllers/spree/api/{addresses_controller_spec.rb → v1/addresses_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{checkouts_controller_spec.rb → v1/checkouts_controller_spec.rb} +51 -3
- data/spec/controllers/spree/api/{classifications_controller_spec.rb → v1/classifications_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{countries_controller_spec.rb → v1/countries_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{credit_cards_controller_spec.rb → v1/credit_cards_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{images_controller_spec.rb → v1/images_controller_spec.rb} +23 -1
- data/spec/controllers/spree/api/{inventory_units_controller_spec.rb → v1/inventory_units_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{line_items_controller_spec.rb → v1/line_items_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{option_types_controller_spec.rb → v1/option_types_controller_spec.rb} +9 -3
- data/spec/controllers/spree/api/{option_values_controller_spec.rb → v1/option_values_controller_spec.rb} +8 -2
- data/spec/controllers/spree/api/{orders_controller_spec.rb → v1/orders_controller_spec.rb} +29 -8
- data/spec/controllers/spree/api/{payments_controller_spec.rb → v1/payments_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{product_properties_controller_spec.rb → v1/product_properties_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{products_controller_spec.rb → v1/products_controller_spec.rb} +5 -5
- data/spec/controllers/spree/api/{promotion_application_spec.rb → v1/promotion_application_spec.rb} +2 -2
- data/spec/controllers/spree/api/{promotions_controller_spec.rb → v1/promotions_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{properties_controller_spec.rb → v1/properties_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{return_authorizations_controller_spec.rb → v1/return_authorizations_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{shipments_controller_spec.rb → v1/shipments_controller_spec.rb} +4 -4
- data/spec/controllers/spree/api/{states_controller_spec.rb → v1/states_controller_spec.rb} +14 -10
- data/spec/controllers/spree/api/{stock_items_controller_spec.rb → v1/stock_items_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stock_locations_controller_spec.rb → v1/stock_locations_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stock_movements_controller_spec.rb → v1/stock_movements_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stores_controller_spec.rb → v1/stores_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{taxonomies_controller_spec.rb → v1/taxonomies_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{taxons_controller_spec.rb → v1/taxons_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{unauthenticated_products_controller_spec.rb → v1/unauthenticated_products_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{users_controller_spec.rb → v1/users_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{variants_controller_spec.rb → v1/variants_controller_spec.rb} +3 -3
- data/spec/controllers/spree/api/{zones_controller_spec.rb → v1/zones_controller_spec.rb} +7 -5
- data/spec/requests/rabl_cache_spec.rb +2 -2
- data/spec/requests/ransackable_attributes_spec.rb +6 -6
- data/spec/requests/version_spec.rb +19 -0
- data/spree_api.gemspec +1 -1
- metadata +188 -185
- data/CHANGELOG.md +0 -3
- data/app/controllers/spree/api/addresses_controller.rb +0 -43
- data/app/controllers/spree/api/checkouts_controller.rb +0 -98
- data/app/controllers/spree/api/classifications_controller.rb +0 -18
- data/app/controllers/spree/api/countries_controller.rb +0 -23
- data/app/controllers/spree/api/credit_cards_controller.rb +0 -25
- data/app/controllers/spree/api/images_controller.rb +0 -47
- data/app/controllers/spree/api/inventory_units_controller.rb +0 -52
- data/app/controllers/spree/api/line_items_controller.rb +0 -69
- data/app/controllers/spree/api/option_types_controller.rb +0 -49
- data/app/controllers/spree/api/option_values_controller.rb +0 -58
- data/app/controllers/spree/api/orders_controller.rb +0 -130
- data/app/controllers/spree/api/payments_controller.rb +0 -80
- data/app/controllers/spree/api/product_properties_controller.rb +0 -72
- data/app/controllers/spree/api/products_controller.rb +0 -124
- data/app/controllers/spree/api/promotions_controller.rb +0 -26
- data/app/controllers/spree/api/properties_controller.rb +0 -70
- data/app/controllers/spree/api/return_authorizations_controller.rb +0 -69
- data/app/controllers/spree/api/shipments_controller.rb +0 -149
- data/app/controllers/spree/api/states_controller.rb +0 -38
- data/app/controllers/spree/api/stock_items_controller.rb +0 -75
- data/app/controllers/spree/api/stock_locations_controller.rb +0 -50
- data/app/controllers/spree/api/stock_movements_controller.rb +0 -43
- data/app/controllers/spree/api/stores_controller.rb +0 -55
- data/app/controllers/spree/api/taxonomies_controller.rb +0 -64
- data/app/controllers/spree/api/taxons_controller.rb +0 -93
- data/app/controllers/spree/api/users_controller.rb +0 -56
- data/app/controllers/spree/api/variants_controller.rb +0 -73
- data/app/controllers/spree/api/zones_controller.rb +0 -49
- data/app/models/spree/option_value_decorator.rb +0 -9
- data/app/views/spree/api/option_types/index.v1.rabl +0 -3
- data/app/views/spree/api/option_values/index.v1.rabl +0 -3
- data/app/views/spree/api/taxons/taxons.v1.rabl +0 -5
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'shared_examples/protect_product_actions'
|
3
3
|
|
4
4
|
module Spree
|
5
|
-
describe
|
5
|
+
describe Api::V1::ProductPropertiesController, :type => :controller do
|
6
6
|
render_views
|
7
7
|
|
8
8
|
let!(:product) { create(:product) }
|
data/spec/controllers/spree/api/{products_controller_spec.rb → v1/products_controller_spec.rb}
RENAMED
@@ -2,11 +2,11 @@ require 'spec_helper'
|
|
2
2
|
require 'shared_examples/protect_product_actions'
|
3
3
|
|
4
4
|
module Spree
|
5
|
-
describe
|
5
|
+
describe Api::V1::ProductsController, :type => :controller do
|
6
6
|
render_views
|
7
7
|
|
8
8
|
let!(:product) { create(:product) }
|
9
|
-
let!(:inactive_product) { create(:product, available_on: Time.
|
9
|
+
let!(:inactive_product) { create(:product, available_on: Time.current.tomorrow, name: "inactive") }
|
10
10
|
let(:base_attributes) { Api::ApiHelpers.product_attributes }
|
11
11
|
let(:show_attributes) { base_attributes.dup.push(:has_variants) }
|
12
12
|
let(:new_attributes) { base_attributes }
|
@@ -126,7 +126,7 @@ module Spree
|
|
126
126
|
|
127
127
|
it "gets a single product" do
|
128
128
|
product.master.images.create!(:attachment => image("thinking-cat.jpg"))
|
129
|
-
product
|
129
|
+
create(:variant, product: product)
|
130
130
|
product.variants.first.images.create!(:attachment => image("thinking-cat.jpg"))
|
131
131
|
product.set_property("spree", "rocks")
|
132
132
|
product.taxons << create(:taxon)
|
@@ -202,7 +202,7 @@ module Spree
|
|
202
202
|
required_attributes = json_response["required_attributes"]
|
203
203
|
expect(required_attributes).to include("name")
|
204
204
|
expect(required_attributes).to include("price")
|
205
|
-
expect(required_attributes).to include("
|
205
|
+
expect(required_attributes).to include("shipping_category")
|
206
206
|
end
|
207
207
|
|
208
208
|
it_behaves_like "modifying product actions are restricted"
|
@@ -335,7 +335,7 @@ module Spree
|
|
335
335
|
expect(json_response["error"]).to eq("Invalid resource. Please fix errors and try again.")
|
336
336
|
errors = json_response["errors"]
|
337
337
|
errors.delete("slug") # Don't care about this one.
|
338
|
-
expect(errors.keys).to match_array(["name", "price", "
|
338
|
+
expect(errors.keys).to match_array(["name", "price", "shipping_category"])
|
339
339
|
end
|
340
340
|
end
|
341
341
|
|
data/spec/controllers/spree/api/{properties_controller_spec.rb → v1/properties_controller_spec.rb}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
module Spree
|
3
|
-
describe
|
3
|
+
describe Api::V1::PropertiesController, :type => :controller do
|
4
4
|
render_views
|
5
5
|
|
6
6
|
let!(:property_1) { Property.create!(:name => "foo", :presentation => "Foo") }
|
data/spec/controllers/spree/api/{shipments_controller_spec.rb → v1/shipments_controller_spec.rb}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Spree::Api::ShipmentsController, :type => :controller do
|
3
|
+
describe Spree::Api::V1::ShipmentsController, :type => :controller do
|
4
4
|
render_views
|
5
5
|
let!(:shipment) { create(:shipment) }
|
6
6
|
let!(:attributes) { [:id, :tracking, :number, :cost, :shipped_at, :stock_location_name, :order_id, :shipping_rates, :shipping_methods] }
|
@@ -38,9 +38,9 @@ describe Spree::Api::ShipmentsController, :type => :controller do
|
|
38
38
|
shipment: { order_id: order.number },
|
39
39
|
stock_location_id: stock_location.to_param
|
40
40
|
}
|
41
|
-
end
|
42
|
-
|
43
|
-
subject do
|
41
|
+
end
|
42
|
+
|
43
|
+
subject do
|
44
44
|
api_post :create, params
|
45
45
|
end
|
46
46
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
module Spree
|
4
|
-
describe Api::StatesController, :type => :controller do
|
4
|
+
describe Api::V1::StatesController, :type => :controller do
|
5
5
|
render_views
|
6
6
|
|
7
7
|
let!(:state) { create(:state, :name => "Victoria") }
|
@@ -24,26 +24,30 @@ module Spree
|
|
24
24
|
end
|
25
25
|
|
26
26
|
context "pagination" do
|
27
|
+
let(:scope) { double('scope') }
|
28
|
+
|
27
29
|
before do
|
28
|
-
expect(
|
29
|
-
|
30
|
+
expect(scope).to receive_messages(last: state)
|
31
|
+
expect(State).to receive_messages(accessible_by: scope)
|
32
|
+
expect(scope).to receive_messages(order: scope)
|
33
|
+
allow(scope).to receive_message_chain(:ransack, :result, :includes).and_return(scope)
|
30
34
|
end
|
31
35
|
|
32
36
|
it "does not paginate states results when asked not to do so" do
|
33
|
-
expect(
|
34
|
-
expect(
|
37
|
+
expect(scope).not_to receive(:page)
|
38
|
+
expect(scope).not_to receive(:per)
|
35
39
|
api_get :index
|
36
40
|
end
|
37
41
|
|
38
42
|
it "paginates when page parameter is passed through" do
|
39
|
-
expect(
|
40
|
-
expect(
|
43
|
+
expect(scope).to receive(:page).with(1).and_return(scope)
|
44
|
+
expect(scope).to receive(:per).with(nil).and_return(scope)
|
41
45
|
api_get :index, :page => 1
|
42
46
|
end
|
43
47
|
|
44
48
|
it "paginates when per_page parameter is passed through" do
|
45
|
-
expect(
|
46
|
-
expect(
|
49
|
+
expect(scope).to receive(:page).with(nil).and_return(scope)
|
50
|
+
expect(scope).to receive(:per).with(25).and_return(scope)
|
47
51
|
api_get :index, :per_page => 25
|
48
52
|
end
|
49
53
|
end
|
@@ -54,7 +58,7 @@ module Spree
|
|
54
58
|
|
55
59
|
it "gets all states for a country" do
|
56
60
|
country = create(:country, :states_required => true)
|
57
|
-
state.country = country
|
61
|
+
state.country = country
|
58
62
|
state.save
|
59
63
|
|
60
64
|
api_get :index, :country_id => country.id
|
@@ -2,7 +2,7 @@ require 'shared_examples/protect_product_actions'
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
module Spree
|
5
|
-
describe
|
5
|
+
describe Api::V1::ProductsController, :type => :controller do
|
6
6
|
render_views
|
7
7
|
|
8
8
|
let!(:product) { create(:product) }
|
data/spec/controllers/spree/api/{variants_controller_spec.rb → v1/variants_controller_spec.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
module Spree
|
4
|
-
describe Api::VariantsController, :type => :controller do
|
4
|
+
describe Api::V1::VariantsController, :type => :controller do
|
5
5
|
render_views
|
6
6
|
|
7
7
|
let(:option_value) { create(:option_value) }
|
@@ -79,7 +79,7 @@ module Spree
|
|
79
79
|
# Regression test for #2141
|
80
80
|
context "a deleted variant" do
|
81
81
|
before do
|
82
|
-
variant.update_column(:deleted_at, Time.
|
82
|
+
variant.update_column(:deleted_at, Time.current)
|
83
83
|
end
|
84
84
|
|
85
85
|
it "is not returned in the results" do
|
@@ -157,7 +157,7 @@ module Spree
|
|
157
157
|
# Test for #2141
|
158
158
|
context "deleted variants" do
|
159
159
|
before do
|
160
|
-
variant.update_column(:deleted_at, Time.
|
160
|
+
variant.update_column(:deleted_at, Time.current)
|
161
161
|
end
|
162
162
|
|
163
163
|
it "are visible by admin" do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
module Spree
|
4
|
-
describe Api::ZonesController, :type => :controller do
|
4
|
+
describe Api::V1::ZonesController, :type => :controller do
|
5
5
|
render_views
|
6
6
|
|
7
7
|
let!(:attributes) { [:id, :name, :zone_members] }
|
@@ -41,14 +41,16 @@ module Spree
|
|
41
41
|
context "as an admin" do
|
42
42
|
sign_in_as_admin!
|
43
43
|
|
44
|
+
let!(:country) { create(:country) }
|
45
|
+
|
44
46
|
it "can create a new zone" do
|
45
47
|
params = {
|
46
48
|
:zone => {
|
47
49
|
:name => "North Pole",
|
48
50
|
:zone_members => [
|
49
51
|
{
|
50
|
-
:
|
51
|
-
:
|
52
|
+
zoneable_type: "Spree::Country",
|
53
|
+
zoneable_id: country.id
|
52
54
|
}
|
53
55
|
]
|
54
56
|
}
|
@@ -66,8 +68,8 @@ module Spree
|
|
66
68
|
:name => "North Pole",
|
67
69
|
:zone_members => [
|
68
70
|
{
|
69
|
-
:
|
70
|
-
:
|
71
|
+
zoneable_type: "Spree::Country",
|
72
|
+
zoneable_id: country.id
|
71
73
|
}
|
72
74
|
]
|
73
75
|
}
|
@@ -10,7 +10,7 @@ describe "Rabl Cache", :type => :request, :caching => true do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
it "doesn't create a cache key collision for models with different rabl templates" do
|
13
|
-
get "/api/variants", :token => user.spree_api_key
|
13
|
+
get "/api/v1/variants", :token => user.spree_api_key
|
14
14
|
expect(response.status).to eq(200)
|
15
15
|
|
16
16
|
# Make sure we get a non master variant
|
@@ -21,7 +21,7 @@ describe "Rabl Cache", :type => :request, :caching => true do
|
|
21
21
|
expect(variant_a['is_master']).to be false
|
22
22
|
expect(variant_a['stock_items']).not_to be_nil
|
23
23
|
|
24
|
-
get "/api/products/#{Spree::Product.first.id}", :token => user.spree_api_key
|
24
|
+
get "/api/v1/products/#{Spree::Product.first.id}", :token => user.spree_api_key
|
25
25
|
expect(response.status).to eq(200)
|
26
26
|
variant_b = JSON.parse(response.body)['variants'].last
|
27
27
|
expect(variant_b['is_master']).to be false
|
@@ -7,7 +7,7 @@ describe "Ransackable Attributes" do
|
|
7
7
|
it "does not allow the filtering of variants by order attributes" do
|
8
8
|
2.times { create(:variant) }
|
9
9
|
|
10
|
-
get "/api/variants?q[orders_email_start]=#{order.email}", token: user.spree_api_key
|
10
|
+
get "/api/v1/variants?q[orders_email_start]=#{order.email}", token: user.spree_api_key
|
11
11
|
|
12
12
|
variants_response = JSON.parse(response.body)
|
13
13
|
expect(variants_response['total_count']).to eq(Spree::Variant.count)
|
@@ -18,7 +18,7 @@ describe "Ransackable Attributes" do
|
|
18
18
|
it "does not allow the filtering of variants by user attributes" do
|
19
19
|
2.times { create(:variant) }
|
20
20
|
|
21
|
-
get "/api/variants?q[orders_user_email_start]=#{order.user.email}", token: user.spree_api_key
|
21
|
+
get "/api/v1/variants?q[orders_user_email_start]=#{order.user.email}", token: user.spree_api_key
|
22
22
|
|
23
23
|
variants_response = JSON.parse(response.body)
|
24
24
|
expect(variants_response['total_count']).to eq(Spree::Variant.count)
|
@@ -31,7 +31,7 @@ describe "Ransackable Attributes" do
|
|
31
31
|
variant = create(:variant, product: product)
|
32
32
|
other_variant = create(:variant)
|
33
33
|
|
34
|
-
get "/api/variants?q[product_name_or_sku_cont]=fritos", token: user.spree_api_key
|
34
|
+
get "/api/v1/variants?q[product_name_or_sku_cont]=fritos", token: user.spree_api_key
|
35
35
|
|
36
36
|
skus = JSON.parse(response.body)['variants'].map { |variant| variant['sku'] }
|
37
37
|
expect(skus).to include variant.sku
|
@@ -44,7 +44,7 @@ describe "Ransackable Attributes" do
|
|
44
44
|
product = create(:product, meta_title: "special product")
|
45
45
|
other_product = create(:product)
|
46
46
|
|
47
|
-
get "/api/products?q[meta_title_cont]=special", token: user.spree_api_key
|
47
|
+
get "/api/v1/products?q[meta_title_cont]=special", token: user.spree_api_key
|
48
48
|
|
49
49
|
products_response = JSON.parse(response.body)
|
50
50
|
expect(products_response['total_count']).to eq(Spree::Product.count)
|
@@ -54,7 +54,7 @@ describe "Ransackable Attributes" do
|
|
54
54
|
product = create(:product)
|
55
55
|
other_product = create(:product)
|
56
56
|
|
57
|
-
get "/api/products?q[id_eq]=#{product.id}", token: user.spree_api_key
|
57
|
+
get "/api/v1/products?q[id_eq]=#{product.id}", token: user.spree_api_key
|
58
58
|
|
59
59
|
product_names = JSON.parse(response.body)['products'].map { |product| product['name'] }
|
60
60
|
expect(product_names).to include product.name
|
@@ -67,7 +67,7 @@ describe "Ransackable Attributes" do
|
|
67
67
|
product = create(:product, name: "Fritos")
|
68
68
|
other_product = create(:product)
|
69
69
|
|
70
|
-
get "/api/products?q[name_cont]=fritos", token: user.spree_api_key
|
70
|
+
get "/api/v1/products?q[name_cont]=fritos", token: user.spree_api_key
|
71
71
|
|
72
72
|
product_names = JSON.parse(response.body)['products'].map { |product| product['name'] }
|
73
73
|
expect(product_names).to include product.name
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Version", type: :request do
|
4
|
+
let!(:countries) { 2.times.map { create :country } }
|
5
|
+
|
6
|
+
describe "/api" do
|
7
|
+
it "be a redirect" do
|
8
|
+
get "/api/countries"
|
9
|
+
expect(response).to have_http_status 301
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "/api/v1" do
|
14
|
+
it "be successful" do
|
15
|
+
get "/api/v1/countries"
|
16
|
+
expect(response).to have_http_status 200
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spree_api.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.1.0.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.1.0.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.12.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.12.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: versioncake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,134 +60,135 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
-
- CHANGELOG.md
|
64
63
|
- Gemfile
|
65
64
|
- LICENSE
|
66
65
|
- Rakefile
|
67
|
-
- app/controllers/spree/api/addresses_controller.rb
|
68
66
|
- app/controllers/spree/api/base_controller.rb
|
69
|
-
- app/controllers/spree/api/
|
70
|
-
- app/controllers/spree/api/
|
71
|
-
- app/controllers/spree/api/
|
72
|
-
- app/controllers/spree/api/
|
73
|
-
- app/controllers/spree/api/
|
74
|
-
- app/controllers/spree/api/
|
75
|
-
- app/controllers/spree/api/
|
76
|
-
- app/controllers/spree/api/
|
77
|
-
- app/controllers/spree/api/
|
78
|
-
- app/controllers/spree/api/
|
79
|
-
- app/controllers/spree/api/
|
80
|
-
- app/controllers/spree/api/
|
81
|
-
- app/controllers/spree/api/
|
82
|
-
- app/controllers/spree/api/
|
83
|
-
- app/controllers/spree/api/
|
84
|
-
- app/controllers/spree/api/
|
85
|
-
- app/controllers/spree/api/
|
86
|
-
- app/controllers/spree/api/
|
87
|
-
- app/controllers/spree/api/
|
88
|
-
- app/controllers/spree/api/
|
89
|
-
- app/controllers/spree/api/
|
90
|
-
- app/controllers/spree/api/
|
91
|
-
- app/controllers/spree/api/
|
92
|
-
- app/controllers/spree/api/
|
93
|
-
- app/controllers/spree/api/
|
94
|
-
- app/controllers/spree/api/
|
95
|
-
- app/controllers/spree/api/
|
67
|
+
- app/controllers/spree/api/v1/addresses_controller.rb
|
68
|
+
- app/controllers/spree/api/v1/checkouts_controller.rb
|
69
|
+
- app/controllers/spree/api/v1/classifications_controller.rb
|
70
|
+
- app/controllers/spree/api/v1/countries_controller.rb
|
71
|
+
- app/controllers/spree/api/v1/credit_cards_controller.rb
|
72
|
+
- app/controllers/spree/api/v1/images_controller.rb
|
73
|
+
- app/controllers/spree/api/v1/inventory_units_controller.rb
|
74
|
+
- app/controllers/spree/api/v1/line_items_controller.rb
|
75
|
+
- app/controllers/spree/api/v1/option_types_controller.rb
|
76
|
+
- app/controllers/spree/api/v1/option_values_controller.rb
|
77
|
+
- app/controllers/spree/api/v1/orders_controller.rb
|
78
|
+
- app/controllers/spree/api/v1/payments_controller.rb
|
79
|
+
- app/controllers/spree/api/v1/product_properties_controller.rb
|
80
|
+
- app/controllers/spree/api/v1/products_controller.rb
|
81
|
+
- app/controllers/spree/api/v1/promotions_controller.rb
|
82
|
+
- app/controllers/spree/api/v1/properties_controller.rb
|
83
|
+
- app/controllers/spree/api/v1/return_authorizations_controller.rb
|
84
|
+
- app/controllers/spree/api/v1/shipments_controller.rb
|
85
|
+
- app/controllers/spree/api/v1/states_controller.rb
|
86
|
+
- app/controllers/spree/api/v1/stock_items_controller.rb
|
87
|
+
- app/controllers/spree/api/v1/stock_locations_controller.rb
|
88
|
+
- app/controllers/spree/api/v1/stock_movements_controller.rb
|
89
|
+
- app/controllers/spree/api/v1/stores_controller.rb
|
90
|
+
- app/controllers/spree/api/v1/taxonomies_controller.rb
|
91
|
+
- app/controllers/spree/api/v1/taxons_controller.rb
|
92
|
+
- app/controllers/spree/api/v1/users_controller.rb
|
93
|
+
- app/controllers/spree/api/v1/variants_controller.rb
|
94
|
+
- app/controllers/spree/api/v1/zones_controller.rb
|
96
95
|
- app/helpers/spree/api/api_helpers.rb
|
97
96
|
- app/models/spree/api_configuration.rb
|
98
|
-
- app/models/spree/option_value_decorator.rb
|
99
|
-
- app/views/spree/api/addresses/show.v1.rabl
|
100
|
-
- app/views/spree/api/adjustments/show.v1.rabl
|
101
|
-
- app/views/spree/api/config/money.v1.rabl
|
102
|
-
- app/views/spree/api/config/show.v1.rabl
|
103
|
-
- app/views/spree/api/countries/index.v1.rabl
|
104
|
-
- app/views/spree/api/countries/show.v1.rabl
|
105
|
-
- app/views/spree/api/credit_cards/index.v1.rabl
|
106
|
-
- app/views/spree/api/credit_cards/show.v1.rabl
|
107
97
|
- app/views/spree/api/errors/gateway_error.v1.rabl
|
108
98
|
- app/views/spree/api/errors/invalid_api_key.v1.rabl
|
109
99
|
- app/views/spree/api/errors/invalid_resource.v1.rabl
|
110
100
|
- app/views/spree/api/errors/must_specify_api_key.v1.rabl
|
111
101
|
- app/views/spree/api/errors/not_found.v1.rabl
|
112
102
|
- app/views/spree/api/errors/unauthorized.v1.rabl
|
113
|
-
- app/views/spree/api/
|
114
|
-
- app/views/spree/api/
|
115
|
-
- app/views/spree/api/
|
116
|
-
- app/views/spree/api/
|
117
|
-
- app/views/spree/api/
|
118
|
-
- app/views/spree/api/
|
119
|
-
- app/views/spree/api/
|
120
|
-
- app/views/spree/api/
|
121
|
-
- app/views/spree/api/
|
122
|
-
- app/views/spree/api/
|
123
|
-
- app/views/spree/api/
|
124
|
-
- app/views/spree/api/
|
125
|
-
- app/views/spree/api/
|
126
|
-
- app/views/spree/api/
|
127
|
-
- app/views/spree/api/
|
128
|
-
- app/views/spree/api/
|
129
|
-
- app/views/spree/api/
|
130
|
-
- app/views/spree/api/
|
131
|
-
- app/views/spree/api/
|
132
|
-
- app/views/spree/api/
|
133
|
-
- app/views/spree/api/orders/
|
134
|
-
- app/views/spree/api/
|
135
|
-
- app/views/spree/api/
|
136
|
-
- app/views/spree/api/
|
137
|
-
- app/views/spree/api/
|
138
|
-
- app/views/spree/api/
|
139
|
-
- app/views/spree/api/
|
140
|
-
- app/views/spree/api/
|
141
|
-
- app/views/spree/api/
|
142
|
-
- app/views/spree/api/
|
143
|
-
- app/views/spree/api/
|
144
|
-
- app/views/spree/api/
|
145
|
-
- app/views/spree/api/
|
146
|
-
- app/views/spree/api/
|
147
|
-
- app/views/spree/api/
|
148
|
-
- app/views/spree/api/
|
149
|
-
- app/views/spree/api/
|
150
|
-
- app/views/spree/api/
|
151
|
-
- app/views/spree/api/
|
152
|
-
- app/views/spree/api/
|
153
|
-
- app/views/spree/api/
|
154
|
-
- app/views/spree/api/
|
155
|
-
- app/views/spree/api/
|
156
|
-
- app/views/spree/api/
|
157
|
-
- app/views/spree/api/
|
158
|
-
- app/views/spree/api/
|
159
|
-
- app/views/spree/api/
|
160
|
-
- app/views/spree/api/
|
161
|
-
- app/views/spree/api/
|
162
|
-
- app/views/spree/api/
|
163
|
-
- app/views/spree/api/
|
164
|
-
- app/views/spree/api/
|
165
|
-
- app/views/spree/api/
|
166
|
-
- app/views/spree/api/
|
167
|
-
- app/views/spree/api/
|
168
|
-
- app/views/spree/api/
|
169
|
-
- app/views/spree/api/
|
170
|
-
- app/views/spree/api/
|
171
|
-
- app/views/spree/api/
|
172
|
-
- app/views/spree/api/
|
173
|
-
- app/views/spree/api/
|
174
|
-
- app/views/spree/api/
|
175
|
-
- app/views/spree/api/
|
176
|
-
- app/views/spree/api/
|
177
|
-
- app/views/spree/api/
|
178
|
-
- app/views/spree/api/
|
179
|
-
- app/views/spree/api/
|
180
|
-
- app/views/spree/api/
|
181
|
-
- app/views/spree/api/
|
182
|
-
- app/views/spree/api/
|
183
|
-
- app/views/spree/api/
|
184
|
-
- app/views/spree/api/
|
185
|
-
- app/views/spree/api/
|
186
|
-
- app/views/spree/api/
|
187
|
-
- app/views/spree/api/
|
188
|
-
- app/views/spree/api/
|
189
|
-
- app/views/spree/api/
|
190
|
-
- app/views/spree/api/
|
103
|
+
- app/views/spree/api/v1/addresses/show.v1.rabl
|
104
|
+
- app/views/spree/api/v1/adjustments/show.v1.rabl
|
105
|
+
- app/views/spree/api/v1/config/money.v1.rabl
|
106
|
+
- app/views/spree/api/v1/config/show.v1.rabl
|
107
|
+
- app/views/spree/api/v1/countries/index.v1.rabl
|
108
|
+
- app/views/spree/api/v1/countries/show.v1.rabl
|
109
|
+
- app/views/spree/api/v1/credit_cards/index.v1.rabl
|
110
|
+
- app/views/spree/api/v1/credit_cards/show.v1.rabl
|
111
|
+
- app/views/spree/api/v1/images/index.v1.rabl
|
112
|
+
- app/views/spree/api/v1/images/new.v1.rabl
|
113
|
+
- app/views/spree/api/v1/images/show.v1.rabl
|
114
|
+
- app/views/spree/api/v1/inventory_units/show.rabl
|
115
|
+
- app/views/spree/api/v1/line_items/new.v1.rabl
|
116
|
+
- app/views/spree/api/v1/line_items/show.v1.rabl
|
117
|
+
- app/views/spree/api/v1/option_types/index.v1.rabl
|
118
|
+
- app/views/spree/api/v1/option_types/new.v1.rabl
|
119
|
+
- app/views/spree/api/v1/option_types/show.v1.rabl
|
120
|
+
- app/views/spree/api/v1/option_values/index.v1.rabl
|
121
|
+
- app/views/spree/api/v1/option_values/new.v1.rabl
|
122
|
+
- app/views/spree/api/v1/option_values/show.v1.rabl
|
123
|
+
- app/views/spree/api/v1/orders/address.v1.rabl
|
124
|
+
- app/views/spree/api/v1/orders/canceled.v1.rabl
|
125
|
+
- app/views/spree/api/v1/orders/cart.v1.rabl
|
126
|
+
- app/views/spree/api/v1/orders/complete.v1.rabl
|
127
|
+
- app/views/spree/api/v1/orders/could_not_apply_coupon.v1.rabl
|
128
|
+
- app/views/spree/api/v1/orders/could_not_transition.v1.rabl
|
129
|
+
- app/views/spree/api/v1/orders/index.v1.rabl
|
130
|
+
- app/views/spree/api/v1/orders/invalid_shipping_method.v1.rabl
|
131
|
+
- app/views/spree/api/v1/orders/mine.v1.rabl
|
132
|
+
- app/views/spree/api/v1/orders/order.v1.rabl
|
133
|
+
- app/views/spree/api/v1/orders/payment.v1.rabl
|
134
|
+
- app/views/spree/api/v1/orders/show.v1.rabl
|
135
|
+
- app/views/spree/api/v1/payments/credit_over_limit.v1.rabl
|
136
|
+
- app/views/spree/api/v1/payments/index.v1.rabl
|
137
|
+
- app/views/spree/api/v1/payments/new.v1.rabl
|
138
|
+
- app/views/spree/api/v1/payments/show.v1.rabl
|
139
|
+
- app/views/spree/api/v1/payments/update_forbidden.v1.rabl
|
140
|
+
- app/views/spree/api/v1/product_properties/index.v1.rabl
|
141
|
+
- app/views/spree/api/v1/product_properties/new.v1.rabl
|
142
|
+
- app/views/spree/api/v1/product_properties/show.v1.rabl
|
143
|
+
- app/views/spree/api/v1/products/index.v1.rabl
|
144
|
+
- app/views/spree/api/v1/products/new.v1.rabl
|
145
|
+
- app/views/spree/api/v1/products/product.v1.rabl
|
146
|
+
- app/views/spree/api/v1/products/show.v1.rabl
|
147
|
+
- app/views/spree/api/v1/promotions/handler.v1.rabl
|
148
|
+
- app/views/spree/api/v1/promotions/show.v1.rabl
|
149
|
+
- app/views/spree/api/v1/properties/index.v1.rabl
|
150
|
+
- app/views/spree/api/v1/properties/new.v1.rabl
|
151
|
+
- app/views/spree/api/v1/properties/show.v1.rabl
|
152
|
+
- app/views/spree/api/v1/return_authorizations/index.v1.rabl
|
153
|
+
- app/views/spree/api/v1/return_authorizations/new.v1.rabl
|
154
|
+
- app/views/spree/api/v1/return_authorizations/show.v1.rabl
|
155
|
+
- app/views/spree/api/v1/shared/stock_location_required.v1.rabl
|
156
|
+
- app/views/spree/api/v1/shipments/big.v1.rabl
|
157
|
+
- app/views/spree/api/v1/shipments/cannot_ready_shipment.v1.rabl
|
158
|
+
- app/views/spree/api/v1/shipments/mine.v1.rabl
|
159
|
+
- app/views/spree/api/v1/shipments/show.v1.rabl
|
160
|
+
- app/views/spree/api/v1/shipments/small.v1.rabl
|
161
|
+
- app/views/spree/api/v1/shipping_rates/show.v1.rabl
|
162
|
+
- app/views/spree/api/v1/states/index.v1.rabl
|
163
|
+
- app/views/spree/api/v1/states/show.v1.rabl
|
164
|
+
- app/views/spree/api/v1/stock_items/index.v1.rabl
|
165
|
+
- app/views/spree/api/v1/stock_items/show.v1.rabl
|
166
|
+
- app/views/spree/api/v1/stock_locations/index.v1.rabl
|
167
|
+
- app/views/spree/api/v1/stock_locations/show.v1.rabl
|
168
|
+
- app/views/spree/api/v1/stock_movements/index.v1.rabl
|
169
|
+
- app/views/spree/api/v1/stock_movements/show.v1.rabl
|
170
|
+
- app/views/spree/api/v1/stores/index.v1.rabl
|
171
|
+
- app/views/spree/api/v1/stores/show.v1.rabl
|
172
|
+
- app/views/spree/api/v1/taxonomies/index.v1.rabl
|
173
|
+
- app/views/spree/api/v1/taxonomies/jstree.rabl
|
174
|
+
- app/views/spree/api/v1/taxonomies/nested.v1.rabl
|
175
|
+
- app/views/spree/api/v1/taxonomies/new.v1.rabl
|
176
|
+
- app/views/spree/api/v1/taxonomies/show.v1.rabl
|
177
|
+
- app/views/spree/api/v1/taxons/index.v1.rabl
|
178
|
+
- app/views/spree/api/v1/taxons/jstree.rabl
|
179
|
+
- app/views/spree/api/v1/taxons/new.v1.rabl
|
180
|
+
- app/views/spree/api/v1/taxons/show.v1.rabl
|
181
|
+
- app/views/spree/api/v1/taxons/taxons.v1.rabl
|
182
|
+
- app/views/spree/api/v1/users/index.v1.rabl
|
183
|
+
- app/views/spree/api/v1/users/new.v1.rabl
|
184
|
+
- app/views/spree/api/v1/users/show.v1.rabl
|
185
|
+
- app/views/spree/api/v1/variants/big.v1.rabl
|
186
|
+
- app/views/spree/api/v1/variants/index.v1.rabl
|
187
|
+
- app/views/spree/api/v1/variants/new.v1.rabl
|
188
|
+
- app/views/spree/api/v1/variants/show.v1.rabl
|
189
|
+
- app/views/spree/api/v1/variants/small.v1.rabl
|
190
|
+
- app/views/spree/api/v1/zones/index.v1.rabl
|
191
|
+
- app/views/spree/api/v1/zones/show.v1.rabl
|
191
192
|
- config/initializers/metal_load_paths.rb
|
192
193
|
- config/locales/en.yml
|
193
194
|
- config/routes.rb
|
@@ -205,41 +206,42 @@ files:
|
|
205
206
|
- lib/spree/api/testing_support/setup.rb
|
206
207
|
- lib/spree_api.rb
|
207
208
|
- script/rails
|
208
|
-
- spec/controllers/spree/api/addresses_controller_spec.rb
|
209
209
|
- spec/controllers/spree/api/base_controller_spec.rb
|
210
|
-
- spec/controllers/spree/api/
|
211
|
-
- spec/controllers/spree/api/
|
212
|
-
- spec/controllers/spree/api/
|
213
|
-
- spec/controllers/spree/api/
|
214
|
-
- spec/controllers/spree/api/
|
215
|
-
- spec/controllers/spree/api/
|
216
|
-
- spec/controllers/spree/api/
|
217
|
-
- spec/controllers/spree/api/
|
218
|
-
- spec/controllers/spree/api/
|
219
|
-
- spec/controllers/spree/api/
|
220
|
-
- spec/controllers/spree/api/
|
221
|
-
- spec/controllers/spree/api/
|
222
|
-
- spec/controllers/spree/api/
|
223
|
-
- spec/controllers/spree/api/
|
224
|
-
- spec/controllers/spree/api/
|
225
|
-
- spec/controllers/spree/api/
|
226
|
-
- spec/controllers/spree/api/
|
227
|
-
- spec/controllers/spree/api/
|
228
|
-
- spec/controllers/spree/api/
|
229
|
-
- spec/controllers/spree/api/
|
230
|
-
- spec/controllers/spree/api/
|
231
|
-
- spec/controllers/spree/api/
|
232
|
-
- spec/controllers/spree/api/
|
233
|
-
- spec/controllers/spree/api/
|
234
|
-
- spec/controllers/spree/api/
|
235
|
-
- spec/controllers/spree/api/
|
236
|
-
- spec/controllers/spree/api/
|
237
|
-
- spec/controllers/spree/api/
|
238
|
-
- spec/controllers/spree/api/
|
210
|
+
- spec/controllers/spree/api/v1/addresses_controller_spec.rb
|
211
|
+
- spec/controllers/spree/api/v1/checkouts_controller_spec.rb
|
212
|
+
- spec/controllers/spree/api/v1/classifications_controller_spec.rb
|
213
|
+
- spec/controllers/spree/api/v1/countries_controller_spec.rb
|
214
|
+
- spec/controllers/spree/api/v1/credit_cards_controller_spec.rb
|
215
|
+
- spec/controllers/spree/api/v1/images_controller_spec.rb
|
216
|
+
- spec/controllers/spree/api/v1/inventory_units_controller_spec.rb
|
217
|
+
- spec/controllers/spree/api/v1/line_items_controller_spec.rb
|
218
|
+
- spec/controllers/spree/api/v1/option_types_controller_spec.rb
|
219
|
+
- spec/controllers/spree/api/v1/option_values_controller_spec.rb
|
220
|
+
- spec/controllers/spree/api/v1/orders_controller_spec.rb
|
221
|
+
- spec/controllers/spree/api/v1/payments_controller_spec.rb
|
222
|
+
- spec/controllers/spree/api/v1/product_properties_controller_spec.rb
|
223
|
+
- spec/controllers/spree/api/v1/products_controller_spec.rb
|
224
|
+
- spec/controllers/spree/api/v1/promotion_application_spec.rb
|
225
|
+
- spec/controllers/spree/api/v1/promotions_controller_spec.rb
|
226
|
+
- spec/controllers/spree/api/v1/properties_controller_spec.rb
|
227
|
+
- spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb
|
228
|
+
- spec/controllers/spree/api/v1/shipments_controller_spec.rb
|
229
|
+
- spec/controllers/spree/api/v1/states_controller_spec.rb
|
230
|
+
- spec/controllers/spree/api/v1/stock_items_controller_spec.rb
|
231
|
+
- spec/controllers/spree/api/v1/stock_locations_controller_spec.rb
|
232
|
+
- spec/controllers/spree/api/v1/stock_movements_controller_spec.rb
|
233
|
+
- spec/controllers/spree/api/v1/stores_controller_spec.rb
|
234
|
+
- spec/controllers/spree/api/v1/taxonomies_controller_spec.rb
|
235
|
+
- spec/controllers/spree/api/v1/taxons_controller_spec.rb
|
236
|
+
- spec/controllers/spree/api/v1/unauthenticated_products_controller_spec.rb
|
237
|
+
- spec/controllers/spree/api/v1/users_controller_spec.rb
|
238
|
+
- spec/controllers/spree/api/v1/variants_controller_spec.rb
|
239
|
+
- spec/controllers/spree/api/v1/zones_controller_spec.rb
|
239
240
|
- spec/fixtures/thinking-cat.jpg
|
240
241
|
- spec/models/spree/legacy_user_spec.rb
|
241
242
|
- spec/requests/rabl_cache_spec.rb
|
242
243
|
- spec/requests/ransackable_attributes_spec.rb
|
244
|
+
- spec/requests/version_spec.rb
|
243
245
|
- spec/shared_examples/protect_product_actions.rb
|
244
246
|
- spec/spec_helper.rb
|
245
247
|
- spec/support/controller_hacks.rb
|
@@ -261,51 +263,52 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
261
263
|
version: '0'
|
262
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
265
|
requirements:
|
264
|
-
- - "
|
266
|
+
- - ">"
|
265
267
|
- !ruby/object:Gem::Version
|
266
|
-
version:
|
268
|
+
version: 1.3.1
|
267
269
|
requirements: []
|
268
270
|
rubyforge_project:
|
269
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.4.8
|
270
272
|
signing_key:
|
271
273
|
specification_version: 4
|
272
274
|
summary: Spree's API
|
273
275
|
test_files:
|
274
|
-
- spec/controllers/spree/api/addresses_controller_spec.rb
|
275
276
|
- spec/controllers/spree/api/base_controller_spec.rb
|
276
|
-
- spec/controllers/spree/api/
|
277
|
-
- spec/controllers/spree/api/
|
278
|
-
- spec/controllers/spree/api/
|
279
|
-
- spec/controllers/spree/api/
|
280
|
-
- spec/controllers/spree/api/
|
281
|
-
- spec/controllers/spree/api/
|
282
|
-
- spec/controllers/spree/api/
|
283
|
-
- spec/controllers/spree/api/
|
284
|
-
- spec/controllers/spree/api/
|
285
|
-
- spec/controllers/spree/api/
|
286
|
-
- spec/controllers/spree/api/
|
287
|
-
- spec/controllers/spree/api/
|
288
|
-
- spec/controllers/spree/api/
|
289
|
-
- spec/controllers/spree/api/
|
290
|
-
- spec/controllers/spree/api/
|
291
|
-
- spec/controllers/spree/api/
|
292
|
-
- spec/controllers/spree/api/
|
293
|
-
- spec/controllers/spree/api/
|
294
|
-
- spec/controllers/spree/api/
|
295
|
-
- spec/controllers/spree/api/
|
296
|
-
- spec/controllers/spree/api/
|
297
|
-
- spec/controllers/spree/api/
|
298
|
-
- spec/controllers/spree/api/
|
299
|
-
- spec/controllers/spree/api/
|
300
|
-
- spec/controllers/spree/api/
|
301
|
-
- spec/controllers/spree/api/
|
302
|
-
- spec/controllers/spree/api/
|
303
|
-
- spec/controllers/spree/api/
|
304
|
-
- spec/controllers/spree/api/
|
277
|
+
- spec/controllers/spree/api/v1/addresses_controller_spec.rb
|
278
|
+
- spec/controllers/spree/api/v1/checkouts_controller_spec.rb
|
279
|
+
- spec/controllers/spree/api/v1/classifications_controller_spec.rb
|
280
|
+
- spec/controllers/spree/api/v1/countries_controller_spec.rb
|
281
|
+
- spec/controllers/spree/api/v1/credit_cards_controller_spec.rb
|
282
|
+
- spec/controllers/spree/api/v1/images_controller_spec.rb
|
283
|
+
- spec/controllers/spree/api/v1/inventory_units_controller_spec.rb
|
284
|
+
- spec/controllers/spree/api/v1/line_items_controller_spec.rb
|
285
|
+
- spec/controllers/spree/api/v1/option_types_controller_spec.rb
|
286
|
+
- spec/controllers/spree/api/v1/option_values_controller_spec.rb
|
287
|
+
- spec/controllers/spree/api/v1/orders_controller_spec.rb
|
288
|
+
- spec/controllers/spree/api/v1/payments_controller_spec.rb
|
289
|
+
- spec/controllers/spree/api/v1/product_properties_controller_spec.rb
|
290
|
+
- spec/controllers/spree/api/v1/products_controller_spec.rb
|
291
|
+
- spec/controllers/spree/api/v1/promotion_application_spec.rb
|
292
|
+
- spec/controllers/spree/api/v1/promotions_controller_spec.rb
|
293
|
+
- spec/controllers/spree/api/v1/properties_controller_spec.rb
|
294
|
+
- spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb
|
295
|
+
- spec/controllers/spree/api/v1/shipments_controller_spec.rb
|
296
|
+
- spec/controllers/spree/api/v1/states_controller_spec.rb
|
297
|
+
- spec/controllers/spree/api/v1/stock_items_controller_spec.rb
|
298
|
+
- spec/controllers/spree/api/v1/stock_locations_controller_spec.rb
|
299
|
+
- spec/controllers/spree/api/v1/stock_movements_controller_spec.rb
|
300
|
+
- spec/controllers/spree/api/v1/stores_controller_spec.rb
|
301
|
+
- spec/controllers/spree/api/v1/taxonomies_controller_spec.rb
|
302
|
+
- spec/controllers/spree/api/v1/taxons_controller_spec.rb
|
303
|
+
- spec/controllers/spree/api/v1/unauthenticated_products_controller_spec.rb
|
304
|
+
- spec/controllers/spree/api/v1/users_controller_spec.rb
|
305
|
+
- spec/controllers/spree/api/v1/variants_controller_spec.rb
|
306
|
+
- spec/controllers/spree/api/v1/zones_controller_spec.rb
|
305
307
|
- spec/fixtures/thinking-cat.jpg
|
306
308
|
- spec/models/spree/legacy_user_spec.rb
|
307
309
|
- spec/requests/rabl_cache_spec.rb
|
308
310
|
- spec/requests/ransackable_attributes_spec.rb
|
311
|
+
- spec/requests/version_spec.rb
|
309
312
|
- spec/shared_examples/protect_product_actions.rb
|
310
313
|
- spec/spec_helper.rb
|
311
314
|
- spec/support/controller_hacks.rb
|