async-websocket 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/websocket/client.rb +15 -11
- data/lib/async/websocket/server.rb +2 -2
- data/lib/async/websocket/upgrade_request.rb +3 -2
- data/lib/async/websocket/version.rb +2 -2
- data/license.md +3 -2
- data.tar.gz.sig +0 -0
- metadata +12 -24
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62c467d7d9d1346573fce502f4791549a482d9d118e5cebf6e3dd578d82bc332
|
4
|
+
data.tar.gz: e2a45431d3f38d74290c3c38bb4c3baf662cbf24e4463dea9059d2dc7074679f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c3899cbb3370939daa04657f50fa949b1044bcc8c39c241556157d24008b8d7623c5566452cd922eda1d57d89df3009cc52a177e8fc1ca36d6a4d5e0c2a89b1
|
7
|
+
data.tar.gz: 6493fb20f5e3ab7bbf596dd0436c2584a8737d609094c557912353b0e807f210b47644d73c726b39098acddb18d893dbaf17bf3b4020ffd48ebd18833513484e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2015-
|
4
|
+
# Copyright, 2015-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2019, by Bryan Powell.
|
6
6
|
# Copyright, 2019, by Janko Marohnić.
|
7
7
|
# Copyright, 2023, by Thomas Morgan.
|
@@ -54,16 +54,18 @@ module Async
|
|
54
54
|
|
55
55
|
# @return [Connection] an open websocket connection to the given endpoint.
|
56
56
|
def self.connect(endpoint, *arguments, **options, &block)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
Sync do
|
58
|
+
client = self.open(endpoint, *arguments)
|
59
|
+
connection = client.connect(endpoint.authority, endpoint.path, **options)
|
60
|
+
|
61
|
+
return ClientCloseDecorator.new(client, connection) unless block_given?
|
62
|
+
|
63
|
+
begin
|
64
|
+
yield connection
|
65
|
+
ensure
|
66
|
+
connection.close
|
67
|
+
client.close
|
68
|
+
end
|
67
69
|
end
|
68
70
|
end
|
69
71
|
|
@@ -80,6 +82,8 @@ module Async
|
|
80
82
|
@connection = connection
|
81
83
|
end
|
82
84
|
|
85
|
+
attr :connection
|
86
|
+
|
83
87
|
def close
|
84
88
|
super
|
85
89
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2018-
|
5
|
-
# Copyright, 2019, by
|
4
|
+
# Copyright, 2018-2024, by Samuel Williams.
|
5
|
+
# Copyright, 2019, by Simon Crocker.
|
6
6
|
|
7
7
|
require_relative 'connection'
|
8
8
|
require_relative 'response'
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Thomas Morgan.
|
6
|
+
# Copyright, 2024, by Ryu Sato.
|
6
7
|
|
7
8
|
require 'protocol/http/middleware'
|
8
9
|
require 'protocol/http/request'
|
@@ -76,7 +77,7 @@ module Async
|
|
76
77
|
raise ProtocolError, "Invalid accept digest, expected #{expected_accept_digest.inspect}, got #{accept_digest.inspect}!"
|
77
78
|
end
|
78
79
|
end
|
79
|
-
verified = accept_digest && Array(response.protocol) == %w(websocket) && response.headers['connection']&.include?('upgrade')
|
80
|
+
verified = accept_digest && Array(response.protocol).map(&:downcase) == %w(websocket) && response.headers['connection']&.include?('upgrade')
|
80
81
|
|
81
82
|
return Wrapper.new(response, verified: verified)
|
82
83
|
end
|
data/license.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2015-
|
3
|
+
Copyright, 2015-2024, by Samuel Williams.
|
4
4
|
Copyright, 2019, by Bryan Powell.
|
5
|
-
Copyright, 2019, by
|
5
|
+
Copyright, 2019, by Simon Crocker.
|
6
6
|
Copyright, 2019, by Michel Boaventura.
|
7
7
|
Copyright, 2019, by Janko Marohnić.
|
8
8
|
Copyright, 2020-2021, by Olle Jonsson.
|
@@ -12,6 +12,7 @@ Copyright, 2021, by Aurora Nockert.
|
|
12
12
|
Copyright, 2023, by Peter Runich.
|
13
13
|
Copyright, 2023, by Thomas Morgan.
|
14
14
|
Copyright, 2023, by Emily Love Mills.
|
15
|
+
Copyright, 2024, by Ryu Sato.
|
15
16
|
|
16
17
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
17
18
|
of this software and associated documentation files (the "Software"), to deal
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
-
|
8
|
+
- Simon Crocker
|
9
9
|
- Olle Jonsson
|
10
10
|
- Thomas Morgan
|
11
11
|
- Aurora Nockert
|
@@ -16,6 +16,7 @@ authors:
|
|
16
16
|
- Juan Antonio Martín Lucas
|
17
17
|
- Michel Boaventura
|
18
18
|
- Peter Runich
|
19
|
+
- Ryu Sato
|
19
20
|
autorequire:
|
20
21
|
bindir: bin
|
21
22
|
cert_chain:
|
@@ -48,7 +49,7 @@ cert_chain:
|
|
48
49
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
49
50
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
50
51
|
-----END CERTIFICATE-----
|
51
|
-
date:
|
52
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
52
53
|
dependencies:
|
53
54
|
- !ruby/object:Gem::Dependency
|
54
55
|
name: async-http
|
@@ -64,48 +65,34 @@ dependencies:
|
|
64
65
|
- - "~>"
|
65
66
|
- !ruby/object:Gem::Version
|
66
67
|
version: '0.54'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: async-io
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '1.23'
|
74
|
-
type: :runtime
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '1.23'
|
81
68
|
- !ruby/object:Gem::Dependency
|
82
69
|
name: protocol-rack
|
83
70
|
requirement: !ruby/object:Gem::Requirement
|
84
71
|
requirements:
|
85
72
|
- - "~>"
|
86
73
|
- !ruby/object:Gem::Version
|
87
|
-
version: '0.
|
74
|
+
version: '0.5'
|
88
75
|
type: :runtime
|
89
76
|
prerelease: false
|
90
77
|
version_requirements: !ruby/object:Gem::Requirement
|
91
78
|
requirements:
|
92
79
|
- - "~>"
|
93
80
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0.
|
81
|
+
version: '0.5'
|
95
82
|
- !ruby/object:Gem::Dependency
|
96
83
|
name: protocol-websocket
|
97
84
|
requirement: !ruby/object:Gem::Requirement
|
98
85
|
requirements:
|
99
86
|
- - "~>"
|
100
87
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0.
|
88
|
+
version: '0.14'
|
102
89
|
type: :runtime
|
103
90
|
prerelease: false
|
104
91
|
version_requirements: !ruby/object:Gem::Requirement
|
105
92
|
requirements:
|
106
93
|
- - "~>"
|
107
94
|
- !ruby/object:Gem::Version
|
108
|
-
version: '0.
|
95
|
+
version: '0.14'
|
109
96
|
description:
|
110
97
|
email:
|
111
98
|
executables: []
|
@@ -135,6 +122,7 @@ licenses:
|
|
135
122
|
metadata:
|
136
123
|
documentation_uri: https://socketry.github.io/async-websocket/
|
137
124
|
funding_uri: https://github.com/sponsors/ioquatix
|
125
|
+
source_code_uri: https://github.com/socketry/async-websocket.git
|
138
126
|
post_install_message:
|
139
127
|
rdoc_options: []
|
140
128
|
require_paths:
|
@@ -143,15 +131,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
131
|
requirements:
|
144
132
|
- - ">="
|
145
133
|
- !ruby/object:Gem::Version
|
146
|
-
version: '3.
|
134
|
+
version: '3.1'
|
147
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
136
|
requirements:
|
149
137
|
- - ">="
|
150
138
|
- !ruby/object:Gem::Version
|
151
139
|
version: '0'
|
152
140
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.5.11
|
154
142
|
signing_key:
|
155
143
|
specification_version: 4
|
156
|
-
summary: An async websocket library on top of websocket
|
144
|
+
summary: An async websocket library on top of protocol-websocket.
|
157
145
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|