roda-component 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/roda/component.rb +2 -2
- data/lib/roda/component/version.rb +1 -1
- data/lib/roda/plugins/component.rb +10 -4
- 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: 593646329d5c319bc13063df03ac54d68dad4ea9
|
4
|
+
data.tar.gz: a10c68c8fa64cb522d3d4305c548a158101f2271
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6b11c2f8010465b3b51fb37c074ae64fb5d2d1237f28b7d070620d82b0268830ca815c829a34dc70bfe1b7ef740ca2a7c688dd65e9f95df69b68509e51181bb
|
7
|
+
data.tar.gz: 891ac724dd26eea83b5e30295f008e56c554bc9138346ec6f11b6aa3a83b114bd447157c41a4017698aca49859a73d10dbfa56b64f1adb1adcc17f008366ee1a
|
data/lib/roda/component.rb
CHANGED
@@ -156,7 +156,7 @@ class Roda
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def method_missing method, *args, &block
|
159
|
-
if server && app.respond_to?(method, true)
|
159
|
+
if server? && app.respond_to?(method, true)
|
160
160
|
app.send method, *args, &block
|
161
161
|
else
|
162
162
|
super
|
@@ -219,7 +219,7 @@ class Roda
|
|
219
219
|
end
|
220
220
|
|
221
221
|
def method_missing method, *args, &block
|
222
|
-
if server && scope.respond_to?(method, true)
|
222
|
+
if server? && scope.respond_to?(method, true)
|
223
223
|
scope.send method, *args, &block
|
224
224
|
else
|
225
225
|
super
|
@@ -104,14 +104,20 @@ class Roda
|
|
104
104
|
if trigger
|
105
105
|
comp_response = comp.trigger trigger, options
|
106
106
|
else
|
107
|
-
|
108
|
-
|
107
|
+
# We want to make sure it's not a method that already exists in ruba
|
108
|
+
# otherwise that would give us a false positive.
|
109
|
+
if comp.respond_to?(action) && !"#{comp.method(action)}"[/\(Kernel\)/]
|
110
|
+
if comp.method(action).parameters.length > 0
|
111
|
+
comp_response = comp.send(action, options, &block)
|
112
|
+
else
|
113
|
+
comp_response = comp.send(action, &block)
|
114
|
+
end
|
109
115
|
else
|
110
|
-
|
116
|
+
fail "##{action} doesn't exist for #{comp.class}"
|
111
117
|
end
|
112
118
|
end
|
113
119
|
|
114
|
-
if
|
120
|
+
if req && !req.env['RODA_COMPONENT_FROM_FAYE']
|
115
121
|
if comp_response.is_a? Roda::Component::DOM
|
116
122
|
content = comp_response.to_html
|
117
123
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roda-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|