hot_bunnies 1.3.4-java → 1.3.5-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.
@@ -1,8 +1,8 @@
1
1
  script: "bundle exec rspec -c spec"
2
2
  rvm:
3
- - jruby
4
- env:
5
- - JRUBY_OPTS="--server"
6
- - JRUBY_OPTS="--server --1.9"
3
+ - jruby-18mode
4
+ - jruby-19mode
5
+ - jruby-head
7
6
  notifications:
8
- email: false
7
+ recipients:
8
+ - michaelklishin@me.com
@@ -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'
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module HotBunnies
4
- VERSION = '1.3.4'
4
+ VERSION = '1.3.5'
5
5
  end
@@ -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
metadata CHANGED
@@ -1,34 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hot_bunnies
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 1
8
- - 3
9
- - 4
10
- version: 1.3.4
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.3.5
11
6
  platform: java
12
- authors:
7
+ authors:
13
8
  - Theo Hultberg
14
9
  - Michael S. Klishin
15
- autorequire:
10
+ autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-01-04 00:00:00 Z
13
+ date: 2012-02-07 00:00:00.000000000Z
20
14
  dependencies: []
21
-
22
15
  description: A object oriented interface to RabbitMQ that uses the Java driver under the hood
23
- email:
16
+ email:
24
17
  - theo@burtcorp.com
25
18
  executables: []
26
-
27
19
  extensions: []
28
-
29
20
  extra_rdoc_files: []
30
-
31
- files:
21
+ files:
32
22
  - .gitignore
33
23
  - .rvmrc
34
24
  - .travis.yml
@@ -49,6 +39,7 @@ files:
49
39
  - lib/hot_bunnies/version.rb
50
40
  - spec/integration/alternate_exchanges_spec.rb
51
41
  - spec/integration/basic_consume_spec.rb
42
+ - spec/integration/connection_spec.rb
52
43
  - spec/integration/exchange_bind_spec.rb
53
44
  - spec/integration/exchange_declare_spec.rb
54
45
  - spec/integration/publisher_confirmations_spec.rb
@@ -61,36 +52,27 @@ files:
61
52
  - spec/spec_helper.rb
62
53
  homepage: http://github.com/iconara/hot_bunnies
63
54
  licenses: []
64
-
65
- post_install_message:
55
+ post_install_message:
66
56
  rdoc_options: []
67
-
68
- require_paths:
57
+ require_paths:
69
58
  - lib
70
- required_ruby_version: !ruby/object:Gem::Requirement
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
71
64
  none: false
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- hash: 3
76
- segments:
77
- - 0
78
- version: "0"
79
- required_rubygems_version: !ruby/object:Gem::Requirement
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
80
70
  none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
88
71
  requirements: []
89
-
90
72
  rubyforge_project: hot_bunnies
91
- rubygems_version: 1.8.10
92
- signing_key:
73
+ rubygems_version: 1.8.15
74
+ signing_key:
93
75
  specification_version: 3
94
76
  summary: Ruby wrapper for the RabbitMQ Java driver
95
77
  test_files: []
96
-
78
+ ...