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 CHANGED
@@ -3,6 +3,8 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in radiowaves.gemspec
4
4
  gemspec
5
5
 
6
+ gem 'rails'
7
+ gem 'activesupport'
6
8
  gem 'rack-contrib'
7
9
  gem 'em-websocket'
8
10
  gem 'web-socket-ruby', :require => 'web_socket'
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-URI so a client can "discover" radiowaves server by
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.
@@ -1,4 +1,5 @@
1
1
  require 'rack/contrib/response_headers'
2
+ require 'rails/railtie'
2
3
 
3
4
  module Radiowaves
4
5
  class Railtie < ::Rails::Railtie
@@ -10,9 +10,11 @@ module Radiowaves
10
10
  end
11
11
 
12
12
  def start
13
- ActiveSupport::Notifications.subscribe('process_action.action_controller') do |*args|
14
- event = ActiveSupport::Notifications::Event.new(*args).to_json
15
- @client.send(event)
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
 
@@ -1,3 +1,3 @@
1
1
  module Radiowaves
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  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.3
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-11-24 00:00:00.000000000 Z
12
+ date: 2012-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack-contrib