bunny 1.7.0 → 1.7.1
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 +4 -4
- data/ChangeLog.md +18 -0
- data/bunny.gemspec +1 -1
- data/lib/bunny/jruby/socket.rb +2 -1
- data/lib/bunny/session.rb +12 -10
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/connection_spec.rb +5 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6e1ab5b64d51e0a5723b686711573c11a39cf5a
|
4
|
+
data.tar.gz: f8700621a089b0f6cd594c7f2fc1d6677cd321aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0682d6723a1530cfcb39b384027108ea306206fc7c275b86961d8fed701f7363688cd9cac888e97b890463bbff126194a04954dbc3821c6dd9463586182c81c5
|
7
|
+
data.tar.gz: 79e3f21253c27c279050a7c5d730a4d65e2ae122f72a64b7830e0d07c56cc108063c791f1b00b1ae9eea997088e2bcbe2d758bcb46d1ea0d65e62f004b4bc5be
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## Changes between Bunny 1.7.0 and 1.7.1
|
2
|
+
|
3
|
+
### amq-protocol Dependendency Locked to 1.9.x
|
4
|
+
|
5
|
+
Since `amq-protocol` 2.0 requires Ruby 2.0 or later, 1.7.x versions of Bunny
|
6
|
+
must use `1.9.2`.
|
7
|
+
|
8
|
+
GH issue: [#336](https://github.com/ruby-amqp/bunny/issues/336).
|
9
|
+
|
10
|
+
### Logger Output Remains Consistent
|
11
|
+
|
12
|
+
Setting the `@logger.progname` attribute changes the output of the logger.
|
13
|
+
This is not expected behaviour when the client provides a custom logger.
|
14
|
+
Behaviour remains unchainged when the internally initialized logger is used.
|
15
|
+
|
16
|
+
Contributed by Justin Carter.
|
17
|
+
|
18
|
+
|
1
19
|
## Changes between Bunny 1.6.0 and 1.7.0
|
2
20
|
|
3
21
|
### TLS Peer Verification Enabled by Default
|
data/bunny.gemspec
CHANGED
data/lib/bunny/jruby/socket.rb
CHANGED
@@ -5,7 +5,8 @@ module Bunny
|
|
5
5
|
# TCP socket extension that uses Socket#readpartial to avoid excessive CPU
|
6
6
|
# burn after some time. See issue #165.
|
7
7
|
# @private
|
8
|
-
|
8
|
+
module Socket
|
9
|
+
include Bunny::Socket
|
9
10
|
|
10
11
|
# Reads given number of bytes with an optional timeout
|
11
12
|
#
|
data/lib/bunny/session.rb
CHANGED
@@ -144,10 +144,11 @@ module Bunny
|
|
144
144
|
@user = self.username_from(opts)
|
145
145
|
@pass = self.password_from(opts)
|
146
146
|
@vhost = self.vhost_from(opts)
|
147
|
-
@logfile = opts[:log_file] || opts[:logfile] || STDOUT
|
148
147
|
@threaded = opts.fetch(:threaded, true)
|
149
148
|
|
150
|
-
|
149
|
+
log_file = opts[:log_file] || opts[:logfile] || STDOUT
|
150
|
+
log_level = opts[:log_level] || ENV["BUNNY_LOG_LEVEL"] || Logger::WARN
|
151
|
+
@logger = opts.fetch(:logger, init_default_logger(log_file, log_level))
|
151
152
|
|
152
153
|
# should automatic recovery from network failures be used?
|
153
154
|
@automatically_recover = if opts[:automatically_recover].nil? && opts[:automatic_recovery].nil?
|
@@ -1103,8 +1104,8 @@ module Bunny
|
|
1103
1104
|
@transport.close rescue nil # Let's make sure the previous transport socket is closed
|
1104
1105
|
@transport = Transport.new(self, host, @port, @opts.merge(:session_thread => @origin_thread))
|
1105
1106
|
|
1106
|
-
# Reset the cached progname for the logger
|
1107
|
-
@
|
1107
|
+
# Reset the cached progname for the logger only when no logger was provided
|
1108
|
+
@default_logger.progname = self.to_s
|
1108
1109
|
|
1109
1110
|
@transport
|
1110
1111
|
else
|
@@ -1157,12 +1158,13 @@ module Bunny
|
|
1157
1158
|
end
|
1158
1159
|
|
1159
1160
|
# @private
|
1160
|
-
def
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1161
|
+
def init_default_logger(logfile, level)
|
1162
|
+
@default_logger = begin
|
1163
|
+
lgr = ::Logger.new(logfile)
|
1164
|
+
lgr.level = normalize_log_level(level)
|
1165
|
+
lgr.progname = self.to_s
|
1166
|
+
lgr
|
1167
|
+
end
|
1166
1168
|
end
|
1167
1169
|
|
1168
1170
|
# @private
|
data/lib/bunny/version.rb
CHANGED
@@ -435,5 +435,10 @@ describe Bunny::Session do
|
|
435
435
|
|
436
436
|
conn.close
|
437
437
|
end
|
438
|
+
|
439
|
+
it "doesn't reassign the logger's progname attribute" do
|
440
|
+
expect(logger).not_to receive(:progname=)
|
441
|
+
described_class.new(:hostname => "localhost", :logger => logger)
|
442
|
+
end
|
438
443
|
end
|
439
444
|
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: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Duncan
|
@@ -12,20 +12,20 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - "
|
21
|
+
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.9.2
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - "
|
28
|
+
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: 1.9.2
|
31
31
|
description: Easy to use, feature complete Ruby client for RabbitMQ 3.3 and later
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.4.
|
236
|
+
rubygems_version: 2.4.8
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Popular easy to use Ruby client for RabbitMQ
|