async-websocket 0.26.2 → 0.28.0

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: 62c467d7d9d1346573fce502f4791549a482d9d118e5cebf6e3dd578d82bc332
4
- data.tar.gz: e2a45431d3f38d74290c3c38bb4c3baf662cbf24e4463dea9059d2dc7074679f
3
+ metadata.gz: 888f2fa13744599f5f16f22feba6826ad1b8e44dc59520480daee4663cc89341
4
+ data.tar.gz: f81c1f4d77d0593d6bfb59a5bd8c307ddaa218e5b22999f2f08ae5d5801e9dd4
5
5
  SHA512:
6
- metadata.gz: 8c3899cbb3370939daa04657f50fa949b1044bcc8c39c241556157d24008b8d7623c5566452cd922eda1d57d89df3009cc52a177e8fc1ca36d6a4d5e0c2a89b1
7
- data.tar.gz: 6493fb20f5e3ab7bbf596dd0436c2584a8737d609094c557912353b0e807f210b47644d73c726b39098acddb18d893dbaf17bf3b4020ffd48ebd18833513484e
6
+ metadata.gz: 6b71ab0e424b91f2e6500cc1277ac1edc7491f32144df6efc49847fbcdd200a9586b7be08d28341592862858cd4be6e7b1f5d31f983c6492b6667f4d543ec62c
7
+ data.tar.gz: fb32ff7cc27011471594bf111dbbad00d4e458dc58664e916d426aea48fa808a33eb8e02304a31640d8179e0a21a09264b0811cacd8ac9c54e901b8055dec3c9
checksums.yaml.gz.sig CHANGED
Binary file
@@ -110,9 +110,7 @@ module Async
110
110
  response = request.call(connection)
111
111
 
112
112
  unless response.stream?
113
- response.close
114
-
115
- raise ProtocolError, "Failed to negotiate connection: #{response.status}"
113
+ raise ConnectionError.new("Failed to negotiate connection!", response.unwrap)
116
114
  end
117
115
 
118
116
  protocol = response.headers[SEC_WEBSOCKET_PROTOCOL]&.first
@@ -28,6 +28,10 @@ module Async
28
28
  @response.close
29
29
  end
30
30
 
31
+ def unwrap
32
+ @response.buffered!
33
+ end
34
+
31
35
  attr_accessor :response
32
36
  attr_accessor :stream
33
37
 
@@ -15,5 +15,16 @@ module Async
15
15
 
16
16
  class UnsupportedVersionError < Error
17
17
  end
18
+
19
+ class ConnectionError < Error
20
+ def initialize(message, response)
21
+ super(message)
22
+
23
+ @response = response
24
+ end
25
+
26
+ # The failed HTTP response.
27
+ attr :response
28
+ end
18
29
  end
19
30
  end
@@ -33,6 +33,10 @@ module Async
33
33
  @response.close
34
34
  end
35
35
 
36
+ def unwrap
37
+ @response.buffered!
38
+ end
39
+
36
40
  attr_accessor :response
37
41
 
38
42
  def stream?
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module WebSocket
8
- VERSION = "0.26.2"
8
+ VERSION = "0.28.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -10,7 +10,7 @@ Please see the [project documentation](https://socketry.github.io/async-websocke
10
10
 
11
11
  - [Getting Started](https://socketry.github.io/async-websocket/guides/getting-started/index) - This guide shows you how to implement a basic client and server.
12
12
 
13
- - [Rails Integration](https://socketry.github.io/async-websocket/guides/rails-integration/index) - This guide explains how to use `async-websocket` with `falcon`.
13
+ - [Rails Integration](https://socketry.github.io/async-websocket/guides/rails-integration/index) - This guide explains how to use `async-websocket` with Rails.
14
14
 
15
15
  ## Contributing
16
16
 
@@ -24,8 +24,8 @@ We welcome contributions to this project.
24
24
 
25
25
  ### Developer Certificate of Origin
26
26
 
27
- This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
27
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
28
28
 
29
- ### Contributor Covenant
29
+ ### Community Guidelines
30
30
 
31
- This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
31
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data.tar.gz.sig CHANGED
Binary file
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.26.2
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -49,7 +49,7 @@ cert_chain:
49
49
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
50
50
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
51
51
  -----END CERTIFICATE-----
52
- date: 2024-06-20 00:00:00.000000000 Z
52
+ date: 2024-07-19 00:00:00.000000000 Z
53
53
  dependencies:
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: async-http
@@ -65,6 +65,20 @@ dependencies:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0.54'
68
+ - !ruby/object:Gem::Dependency
69
+ name: protocol-http
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.28.1
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 0.28.1
68
82
  - !ruby/object:Gem::Dependency
69
83
  name: protocol-rack
70
84
  requirement: !ruby/object:Gem::Requirement
@@ -85,14 +99,14 @@ dependencies:
85
99
  requirements:
86
100
  - - "~>"
87
101
  - !ruby/object:Gem::Version
88
- version: '0.14'
102
+ version: '0.15'
89
103
  type: :runtime
90
104
  prerelease: false
91
105
  version_requirements: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
- version: '0.14'
109
+ version: '0.15'
96
110
  description:
97
111
  email:
98
112
  executables: []
metadata.gz.sig CHANGED
Binary file