spree_api 2.2.11 → 2.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ff260b616c251dba5224a5fe2fdf911596fade7
4
- data.tar.gz: c575c8571b0e883b95ff1f71570c1e1503e1bc7a
3
+ metadata.gz: 7c82df8c8bf25d14da8c58e1eca3ddeceba500a1
4
+ data.tar.gz: cfd8010ad17c0e023831dfb687c1b4dfafec2f7b
5
5
  SHA512:
6
- metadata.gz: 7c83992f15eec1cf04aa7adfeb92f3805f2845d422dc23b49514735d2e79b2bfe75aae047d536b9352c97653ebf3b617668acba0b00ed40ea0c709b1dd8c19ad
7
- data.tar.gz: 7ab3450b8d301c6ade86486b7ddc7e514b14c07561a0919c7cad3ad120ea1d071c7ffeb6a40191022040b74b0316969bc4b1c165f17a71be2c124b64f16529ee
6
+ metadata.gz: f320a4ef5695007ee32028b06fc4bce5fe5c044818984d612a46b19a45cbe54086a04c262bd71397b242d912ae8c01f7b7de7b282e034a06cc3083b169f49de6
7
+ data.tar.gz: 2611228601a1b147e6dc777f0b0946f6b774db8c925939f8b12791777069877b539a6cf6c1ceeb8d2c8948d0429242932d7ec9239896ad546f4a02ff60227577
@@ -14,7 +14,7 @@ module Spree
14
14
  end
15
15
 
16
16
  def template
17
- request.headers['X-Spree-Template'] || controller.params[:template] || options[:default_template]
17
+ options[:default_template]
18
18
  end
19
19
 
20
20
  def api_behavior(error)
@@ -67,34 +67,6 @@ module Spree
67
67
  json_response["per_page"].should == Kaminari.config.default_per_page
68
68
  end
69
69
 
70
- context "specifying a rabl template for a custom action" do
71
- before do
72
- Spree::Api::ProductsController.class_eval do
73
- def custom_show
74
- @product = find_product(params[:id])
75
- respond_with(@product)
76
- end
77
- end
78
- end
79
-
80
- it "uses the specified custom template through the request header" do
81
- request.headers['X-Spree-Template'] = 'show'
82
- api_get :custom_show, :id => product.id
83
- response.should render_template('spree/api/products/show')
84
- end
85
-
86
- it "uses the specified custom template through the template URL parameter" do
87
- api_get :custom_show, :id => product.id, :template => 'show'
88
- response.should render_template('spree/api/products/show')
89
- end
90
-
91
- it "falls back to the default template if the specified template does not exist" do
92
- request.headers['X-Spree-Template'] = 'invoice'
93
- api_get :show, :id => product.id
94
- response.should render_template('spree/api/products/show')
95
- end
96
- end
97
-
98
70
  context "product has more than one price" do
99
71
  before { product.master.prices.create currency: "EUR", amount: 22 }
100
72
 
@@ -38,28 +38,6 @@ module Spree
38
38
  json_response['zone_members'].size.should eq @zone.zone_members.count
39
39
  end
40
40
 
41
- context "specifying a rabl template to use" do
42
- before do
43
- Spree::Api::ZonesController.class_eval do
44
- def custom_show
45
- respond_with(zone)
46
- end
47
- end
48
- end
49
-
50
- it "uses the specified template" do
51
- request.headers['X-Spree-Template'] = 'show'
52
- api_get :custom_show, :id => @zone.id
53
- response.should render_template('spree/api/zones/show')
54
- end
55
-
56
- it "falls back to the default template if the specified template does not exist" do
57
- request.headers['X-Spree-Template'] = 'invoice'
58
- api_get :show, :id => @zone.id
59
- response.should render_template('spree/api/zones/show')
60
- end
61
- end
62
-
63
41
  context "as an admin" do
64
42
  sign_in_as_admin!
65
43
 
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.11
4
+ version: 2.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-07-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.11
19
+ version: 2.2.12
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.11
26
+ version: 2.2.12
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rabl
29
29
  requirement: !ruby/object:Gem::Requirement