message_bus 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of message_bus might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99317ae05b998644cb03be9365caf40fb7375426ea0bbbc1a165a3d6b10edf57
4
- data.tar.gz: 3a0101abb11820b6225eefe0c2ac318502e05a8e2b6e0a4116adfed4b2a53864
3
+ metadata.gz: '096c5bb55b64076beef0b89313a6424fb0ded08cb2988f0b79cc44dfc58cc4dd'
4
+ data.tar.gz: aceed48ea3dbc555fa4f9896f8cdb474fa543f20469659bc8bf05bcbdd8e20e2
5
5
  SHA512:
6
- metadata.gz: b1aca6d2cad3da7eb43febac4538396a14824cf3638afe28b1d20470b8a01b52a26039102fa87dde502d3aac4cf0c12030b8c21145aaeb591573f190765aae3e
7
- data.tar.gz: c5eaac3ab21f72c235c2d408d054e0c3423f619bc298d04402e3e101517944d74bcc799fa240ce7ec11187478dc78f87875293d53998e04edb5aa62c5a3a6f9f
6
+ metadata.gz: d906c4e50068024c76ea0019f9d376869fba3ea67d52cfae4a49d251f270b442723a3924b78eccdaddcc68963f0c040e91a37d92c9b396f2bf5340b213338328
7
+ data.tar.gz: c7ffa6dfd797b20c44e3e305f5de06c04a10a39fc708152c5479b50ca54baf3ebc2b3ff19a08f33949f31390370fded3ea934f39f8c10a0ac22f7a18ac8a341f
data/CHANGELOG CHANGED
@@ -1,4 +1,8 @@
1
- Unreleased
1
+ 30-04-2019
2
+
3
+ - Version 2.2.1
4
+
5
+ - FIX: No longer handles exceptions raised in downstream middleware via `on_middleware_error`
2
6
 
3
7
  28-01-2019
4
8
 
data/README.md CHANGED
@@ -631,6 +631,10 @@ This message indicates the last ID in the backlog for each channel that the clie
631
631
 
632
632
  The values provided in this status message can be used by the client to skip requesting messages it will never receive and move forward in polling.
633
633
 
634
+ ### Publishing to MessageBus from outside of MessageBus
635
+
636
+ It may be necessary or desired for integration with existing systems to publish messages from outside the Ruby app where MessageBus is running. @tgodfrey has an example of how to do that, using the Redis backend, from Elixir here: https://gist.github.com/tgodfrey/1a67753d51cb202ca8eb04b933cec924.
637
+
634
638
  ## Contributing
635
639
 
636
640
  If you are looking to contribute to this project here are some ideas
@@ -56,6 +56,12 @@ class MessageBus::Rack::Middleware
56
56
  def call(env)
57
57
  return @app.call(env) unless env['PATH_INFO'] =~ /^\/message-bus\//
58
58
 
59
+ handle_request(env)
60
+ end
61
+
62
+ private
63
+
64
+ def handle_request(env)
59
65
  # special debug/test route
60
66
  if @bus.allow_broadcast? && env['PATH_INFO'] == '/message-bus/broadcast'
61
67
  parsed = Rack::Request.new(env)
@@ -184,8 +190,6 @@ class MessageBus::Rack::Middleware
184
190
  end
185
191
  end
186
192
 
187
- private
188
-
189
193
  def close_db_connection!
190
194
  # IMPORTANT
191
195
  # ConnectionManagement in Rails puts a BodyProxy around stuff
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MessageBus
4
- VERSION = "2.2.0"
4
+ VERSION = "2.2.1"
5
5
  end
@@ -369,6 +369,17 @@ describe MessageBus::Rack::Middleware do
369
369
 
370
370
  last_response.status.must_equal 407
371
371
  end
372
+
373
+ it "does not handle exceptions from downstream middleware" do
374
+ @bus.on_middleware_error do |_env, err|
375
+ [404, {}, []]
376
+ end
377
+
378
+ get("/")
379
+
380
+ last_response.status.must_equal 500
381
+ last_response.body.must_equal 'should not be called'
382
+ end
372
383
  end
373
384
 
374
385
  describe "messagebus.channels env support" do
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: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -155,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 2.7.6
158
+ rubygems_version: 3.0.3
160
159
  signing_key:
161
160
  specification_version: 4
162
161
  summary: ''