websocketable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/websocketable/blueprinter/helper.rb +23 -0
- data/lib/websocketable/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2af89500391e7ebc351cf82252baa67fd9509e07d0668401715199fa5268865
|
4
|
+
data.tar.gz: d7c231918f5428ae5a54f427ac7cd4a8210487b89098615f49e787a263764409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6b27d0e616cc47403422db1b6a62a455785f14ad076cf34e727cff7875c8148af563edb4a18693baf6a4cb45ba3ef2038b14cb0a8a4f54f32e3c6d313f12b9a
|
7
|
+
data.tar.gz: 2eab34409ec6c37ff65ea6ef262c745e3deb07f7122c80775de666734220e1717a8d6eb182cb350c6170003329fe339fd5d90f8b36126b5317e4591c3cd5dbc3
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Websocketable
|
2
|
+
module Blueprinter
|
3
|
+
module Helper
|
4
|
+
|
5
|
+
def broadcast_for_channel(channel, blueprint, resource)
|
6
|
+
ActionCable.server.broadcast channel, hashable(blueprint, resource)
|
7
|
+
head :ok
|
8
|
+
end
|
9
|
+
|
10
|
+
def broadcast_to_channel(channel, resource)
|
11
|
+
channel.broadcast_to resource, hashable(blueprint, resource)
|
12
|
+
head :ok
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def hashable(blueprint, resource)
|
18
|
+
blueprint.render_as_hash(resource)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocketable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Heft
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/generators/templates/initializer.rb
|
57
57
|
- lib/generators/websocketable/install_generator.rb
|
58
58
|
- lib/websocketable.rb
|
59
|
+
- lib/websocketable/blueprinter/helper.rb
|
59
60
|
- lib/websocketable/configuration.rb
|
60
61
|
- lib/websocketable/version.rb
|
61
62
|
- websocketable.gemspec
|