faye 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of faye might be problematic. Click here for more details.

Files changed (54) hide show
  1. data/History.txt +15 -3
  2. data/README.rdoc +2 -6
  3. data/lib/faye-browser-min.js +1 -1
  4. data/lib/faye.rb +25 -36
  5. data/lib/faye/adapters/rack_adapter.rb +43 -22
  6. data/lib/faye/engines/connection.rb +7 -10
  7. data/lib/faye/engines/memory.rb +28 -28
  8. data/lib/faye/engines/proxy.rb +109 -0
  9. data/lib/faye/mixins/logging.rb +1 -8
  10. data/lib/faye/mixins/timeouts.rb +1 -1
  11. data/lib/faye/protocol/channel.rb +3 -3
  12. data/lib/faye/protocol/client.rb +50 -45
  13. data/lib/faye/protocol/extensible.rb +11 -18
  14. data/lib/faye/protocol/server.rb +53 -38
  15. data/lib/faye/transport/http.rb +49 -27
  16. data/lib/faye/transport/transport.rb +3 -1
  17. data/lib/faye/transport/web_socket.rb +6 -10
  18. data/lib/faye/util/namespace.rb +2 -2
  19. data/spec/browser.html +3 -1
  20. data/spec/encoding_helper.rb +7 -0
  21. data/spec/javascript/client_spec.js +0 -5
  22. data/spec/javascript/engine/memory_spec.js +7 -0
  23. data/spec/javascript/engine_spec.js +22 -57
  24. data/spec/javascript/server/handshake_spec.js +10 -6
  25. data/spec/javascript/server/integration_spec.js +11 -10
  26. data/spec/javascript/server/publish_spec.js +85 -0
  27. data/spec/javascript/server_spec.js +5 -51
  28. data/spec/node.js +6 -6
  29. data/spec/ruby/client_spec.rb +1 -1
  30. data/spec/ruby/engine/memory_spec.rb +7 -0
  31. data/spec/ruby/{engine_spec.rb → engine_examples.rb} +28 -34
  32. data/spec/ruby/rack_adapter_spec.rb +1 -1
  33. data/spec/ruby/server/handshake_spec.rb +10 -6
  34. data/spec/ruby/server/publish_spec.rb +81 -0
  35. data/spec/ruby/server_spec.rb +6 -44
  36. data/spec/spec_helper.rb +5 -18
  37. data/spec/testswarm +1 -5
  38. metadata +105 -180
  39. data/lib/faye/engines/base.rb +0 -66
  40. data/lib/faye/engines/redis.rb +0 -225
  41. data/lib/faye/thin_extensions.rb +0 -75
  42. data/lib/faye/util/web_socket.rb +0 -89
  43. data/lib/faye/util/web_socket/api.rb +0 -103
  44. data/lib/faye/util/web_socket/client.rb +0 -82
  45. data/lib/faye/util/web_socket/draft75_parser.rb +0 -53
  46. data/lib/faye/util/web_socket/draft76_parser.rb +0 -53
  47. data/lib/faye/util/web_socket/protocol8_parser.rb +0 -324
  48. data/spec/javascript/web_socket/client_spec.js +0 -121
  49. data/spec/javascript/web_socket/draft75parser_spec.js +0 -39
  50. data/spec/javascript/web_socket/protocol8parser_spec.js +0 -153
  51. data/spec/redis.conf +0 -42
  52. data/spec/ruby/web_socket/client_spec.rb +0 -126
  53. data/spec/ruby/web_socket/draft75_parser_spec.rb +0 -41
  54. data/spec/ruby/web_socket/protocol8_parser_spec.rb +0 -145
@@ -4,21 +4,8 @@ require dir + '/../lib/faye'
4
4
  require dir + '/../vendor/em-rspec/lib/em-rspec'
5
5
  require 'rack/test'
6
6
 
7
- module EncodingHelper
8
- def encode(message)
9
- message.respond_to?(:force_encoding) ?
10
- message.force_encoding("UTF-8") :
11
- message
12
- end
13
-
14
- def bytes(string)
15
- count = string.respond_to?(:bytes) ? string.bytes.count : string.size
16
- (0...count).map do |i|
17
- string.respond_to?(:getbyte) ? string.getbyte(i) : string[i]
18
- end
19
- end
20
-
21
- def parse(bytes)
22
- @parser.parse(bytes.map { |b| b.chr } * '')
23
- end
24
- end
7
+ Faye.logger = lambda { |*| }
8
+
9
+ require 'encoding_helper'
10
+ require 'ruby/engine_examples'
11
+
@@ -15,11 +15,7 @@ job = TestSwarm::Job.create(
15
15
  :diff => ["javascript", "spec/javascript"],
16
16
  :inject => "spec/browser.html",
17
17
 
18
- :build => [
19
- "cd vendor/js.class && jake",
20
- "rm -rf build",
21
- "jake"
22
- ]
18
+ :build => ["npm install", "rm -rf build", "jake"]
23
19
  )
24
20
 
25
21
  exit unless job.new?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
12
+ date: 2012-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cookiejar
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &16316860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,111 +21,65 @@ dependencies:
21
21
  version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ version_requirements: *16316860
25
+ - !ruby/object:Gem::Dependency
26
+ name: em-http-request
27
+ requirement: &16316380 !ruby/object:Gem::Requirement
25
28
  none: false
26
29
  requirements:
27
30
  - - ! '>='
28
31
  - !ruby/object:Gem::Version
29
32
  version: 0.3.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *16316380
30
36
  - !ruby/object:Gem::Dependency
31
37
  name: eventmachine
32
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &16315920 !ruby/object:Gem::Requirement
33
39
  none: false
34
40
  requirements:
35
- - - ~>
41
+ - - ! '>='
36
42
  - !ruby/object:Gem::Version
37
43
  version: 0.12.0
38
44
  type: :runtime
39
45
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.12.0
46
+ version_requirements: *16315920
46
47
  - !ruby/object:Gem::Dependency
47
- name: em-http-request
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '0.3'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '0.3'
62
- - !ruby/object:Gem::Dependency
63
- name: em-hiredis
64
- requirement: !ruby/object:Gem::Requirement
48
+ name: faye-websocket
49
+ requirement: &16315460 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
68
53
  - !ruby/object:Gem::Version
69
- version: 0.0.1
54
+ version: 0.4.0
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: 0.0.1
57
+ version_requirements: *16315460
78
58
  - !ruby/object:Gem::Dependency
79
- name: json
80
- requirement: !ruby/object:Gem::Requirement
59
+ name: rack
60
+ requirement: &16315000 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
84
64
  - !ruby/object:Gem::Version
85
- version: '1.0'
65
+ version: 1.0.0
86
66
  type: :runtime
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '1.0'
68
+ version_requirements: *16315000
94
69
  - !ruby/object:Gem::Dependency
95
- name: thin
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: '1.2'
102
- type: :runtime
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: '1.2'
110
- - !ruby/object:Gem::Dependency
111
- name: rack
112
- requirement: !ruby/object:Gem::Requirement
70
+ name: yajl-ruby
71
+ requirement: &16314540 !ruby/object:Gem::Requirement
113
72
  none: false
114
73
  requirements:
115
74
  - - ! '>='
116
75
  - !ruby/object:Gem::Version
117
- version: '1.0'
76
+ version: 1.0.0
118
77
  type: :runtime
119
78
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '1.0'
79
+ version_requirements: *16314540
126
80
  - !ruby/object:Gem::Dependency
127
81
  name: jake
128
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &16314160 !ruby/object:Gem::Requirement
129
83
  none: false
130
84
  requirements:
131
85
  - - ! '>='
@@ -133,15 +87,10 @@ dependencies:
133
87
  version: '0'
134
88
  type: :development
135
89
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
90
+ version_requirements: *16314160
142
91
  - !ruby/object:Gem::Dependency
143
92
  name: rake
144
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &16313700 !ruby/object:Gem::Requirement
145
94
  none: false
146
95
  requirements:
147
96
  - - ! '>='
@@ -149,31 +98,21 @@ dependencies:
149
98
  version: '0'
150
99
  type: :development
151
100
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
101
+ version_requirements: *16313700
158
102
  - !ruby/object:Gem::Dependency
159
103
  name: rspec
160
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &16313200 !ruby/object:Gem::Requirement
161
105
  none: false
162
106
  requirements:
163
107
  - - ~>
164
108
  - !ruby/object:Gem::Version
165
- version: 2.5.0
109
+ version: 2.8.0
166
110
  type: :development
167
111
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ~>
172
- - !ruby/object:Gem::Version
173
- version: 2.5.0
112
+ version_requirements: *16313200
174
113
  - !ruby/object:Gem::Dependency
175
114
  name: rack-proxy
176
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &16312780 !ruby/object:Gem::Requirement
177
116
  none: false
178
117
  requirements:
179
118
  - - ! '>='
@@ -181,15 +120,10 @@ dependencies:
181
120
  version: '0'
182
121
  type: :development
183
122
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
123
+ version_requirements: *16312780
190
124
  - !ruby/object:Gem::Dependency
191
125
  name: rack-test
192
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &16312320 !ruby/object:Gem::Requirement
193
127
  none: false
194
128
  requirements:
195
129
  - - ! '>='
@@ -197,15 +131,21 @@ dependencies:
197
131
  version: '0'
198
132
  type: :development
199
133
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
134
+ version_requirements: *16312320
135
+ - !ruby/object:Gem::Dependency
136
+ name: rainbows
137
+ requirement: &13630360 !ruby/object:Gem::Requirement
201
138
  none: false
202
139
  requirements:
203
140
  - - ! '>='
204
141
  - !ruby/object:Gem::Version
205
- version: '0'
142
+ version: 1.0.0
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: *13630360
206
146
  - !ruby/object:Gem::Dependency
207
147
  name: RedCloth
208
- requirement: !ruby/object:Gem::Requirement
148
+ requirement: &13629440 !ruby/object:Gem::Requirement
209
149
  none: false
210
150
  requirements:
211
151
  - - ~>
@@ -213,15 +153,10 @@ dependencies:
213
153
  version: 3.0.0
214
154
  type: :development
215
155
  prerelease: false
216
- version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
- requirements:
219
- - - ~>
220
- - !ruby/object:Gem::Version
221
- version: 3.0.0
156
+ version_requirements: *13629440
222
157
  - !ruby/object:Gem::Dependency
223
158
  name: sinatra
224
- requirement: !ruby/object:Gem::Requirement
159
+ requirement: &13628580 !ruby/object:Gem::Requirement
225
160
  none: false
226
161
  requirements:
227
162
  - - ! '>='
@@ -229,15 +164,10 @@ dependencies:
229
164
  version: '0'
230
165
  type: :development
231
166
  prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - ! '>='
236
- - !ruby/object:Gem::Version
237
- version: '0'
167
+ version_requirements: *13628580
238
168
  - !ruby/object:Gem::Dependency
239
169
  name: staticmatic
240
- requirement: !ruby/object:Gem::Requirement
170
+ requirement: &13627500 !ruby/object:Gem::Requirement
241
171
  none: false
242
172
  requirements:
243
173
  - - ! '>='
@@ -245,12 +175,18 @@ dependencies:
245
175
  version: '0'
246
176
  type: :development
247
177
  prerelease: false
248
- version_requirements: !ruby/object:Gem::Requirement
178
+ version_requirements: *13627500
179
+ - !ruby/object:Gem::Dependency
180
+ name: thin
181
+ requirement: &13626820 !ruby/object:Gem::Requirement
249
182
  none: false
250
183
  requirements:
251
184
  - - ! '>='
252
185
  - !ruby/object:Gem::Version
253
- version: '0'
186
+ version: 1.2.0
187
+ type: :development
188
+ prerelease: false
189
+ version_requirements: *13626820
254
190
  description:
255
191
  email: jcoglan@gmail.com
256
192
  executables: []
@@ -262,78 +198,68 @@ files:
262
198
  - README.rdoc
263
199
  - lib/faye-browser-min.js
264
200
  - spec/browser.html
201
+ - spec/phantom.js
265
202
  - spec/install.sh
266
203
  - spec/thin_proxy.rb
267
- - spec/javascript/web_socket/protocol8parser_spec.js
268
- - spec/javascript/web_socket/draft75parser_spec.js
269
- - spec/javascript/web_socket/client_spec.js
204
+ - spec/ruby/server/handshake_spec.rb
205
+ - spec/ruby/server/extensions_spec.rb
206
+ - spec/ruby/server/subscribe_spec.rb
207
+ - spec/ruby/server/disconnect_spec.rb
208
+ - spec/ruby/server/publish_spec.rb
209
+ - spec/ruby/server/unsubscribe_spec.rb
210
+ - spec/ruby/server/connect_spec.rb
211
+ - spec/ruby/server/integration_spec.rb
212
+ - spec/ruby/rack_adapter_spec.rb
213
+ - spec/ruby/client_spec.rb
214
+ - spec/ruby/server_spec.rb
215
+ - spec/ruby/channel_spec.rb
216
+ - spec/ruby/transport_spec.rb
217
+ - spec/ruby/engine/memory_spec.rb
218
+ - spec/ruby/faye_spec.rb
219
+ - spec/ruby/grammar_spec.rb
220
+ - spec/ruby/engine_examples.rb
221
+ - spec/node.js
222
+ - spec/javascript/faye_spec.js
223
+ - spec/javascript/server/publish_spec.js
224
+ - spec/javascript/server/disconnect_spec.js
225
+ - spec/javascript/server/subscribe_spec.js
226
+ - spec/javascript/server/extensions_spec.js
227
+ - spec/javascript/server/unsubscribe_spec.js
228
+ - spec/javascript/server/integration_spec.js
229
+ - spec/javascript/server/connect_spec.js
230
+ - spec/javascript/server/handshake_spec.js
231
+ - spec/javascript/server_spec.js
270
232
  - spec/javascript/engine_spec.js
233
+ - spec/javascript/transport_spec.js
271
234
  - spec/javascript/channel_spec.js
235
+ - spec/javascript/engine/memory_spec.js
236
+ - spec/javascript/node_adapter_spec.js
272
237
  - spec/javascript/client_spec.js
273
- - spec/javascript/server_spec.js
274
- - spec/javascript/faye_spec.js
275
- - spec/javascript/transport_spec.js
276
238
  - spec/javascript/grammar_spec.js
277
- - spec/javascript/node_adapter_spec.js
278
- - spec/javascript/server/handshake_spec.js
279
- - spec/javascript/server/connect_spec.js
280
- - spec/javascript/server/extensions_spec.js
281
- - spec/javascript/server/integration_spec.js
282
- - spec/javascript/server/unsubscribe_spec.js
283
- - spec/javascript/server/disconnect_spec.js
284
- - spec/javascript/server/subscribe_spec.js
285
- - spec/node.js
239
+ - spec/encoding_helper.rb
286
240
  - spec/testswarm
287
- - spec/phantom.js
288
- - spec/redis.conf
289
- - spec/ruby/web_socket/protocol8_parser_spec.rb
290
- - spec/ruby/web_socket/client_spec.rb
291
- - spec/ruby/web_socket/draft75_parser_spec.rb
292
- - spec/ruby/transport_spec.rb
293
- - spec/ruby/channel_spec.rb
294
- - spec/ruby/faye_spec.rb
295
- - spec/ruby/client_spec.rb
296
- - spec/ruby/server_spec.rb
297
- - spec/ruby/engine_spec.rb
298
- - spec/ruby/grammar_spec.rb
299
- - spec/ruby/rack_adapter_spec.rb
300
- - spec/ruby/server/extensions_spec.rb
301
- - spec/ruby/server/integration_spec.rb
302
- - spec/ruby/server/unsubscribe_spec.rb
303
- - spec/ruby/server/subscribe_spec.rb
304
- - spec/ruby/server/handshake_spec.rb
305
- - spec/ruby/server/disconnect_spec.rb
306
- - spec/ruby/server/connect_spec.rb
307
241
  - spec/spec_helper.rb
308
- - lib/faye.rb
309
- - lib/faye/protocol/grammar.rb
310
- - lib/faye/protocol/channel.rb
311
- - lib/faye/protocol/extensible.rb
312
- - lib/faye/protocol/publication.rb
313
- - lib/faye/protocol/subscription.rb
314
- - lib/faye/protocol/server.rb
315
- - lib/faye/protocol/client.rb
316
- - lib/faye/engines/redis.rb
317
- - lib/faye/engines/memory.rb
318
- - lib/faye/engines/connection.rb
319
- - lib/faye/engines/base.rb
320
- - lib/faye/thin_extensions.rb
321
- - lib/faye/util/web_socket/draft75_parser.rb
322
- - lib/faye/util/web_socket/draft76_parser.rb
323
- - lib/faye/util/web_socket/protocol8_parser.rb
324
- - lib/faye/util/web_socket/client.rb
325
- - lib/faye/util/web_socket/api.rb
242
+ - lib/faye/error.rb
326
243
  - lib/faye/util/namespace.rb
327
- - lib/faye/util/web_socket.rb
328
- - lib/faye/adapters/rack_adapter.rb
329
- - lib/faye/mixins/timeouts.rb
330
244
  - lib/faye/mixins/logging.rb
331
245
  - lib/faye/mixins/publisher.rb
332
- - lib/faye/error.rb
333
- - lib/faye/transport/web_socket.rb
246
+ - lib/faye/mixins/timeouts.rb
334
247
  - lib/faye/transport/http.rb
335
248
  - lib/faye/transport/local.rb
336
249
  - lib/faye/transport/transport.rb
250
+ - lib/faye/transport/web_socket.rb
251
+ - lib/faye/protocol/client.rb
252
+ - lib/faye/protocol/publication.rb
253
+ - lib/faye/protocol/subscription.rb
254
+ - lib/faye/protocol/server.rb
255
+ - lib/faye/protocol/extensible.rb
256
+ - lib/faye/protocol/channel.rb
257
+ - lib/faye/protocol/grammar.rb
258
+ - lib/faye/adapters/rack_adapter.rb
259
+ - lib/faye/engines/proxy.rb
260
+ - lib/faye/engines/connection.rb
261
+ - lib/faye/engines/memory.rb
262
+ - lib/faye.rb
337
263
  homepage: http://faye.jcoglan.com
338
264
  licenses: []
339
265
  post_install_message:
@@ -356,9 +282,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
282
  version: '0'
357
283
  requirements: []
358
284
  rubyforge_project:
359
- rubygems_version: 1.8.23
285
+ rubygems_version: 1.8.10
360
286
  signing_key:
361
287
  specification_version: 3
362
288
  summary: Simple pub/sub messaging for the web
363
289
  test_files: []
364
- has_rdoc: