radiowaves 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -6
- data/lib/radiowaves/railtie.rb +1 -1
- data/lib/radiowaves/version.rb +1 -1
- data/lib/tasks/radiowaves.tasks +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -11,14 +11,16 @@ Add radiowaves gem to development group in Gemfile:
|
|
11
11
|
gem 'radiowaves'
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
And reboot server.
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
bundle exec rake radiowaves:start
|
16
|
+
WebSocket server will start in a seperated thread during Rails boot
|
17
|
+
and Rails Notifications will be published on ws://localhost:12017
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
Also response header will contain information about server URI under
|
20
|
+
X-Radiowaves-URI so a client can "discover" radiowaves server by
|
21
|
+
inspecting header.
|
22
|
+
|
23
|
+
Tested to work with: pow and WEBrick.
|
22
24
|
|
23
25
|
## Licence
|
24
26
|
|
data/lib/radiowaves/railtie.rb
CHANGED
@@ -11,7 +11,7 @@ module Radiowaves
|
|
11
11
|
|
12
12
|
initializer 'radiowaves.add_uri_to_headers' do |app|
|
13
13
|
app.middleware.use Rack::ResponseHeaders do |headers|
|
14
|
-
headers['X-Radiowaves-
|
14
|
+
headers['X-Radiowaves-Uri'] = "ws://#{host}:#{port}"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
data/lib/radiowaves/version.rb
CHANGED
data/lib/tasks/radiowaves.tasks
CHANGED