radiowaves 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/README.md +2 -2
- data/lib/radiowaves/railtie.rb +1 -0
- data/lib/radiowaves/transmitter.rb +5 -3
- data/lib/radiowaves/version.rb +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -16,8 +16,8 @@ And reboot server.
|
|
16
16
|
WebSocket server will start in a seperated thread during Rails boot
|
17
17
|
and Rails Notifications will be published on ws://localhost:12017
|
18
18
|
|
19
|
-
Also response header will contain information about server URI under
|
20
|
-
X-Radiowaves-
|
19
|
+
Also, response header will contain information about server URI under
|
20
|
+
X-Radiowaves-Uri so a client can "discover" radiowaves server by
|
21
21
|
inspecting header.
|
22
22
|
|
23
23
|
Tested to work with: pow and WEBrick.
|
data/lib/radiowaves/railtie.rb
CHANGED
@@ -10,9 +10,11 @@ module Radiowaves
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def start
|
13
|
-
ActiveSupport::Notifications.subscribe
|
14
|
-
event = ActiveSupport::Notifications::Event.new(*args)
|
15
|
-
|
13
|
+
ActiveSupport::Notifications.subscribe do |*args|
|
14
|
+
event = ActiveSupport::Notifications::Event.new(*args)
|
15
|
+
json_event = event.to_json
|
16
|
+
logger.debug json_event
|
17
|
+
@client.send json_event
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
data/lib/radiowaves/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiowaves
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack-contrib
|