message_bus 4.3.2 → 4.3.4

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: e36107abe5d2f970df28804121149c63c3fc7b7708013673340564f511bbfbbe
4
- data.tar.gz: 5a3b55c06cd1137c152025b08e8ca3bba0b47c5cdb2330721c9c9c3559db454d
3
+ metadata.gz: 76a5b68eec4b7cfbe611e8b2a1fa0d60ac5d48dc33594419613ff07579cabe63
4
+ data.tar.gz: 9164fb39f5850d69ff83ce373ea398e9cd4086d9edc319c62c36f1bbdd1ffd99
5
5
  SHA512:
6
- metadata.gz: 19ecda3ef5c20ffd217e491dcd784c4e2f04a360b0ad27d3aeee96b468ae55e88e23827a0d5fab787af05cf9afa9df2d2a0c7d3b1a7ccb8b3b4544164e430595
7
- data.tar.gz: 05c2411c4b17495306d7c33da0a73759ceab0ec7f332e4626d914b68d4ae8febc53ab552a854197a0335c5f4483195a3389eec7c6b4774d14a719c7b8429bf7a
6
+ metadata.gz: 6d9b70b183065bc17178443c8e008b921d3952b3ad9b45c3d30b2b19c388e6b7d9311537d654c0523449926918c797d9a4a5156f1b5631976b605e48b8878444
7
+ data.tar.gz: 7ae3c8104dcfb41af4b58d4baad29371307cbbf13bb6de6e364cddb48b6a271b147a55c123068a74537789dff7ba414a4fa5b4e1953893a5af6b29188ba85906
data/CHANGELOG CHANGED
@@ -1,9 +1,20 @@
1
- FUTURE
1
+ 20-06-2023
2
2
 
3
+ - Version 4.3.4
4
+
5
+ - Revert "FIX: Don't error when trying to write a message to a closed client (#336)".
6
+ This seems to have broken MessageBus in production so reverting for now.
7
+
8
+ 19-06-2023
9
+
10
+ - Version 4.3.3
11
+
12
+ - FIX: Use lowercase header names in `MessageBus::Rack::Middleware` for compatibility with Rack 3.x.
13
+ - FIX: Don't error when trying to write a message to a closed client
3
14
 
4
15
  13-01-2023
5
16
 
6
- - Version 4.2.1
17
+ - Version 4.3.2
7
18
 
8
19
  - FIX: Do not disable chunking on cancel/error
9
20
 
@@ -34,7 +45,7 @@ FUTURE
34
45
 
35
46
  - PERF: Optimize Client#backlog for up-to-date clients
36
47
 
37
- Also introduces a new MessageBus#last_ids(*channels) api for fetching the last_ids of
48
+ Also introduces a new MessageBus#last_ids(\*channels) api for fetching the last_ids of
38
49
  multiple channels simultaneously
39
50
 
40
51
  11-01-2022
data/README.md CHANGED
@@ -416,7 +416,7 @@ message_bus also supports PostgreSQL as a backend, and can be configured like so
416
416
  MessageBus.configure(backend: :postgres, backend_options: {user: 'message_bus', dbname: 'message_bus'})
417
417
  ```
418
418
 
419
- The PostgreSQL client message_bus uses is [ruby-pg](https://bitbucket.org/ged/ruby-pg), so you can visit it's repo to see what options you can include in `:backend_options`.
419
+ The PostgreSQL client message_bus uses is [ruby-pg](https://github.com/ged/ruby-pg), so you can visit it's repo to see what options you can include in `:backend_options`.
420
420
 
421
421
  A `:clear_every` option is also supported, which limits backlog trimming frequency to the specified number of publications. If you set `clear_every: 100`, the backlog will only be cleared every 100 publications. This can improve performance in cases where exact backlog length limiting is not required.
422
422
 
@@ -526,16 +526,11 @@ Rails.application.config do |config|
526
526
  end
527
527
  ```
528
528
 
529
- Specifically, if you use a Rack middleware-based authentication solution (such as Warden) in a Rails application and wish to use it for authenticating message_bus requests, you must ensure that the MessageBus middleware comes after it in the stack. Unfortunately, this can be difficult, but the following solution is known to work:
529
+ Specifically, if you use a Rack middleware-based authentication solution (such as Warden) in a Rails application and wish to use it for authenticating message_bus requests, you must ensure that the MessageBus middleware comes after it in the stack.
530
530
 
531
531
  ```ruby
532
532
  # config/initializers/message_bus.rb
533
- Rails.application.config do |config|
534
- # See https://github.com/rails/rails/issues/26303#issuecomment-442894832
535
- MyAppMessageBusMiddleware = Class.new(MessageBus::Rack::Middleware)
536
- config.middleware.delete(MessageBus::Rack::Middleware)
537
- config.middleware.insert_after(Warden::Manager, MyAppMessageBusMiddleware)
538
- end
533
+ Rails.application.config.middleware.move_after(Warden::Manager, MessageBus::Rack::Middleware)
539
534
  ```
540
535
 
541
536
  ### A Distributed Cache
@@ -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.2"
4
+ VERSION = "4.3.4"
5
5
  end