roda-component 0.1.60 → 0.1.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roda/component/version.rb +1 -1
- data/lib/roda/plugins/component.rb +15 -12
- 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: efa2ffbbf6237d987b59f1dc0a46254ce509d231
|
4
|
+
data.tar.gz: 1b9e42b971f078cec77123a9ddb2c94cd8e62381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e1237972c3ce8c333576d327d98d58b0e0e4ea2766f6d38fa4a3285476236c6df78bfa5ed6c0583494018494bc58c01fe2691f33637dd8c4305e8bf161f761
|
7
|
+
data.tar.gz: c6894cc9343b48f906c7f55d36a1575d24ab532c2dfdffa9aa83ed387aba4cfdaac684b7b228767fefb8f4f116d36e689ea1d12df06419e4fd2a4859b98453a2
|
@@ -26,6 +26,7 @@ class Roda
|
|
26
26
|
opts[:path] ||= 'components'
|
27
27
|
opts[:route] ||= 'components'
|
28
28
|
opts[:debug] ||= false
|
29
|
+
opts[:faye] ||= true
|
29
30
|
opts[:assets_route] ||= 'assets/components'
|
30
31
|
opts[:class] ||= Roda::Component
|
31
32
|
opts[:settings] ||= {}
|
@@ -36,18 +37,20 @@ class Roda
|
|
36
37
|
opts[:redis_namespace] ||= 'roda:component:'
|
37
38
|
opts[:cache][:tmpl] ||= {}
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
if opts[:faye]
|
41
|
+
app.use(Faye::RackAdapter, {
|
42
|
+
mount: '/faye',
|
43
|
+
extensions: [
|
44
|
+
Roda::Component::Faye::CsrfProtection.new,
|
45
|
+
Roda::Component::Faye::ChannelManager.new
|
46
|
+
],
|
47
|
+
engine: {
|
48
|
+
type: Faye::Redis,
|
49
|
+
uri: opts[:redis_uri],
|
50
|
+
namespace: opts[:redis_namespace]
|
51
|
+
}
|
52
|
+
})
|
53
|
+
end
|
51
54
|
|
52
55
|
# Roda::Component::Ohm.redis = Redic.new opts[:redis_uri] || 'redis://localhost:6379'
|
53
56
|
|