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 CHANGED
@@ -11,14 +11,16 @@ Add radiowaves gem to development group in Gemfile:
11
11
  gem 'radiowaves'
12
12
  end
13
13
 
14
- ## Usage
14
+ And reboot server.
15
15
 
16
- Start radiowaves websocket server:
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
- Now subscribe to ws://localhost:12010 and start receiving notifications from
21
- Rails via websocket.
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
 
@@ -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-URI'] = "ws://#{host}:#{port}"
14
+ headers['X-Radiowaves-Uri'] = "ws://#{host}:#{port}"
15
15
  end
16
16
  end
17
17
 
@@ -1,3 +1,3 @@
1
1
  module Radiowaves
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -2,6 +2,6 @@ desc 'Start radiowaves server'
2
2
  namespace :radiowaves do
3
3
  task :start do
4
4
  puts "Starting radiowaves server..."
5
- Radiowaves::Server.start!
5
+ Radiowaves::Server.new('localhost', 12017).start
6
6
  end
7
7
  end
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: