wedge 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roda/plugins/wedge.rb +9 -4
- data/lib/wedge/component.rb +3 -2
- data/lib/wedge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d62dd5b3067bf262e99e9b85580f10c6f69053a0
|
4
|
+
data.tar.gz: 39b1045a8fd84f04692be637f9ad8316596fdb3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74e631d8f30318eba1c883e2f3419c00e3a94d75ad9fff551abd1186e039d8671efe6c098ff915a67ebb0443cab72e622333e5c0137fa5973c14c099ee3b6b75
|
7
|
+
data.tar.gz: 14311787e2080870c0b1a5281d4d18a52ddba761a688d94a2261ae5188e13e9172cb02aa3edfe6daeb7449d0820bf5873653dba971d09ec062cba0f710fbfd4d
|
data/lib/roda/plugins/wedge.rb
CHANGED
@@ -64,11 +64,16 @@ class Roda
|
|
64
64
|
end
|
65
65
|
|
66
66
|
data = data.indifferent
|
67
|
-
name = data.delete(:
|
68
|
-
method_called = data.delete(:
|
69
|
-
method_args = data.delete(:
|
67
|
+
name = data.delete(:wedge_name)
|
68
|
+
method_called = data.delete(:wedge_method_called)
|
69
|
+
method_args = data.delete(:wedge_method_args)
|
70
70
|
|
71
|
-
|
71
|
+
if method_args == 'wedge_data' && data
|
72
|
+
method_args = [data]
|
73
|
+
res = scope.wedge(name).send(method_called, *method_args) || ''
|
74
|
+
else
|
75
|
+
res = scope.wedge(name, data).send(method_called, *method_args) || ''
|
76
|
+
end
|
72
77
|
|
73
78
|
scope.response.headers["BIO-CSRF-TOKEN"] = scope.csrf_token if scope.methods.include? :csrf_token
|
74
79
|
|
data/lib/wedge/component.rb
CHANGED
@@ -199,8 +199,9 @@ module Wedge
|
|
199
199
|
payload = client_wedge_opts.reject do |k, _|
|
200
200
|
%w(html tmpl requires plugins object_events js_loaded).include? k
|
201
201
|
end
|
202
|
-
payload[:
|
203
|
-
payload[:
|
202
|
+
payload[:wedge_name] = payload[:name]
|
203
|
+
payload[:wedge_method_called] = meth
|
204
|
+
payload[:wedge_method_args] = args
|
204
205
|
|
205
206
|
HTTP.post("#{Wedge.assets_url}/#{path_name}.call",
|
206
207
|
headers: {
|
data/lib/wedge/version.rb
CHANGED