async-websocket 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d90af5dc72de1e262ea96046aac6d5aea83dd2dba9d7a6f98684da3107d152d
4
- data.tar.gz: 9544351dc684062ea0a78b50d15bf9441d18f401fd23fc30eae768a8ef45cd86
3
+ metadata.gz: 59123bc7ccf2af0d260325c7aa1c334069e8f39033e7f4816d026c03b9ff30d3
4
+ data.tar.gz: f88b770e168497e9331bfd9eaa47ff3ba0247f4f9d1ef326e7f90f798330e5c1
5
5
  SHA512:
6
- metadata.gz: 22130d886d22511b6c9478f5035af01aed0dd00225582857d0bc28b864470f47568e0c38a62afb8a46227285009a227f9f2b222b0b5383c0ccaef455beede1bf
7
- data.tar.gz: 3b9517e0cdaec509d72246776784024a171ba371b7284213e6064cb679b762417560556e00a6f76d164e0aa0c9e5272daa4ee076b31796834f468e30011b14a5
6
+ metadata.gz: f4e9e0c695517a81251fc5fafb56a03fcf9b26338b2942131b002a34731178ee4f9249c4ca89b652308c8dd7baf7cf6ec9bd0b299fc48df09004695413813ed0
7
+ data.tar.gz: dc18bbb860db8cda14bc863211ead3c64276086c297632beca706dc142e10005a7c4a75e6e8876c3d0781dacd149be1a020530e6759a6caceb91b492ca816490
data/.gitignore CHANGED
@@ -1,22 +1,13 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
6
12
  Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- *.bundle
19
- *.so
20
- *.o
21
- *.a
22
- mkmf.log
13
+ .covered.db
@@ -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.41"
20
- spec.add_dependency "protocol-websocket", "~> 0.5.0"
20
+ spec.add_dependency "protocol-websocket", "~> 0.6.0"
21
21
 
22
22
  spec.add_development_dependency "async-rspec"
23
23
  spec.add_development_dependency "falcon", "~> 0.30"
@@ -14,7 +14,7 @@ Async do |task|
14
14
  Async::IO::Generic.new($stdin)
15
15
  )
16
16
 
17
- Async::WebSocket::Client.open(ENDPOINT) do |connection|
17
+ Async::WebSocket::Client.connect(ENDPOINT) do |connection|
18
18
  input_task = task.async do
19
19
  while line = stdin.read_until("\n")
20
20
  connection.write({text: line})
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S falcon serve --bind http://127.0.0.1:8080 --count 1 -c
2
2
 
3
- require_relative '../../lib/async/websocket/server/rack'
3
+ require_relative '../../lib/async/websocket/adapters/rack'
4
4
  require 'async/clock'
5
5
  require 'async/semaphore'
6
6
  require 'async/logger'
@@ -106,7 +106,7 @@ class Room
106
106
  end
107
107
 
108
108
  def call(env)
109
- Async::WebSocket::Server::Rack.open(env, &self.method(:open))
109
+ Async::WebSocket::Adapters::Rack.open(env, &self.method(:open))
110
110
  end
111
111
  end
112
112
 
@@ -58,10 +58,10 @@ class Command < Samovar::Command
58
58
  # subtask.children.each(&:stop)
59
59
  end
60
60
 
61
- client = Async::WebSocket::Client.new(endpoint)
61
+ client = Async::WebSocket::Client.open(endpoint)
62
62
 
63
63
  count.times do |i|
64
- connections.enqueue(client.get)
64
+ connections.enqueue(client.connect(endpoint.path))
65
65
  progress.advance(1)
66
66
  end
67
67
 
@@ -21,6 +21,7 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  require_relative '../connection'
24
+ require_relative '../response'
24
25
 
25
26
  module Async
26
27
  module WebSocket
@@ -21,11 +21,13 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  require_relative 'request'
24
+ require_relative 'connection'
24
25
 
25
26
  require 'protocol/websocket/headers'
26
-
27
27
  require 'protocol/http/middleware'
28
28
 
29
+ require 'async/http/client'
30
+
29
31
  module Async
30
32
  module WebSocket
31
33
  # This is a basic synchronous websocket client:
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module WebSocket
23
- VERSION = "0.11.0"
23
+ VERSION = "0.11.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.0
47
+ version: 0.6.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.5.0
54
+ version: 0.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: async-rspec
57
57
  requirement: !ruby/object:Gem::Requirement