hot_bunnies 1.3.3-java → 1.3.6-java
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.
- data/.travis.yml +6 -5
- data/lib/ext/rabbitmq-client.jar +0 -0
- data/lib/hot_bunnies/queue.rb +1 -1
- data/lib/hot_bunnies/version.rb +1 -1
- data/lib/hot_bunnies.rb +20 -0
- data/spec/integration/connection_spec.rb +19 -0
- data/spec/integration/publisher_confirmations_spec.rb +1 -1
- metadata +41 -21
data/.travis.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
language: ruby
|
1
2
|
script: "bundle exec rspec -c spec"
|
2
3
|
rvm:
|
3
|
-
- jruby
|
4
|
-
|
5
|
-
-
|
6
|
-
- JRUBY_OPTS="--server --1.9"
|
4
|
+
- jruby-18mode
|
5
|
+
- jruby-19mode
|
6
|
+
- jruby-head
|
7
7
|
notifications:
|
8
|
-
|
8
|
+
recipients:
|
9
|
+
- michaelklishin@me.com
|
data/lib/ext/rabbitmq-client.jar
CHANGED
Binary file
|
data/lib/hot_bunnies/queue.rb
CHANGED
data/lib/hot_bunnies/version.rb
CHANGED
data/lib/hot_bunnies.rb
CHANGED
@@ -17,6 +17,7 @@ module HotBunnies
|
|
17
17
|
def self.connect(options={})
|
18
18
|
cf = ConnectionFactory.new
|
19
19
|
|
20
|
+
cf.uri = options[:uri] if options[:uri]
|
20
21
|
cf.host = hostname_from(options) if include_host?(options)
|
21
22
|
cf.port = options[:port] if options[:port]
|
22
23
|
cf.virtual_host = vhost_from(options) if include_vhost?(options)
|
@@ -24,6 +25,9 @@ module HotBunnies
|
|
24
25
|
cf.username = username_from(options) if include_username?(options)
|
25
26
|
cf.password = password_from(options) if include_password?(options)
|
26
27
|
|
28
|
+
cf.requested_heartbeat = heartbeat_from(options) if include_heartbeat?(options)
|
29
|
+
cf.connection_timeout = connection_timeout_from(options) if include_connection_timeout?(options)
|
30
|
+
|
27
31
|
cf.new_connection
|
28
32
|
end
|
29
33
|
|
@@ -58,6 +62,14 @@ module HotBunnies
|
|
58
62
|
options[:username] || options[:user] || ConnectionFactory.DEFAULT_USER
|
59
63
|
end
|
60
64
|
|
65
|
+
def self.heartbeat_from(options)
|
66
|
+
options[:heartbeat_interval] || options[:requested_heartbeat] || ConnectionFactory.DEFAULT_HEARTBEAT
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.connection_timeout_from(options)
|
70
|
+
options[:connection_timeout_interval] || options[:connection_timeout] || ConnectionFactory.DEFAULT_CONNECTION_TIMEOUT
|
71
|
+
end
|
72
|
+
|
61
73
|
def self.include_username?(options)
|
62
74
|
!!(options[:username] || options[:user])
|
63
75
|
end
|
@@ -69,6 +81,14 @@ module HotBunnies
|
|
69
81
|
def self.include_password?(options)
|
70
82
|
!!(options[:password] || options[:pass])
|
71
83
|
end
|
84
|
+
|
85
|
+
def self.include_heartbeat?(options)
|
86
|
+
!!(options[:heartbeat_interval] || options[:requested_heartbeat] || options[:heartbeat])
|
87
|
+
end
|
88
|
+
|
89
|
+
def self.include_connection_timeout?(options)
|
90
|
+
!!(options[:connection_timeout_interval] || options[:connection_timeout])
|
91
|
+
end
|
72
92
|
end
|
73
93
|
|
74
94
|
require 'hot_bunnies/channel'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
|
4
|
+
describe "HotBunnies" do
|
5
|
+
|
6
|
+
#
|
7
|
+
# Examples
|
8
|
+
#
|
9
|
+
|
10
|
+
it "lets you specify requested heartbeat interval" do
|
11
|
+
c1 = HotBunnies.connect(:requested_heartbeat => 10)
|
12
|
+
c1.close
|
13
|
+
end
|
14
|
+
|
15
|
+
it "lets you specify connection timeout interval" do
|
16
|
+
c1 = HotBunnies.connect(:connection_timeout => 3)
|
17
|
+
c1.close
|
18
|
+
end
|
19
|
+
end
|
@@ -39,7 +39,7 @@ describe "Any channel" do
|
|
39
39
|
|
40
40
|
it "can use publisher confirmations with listener objects" do
|
41
41
|
channel.confirm_select
|
42
|
-
channel.
|
42
|
+
channel.add_confirm_listener(ConfirmationListener.new(latch))
|
43
43
|
|
44
44
|
queue = channel.queue("", :auto_delete => true)
|
45
45
|
Thread.new do
|
metadata
CHANGED
@@ -1,25 +1,34 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hot_bunnies
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 6
|
10
|
+
version: 1.3.6
|
6
11
|
platform: java
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Theo Hultberg
|
9
14
|
- Michael S. Klishin
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
18
|
+
|
19
|
+
date: 2012-03-30 00:00:00 Z
|
14
20
|
dependencies: []
|
15
|
-
|
16
|
-
|
17
|
-
email:
|
21
|
+
|
22
|
+
description: A object oriented interface to RabbitMQ that uses the Java driver under the hood
|
23
|
+
email:
|
18
24
|
- theo@burtcorp.com
|
19
25
|
executables: []
|
26
|
+
|
20
27
|
extensions: []
|
28
|
+
|
21
29
|
extra_rdoc_files: []
|
22
|
-
|
30
|
+
|
31
|
+
files:
|
23
32
|
- .gitignore
|
24
33
|
- .rvmrc
|
25
34
|
- .travis.yml
|
@@ -40,6 +49,7 @@ files:
|
|
40
49
|
- lib/hot_bunnies/version.rb
|
41
50
|
- spec/integration/alternate_exchanges_spec.rb
|
42
51
|
- spec/integration/basic_consume_spec.rb
|
52
|
+
- spec/integration/connection_spec.rb
|
43
53
|
- spec/integration/exchange_bind_spec.rb
|
44
54
|
- spec/integration/exchange_declare_spec.rb
|
45
55
|
- spec/integration/publisher_confirmations_spec.rb
|
@@ -52,26 +62,36 @@ files:
|
|
52
62
|
- spec/spec_helper.rb
|
53
63
|
homepage: http://github.com/iconara/hot_bunnies
|
54
64
|
licenses: []
|
65
|
+
|
55
66
|
post_install_message:
|
56
67
|
rdoc_options: []
|
57
|
-
|
68
|
+
|
69
|
+
require_paths:
|
58
70
|
- lib
|
59
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
72
|
none: false
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
81
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
71
89
|
requirements: []
|
90
|
+
|
72
91
|
rubyforge_project: hot_bunnies
|
73
|
-
rubygems_version: 1.8.
|
92
|
+
rubygems_version: 1.8.15
|
74
93
|
signing_key:
|
75
94
|
specification_version: 3
|
76
95
|
summary: Ruby wrapper for the RabbitMQ Java driver
|
77
96
|
test_files: []
|
97
|
+
|