async-websocket 0.26.1 → 0.27.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: bb4efda230c28f10a467f0d90afc709359865ea08248b55b65ab9eef402d0c1a
4
- data.tar.gz: 35be732098859b629fab5dff78dbb91b38ea52980c7c9ae9b7a8cf0421ad5a96
3
+ metadata.gz: 7deca426ef06ec0886b25c2786697db4b9b3c98b2424eead9f227dd53879e3b5
4
+ data.tar.gz: d21453d57e1a10e04b41c192e39a050274ef80f44eb78aaea69d48c662146bd9
5
5
  SHA512:
6
- metadata.gz: 2737cdcbe5ede4cd313f6b3ea73c43910d49089063ca4fb0eb9307460e4ee14115b1ab70e245359513d7961c32da86793c9e3761e68bbb042fc7425b0033697f
7
- data.tar.gz: 6a897cce467e1e0a3e3a45e500da460e2e35c4e4ec5942290ff816bdf2fb6bd7c57d6a000df64d44a7ec3aed07470c9f46d20743d6ffff19312f2a61cbdb7db9
6
+ metadata.gz: 1400f27ba9a845dc4867c2d16461759d4e6036ba711f08c9e198393bb76e7c5363b3de6a36d437405c31cc88b1f712f077b181c0ddebe1acf9e314dbc7649f4d
7
+ data.tar.gz: d022004d81f93c2c75b36c0331ecccd4e9c0b51214378dd9d8ddd07fbe9069da23edaa3d957bef0d2b357f94b26fff20446b110f6efb24470ca735d6fb49b05b
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-2023, by Samuel Williams.
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
- client = self.open(endpoint, *arguments)
58
- connection = client.connect(endpoint.authority, endpoint.path, **options)
59
-
60
- return ClientCloseDecorator.new(client, connection) unless block_given?
61
-
62
- begin
63
- yield connection
64
- ensure
65
- connection.close
66
- client.close
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,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2023, by Samuel Williams.
4
+ # Copyright, 2018-2024, by Samuel Williams.
5
5
  # Copyright, 2019, by Simon Crocker.
6
6
 
7
7
  require_relative 'connection'
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
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
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2023, by Samuel Williams.
4
+ # Copyright, 2018-2024, by Samuel Williams.
5
5
 
6
6
  module Async
7
7
  module WebSocket
8
- VERSION = "0.26.1"
8
+ VERSION = "0.27.0"
9
9
  end
10
10
  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/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.1
4
+ version: 0.27.0
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-04-24 00:00:00.000000000 Z
52
+ date: 2024-07-03 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.11'
88
+ version: '0.15'
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.11'
95
+ version: '0.15'
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.3
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
@@ -1,4 +1 @@
1
- |cb
2
- �<�G�Eb ��msOlҾ�1L��\�qH����w�������0bڊDɥ�P��4��g�n��f/���{����f\�Ȅϐ0�jV�,ĴEJ�`�/�T
3
- �҂���?��_6GM]����[^i����\{�fg�+�`ΝY�_L�r
4
- M����d��M/j����W./'������6�t�6s��A<�����I�b/���Z˕��F��<l�RvU�����e��ąK��N���;��u�c��ɨ�
1
+ C�w�ea.��_5K�?��X�ĥ$-�}=K��*{�^��^Q�m[�Ik�^�LoZJF�+�˜����P~Pß���FM�vClB�sn�w���nħm��{���(��h��-s�6h�VC����"/�B#���� ��b�~ѩ�}�*���giBO[���p���8���dƈ�)���u��Wf��