breakout 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/Gemfile +4 -0
- data/README.md +31 -0
- data/Rakefile +53 -0
- data/_LICENSE +20 -0
- data/breakout.gemspec +21 -0
- data/examples/chat.rb +27 -0
- data/examples/echo.rb +10 -0
- data/examples/ping.rb +9 -0
- data/examples/public/javascripts/chat.js +35 -0
- data/examples/public/javascripts/echo.js +50 -0
- data/examples/public/javascripts/jquery-1.4.2.min.js +154 -0
- data/examples/public/javascripts/ping.js +34 -0
- data/examples/web_app.rb +72 -0
- data/examples/worker_app.rb +13 -0
- data/lib/breakout.rb +13 -0
- data/lib/breakout/api.rb +36 -0
- data/lib/breakout/app.rb +41 -0
- data/lib/breakout/config.rb +50 -0
- data/lib/breakout/railtie.rb +9 -0
- data/lib/breakout/socket.rb +25 -0
- data/lib/breakout/version.rb +4 -0
- data/lib/breakout/web_socket.rb +295 -0
- data/lib/breakout/worker.rb +20 -0
- data/spec/breakout_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- metadata +74 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
module Breakout
|
2
|
+
module Worker
|
3
|
+
WORKERS = Array.new
|
4
|
+
|
5
|
+
def self.included(base)
|
6
|
+
WORKERS << base
|
7
|
+
|
8
|
+
base.class_eval do
|
9
|
+
include(API)
|
10
|
+
attr_accessor :socket
|
11
|
+
end
|
12
|
+
|
13
|
+
base.instance_eval do
|
14
|
+
def route
|
15
|
+
name.downcase
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: breakout
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Steve Masterman
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-05-01 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
description: Breakout routes messages among web browsers and workers using WebSockets.
|
16
|
+
email:
|
17
|
+
- steve@vermonster.com
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- Gemfile
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- _LICENSE
|
27
|
+
- breakout.gemspec
|
28
|
+
- examples/chat.rb
|
29
|
+
- examples/echo.rb
|
30
|
+
- examples/ping.rb
|
31
|
+
- examples/public/javascripts/chat.js
|
32
|
+
- examples/public/javascripts/echo.js
|
33
|
+
- examples/public/javascripts/jquery-1.4.2.min.js
|
34
|
+
- examples/public/javascripts/ping.js
|
35
|
+
- examples/web_app.rb
|
36
|
+
- examples/worker_app.rb
|
37
|
+
- lib/breakout.rb
|
38
|
+
- lib/breakout/api.rb
|
39
|
+
- lib/breakout/app.rb
|
40
|
+
- lib/breakout/config.rb
|
41
|
+
- lib/breakout/railtie.rb
|
42
|
+
- lib/breakout/socket.rb
|
43
|
+
- lib/breakout/version.rb
|
44
|
+
- lib/breakout/web_socket.rb
|
45
|
+
- lib/breakout/worker.rb
|
46
|
+
- spec/breakout_spec.rb
|
47
|
+
- spec/spec.opts
|
48
|
+
- spec/spec_helper.rb
|
49
|
+
has_rdoc: true
|
50
|
+
homepage: https://github.com/steve9001/breakout
|
51
|
+
licenses: []
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project: breakout
|
70
|
+
rubygems_version: 1.6.2
|
71
|
+
signing_key:
|
72
|
+
specification_version: 3
|
73
|
+
summary: Breakout routes messages among web browsers and workers using WebSockets.
|
74
|
+
test_files: []
|