websocket-rack 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0 / 2012-04-16
4
+
5
+ - require EventMachine ~> 1.0.0.beta.4 (support for old version was to confusing for a lot of users)
6
+ - remove thin-websocket wrapper
7
+
3
8
  ## 0.3.3 / 2012-02-16
4
9
 
5
10
  - postponse sending messages and closing connection to next tick(prevent locking rest of current request)
data/README.md CHANGED
@@ -185,10 +185,6 @@ Thin v1.2.8 have --ssl option - just use that! :)
185
185
 
186
186
  Check [Thin](http://code.macournoyer.com/thin/) config - any option supported by Thin(like demonizing, SSL etc.) is supported by WebSocket-Rack.
187
187
 
188
- ### Why (using Thin) user is disconnected after 30 seconds?
189
-
190
- This is bug in EventMachine < 1.0.0. Please consider updating to newer version or use thin-websocket wrapper around thin binary.
191
-
192
188
  ## About
193
189
 
194
190
  Author: Bernard Potocki <<bernard.potocki@imanel.org>>
@@ -58,12 +58,6 @@ module Rack
58
58
  socket.websocket = self
59
59
  socket.comm_inactivity_timeout = 0
60
60
 
61
- if socket.comm_inactivity_timeout != 0
62
- puts "WARNING: You are using old EventMachine version. " +
63
- "Please consider updating to EM version >= 1.0.0 " +
64
- "or running Thin using thin-websocket."
65
- end
66
-
67
61
  debug [:initialize]
68
62
  end
69
63
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module WebSocket
3
- VERSION = "0.3.3"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'rack'
16
16
  s.add_dependency 'em-websocket', '~> 0.3.6'
17
+ s.add_dependency 'eventmachine', '~> 1.0.0.beta.4'
17
18
  s.add_dependency 'thin' # Temporary until we support more servers
18
19
  s.add_development_dependency 'rspec', '~> 2.4.0'
19
20
  s.add_development_dependency 'mocha'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.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: 2012-02-16 00:00:00.000000000Z
12
+ date: 2012-04-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
16
- requirement: &70187912377380 !ruby/object:Gem::Requirement
16
+ requirement: &70359971546820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70187912377380
24
+ version_requirements: *70359971546820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: em-websocket
27
- requirement: &70187912376880 !ruby/object:Gem::Requirement
27
+ requirement: &70359971572660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: 0.3.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70187912376880
35
+ version_requirements: *70359971572660
36
+ - !ruby/object:Gem::Dependency
37
+ name: eventmachine
38
+ requirement: &70359971572160 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.0.0.beta.4
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70359971572160
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: thin
38
- requirement: &70187912376460 !ruby/object:Gem::Requirement
49
+ requirement: &70359971571780 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :runtime
45
56
  prerelease: false
46
- version_requirements: *70187912376460
57
+ version_requirements: *70359971571780
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: rspec
49
- requirement: &70187912375920 !ruby/object:Gem::Requirement
60
+ requirement: &70359971571240 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: 2.4.0
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70187912375920
68
+ version_requirements: *70359971571240
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: mocha
60
- requirement: &70187912375500 !ruby/object:Gem::Requirement
71
+ requirement: &70359971570820 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,12 +76,11 @@ dependencies:
65
76
  version: '0'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70187912375500
79
+ version_requirements: *70359971570820
69
80
  description: Rack-based WebSocket server
70
81
  email:
71
82
  - bernard.potocki@imanel.org
72
- executables:
73
- - thin-websocket
83
+ executables: []
74
84
  extensions: []
75
85
  extra_rdoc_files: []
76
86
  files:
@@ -80,7 +90,6 @@ files:
80
90
  - Gemfile
81
91
  - README.md
82
92
  - Rakefile
83
- - bin/thin-websocket
84
93
  - example/example.ru
85
94
  - example/html/FABridge.js
86
95
  - example/html/WebSocketMain.swf
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # Modified Thin command line interface script.
3
- # This is fallback for WebSocket-Rack.
4
- # Use it when you have EventMachine version < 1.0.0
5
- # Rationale:
6
- # Older versions of EM have bug that prevent to
7
- # clearing connection inactivity once it's set.
8
- # This one will set connection timeout to 0 at
9
- # default, so there will be no need to overwrite it.
10
- # Be aware that this will also change inactivity
11
- # timeout for "normal" connection, so it will be
12
- # easy to make DoS attack.
13
-
14
- require 'rubygems'
15
- require 'thin'
16
-
17
- if EM::VERSION < "1.0.0"
18
- begin
19
- old_verbose, $VERBOSE = $VERBOSE, nil
20
- ::Thin::Server.const_set 'DEFAULT_TIMEOUT', 0
21
- ensure
22
- $VERBOSE = old_verbose
23
- end
24
- end
25
-
26
- Thin::Runner.new(ARGV).run!