spree_api 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/routes.rb +6 -2
- 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: 4b8ad4edd7469cb2c67174d856ae8aa1284f183c
|
4
|
+
data.tar.gz: 2ab89546cef6d0e1a1ab7b89ae248030db2f4704
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a3c1859e39e8040005fe536d1d26e53e8dc6179a318435d74c26cf7ec7ccff9207e1bb26a3f30776175eac0414788158030d391d814da48d84cf8910be4811
|
7
|
+
data.tar.gz: dec9414e9c0f82be84fcd5a6c8a019ed10964c92e053610ee6a0df383bd44db14176adaf4bc7b094f05f83d6a22f76a17e2369f4440c20b2feb36b80a3deb985
|
data/config/routes.rb
CHANGED
@@ -115,10 +115,14 @@ Spree::Core::Engine.add_routes do
|
|
115
115
|
get '/taxons/products', to: 'taxons#products', as: :taxon_products
|
116
116
|
end
|
117
117
|
|
118
|
-
|
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]
|
119
120
|
|
120
121
|
match '*path', to: redirect{ |params, request|
|
121
|
-
"
|
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}"
|
122
126
|
}, via: [:get, :post, :put, :patch, :delete]
|
123
127
|
end
|
124
128
|
end
|
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.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-04 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: 3.1.
|
19
|
+
version: 3.1.5
|
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.1.
|
26
|
+
version: 3.1.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|