faye-websocket 0.12.0 → 0.13.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dee49a39a79363482a72806d0beb3d02006151229a99bf42134b4a0e719cb7d9
4
- data.tar.gz: 5e5a4b517226126798ed6881122d66ea93124cc9e36ab96b228892ba84bbfe5e
3
+ metadata.gz: f7f6e4a36da5e7abb23367c5cdc67313fa9f8183e7cbb113141d95c9d7a320dc
4
+ data.tar.gz: 496722f6c8b15f286d31e25bd27f9699fa66842e781fa7bc2de3a0650d3cf5cd
5
5
  SHA512:
6
- metadata.gz: 681f48154435219f54c2a3724bda64b2b6be5d7b805865864c6b83e009d121d1024248a7690871a6a4ff9ac11f7f712a950f82c6af6992d685f2081500be93cd
7
- data.tar.gz: a5714f10fe704c76df1404e8787542170dfba7b9fbcc9199f477e8cc74a7294dd58012314d0570b5908ffeec3a8fdd531ae6111592d4f8809a85632af11bf3f6
6
+ metadata.gz: c26f0eda321c8c5479d21dc3e9ef4beeb8af728a963a2854fc13902841f53d5dcb049bdecb83793437e9dec86e2baf79103c9cc2f23f55e36db36aef543ab948
7
+ data.tar.gz: 49d082032cc9ed4254730bb6a9b49aa157cb6d9eb16c6c04380dfc55a65e346fbf5e653a5f811e1836e3a750c897cc1b923e328f7b8a28fc7b312e2ce1d92bbd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.13.0 / 2026-11-16
2
+
3
+ - Add `allow_drafts` option to explicitly enable support for `draft75` and
4
+ `draft76` protocols; these are now disabled by default
5
+
1
6
  ### 0.12.0 / 2025-05-25
2
7
 
3
8
  - Represent binary messages as strings with `Encoding::BINARY` rather than as
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2010-2025 James Coglan
1
+ Copyright 2010-2026 James Coglan
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
data/README.md CHANGED
@@ -194,6 +194,8 @@ is an optional hash containing any of these keys:
194
194
  The default value is `2^26 - 1`, or 1 byte short of 64 MiB.
195
195
  - `:ping` - an integer that sets how often the WebSocket should send ping
196
196
  frames, measured in seconds
197
+ - `:allow_drafts` - whether to enable support for long-outdated draft versions
198
+ of the WebSocket protocol, `false` by default
197
199
  - `:tls` - a hash containing key-value pairs for specifying TLS parameters.
198
200
  These are passed along to EventMachine and you can find
199
201
  [more details here](http://rubydoc.info/gems/eventmachine/EventMachine%2FConnection%3Astart_tls)
@@ -22,8 +22,9 @@ module Faye
22
22
  def initialize(options = {})
23
23
  @ready_state = CONNECTING
24
24
  super()
25
- ::WebSocket::Driver.validate_options(options, [
26
- :headers, :extensions, :max_length, :ping, :proxy, :tls, :binary_data_format
25
+
26
+ options = ::WebSocket::Driver.validate_options(options, [
27
+ :headers, :extensions, :max_length, :allow_drafts, :ping, :proxy, :tls, :binary_data_format
27
28
  ])
28
29
 
29
30
  @driver = yield
@@ -59,6 +59,10 @@ module Faye
59
59
  return false
60
60
  end
61
61
 
62
+ def self.validate_options(options, valid_keys)
63
+ ::WebSocket::Driver.validate_options(options, valid_keys)
64
+ end
65
+
62
66
  def self.websocket?(env)
63
67
  ::WebSocket::Driver.websocket?(env)
64
68
  end
@@ -72,7 +76,12 @@ module Faye
72
76
  @env = env
73
77
  @url = WebSocket.determine_url(@env)
74
78
 
75
- super(options) { ::WebSocket::Driver.rack(self, :max_length => options[:max_length], :protocols => protocols) }
79
+ super(options) do
80
+ ::WebSocket::Driver.rack(self,
81
+ :max_length => options[:max_length],
82
+ :protocols => protocols,
83
+ :allow_drafts => options[:allow_drafts])
84
+ end
76
85
  @driver_started = false
77
86
 
78
87
  @stream = Stream.new(self)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.8.0
32
+ version: 0.9.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.8.0
39
+ version: 0.9.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: permessage_deflate
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  - !ruby/object:Gem::Version
235
235
  version: '0'
236
236
  requirements: []
237
- rubygems_version: 3.6.7
237
+ rubygems_version: 3.6.9
238
238
  specification_version: 4
239
239
  summary: Standards-compliant WebSocket server and client
240
240
  test_files: []