async-websocket 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/README.md +2 -2
- data/async-websocket.gemspec +1 -1
- data/examples/mud/config.ru +2 -2
- data/examples/utopia/pages/server/controller.rb +2 -2
- data/lib/async/websocket/version.rb +1 -1
- data/spec/async/websocket/server_examples.rb +0 -1
- data/spec/async/websocket/upgrade.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9ed569bb920db994f1bbc777cb0edb7134a264bcbe1d4b50d20548b27694484
|
4
|
+
data.tar.gz: 1ffab71222838d000e0fbfdbeb83736058d8aae007679f55b0f05e2597acba6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f26b555da7f2e0c552e665d34799d51102224f32a3bf5a1b30526bd24751ddb2319cac54ca2292dd8fd11afacd05272ca97c9d28453edfc1e1dc9715b85f840
|
7
|
+
data.tar.gz: b18f15df6147da77f3dad4d1c0cbd656be2e17107c79c984fd276bd71bb0abe014c64cb28f46ce91f81755ae8790798d993be226b64cc8e95386092dff5210f4
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -75,13 +75,13 @@ end
|
|
75
75
|
```ruby
|
76
76
|
#!/usr/bin/env -S falcon serve --bind http://localhost:7070 --count 1 -c
|
77
77
|
|
78
|
-
require 'async/websocket/
|
78
|
+
require 'async/websocket/adapters/rack'
|
79
79
|
require 'set'
|
80
80
|
|
81
81
|
$connections = Set.new
|
82
82
|
|
83
83
|
run lambda {|env|
|
84
|
-
Async::WebSocket::
|
84
|
+
Async::WebSocket::Adapters::Rack.open(env, protocols: ['ws']) do |connection|
|
85
85
|
$connections << connection
|
86
86
|
|
87
87
|
while message = connection.read
|
data/async-websocket.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.add_dependency "async-io", "~> 1.23"
|
19
19
|
spec.add_dependency "async-http", "~> 0.43"
|
20
|
-
spec.add_dependency "protocol-websocket", "~> 0.
|
20
|
+
spec.add_dependency "protocol-websocket", "~> 0.7.0"
|
21
21
|
|
22
22
|
spec.add_development_dependency "async-rspec"
|
23
23
|
spec.add_development_dependency "falcon", "~> 0.32"
|
data/examples/mud/config.ru
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env falcon serve --count 1 --bind http://127.0.0.1:7070 -c
|
2
2
|
|
3
|
-
require 'async/websocket/
|
3
|
+
require 'async/websocket/adapters/rack'
|
4
4
|
|
5
5
|
class Room
|
6
6
|
def initialize(name, description = nil)
|
@@ -124,7 +124,7 @@ class Server
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def call(env)
|
127
|
-
Async::WebSocket::
|
127
|
+
Async::WebSocket::Adapters::Rack.open(env, connect: User) do |user|
|
128
128
|
@entrance.enter(user)
|
129
129
|
|
130
130
|
while message = user.read
|
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
2
|
prepend Actions
|
3
3
|
|
4
|
-
require 'async/websocket/
|
4
|
+
require 'async/websocket/adapters/rack'
|
5
5
|
require 'set'
|
6
6
|
|
7
7
|
$connections = Set.new
|
8
8
|
|
9
9
|
on 'connect' do |request|
|
10
|
-
response = Async::WebSocket::
|
10
|
+
response = Async::WebSocket::Adapters::Rack.open(request.env) do |connection|
|
11
11
|
$connections << connection
|
12
12
|
|
13
13
|
while message = connection.read
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
require 'async/websocket/
|
21
|
+
require 'async/websocket/adapters/rack'
|
22
22
|
|
23
23
|
class Upgrade
|
24
24
|
def initialize(app)
|
@@ -26,7 +26,7 @@ class Upgrade
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def call(env)
|
29
|
-
Async::WebSocket::
|
29
|
+
Async::WebSocket::Adapters::Rack.open(env, supported_protocols: ['ws']) do |connection|
|
30
30
|
read, write = IO.pipe
|
31
31
|
|
32
32
|
Process.spawn("ls -lah", :out => write)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-io
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.7.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.7.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: async-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|