beetle 0.2.9.2 → 0.2.9.3

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/beetle.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "beetle"
3
- s.version = "0.2.9.2"
3
+ s.version = "0.2.9.3"
4
4
 
5
5
  s.required_rubygems_version = ">= 1.3.1"
6
6
  s.authors = ["Stefan Kaes", "Pascal Friederich", "Ali Jelveh", "Sebastian Roebke"]
@@ -47,6 +47,9 @@ module Beetle
47
47
  # the password to use when connectiong to the AMQP servers (defaults to <tt>"guest"</tt>)
48
48
  attr_accessor :password
49
49
 
50
+ # the socket timeout in seconds for message publishing (defaults to <tt>10.0</tt>)
51
+ attr_accessor :publishing_timeout
52
+
50
53
  # external config file (defaults to <tt>no file</tt>)
51
54
  attr_reader :config_file
52
55
 
@@ -70,6 +73,8 @@ module Beetle
70
73
  self.user = "guest"
71
74
  self.password = "guest"
72
75
 
76
+ self.publishing_timeout = 5.0
77
+
73
78
  self.log_file = STDOUT
74
79
  end
75
80
 
@@ -141,7 +141,8 @@ module Beetle
141
141
 
142
142
  def new_bunny
143
143
  b = Bunny.new(:host => current_host, :port => current_port, :logging => !!@options[:logging],
144
- :user => Beetle.config.user, :pass => Beetle.config.password, :vhost => Beetle.config.vhost)
144
+ :user => Beetle.config.user, :pass => Beetle.config.password, :vhost => Beetle.config.vhost,
145
+ :socket_timeout => Beetle.config.publishing_timeout)
145
146
  b.start
146
147
  b
147
148
  end
@@ -19,7 +19,7 @@ module Beetle
19
19
  m = mock("dummy")
20
20
  expected_bunny_options = {
21
21
  :host => @pub.send(:current_host), :port => @pub.send(:current_port),
22
- :logging => false, :user => "guest", :pass => "guest", :vhost => "/"
22
+ :logging => false, :user => "guest", :pass => "guest", :vhost => "/", :socket_timeout => 5.0
23
23
  }
24
24
  Bunny.expects(:new).with(expected_bunny_options).returns(m)
25
25
  m.expects(:start)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beetle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 127
4
+ hash: 125
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
9
  - 9
10
- - 2
11
- version: 0.2.9.2
10
+ - 3
11
+ version: 0.2.9.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Stefan Kaes
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-11-19 00:00:00 +01:00
22
+ date: 2010-11-22 00:00:00 +01:00
23
23
  default_executable: beetle
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency