message_bus 4.3.4 → 4.3.7

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: 76a5b68eec4b7cfbe611e8b2a1fa0d60ac5d48dc33594419613ff07579cabe63
4
- data.tar.gz: 9164fb39f5850d69ff83ce373ea398e9cd4086d9edc319c62c36f1bbdd1ffd99
3
+ metadata.gz: ed07dd9a2acd5f0a87a3642a5b737a1f3b259fba4b1b9d52047a5a55f80818c7
4
+ data.tar.gz: 0bec8a9871c476feadd6112fc3054890b3e894af9c80bff58cea296b685c2e8d
5
5
  SHA512:
6
- metadata.gz: 6d9b70b183065bc17178443c8e008b921d3952b3ad9b45c3d30b2b19c388e6b7d9311537d654c0523449926918c797d9a4a5156f1b5631976b605e48b8878444
7
- data.tar.gz: 7ae3c8104dcfb41af4b58d4baad29371307cbbf13bb6de6e364cddb48b6a271b147a55c123068a74537789dff7ba414a4fa5b4e1953893a5af6b29188ba85906
6
+ metadata.gz: 06b571fb6e122c0d366c234ea25a9d2e34405d801f829db1526710f9ba0218fa1ac258781f8aedc9b7b72dff46203d77e3672ce0467d50e09fb00023d4da8cfe
7
+ data.tar.gz: ed19c42187198b47ac09b5d743e10fa7a36a4957923065930f287e43d83ae032c33c541f3d04b75c95183e9ba273a010b6493fab5665a6ec129af934d9cc26cc
data/CHANGELOG CHANGED
@@ -1,5 +1,20 @@
1
+ 28-06-2023
2
+
3
+ - Version 4.3.7
4
+
5
+ - FIX: Allow using `:long_polling_interval` with Redis gem version 5+.
6
+
7
+ - Version 4.3.6
8
+
9
+ - Don't error when trying to write a message to a closed client take 2
10
+
1
11
  20-06-2023
2
12
 
13
+ - Version 4.3.5
14
+
15
+ - Revert "Make headers all lowercase in rack middleware (#328)".
16
+ This seems to have broken MessageBus in production so reverting for now.
17
+
3
18
  - Version 4.3.4
4
19
 
5
20
  - Revert "FIX: Don't error when trying to write a message to a closed client (#336)".
@@ -359,6 +359,7 @@ LUA
359
359
  :backend,
360
360
  :logger,
361
361
  :long_polling_enabled,
362
+ :long_polling_interval,
362
363
  :backend_options,
363
364
  :base_route,
364
365
  :client_message_filters,
@@ -278,7 +278,7 @@ class MessageBus::Client
278
278
  @async_response << data
279
279
  @async_response << postfix
280
280
  @async_response << NEWLINE
281
- else
281
+ elsif @io
282
282
  @io.write(chunk_length.to_s(16) << NEWLINE << data << postfix << NEWLINE)
283
283
  end
284
284
  end
@@ -82,10 +82,10 @@ class MessageBus::Rack::Middleware
82
82
  return [404, {}, ["not found"]] unless client_id
83
83
 
84
84
  headers = {}
85
- headers["cache-control"] = "must-revalidate, private, max-age=0"
86
- headers["content-type"] = "application/json; charset=utf-8"
87
- headers["pragma"] = "no-cache"
88
- headers["expires"] = "0"
85
+ headers["Cache-Control"] = "must-revalidate, private, max-age=0"
86
+ headers["Content-Type"] = "application/json; charset=utf-8"
87
+ headers["Pragma"] = "no-cache"
88
+ headers["Expires"] = "0"
89
89
 
90
90
  if @bus.extra_response_headers_lookup
91
91
  @bus.extra_response_headers_lookup.call(env).each do |k, v|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MessageBus
4
- VERSION = "4.3.4"
4
+ VERSION = "4.3.7"
5
5
  end
@@ -99,6 +99,12 @@ describe MessageBus::Client do
99
99
  chunk2.length.must_equal 0
100
100
  end
101
101
 
102
+ it "does not raise an error when trying to write a message to a closed client using chunked encoding" do
103
+ @client.use_chunked = true
104
+ assert(@client.closed?)
105
+ @client << MessageBus::Message.new(1, 1, "/test", "test")
106
+ end
107
+
102
108
  it "does not bleed data across sites" do
103
109
  @client.site_id = "test"
104
110
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: message_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.4
4
+ version: 4.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack