bunny 2.7.1 → 2.7.2

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
  SHA1:
3
- metadata.gz: 3f58b34695f1799decb5818ead7efbf21448656d
4
- data.tar.gz: 4c8db08cd4581da8eab1bdd0afd81693d4042a55
3
+ metadata.gz: f1dd2f949bcc12b76fad38159f60adfbf52eed85
4
+ data.tar.gz: 280cc9632f061268091bf5e0b705f1264f3b3aa6
5
5
  SHA512:
6
- metadata.gz: 941c64ca6a10063df82456aec1f5dd4a44d5df67c6d9e74a73cfc41821b1b3d29f2ddfe260ea31434adb0697d5136d6cbc28e5a84e8adaca2b83d8897fb8d164
7
- data.tar.gz: a3056eae41a6600aeed337094851c1f5f16e0f80e7b8170e2a7a18d22ac2caabdb0cf0ce69637c1f9f0ecdee7e693d1e9cf84dbc66ebfdd866bd6602a6b84a67
6
+ metadata.gz: 5b8e2f0e13ba6488e563ae1e8ba6566cf4c3d6ddfe22e095f3a2444240cfcf78f236cbf6a97cc71aba777e0ec8fcc14e6859fa5266dc012f063c4dbeb3bad3c0
7
+ data.tar.gz: 99bd85512d22d4da1626e98346a61512b470d6c87fd735838960c951af99fef340cee57cc9b8b6f54905d93f64c94c8b1a180c87b6f69439f654348aaf57e751
@@ -1,9 +1,30 @@
1
+ ## Overview
2
+
3
+ This project **does not** use GitHub issues for questions, investigations, discussions, and so on.
4
+ Issues are appropriate for something specific enough for a maintainer or contributor to work on:
5
+
6
+ * There should be enough information to reproduce the behavior observed in a reasonable amount of time
7
+ * It should be reasonably clear why the behavior should be changed and why this cannot or should not be addressed
8
+ in application code, a separate library and so on
9
+
10
+ All issues that do not satisfy the above properties belong to the [Ruby RabbitMQ clients mailing list](http://groups.google.com/forum/#!forum/ruby-amqp). Pull request that do not satisfy them have a high chance
11
+ of being closed.
12
+
13
+ ## Submitting a Pull Request
14
+
15
+ Please read the sections below to get an idea about how to run Bunny test suites first. Successfully
16
+ running all tests, at least with `CI` environment variable exported to `true`, is an important
17
+ first step for any contributor.
18
+
19
+ Once you have a passing test suite, create a branch and make your changes on it.
20
+ When you are done with your changes and all
21
+ tests pass, write a [good, detailed commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) submit a pull request on GitHub.
22
+
1
23
  ## Pre-requisites
2
24
 
3
25
  The project uses Bundler for dependency management and requires RabbitMQ `3.5+` to be running
4
26
  locally with the `rabbitmq-management` and `rabbitmq_consistent_hash_exchange` plugins enabled.
5
27
 
6
-
7
28
  ### Running the Specs
8
29
 
9
30
  The specs require RabbitMQ to be running locally with a specific set of vhosts
@@ -88,8 +109,3 @@ It is possible to run all tests:
88
109
  It is possible to run only integration and regression tests but exclude unit and stress tests:
89
110
 
90
111
  CI=true bundle exec rspec -c spec/higher_level_api/ spec/lower_level_api spec/issues && bundle exec rspec -c spec/higher_level_api/integration/connection_recovery_spec.rb
91
-
92
- ## Pull Requests
93
-
94
- Then create a branch and make your changes on it. Once you are done with your changes and all
95
- tests pass, write a [good, detailed commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) submit a pull request on GitHub.
@@ -1,6 +1,13 @@
1
1
  ## Changes between Bunny 2.7.1 and 2.7.2 (unreleased)
2
2
 
3
- No changes yet.
3
+ ### Reading a Frame without Payload Could Result in a `Bunny::NoFinalOctetError`
4
+
5
+ Reading a frame without payload (e.g. a heartbeat frame) could result in a `Bunny::NoFinalOctetError`
6
+ with mostly idle connections.
7
+
8
+ GitHub issue: [#521](https://github.com/ruby-amqp/bunny/issues/521).
9
+
10
+ Contributed by GPif.
4
11
 
5
12
 
6
13
  ## Changes between Bunny 2.7.0 and 2.7.1 (Sep 25th, 2017)
@@ -51,7 +58,7 @@ in those cases.
51
58
 
52
59
  ### amq-protocol Update
53
60
 
54
- Minimum `amq-protocol` version is now [`2.2.0`]](https://github.com/ruby-amqp/amq-protocol/blob/master/ChangeLog.md#changes-between-210-and-220-may-11th-2017) which includes
61
+ Minimum `amq-protocol` version is now [`2.2.0`](https://github.com/ruby-amqp/amq-protocol/blob/master/ChangeLog.md#changes-between-210-and-220-may-11th-2017) which includes
55
62
  a change in [how timestamps are encoded](https://github.com/ruby-amqp/amq-protocol/issues/64).
56
63
 
57
64
 
data/Gemfile CHANGED
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  group :test do
35
35
  gem "rspec", "~> 3.5.0"
36
- gem "rabbitmq_http_api_client", "~> 1.8.0"
36
+ gem "rabbitmq_http_api_client", "~> 1.9.1"
37
37
  end
38
38
 
39
39
  gemspec
data/README.md CHANGED
@@ -160,7 +160,7 @@ to also join the [RabbitMQ mailing list](https://groups.google.com/forum/#!forum
160
160
 
161
161
  ## Continuous Integration
162
162
 
163
- [![Build Status](https://travis-ci.org/ruby-amqp/bunny.png)](https://travis-ci.org/ruby-amqp/bunny/)
163
+ [![Build Status](https://travis-ci.org/ruby-amqp/bunny.svg)](https://travis-ci.org/ruby-amqp/bunny/)
164
164
 
165
165
 
166
166
  ### News & Announcements on Twitter
@@ -89,7 +89,7 @@ module Bunny
89
89
  # @return [Integer] Timeout for blocking protocol operations (queue.declare, queue.bind, etc), in milliseconds. Default is 15000.
90
90
  attr_reader :continuation_timeout
91
91
  attr_reader :network_recovery_interval
92
-
92
+ attr_accessor :socket_configurator
93
93
 
94
94
  # @param [String, Hash] connection_string_or_opts Connection string or a hash of connection options
95
95
  # @param [Hash] optz Extra options not related to connection
@@ -1257,7 +1257,7 @@ module Bunny
1257
1257
 
1258
1258
  # @private
1259
1259
  def negotiate_value(client_value, server_value)
1260
- return server_value if client_value == :server
1260
+ return server_value if [:server, "server"].include?(client_value)
1261
1261
 
1262
1262
  if client_value == 0 || server_value == 0
1263
1263
  [client_value, server_value].max
@@ -233,17 +233,13 @@ module Bunny
233
233
  # Exposed primarily for Bunny::Channel
234
234
  # @private
235
235
  def read_next_frame(opts = {})
236
- header = read_fully(7)
237
- # TODO: network issues here will sometimes cause
238
- # the socket method return an empty string. We need to log
239
- # and handle this better.
240
- # type, channel, size = begin
241
- # AMQ::Protocol::Frame.decode_header(header)
242
- # rescue AMQ::Protocol::EmptyResponseError => e
243
- # puts "Got AMQ::Protocol::EmptyResponseError, header is #{header.inspect}"
244
- # end
236
+ header = read_fully(7)
245
237
  type, channel, size = AMQ::Protocol::Frame.decode_header(header)
246
- payload = read_fully(size)
238
+ payload = if size > 0
239
+ read_fully(size)
240
+ else
241
+ ''
242
+ end
247
243
  frame_end = read_fully(1)
248
244
 
249
245
  # 1) the size is miscalculated
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.7.1"
5
+ VERSION = "2.7.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Duncan
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2017-09-24 00:00:00.000000000 Z
15
+ date: 2017-11-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol