async-websocket 0.26.1 → 0.26.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/websocket/client.rb +15 -11
- data/lib/async/websocket/server.rb +1 -1
- data/lib/async/websocket/upgrade_request.rb +3 -2
- data/lib/async/websocket/version.rb +2 -2
- data/license.md +1 -0
- data.tar.gz.sig +0 -0
- metadata +6 -5
- 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,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
@@ -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,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.
|
4
|
+
version: 0.26.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -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: 2024-
|
52
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
52
53
|
dependencies:
|
53
54
|
- !ruby/object:Gem::Dependency
|
54
55
|
name: async-http
|
@@ -84,14 +85,14 @@ dependencies:
|
|
84
85
|
requirements:
|
85
86
|
- - "~>"
|
86
87
|
- !ruby/object:Gem::Version
|
87
|
-
version: '0.
|
88
|
+
version: '0.14'
|
88
89
|
type: :runtime
|
89
90
|
prerelease: false
|
90
91
|
version_requirements: !ruby/object:Gem::Requirement
|
91
92
|
requirements:
|
92
93
|
- - "~>"
|
93
94
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0.
|
95
|
+
version: '0.14'
|
95
96
|
description:
|
96
97
|
email:
|
97
98
|
executables: []
|
@@ -137,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
|
-
rubygems_version: 3.5.
|
141
|
+
rubygems_version: 3.5.11
|
141
142
|
signing_key:
|
142
143
|
specification_version: 4
|
143
144
|
summary: An async websocket library on top of protocol-websocket.
|
metadata.gz.sig
CHANGED
Binary file
|