spree_api 2.3.8 → 2.3.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55e3c818a98a4a747b894632ab026dd947f8cb68
|
4
|
+
data.tar.gz: 0c4ab51cfef6c0f9a22b7a792642f4259439afa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7b7a7cdecaba8bcfe43cc8391ec855f1b2194b7d7de64d48d8676d8152231e4f7c472f9818e1c6492de99a4f6352f528cef6d9bbdc534fded9c3bc615fa38e9
|
7
|
+
data.tar.gz: 15ce0fba310cd35a6eac7a7057cd539831713aeecb3addc5adc14c9a7b4fb9194d202ad79edc1e4ad74447a87ac1a40c5afc10560d6b701470ff63aef41e02a4
|
@@ -16,8 +16,6 @@ module Spree
|
|
16
16
|
before_filter :authenticate_user
|
17
17
|
before_filter :load_user_roles
|
18
18
|
|
19
|
-
after_filter :set_jsonp_format
|
20
|
-
|
21
19
|
rescue_from Exception, with: :error_during_processing
|
22
20
|
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
23
21
|
rescue_from CanCan::AccessDenied, with: :unauthorized
|
@@ -27,13 +25,6 @@ module Spree
|
|
27
25
|
|
28
26
|
ssl_allowed
|
29
27
|
|
30
|
-
def set_jsonp_format
|
31
|
-
if params[:callback] && request.get?
|
32
|
-
self.response_body = "#{params[:callback]}(#{response.body})"
|
33
|
-
headers["Content-Type"] = 'application/javascript'
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
28
|
def map_nested_attributes_keys(klass, attributes)
|
38
29
|
nested_keys = klass.nested_attributes_options.keys
|
39
30
|
attributes.inject({}) do |h, (k,v)|
|
@@ -145,21 +145,6 @@ module Spree
|
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
148
|
-
context "jsonp" do
|
149
|
-
it "retrieves a list of products of jsonp" do
|
150
|
-
api_get :index, {:callback => 'callback'}
|
151
|
-
expect(response.body).to match(/^callback\(.*\)$/)
|
152
|
-
expect(response.header['Content-Type']).to include('application/javascript')
|
153
|
-
end
|
154
|
-
|
155
|
-
# Regression test for #4332
|
156
|
-
it "does not escape quotes" do
|
157
|
-
api_get :index, {:callback => 'callback'}
|
158
|
-
expect(response.body).to match(/^callback\({"count":1,"total_count":1/)
|
159
|
-
expect(response.header['Content-Type']).to include('application/javascript')
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
148
|
it "can search for products" do
|
164
149
|
create(:product, :name => "The best product in the world")
|
165
150
|
api_get :index, :q => { :name_cont => "best" }
|
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.3.
|
4
|
+
version: 2.3.9
|
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-
|
11
|
+
date: 2015-03-10 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.3.
|
19
|
+
version: 2.3.9
|
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.3.
|
26
|
+
version: 2.3.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|