roda-component 0.1.53 → 0.1.54
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.rb +1 -1
- data/lib/roda/component/events.rb +1 -1
- data/lib/roda/component/faye.rb +2 -0
- data/lib/roda/component/version.rb +1 -1
- 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: ac93227aa38ca66d828975be429d53f4f49b4829
|
4
|
+
data.tar.gz: 89e584ade93b145089a3a881aa244eaf6a083707
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f25e8aa49e8302ec65cee1f801d4bf85d4a5a345fa194738388c0893e8058fd2e7fa9bc7b6d415ed0685a29035618b7aaea7ee0be789ad8f71ab99df6b3cbed9
|
7
|
+
data.tar.gz: a5548d6a14d481a23bedc91c061427225b4504c60f4b4f0502e653e2e36b2d6f8af558e9a40934bfdb103c65d44584665e0cdf05261758fe762d83af683811ca
|
data/lib/roda/component.rb
CHANGED
@@ -93,7 +93,7 @@ class Roda
|
|
93
93
|
def _initialize(scope = false)
|
94
94
|
@_scope = scope if scope
|
95
95
|
|
96
|
-
if client? && !$component_opts[:faye][:"#{self.class._name}"]
|
96
|
+
if $faye && client? && !$component_opts[:faye][:"#{self.class._name}"]
|
97
97
|
$component_opts[:faye][:"#{self.class._name}"] = true
|
98
98
|
|
99
99
|
$faye.subscribe "/components/#{self.class._name}" do |msg|
|
data/lib/roda/component/faye.rb
CHANGED
@@ -19,6 +19,8 @@ if RUBY_ENGINE == 'opal'
|
|
19
19
|
attr_accessor :disconnected, :online
|
20
20
|
|
21
21
|
def initialize url
|
22
|
+
return false unless `(typeof Faye === 'function')`
|
23
|
+
|
22
24
|
super `new Faye.Client(#{url})`
|
23
25
|
set_header 'X-CSRF-TOKEN', Element.find('meta[name=_csrf]').attr('content')
|
24
26
|
add_extension({
|
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.1.
|
4
|
+
version: 0.1.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|