bunny 2.11.0.pre1 → 2.11.0

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
  SHA1:
3
- metadata.gz: c3f36588bd0953c3c43b8828d00aef4ccbf750aa
4
- data.tar.gz: 219a436f9ef331a65dc64b7099636448f5742f92
3
+ metadata.gz: 30bc96b65edcb9a0d976408669ca1af4654e5a8a
4
+ data.tar.gz: 144a71c34e3f0cc04024dd7d80eb400fd1834a36
5
5
  SHA512:
6
- metadata.gz: 49de63ff6da6733575a771e9a3c9eb1aa42770c9441cdcd5d4e86a11075c838dc6d4c5d096a24e28f660f82c278c23df7e31590799a1ed4619efe2555813106f
7
- data.tar.gz: 359d102f28f9adab1f2f855872613ef8d9b0b8f486db0dd62db8d742520490c72cd151c341834f68aa86dee4e7c4efbb923683f67eaeb5ed94020ceebabb0260
6
+ metadata.gz: f85596d0dd8e731f6d6bf6719d3f1324690762c61f2829ad65125a4b55d833c000b574f90160e956fefbff930519e9d33fab30723cb9b0a00de85e3252a208ae
7
+ data.tar.gz: 60ee0016f188410417f8742c24850fa57260808759c2c95f71f4c9ea2ea2cf9e940ea170b4503f6bca800f7ccf0cae5eabe382ebf00dbd432ad6337e64febcad
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(:heartbeat_timeout => 8)
12
12
  conn.start
13
13
 
14
14
  ch = conn.create_channel
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(heartbeat_timeout: 8)
12
12
  conn.start
13
13
 
14
14
  ch = conn.create_channel
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(heartbeat_timeout: 8)
12
12
  conn.start
13
13
 
14
14
  ch1 = conn.create_channel
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'Bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(:heartbeat_timeout => 8)
12
12
  conn.start
13
13
 
14
14
  ch0 = conn.create_channel
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(heartbeat_timeout: 8)
12
12
  conn.start
13
13
 
14
14
  ch = conn.create_channel
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8)
11
+ conn = Bunny.new(heartbeat_timeout: 8)
12
12
  conn.start
13
13
 
14
14
  begin
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
8
8
 
9
9
  require 'bunny'
10
10
 
11
- conn = Bunny.new(:heartbeat_interval => 8, :automatically_recover => false)
11
+ conn = Bunny.new(heartbeat_timeout: 8, automatically_recover: false)
12
12
  conn.start
13
13
 
14
14
  ch = conn.create_channel
@@ -9,7 +9,7 @@ $:.unshift(File.expand_path("../../../lib", __FILE__))
9
9
  require 'bunny'
10
10
 
11
11
 
12
- conn = Bunny.new(:heartbeat_interval => 2)
12
+ conn = Bunny.new(:heartbeat_timeout => 2)
13
13
  conn.start
14
14
 
15
15
  c = conn.create_channel
@@ -11,7 +11,7 @@ require 'bunny'
11
11
  HIGH_PRIORITY_Q = "bunny.examples.priority.hilo.high"
12
12
  LOW_PRIORITY_Q = "bunny.examples.priority.hilo.low"
13
13
 
14
- conn = Bunny.new(:heartbeat_interval => 8)
14
+ conn = Bunny.new(heartbeat_timeout: 8)
15
15
  conn.start
16
16
 
17
17
  ch1 = conn.create_channel
@@ -101,7 +101,7 @@ module Bunny
101
101
  # @option connection_string_or_opts [String] :username ("guest") Username
102
102
  # @option connection_string_or_opts [String] :password ("guest") Password
103
103
  # @option connection_string_or_opts [String] :vhost ("/") Virtual host to use
104
- # @option connection_string_or_opts [Integer, Symbol] :heartbeat (:server) Heartbeat interval. :server means use the default suggested by RabbitMQ. 0 means heartbeats and socket read timeouts will be disabled (not recommended).
104
+ # @option connection_string_or_opts [Integer, Symbol] :heartbeat (:server) Heartbeat timeout to offer to the server. :server means use the value suggested by RabbitMQ. 0 means heartbeats and socket read timeouts will be disabled (not recommended).
105
105
  # @option connection_string_or_opts [Integer] :network_recovery_interval (4) Recovery interval periodic network recovery will use. This includes initial pause after network failure.
106
106
  # @option connection_string_or_opts [Boolean] :tls (false) Should TLS/SSL be used?
107
107
  # @option connection_string_or_opts [String] :tls_cert (nil) Path to client TLS/SSL certificate file (.pem)
@@ -233,9 +233,13 @@ module Bunny
233
233
  # @return [String] Virtual host used
234
234
  def virtual_host; self.vhost; end
235
235
 
236
- # @return [Integer] Heartbeat interval used
236
+ # @deprecated
237
+ # @return [Integer] Heartbeat timeout (not interval) used
237
238
  def heartbeat_interval; self.heartbeat; end
238
239
 
240
+ # @return [Integer] Heartbeat timeout used
241
+ def heartbeat_timeout; self.heartbeat; end
242
+
239
243
  # @return [Boolean] true if this connection uses TLS (SSL)
240
244
  def uses_tls?
241
245
  @transport.uses_tls?
@@ -944,7 +948,7 @@ module Bunny
944
948
 
945
949
  # @private
946
950
  def heartbeat_from(options)
947
- options[:heartbeat] || options[:heartbeat_interval] || options[:requested_heartbeat] || DEFAULT_HEARTBEAT
951
+ options[:heartbeat] || options[:heartbeat_timeout] || options[:requested_heartbeat] || options[:heartbeat_interval] || DEFAULT_HEARTBEAT
948
952
  end
949
953
 
950
954
  # @private
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.11.0.pre1"
5
+ VERSION = "2.11.0"
6
6
  end
@@ -462,7 +462,7 @@ describe Bunny::Session do
462
462
  let(:interval) { 1 }
463
463
 
464
464
  subject do
465
- described_class.new(hostname: host, username: username, password: password, vhost: vhost, heartbeat_interval: interval)
465
+ described_class.new(hostname: host, username: username, password: password, vhost: vhost, heartbeat_timeout: interval)
466
466
  end
467
467
 
468
468
  it "successfully connects" do
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe "Client-defined heartbeat interval" do
4
4
  context "with value > 0" do
5
5
  let(:connection) do
6
- c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_interval: 4)
6
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_timeout: 4)
7
7
  c.start
8
8
  c
9
9
  end
@@ -19,7 +19,7 @@ describe "Client-defined heartbeat interval" do
19
19
  context "with value = 0" do
20
20
  let(:connection) do
21
21
  c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed",
22
- heartbeat_interval: 0, automatically_recover: false)
22
+ heartbeat_timeout: 0, automatically_recover: false)
23
23
  c.start
24
24
  c
25
25
  end
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  describe "Server-defined heartbeat interval" do
37
37
  let(:connection) do
38
- c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_interval: :server)
38
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_timeout: :server)
39
39
  c.start
40
40
  c
41
41
  end
@@ -9,7 +9,7 @@ unless ENV["CI"]
9
9
  before :all do
10
10
  @connection = Bunny.new(username: "bunny_gem",
11
11
  password: "bunny_password", vhost: "bunny_testbed",
12
- automatic_recovery: false, heartbeat_interval: 6)
12
+ automatic_recovery: false, heartbeat_timeout: 6)
13
13
  @connection.start
14
14
  end
15
15
 
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.11.0.pre1
4
+ version: 2.11.0
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: 2018-06-06 00:00:00.000000000 Z
15
+ date: 2018-06-21 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol
@@ -227,9 +227,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
227
  version: '2.2'
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  requirements:
230
- - - ">"
230
+ - - ">="
231
231
  - !ruby/object:Gem::Version
232
- version: 1.3.1
232
+ version: '0'
233
233
  requirements: []
234
234
  rubyforge_project:
235
235
  rubygems_version: 2.6.11