grape-oink 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grape/middleware/oink_middleware.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0df3168f656f94990d48ae358a9915a0d14f5cb
|
4
|
+
data.tar.gz: bb8eedc1643134672e26b21e008561812bcbb56e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cac0b78c6b4c5f984954b4099c53f91ba6c9933de6791799ac9a43bbd5557693ee99fe30a6fd85317d6e54bddf9f6ceedf43d59095f3155382d93fa5e9d0c249
|
7
|
+
data.tar.gz: fdfdc7896681670639ac8f289a5c466073aa787f05f52aee0e219cdf308310aec26f9ff93f7b588dce5366385b3c6eae3a040d33e5a94cdea5d6490c95c804dc
|
@@ -3,13 +3,14 @@ module Grape
|
|
3
3
|
class OinkMiddleware < Grape::Middleware::Base
|
4
4
|
def before
|
5
5
|
options = env['api.endpoint'].try(:options)
|
6
|
-
|
6
|
+
|
7
7
|
if options.present?
|
8
8
|
controller = options[:for].to_s.split("::").last.underscore
|
9
9
|
action = options[:path].try(:first)
|
10
10
|
if action
|
11
|
-
action.
|
12
|
-
action.gsub
|
11
|
+
action = action.to_s
|
12
|
+
action = action.gsub("/", "sl_")
|
13
|
+
action = action.gsub(":", "col_")
|
13
14
|
end
|
14
15
|
method = options[:method].try(:first)
|
15
16
|
env_action = "#{action}_#{method}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-oink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Wainzinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|