websocket-rack 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ script: "bundle exec rake spec"
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - ree
6
+ - rbx
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1 / 2011-07-29
4
+
5
+ - support for WebSocket drafts 07 and 08
6
+
3
7
  ## 0.3.0 / 2011-05-10
4
8
 
5
9
  - support for WebSocket drafts 05 and 06
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ gem 'rake'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # WebSocket Rack
1
+ # WebSocket Rack [![](http://travis-ci.org/imanel/websocket-rack.png)](http://travis-ci.org/imanel/websocket-rack)
2
2
 
3
3
  Rack-based WebSocket server
4
4
 
@@ -6,18 +6,22 @@ Rack-based WebSocket server
6
6
 
7
7
  Create sample rack config file, and inside build app basing on Rack::WebSocket::Application.
8
8
 
9
- require 'rack/websocket'
9
+ ``` ruby
10
+ require 'rack/websocket'
10
11
 
11
- class MyApp < Rack::WebSocket::Application
12
- end
12
+ class MyApp < Rack::WebSocket::Application
13
+ end
13
14
 
14
- map '/' do
15
- run MyApp.new
16
- end
15
+ map '/' do
16
+ run MyApp.new
17
+ end
18
+ ```
17
19
 
18
20
  After that just run Rack config from Rack server:
19
21
 
20
- thin -R config.ru start
22
+ ``` bash
23
+ thin -R config.ru start
24
+ ```
21
25
 
22
26
  Done.
23
27
 
@@ -25,17 +29,48 @@ Done.
25
29
 
26
30
  Rack::WebSocket::Application make following methods available:
27
31
 
32
+ ### initialize
33
+
34
+ Called once after server is started. This is place for application configuration so each instance variables from here will be available in whole application.
35
+
36
+ Example:
37
+
38
+ ``` ruby
39
+ class MyApp < Rack::WebSocket::Application
40
+ def initialize(options = {})
41
+ super
42
+ @myvar = 4
43
+ end
44
+ end
45
+ ```
46
+
47
+ It is important to include 'super' in initialize function, so application will be properly configured.
48
+
49
+ Please notice that in some servers, when 'initialize' is called, EventMachine reactor is not running yet. If you would like to configure EventMachine-based software, then you need to put it inside 'EM.next_tick' block, so this function will be called in first cycle of reactor.
50
+
51
+ Example:
52
+
53
+ ``` ruby
54
+ class MyWebSocket < Rack::WebSocket::Application
55
+ def initialize
56
+ EM.next_tick { @redis = EM::Hiredis.connect }
57
+ end
58
+ end
59
+ ```
60
+
28
61
  ### on_open(env)
29
62
 
30
63
  Called after client is connected. Rack env of client is passed as attribute.
31
64
 
32
65
  Example:
33
66
 
34
- class MyApp < Rack::WebSocket::Application
35
- def on_open(env)
36
- puts "Clien connected"
37
- end
38
- end
67
+ ``` ruby
68
+ class MyApp < Rack::WebSocket::Application
69
+ def on_open(env)
70
+ puts "Clien connected"
71
+ end
72
+ end
73
+ ```
39
74
 
40
75
  ### on_close(env)
41
76
 
@@ -43,11 +78,13 @@ Called after client is disconnected. Rack env of client is passed as attribute.
43
78
 
44
79
  Example:
45
80
 
46
- class MyApp < Rack::WebSocket::Application
47
- def on_close(env)
48
- puts "Clien disconnected"
49
- end
50
- end
81
+ ``` ruby
82
+ class MyApp < Rack::WebSocket::Application
83
+ def on_close(env)
84
+ puts "Clien disconnected"
85
+ end
86
+ end
87
+ ```
51
88
 
52
89
  ### on_message(env, msg)
53
90
 
@@ -55,11 +92,13 @@ Called after server receive message. Rack env of client is passed as attribute.
55
92
 
56
93
  Example:
57
94
 
58
- class MyApp < Rack::WebSocket::Application
59
- def on_message(env, msg)
60
- puts "Received message: " + msg
61
- end
62
- end
95
+ ``` ruby
96
+ class MyApp < Rack::WebSocket::Application
97
+ def on_message(env, msg)
98
+ puts "Received message: " + msg
99
+ end
100
+ end
101
+ ```
63
102
 
64
103
  ### on_error(env, error)
65
104
 
@@ -67,11 +106,13 @@ Called after server catch error. Variable passed is instance of Ruby Exception c
67
106
 
68
107
  Example:
69
108
 
70
- class MyApp < Rack::WebSocket::Application
71
- def on_error(env, error)
72
- puts "Error occured: " + error.message
73
- end
74
- end
109
+ ``` ruby
110
+ class MyApp < Rack::WebSocket::Application
111
+ def on_error(env, error)
112
+ puts "Error occured: " + error.message
113
+ end
114
+ end
115
+ ```
75
116
 
76
117
  ### send_data(data)
77
118
 
@@ -79,11 +120,13 @@ Sends data do client.
79
120
 
80
121
  Example:
81
122
 
82
- class MyApp < Rack::WebSocket::Application
83
- def on_open(env)
84
- send_data "Hello to you!"
85
- end
86
- end
123
+ ``` ruby
124
+ class MyApp < Rack::WebSocket::Application
125
+ def on_open(env)
126
+ send_data "Hello to you!"
127
+ end
128
+ end
129
+ ```
87
130
 
88
131
  ### close_websocket
89
132
 
@@ -91,11 +134,13 @@ Closes connection.
91
134
 
92
135
  Example:
93
136
 
94
- class MyApp < Rack::WebSocket::Application
95
- def on_open(env)
96
- close_websocket if env['REQUEST_PATH'] != '/websocket'
97
- end
98
- end
137
+ ``` ruby
138
+ class MyApp < Rack::WebSocket::Application
139
+ def on_open(env)
140
+ close_websocket if env['REQUEST_PATH'] != '/websocket'
141
+ end
142
+ end
143
+ ```
99
144
 
100
145
  ## Available variables:
101
146
 
@@ -105,16 +150,22 @@ Options passed to app on initialize.
105
150
 
106
151
  Example:
107
152
 
108
- # In config.ru
109
- map '/' do
110
- run MyApp.new :some => :variable
111
- end
112
-
113
- # In application instance
114
- @options # => { :some => :variable }
153
+ ``` ruby
154
+ # In config.ru
155
+ map '/' do
156
+ run MyApp.new :some => :variable
157
+ end
158
+
159
+ # In application instance
160
+ @options # => { :some => :variable }
161
+ ```
115
162
 
116
163
  ## FAQ
117
164
 
165
+ ### Which WebSocket drafts are supported:
166
+
167
+ Currently we support drafts -75 and -76 form old(hixie) numeration and all drafts from -00 to -08 from current(ietf-hybi) numeration.
168
+
118
169
  ### Which Rack servers are supported?
119
170
 
120
171
  Currently we are supporting following servers:
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module WebSocket
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -34,7 +34,7 @@ shared_examples_for 'all drafts' do
34
34
  conn.write(message)
35
35
  end
36
36
  it "should call 'on_message' on connection sending data with proper env and message" do
37
- TestApp.any_instance.expects(:on_message).once.with { |env, message| env.class == Hash && !env.keys.empty? && message == 'some message' }
37
+ TestApp.any_instance.expects(:on_message).once.with { |env, message| env.class == Hash && !env.keys.empty? && message == 'Hello' }
38
38
  conn = new_server_connection
39
39
  conn.write(handshake_request)
40
40
  conn.read(handshake_response.length)
@@ -13,6 +13,7 @@ shared_examples_for 'all handlers' do
13
13
  it_should_behave_like 'all drafts'
14
14
  end
15
15
 
16
+ # Also draft00
16
17
  context 'for draft76' do
17
18
  let(:handshake_request) { spec76_handshake_request }
18
19
  let(:handshake_response) { spec76_handshake_response }
@@ -21,6 +22,7 @@ shared_examples_for 'all handlers' do
21
22
  it_should_behave_like 'all drafts'
22
23
  end
23
24
 
25
+ # Drafts 01, 02 and 03 are pretty the same so one test for all
24
26
  context 'for draft03' do
25
27
  let(:handshake_request) { spec03_handshake_request }
26
28
  let(:handshake_response) { spec03_handshake_response }
@@ -28,4 +30,40 @@ shared_examples_for 'all handlers' do
28
30
 
29
31
  it_should_behave_like 'all drafts'
30
32
  end
33
+
34
+ context 'for draft05' do
35
+ let(:handshake_request) { spec05_handshake_request }
36
+ let(:handshake_response) { spec05_handshake_response }
37
+ let(:message) { spec05_message }
38
+
39
+ it_should_behave_like 'all drafts'
40
+ end
41
+
42
+ context 'for draft06' do
43
+ let(:handshake_request) { spec06_handshake_request }
44
+ let(:handshake_response) { spec06_handshake_response }
45
+ let(:message) { spec06_message }
46
+
47
+ it_should_behave_like 'all drafts'
48
+ end
49
+
50
+ context 'for draft07' do
51
+ let(:handshake_request) { spec07_handshake_request }
52
+ let(:handshake_response) { spec07_handshake_response }
53
+ let(:message) { spec07_unmasked_message }
54
+ let(:masked_message) { spec07_masked_message }
55
+
56
+ it_should_behave_like 'all drafts'
57
+ it_should_behave_like 'draft with masked messages'
58
+ end
59
+
60
+ context 'for draft08' do
61
+ let(:handshake_request) { spec08_handshake_request }
62
+ let(:handshake_response) { spec08_handshake_response }
63
+ let(:message) { spec08_unmasked_message }
64
+ let(:masked_message) { spec08_masked_message }
65
+
66
+ it_should_behave_like 'all drafts'
67
+ it_should_behave_like 'draft with masked messages'
68
+ end
31
69
  end
@@ -0,0 +1,9 @@
1
+ shared_examples_for 'draft with masked messages' do
2
+ it "should call 'on_message' on connection sending masked data with proper env and message" do
3
+ TestApp.any_instance.expects(:on_message).once.with { |env, message| env.class == Hash && !env.keys.empty? && message == 'Hello' }
4
+ conn = new_server_connection
5
+ conn.write(handshake_request)
6
+ conn.read(handshake_response.length)
7
+ conn.write(masked_message)
8
+ end
9
+ end
@@ -8,7 +8,7 @@ end
8
8
 
9
9
  def spec75_handshake_request
10
10
  <<-EOF
11
- GET / HTTP/1.1\r
11
+ GET /demo HTTP/1.1\r
12
12
  Upgrade: WebSocket\r
13
13
  Connection: Upgrade\r
14
14
  Host: localhost:#{TEST_PORT}\r
@@ -23,26 +23,27 @@ HTTP/1.1 101 Web Socket Protocol Handshake\r
23
23
  Upgrade: WebSocket\r
24
24
  Connection: Upgrade\r
25
25
  WebSocket-Origin: http://localhost:#{TEST_PORT}\r
26
- WebSocket-Location: ws://localhost:#{TEST_PORT}/\r
26
+ WebSocket-Location: ws://localhost:#{TEST_PORT}/demo\r
27
27
  \r
28
28
  EOF
29
29
  end
30
30
 
31
31
  def spec75_message
32
- "\x00some message\xff"
32
+ "\x00Hello\xff"
33
33
  end
34
34
 
35
35
  def spec76_handshake_request
36
36
  request = <<-EOF
37
- GET / HTTP/1.1\r
38
- Upgrade: WebSocket\r
39
- Connection: Upgrade\r
37
+ GET /demo HTTP/1.1\r
40
38
  Host: localhost:#{TEST_PORT}\r
39
+ Connection: Upgrade\r
40
+ Sec-WebSocket-Key2: 12998 5 Y3 1 .P00\r
41
+ Sec-WebSocket-Protocol: sample\r
42
+ Upgrade: WebSocket\r
43
+ Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r
41
44
  Origin: http://localhost:#{TEST_PORT}\r
42
- Sec-WebSocket-Key1: 18x 6]8vM;54 *(5: { U1]8 z [ 8\r
43
- Sec-WebSocket-Key2: 1_ tx7X d < nw 334J702) 7]o}` 0\r
44
45
  \r
45
- Tm[K T2u
46
+ ^n:ds[4U
46
47
  EOF
47
48
  request.rstrip
48
49
  end
@@ -52,31 +53,32 @@ def spec76_handshake_response
52
53
  HTTP/1.1 101 WebSocket Protocol Handshake\r
53
54
  Upgrade: WebSocket\r
54
55
  Connection: Upgrade\r
55
- Sec-WebSocket-Location: ws://localhost:#{TEST_PORT}/\r
56
+ Sec-WebSocket-Location: ws://localhost:#{TEST_PORT}/demo\r
56
57
  Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
58
+ Sec-WebSocket-Protocol: sample\r
57
59
  \r
58
- fQJ,fN/4F4!~K~MH
60
+ 8jKS'y:G*Co,Wxa-
59
61
  EOF
60
62
  response.rstrip
61
63
  end
62
64
 
63
65
  def spec76_message
64
- "\x00some message\xff"
66
+ "\x00Hello\xff"
65
67
  end
66
68
 
67
69
  def spec03_handshake_request
68
70
  request = <<-EOF
69
- GET / HTTP/1.1\r
70
- Upgrade: WebSocket\r
71
- Connection: Upgrade\r
71
+ GET /demo HTTP/1.1\r
72
72
  Host: localhost:#{TEST_PORT}\r
73
- Origin: http://localhost:#{TEST_PORT}\r
74
- Sec-WebSocket-Key1: 18x 6]8vM;54 *(5: { U1]8 z [ 8\r
75
- Sec-WebSocket-Key2: 1_ tx7X d < nw 334J702) 7]o}` 0\r
73
+ Connection: Upgrade\r
74
+ Sec-WebSocket-Key2: 12998 5 Y3 1 .P00\r
76
75
  Sec-WebSocket-Protocol: sample\r
76
+ Upgrade: WebSocket\r
77
+ Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r
78
+ Origin: http://localhost:#{TEST_PORT}\r
77
79
  Sec-WebSocket-Draft: 3\r
78
80
  \r
79
- Tm[K T2u
81
+ ^n:ds[4U
80
82
  EOF
81
83
  request.rstrip
82
84
  end
@@ -86,15 +88,131 @@ def spec03_handshake_response
86
88
  HTTP/1.1 101 WebSocket Protocol Handshake\r
87
89
  Upgrade: WebSocket\r
88
90
  Connection: Upgrade\r
89
- Sec-WebSocket-Location: ws://localhost:#{TEST_PORT}/\r
91
+ Sec-WebSocket-Location: ws://localhost:#{TEST_PORT}/demo\r
90
92
  Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
91
93
  Sec-WebSocket-Protocol: sample\r
92
94
  \r
93
- fQJ,fN/4F4!~K~MH
95
+ 8jKS'y:G*Co,Wxa-
94
96
  EOF
95
97
  response.rstrip
96
98
  end
97
99
 
98
100
  def spec03_message
99
- "\x04\x0Csome message"
101
+ "\x04\x05Hello"
102
+ end
103
+
104
+ def spec05_handshake_request
105
+ <<-EOF
106
+ GET /chat HTTP/1.1\r
107
+ Host: localhost:#{TEST_PORT}\r
108
+ Upgrade: websocket\r
109
+ Connection: Upgrade\r
110
+ Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r
111
+ Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
112
+ Sec-WebSocket-Protocol: chat, superchat\r
113
+ Sec-WebSocket-Version: 5\r
114
+ \r
115
+ EOF
116
+ end
117
+
118
+ def spec05_handshake_response
119
+ <<-EOF
120
+ HTTP/1.1 101 Switching Protocols\r
121
+ Upgrade: websocket\r
122
+ Connection: Upgrade\r
123
+ Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r
124
+ EOF
125
+ end
126
+
127
+ def spec05_message
128
+ "\x00\x00\x01\x00\x84\x05Ielln"
129
+ end
130
+
131
+ def spec06_handshake_request
132
+ <<-EOF
133
+ GET /chat HTTP/1.1\r
134
+ Host: localhost:#{TEST_PORT}\r
135
+ Upgrade: websocket\r
136
+ Connection: Upgrade\r
137
+ Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r
138
+ Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
139
+ Sec-WebSocket-Protocol: chat, superchat\r
140
+ Sec-WebSocket-Version: 6\r
141
+ \r
142
+ EOF
143
+ end
144
+
145
+ def spec06_handshake_response
146
+ <<-EOF
147
+ HTTP/1.1 101 Switching Protocols\r
148
+ Upgrade: websocket\r
149
+ Connection: Upgrade\r
150
+ Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r
151
+ EOF
152
+ end
153
+
154
+ def spec06_message
155
+ "\x00\x00\x01\x00\x84\x05Ielln"
156
+ end
157
+
158
+ def spec07_handshake_request
159
+ <<-EOF
160
+ GET /chat HTTP/1.1\r
161
+ Host: localhost:#{TEST_PORT}\r
162
+ Upgrade: websocket\r
163
+ Connection: Upgrade\r
164
+ Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r
165
+ Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
166
+ Sec-WebSocket-Protocol: chat, superchat\r
167
+ Sec-WebSocket-Version: 7\r
168
+ \r
169
+ EOF
170
+ end
171
+
172
+ def spec07_handshake_response
173
+ <<-EOF
174
+ HTTP/1.1 101 Switching Protocols\r
175
+ Upgrade: websocket\r
176
+ Connection: Upgrade\r
177
+ Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r
178
+ EOF
179
+ end
180
+
181
+ def spec07_unmasked_message
182
+ "\x81\x05\x48\x65\x6c\x6c\x6f"
183
+ end
184
+
185
+ def spec07_masked_message
186
+ "\x81\x85\x37\xfa\x21\x3d\x7f\x9f\x4d\x51\x58"
187
+ end
188
+
189
+ def spec08_handshake_request
190
+ <<-EOF
191
+ GET /chat HTTP/1.1\r
192
+ Host: localhost:#{TEST_PORT}\r
193
+ Upgrade: websocket\r
194
+ Connection: Upgrade\r
195
+ Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r
196
+ Sec-WebSocket-Origin: http://localhost:#{TEST_PORT}\r
197
+ Sec-WebSocket-Protocol: chat, superchat\r
198
+ Sec-WebSocket-Version: 8\r
199
+ \r
200
+ EOF
201
+ end
202
+
203
+ def spec08_handshake_response
204
+ <<-EOF
205
+ HTTP/1.1 101 Switching Protocols\r
206
+ Upgrade: websocket\r
207
+ Connection: Upgrade\r
208
+ Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r
209
+ EOF
210
+ end
211
+
212
+ def spec08_unmasked_message
213
+ "\x81\x05\x48\x65\x6c\x6c\x6f"
214
+ end
215
+
216
+ def spec08_masked_message
217
+ "\x81\x85\x37\xfa\x21\x3d\x7f\x9f\x4d\x51\x58"
100
218
  end
data/spec/thin_spec.rb CHANGED
@@ -29,6 +29,7 @@ end
29
29
  def stop_thin_server
30
30
  sleep 0.1
31
31
  @server.stop!
32
+ sleep 0.1
32
33
  @thread.kill
33
34
  sleep 0.1
34
35
  raise "Reactor still running, wtf?" if EventMachine.reactor_running?
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.description = %q{Rack-based WebSocket server}
14
14
 
15
15
  s.add_dependency 'rack'
16
- s.add_dependency 'em-websocket', '~> 0.3.0'
16
+ s.add_dependency 'em-websocket', '~> 0.3.1'
17
17
  s.add_dependency 'thin' # Temporary until we support more servers
18
18
  s.add_development_dependency 'rspec', '~> 2.4.0'
19
19
  s.add_development_dependency 'mocha'
metadata CHANGED
@@ -1,84 +1,82 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: websocket-rack
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
4
5
  prerelease:
5
- version: 0.3.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Bernard Potocki
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-10 00:00:00 +02:00
12
+ date: 2011-07-29 00:00:00.000000000 +02:00
14
13
  default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
17
16
  name: rack
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70160187655260 !ruby/object:Gem::Requirement
20
18
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
25
23
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: em-websocket
29
24
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *70160187655260
26
+ - !ruby/object:Gem::Dependency
27
+ name: em-websocket
28
+ requirement: &70160187654640 !ruby/object:Gem::Requirement
31
29
  none: false
32
- requirements:
30
+ requirements:
33
31
  - - ~>
34
- - !ruby/object:Gem::Version
35
- version: 0.3.0
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.1
36
34
  type: :runtime
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: thin
40
35
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *70160187654640
37
+ - !ruby/object:Gem::Dependency
38
+ name: thin
39
+ requirement: &70160187653460 !ruby/object:Gem::Requirement
42
40
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
47
45
  type: :runtime
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: rspec
51
46
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *70160187653460
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: &70160187650680 !ruby/object:Gem::Requirement
53
51
  none: false
54
- requirements:
52
+ requirements:
55
53
  - - ~>
56
- - !ruby/object:Gem::Version
54
+ - !ruby/object:Gem::Version
57
55
  version: 2.4.0
58
56
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: mocha
62
57
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ version_requirements: *70160187650680
59
+ - !ruby/object:Gem::Dependency
60
+ name: mocha
61
+ requirement: &70160187649040 !ruby/object:Gem::Requirement
64
62
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
69
67
  type: :development
70
- version_requirements: *id005
68
+ prerelease: false
69
+ version_requirements: *70160187649040
71
70
  description: Rack-based WebSocket server
72
- email:
71
+ email:
73
72
  - bernard.potocki@imanel.org
74
- executables:
73
+ executables:
75
74
  - thin-websocket
76
75
  extensions: []
77
-
78
76
  extra_rdoc_files: []
79
-
80
- files:
77
+ files:
81
78
  - .gitignore
79
+ - .travis.yml
82
80
  - CHANGELOG.md
83
81
  - Gemfile
84
82
  - README.md
@@ -105,40 +103,39 @@ files:
105
103
  - spec/spec_helper.rb
106
104
  - spec/support/all_drafts.rb
107
105
  - spec/support/all_handlers.rb
106
+ - spec/support/masked_messages.rb
108
107
  - spec/support/requests.rb
109
108
  - spec/thin_spec.rb
110
109
  - websocket-rack.gemspec
111
110
  has_rdoc: true
112
111
  homepage: http://github.com/imanel/websocket-rack
113
112
  licenses: []
114
-
115
113
  post_install_message:
116
114
  rdoc_options: []
117
-
118
- require_paths:
115
+ require_paths:
119
116
  - lib
120
- required_ruby_version: !ruby/object:Gem::Requirement
117
+ required_ruby_version: !ruby/object:Gem::Requirement
121
118
  none: false
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: "0"
126
- required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
124
  none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: "0"
125
+ requirements:
126
+ - - ! '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
132
129
  requirements: []
133
-
134
130
  rubyforge_project:
135
- rubygems_version: 1.6.1
131
+ rubygems_version: 1.6.2
136
132
  signing_key:
137
133
  specification_version: 3
138
134
  summary: Rack-based WebSocket server
139
- test_files:
135
+ test_files:
140
136
  - spec/spec_helper.rb
141
137
  - spec/support/all_drafts.rb
142
138
  - spec/support/all_handlers.rb
139
+ - spec/support/masked_messages.rb
143
140
  - spec/support/requests.rb
144
141
  - spec/thin_spec.rb