spree_api 2.2.6 → 2.2.7
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/option_types_controller.rb +2 -2
- data/app/controllers/spree/api/payments_controller.rb +1 -1
- data/app/controllers/spree/api/taxons_controller.rb +1 -1
- data/spec/controllers/spree/api/orders_controller_spec.rb +1 -1
- data/spec/controllers/spree/api/payments_controller_spec.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 552423ad87e0055689731580be5866f71756286f
|
4
|
+
data.tar.gz: 2158c845b83c58ce9d2d1109296b2e590d61b506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4dc598439b0c5efb7dee15afc5ceaba4ba0cd34459834bf725e892540a8d76689532265f65c57ab2a603636f60802ec94b78c7e125bbb17c0b56eb18129ce49
|
7
|
+
data.tar.gz: 979ccee54a8e8906d76cda45c7d4b6424905fbc8ce3df112cddf9b911058ed850d9cdf747e11d72115ec55d35b37ac55dafd0fe4dfcbe17e162dd2d989abb99e
|
@@ -3,9 +3,9 @@ module Spree
|
|
3
3
|
class OptionTypesController < Spree::Api::BaseController
|
4
4
|
def index
|
5
5
|
if params[:ids]
|
6
|
-
@option_types = Spree::OptionType.accessible_by(current_ability, :read).where(:
|
6
|
+
@option_types = Spree::OptionType.includes(:option_values).accessible_by(current_ability, :read).where(id: params[:ids].split(','))
|
7
7
|
else
|
8
|
-
@option_types = Spree::OptionType.accessible_by(current_ability, :read).load.ransack(params[:q]).result
|
8
|
+
@option_types = Spree::OptionType.includes(:option_values).accessible_by(current_ability, :read).load.ransack(params[:q]).result
|
9
9
|
end
|
10
10
|
respond_with(@option_types)
|
11
11
|
end
|
@@ -65,7 +65,7 @@ module Spree
|
|
65
65
|
# Products#index does not do the sorting.
|
66
66
|
taxon = Spree::Taxon.find(params[:id])
|
67
67
|
@products = taxon.products.ransack(params[:q]).result
|
68
|
-
@products = @products.page(params[:page]).per(
|
68
|
+
@products = @products.page(params[:page]).per(params[:per_page] || 500)
|
69
69
|
render "spree/api/products/index"
|
70
70
|
end
|
71
71
|
|
@@ -174,7 +174,7 @@ module Spree
|
|
174
174
|
Order.should_receive(:create!).and_return(order = Spree::Order.new)
|
175
175
|
order.stub(:associate_user!)
|
176
176
|
order.stub_chain(:contents, :add).and_return(line_item = double('LineItem'))
|
177
|
-
line_item.should_receive(:update_attributes).with("special" => true)
|
177
|
+
line_item.should_receive(:update_attributes!).with("special" => true)
|
178
178
|
|
179
179
|
controller.stub(permitted_line_item_attributes: [:id, :variant_id, :quantity, :special])
|
180
180
|
api_post :create, :order => {
|
@@ -64,6 +64,11 @@ module Spree
|
|
64
64
|
api_get :index, :order_id => order.to_param
|
65
65
|
assert_unauthorized!
|
66
66
|
end
|
67
|
+
|
68
|
+
it "can view the payments for an order given the order token" do
|
69
|
+
api_get :index, :order_id => order.to_param, :order_token => order.token
|
70
|
+
json_response["payments"].first.should have_attributes(attributes)
|
71
|
+
end
|
67
72
|
end
|
68
73
|
end
|
69
74
|
|
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: 2.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.2.
|
19
|
+
version: 2.2.7
|
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: 2.2.
|
26
|
+
version: 2.2.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|