bunny 0.6.0 → 0.6.3.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  = Bunny: A synchronous Ruby AMQP client
2
2
 
3
- *GitHub* *repo*: http://github.com/celldee/bunny
3
+ *GitHub* *repo*: http://github.com/ruby-amqp/bunny
4
4
 
5
5
  *Rubyforge*: http://rubyforge.org/projects/bunny-amqp
6
6
 
@@ -22,7 +22,7 @@ You can use Bunny to -
22
22
  * Create and delete queues
23
23
  * Publish and consume messages
24
24
 
25
- Bunny is known to work with RabbitMQ versions 1.5.4, 1.5.5, 1.6.0 and version 0-8 of the AMQP specification.
25
+ Bunny is known to work with RabbitMQ versions 1.5.4 and above with version 0-8 of the AMQP specification.
26
26
 
27
27
  === INSTALL:
28
28
 
@@ -1,6 +1,8 @@
1
+ require File.expand_path("../lib/bunny/version", __FILE__)
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = %q{bunny}
3
- s.version = "0.6.0"
5
+ s.version = Bunny::VERSION.dup
4
6
  s.authors = ["Chris Duncan"]
5
7
  s.date = %q{2009-10-05}
6
8
  s.description = %q{Another synchronous Ruby AMQP client}
@@ -5,6 +5,8 @@ $:.unshift File.expand_path(File.dirname(__FILE__))
5
5
  require file
6
6
  end
7
7
 
8
+ require "bunny/version"
9
+
8
10
  module Bunny
9
11
 
10
12
  class ConnectionError < StandardError; end
@@ -16,8 +18,6 @@ module Bunny
16
18
  class UnsubscribeError < StandardError; end
17
19
  class AcknowledgementError < StandardError; end
18
20
 
19
- VERSION = '0.6.0'
20
-
21
21
  # Returns the Bunny version number
22
22
 
23
23
  def self.version
@@ -159,7 +159,7 @@ nil
159
159
  data = data.to_s
160
160
  out << Qrack::Protocol::Header.new(
161
161
  Qrack::Protocol::Basic,
162
- data.length, {
162
+ data.bytesize, {
163
163
  :content_type => 'application/octet-stream',
164
164
  :delivery_mode => delivery_mode,
165
165
  :priority => 0
@@ -60,7 +60,7 @@ specification that applies to your target broker/server.
60
60
  client.send_frame(
61
61
  Qrack::Protocol09::Exchange::Declare.new(
62
62
  { :exchange => name, :type => type, :nowait => false,
63
- :reserved_1 => 0, :reserved_2 => false, :reserved_3 => false }.merge(opts)
63
+ :deprecated_ticket => 0, :deprecated_auto_delete => false, :deprecated_internal => false }.merge(opts)
64
64
  )
65
65
  )
66
66
 
@@ -97,7 +97,7 @@ if successful. If an error occurs raises _Bunny_::_ProtocolError_.
97
97
  opts.delete(:nowait)
98
98
 
99
99
  client.send_frame(
100
- Qrack::Protocol09::Exchange::Delete.new({ :exchange => name, :nowait => false, :reserved_1 => 0 }.merge(opts))
100
+ Qrack::Protocol09::Exchange::Delete.new({ :exchange => name, :nowait => false, :deprecated_ticket => 0 }.merge(opts))
101
101
  )
102
102
 
103
103
  method = client.next_method
@@ -156,12 +156,12 @@ nil
156
156
  :routing_key => routing_key,
157
157
  :mandatory => mandatory,
158
158
  :immediate => immediate,
159
- :reserved_1 => 0 }
159
+ :deprecated_ticket => 0 }
160
160
  )
161
161
  data = data.to_s
162
162
  out << Qrack::Protocol09::Header.new(
163
163
  Qrack::Protocol09::Basic,
164
- data.length, {
164
+ data.bytesize, {
165
165
  :content_type => 'application/octet-stream',
166
166
  :delivery_mode => delivery_mode,
167
167
  :priority => 0
@@ -27,7 +27,7 @@ Queues must be attached to at least one exchange in order to receive messages fr
27
27
  :durable => false,
28
28
  :exclusive => true,
29
29
  :auto_delete => true,
30
- :reserved_1 => 0
30
+ :deprecated_ticket => 0
31
31
  }.merge(opts)
32
32
  end
33
33
 
@@ -36,7 +36,7 @@ Queues must be attached to at least one exchange in order to receive messages fr
36
36
  opts.delete(:nowait)
37
37
 
38
38
  client.send_frame(
39
- Qrack::Protocol09::Queue::Declare.new({ :queue => name || '', :nowait => false, :reserved_1 => 0 }.merge(opts))
39
+ Qrack::Protocol09::Queue::Declare.new({ :queue => name || '', :nowait => false, :deprecated_ticket => 0 }.merge(opts))
40
40
  )
41
41
 
42
42
  method = client.next_method
@@ -109,7 +109,7 @@ bound to the direct exchange '' by default. If error occurs, a _Bunny_::_Protoco
109
109
  :exchange => exchange,
110
110
  :routing_key => opts.delete(:key),
111
111
  :nowait => false,
112
- :reserved_1 => 0 }.merge(opts))
112
+ :deprecated_ticket => 0 }.merge(opts))
113
113
  )
114
114
 
115
115
  method = client.next_method
@@ -150,7 +150,7 @@ from queues if successful. If an error occurs raises _Bunny_::_ProtocolError_.
150
150
  opts.delete(:nowait)
151
151
 
152
152
  client.send_frame(
153
- Qrack::Protocol09::Queue::Delete.new({ :queue => name, :nowait => false, :reserved_1 => 0 }.merge(opts))
153
+ Qrack::Protocol09::Queue::Delete.new({ :queue => name, :nowait => false, :deprecated_ticket => 0 }.merge(opts))
154
154
  )
155
155
 
156
156
  method = client.next_method
@@ -202,7 +202,7 @@ will be nil.
202
202
  :consumer_tag => name,
203
203
  :no_ack => !ack,
204
204
  :nowait => true,
205
- :reserved_1 => 0 }.merge(opts))
205
+ :deprecated_ticket => 0 }.merge(opts))
206
206
  )
207
207
 
208
208
  method = client.next_method
@@ -259,7 +259,7 @@ without any formal "undo" mechanism. If an error occurs raises _Bunny_::_Protoco
259
259
  opts.delete(:nowait)
260
260
 
261
261
  client.send_frame(
262
- Qrack::Protocol09::Queue::Purge.new({ :queue => name, :nowait => false, :reserved_1 => 0 }.merge(opts))
262
+ Qrack::Protocol09::Queue::Purge.new({ :queue => name, :nowait => false, :deprecated_ticket => 0 }.merge(opts))
263
263
  )
264
264
 
265
265
  method = client.next_method
@@ -281,7 +281,7 @@ Returns hash {:message_count, :consumer_count}.
281
281
 
282
282
  def status
283
283
  client.send_frame(
284
- Qrack::Protocol09::Queue::Declare.new({ :queue => name, :passive => true, :reserved_1 => 0 })
284
+ Qrack::Protocol09::Queue::Declare.new({ :queue => name, :passive => true, :deprecated_ticket => 0 })
285
285
  )
286
286
  method = client.next_method
287
287
  {:message_count => method.message_count, :consumer_count => method.consumer_count}
@@ -325,7 +325,7 @@ Removes a queue binding from an exchange. If error occurs, a _Bunny_::_ProtocolE
325
325
  :exchange => exchange,
326
326
  :routing_key => opts.delete(:key),
327
327
  :nowait => false,
328
- :reserved_1 => 0 }.merge(opts)
328
+ :deprecated_ticket => 0 }.merge(opts)
329
329
  )
330
330
  )
331
331
 
@@ -63,7 +63,7 @@ my_queue.subscribe(:message_max => 10, :ack => true) {|msg| puts msg[:payload]}
63
63
 
64
64
  def setup_consumer
65
65
  client.send_frame(
66
- Qrack::Protocol09::Basic::Consume.new({ :reserved_1 => 0,
66
+ Qrack::Protocol09::Basic::Consume.new({ :deprecated_ticket => 0,
67
67
  :queue => queue.name,
68
68
  :consumer_tag => consumer_tag,
69
69
  :no_ack => !ack,
@@ -61,9 +61,15 @@ _Bunny_::_ProtocolError_ is raised. If successful, _Client_._status_ is set to <
61
61
  # Close connection to AMQP server
62
62
  close_connection
63
63
 
64
+ # Clear the channels
65
+ @channels = []
66
+
67
+ # Create channel 0
68
+ @channel = create_channel()
69
+
64
70
  # Close TCP Socket
65
- close_socket
66
- end
71
+ close_socket
72
+ end
67
73
 
68
74
  alias stop close
69
75
 
@@ -87,7 +93,13 @@ _Bunny_::_ProtocolError_ is raised. If successful, _Client_._status_ is set to <
87
93
  alias next_method next_payload
88
94
 
89
95
  def read(*args)
90
- send_command(:read, *args)
96
+ begin
97
+ send_command(:read, *args)
98
+ # Got a SIGINT while waiting; give any traps a chance to run
99
+ rescue Errno::EINTR
100
+ retry
101
+ end
102
+
91
103
  end
92
104
 
93
105
  =begin rdoc
@@ -166,6 +178,9 @@ a hash <tt>{:reply_code, :reply_text, :exchange, :routing_key}</tt>.
166
178
  raise Bunny::ConnectionError, 'No connection - socket has not been created' if !@socket
167
179
  @socket.__send__(cmd, *args)
168
180
  rescue Errno::EPIPE, IOError => e
181
+ # Ensure we close the socket when we are down to prevent further
182
+ # attempts to write to a closed socket
183
+ close_socket
169
184
  raise Bunny::ServerDownError, e.message
170
185
  end
171
186
  end
@@ -179,7 +194,7 @@ a hash <tt>{:reply_code, :reply_text, :exchange, :routing_key}</tt>.
179
194
  TCPSocket.new(host, port)
180
195
  end
181
196
 
182
- if Socket.constants.include? 'TCP_NODELAY'
197
+ if Socket.constants.include?('TCP_NODELAY') || Socket.constants.include?(:TCP_NODELAY)
183
198
  @socket.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1
184
199
  end
185
200
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  #:stopdoc:
3
- # this file was autogenerated on Fri May 15 10:11:23 +0100 2009
4
- # using amqp-0.8.xml (mtime: Wed May 06 14:48:51 +0100 2009)
3
+ # this file was autogenerated on 2009-12-13 13:40:20 +0000
4
+ # using amqp-0.8.json (mtime: 2009-12-13 13:34:07 +0000)
5
5
  #
6
6
  # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
7
7
 
@@ -12,17 +12,19 @@ module Qrack
12
12
  VERSION_MINOR = 0
13
13
  REVISION = 0
14
14
  PORT = 5672
15
- SSL_PORT = 5671
16
15
 
17
16
  RESPONSES = {
18
17
  200 => :REPLY_SUCCESS,
19
18
  310 => :NOT_DELIVERED,
20
19
  311 => :CONTENT_TOO_LARGE,
20
+ 312 => :NO_ROUTE,
21
+ 313 => :NO_CONSUMERS,
21
22
  320 => :CONNECTION_FORCED,
22
23
  402 => :INVALID_PATH,
23
24
  403 => :ACCESS_REFUSED,
24
25
  404 => :NOT_FOUND,
25
26
  405 => :RESOURCE_LOCKED,
27
+ 406 => :PRECONDITION_FAILED,
26
28
  502 => :SYNTAX_ERROR,
27
29
  503 => :COMMAND_INVALID,
28
30
  504 => :CHANNEL_ERROR,
@@ -1,7 +1,7 @@
1
1
 
2
2
  #:stopdoc:
3
- # this file was autogenerated on Wed Jun 17 15:20:32 +0100 2009
4
- # using amqp-0.9.1.xml (mtime: Fri May 01 14:14:29 +0100 2009)
3
+ # this file was autogenerated on 2009-12-13 13:38:22 +0000
4
+ # using amqp-0.9.1.json (mtime: 2009-12-13 13:34:07 +0000)
5
5
  #
6
6
  # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
7
7
 
@@ -12,11 +12,11 @@ module Qrack
12
12
  VERSION_MINOR = 9
13
13
  REVISION = 1
14
14
  PORT = 5672
15
- SSL_PORT = 5671
16
15
 
17
16
  RESPONSES = {
18
17
  200 => :REPLY_SUCCESS,
19
18
  311 => :CONTENT_TOO_LARGE,
19
+ 312 => :NO_ROUTE,
20
20
  313 => :NO_CONSUMERS,
21
21
  320 => :CONNECTION_FORCED,
22
22
  402 => :INVALID_PATH,
@@ -183,12 +183,12 @@ module Qrack
183
183
 
184
184
  class Open
185
185
  shortstr :virtual_host
186
- shortstr :reserved_1
187
- bit :reserved_2
186
+ shortstr :deprecated_capabilities
187
+ bit :deprecated_insist
188
188
  end
189
189
 
190
190
  class OpenOk
191
- shortstr :reserved_1
191
+ shortstr :deprecated_known_hosts
192
192
  end
193
193
 
194
194
  class Close
@@ -214,11 +214,11 @@ module Qrack
214
214
 
215
215
 
216
216
  class Open
217
- shortstr :reserved_1
217
+ shortstr :deprecated_out_of_band
218
218
  end
219
219
 
220
220
  class OpenOk
221
- longstr :reserved_1
221
+ longstr :deprecated_channel_id
222
222
  end
223
223
 
224
224
  class Flow
@@ -250,14 +250,14 @@ module Qrack
250
250
 
251
251
 
252
252
  class Declare
253
- short :reserved_1
253
+ short :deprecated_ticket
254
254
  shortstr :exchange
255
255
  shortstr :type
256
256
  bit :passive
257
257
  bit :durable
258
- bit :reserved_2
259
- bit :reserved_3
260
- bit :no_wait
258
+ bit :deprecated_auto_delete
259
+ bit :deprecated_internal
260
+ bit :nowait
261
261
  table :arguments
262
262
  end
263
263
 
@@ -265,10 +265,10 @@ module Qrack
265
265
  end
266
266
 
267
267
  class Delete
268
- short :reserved_1
268
+ short :deprecated_ticket
269
269
  shortstr :exchange
270
270
  bit :if_unused
271
- bit :no_wait
271
+ bit :nowait
272
272
  end
273
273
 
274
274
  class DeleteOk
@@ -282,22 +282,22 @@ module Qrack
282
282
  class DeclareOk < Method( 11, :declare_ok ); end
283
283
  class Bind < Method( 20, :bind ); end
284
284
  class BindOk < Method( 21, :bind_ok ); end
285
- class Unbind < Method( 50, :unbind ); end
286
- class UnbindOk < Method( 51, :unbind_ok ); end
287
285
  class Purge < Method( 30, :purge ); end
288
286
  class PurgeOk < Method( 31, :purge_ok ); end
289
287
  class Delete < Method( 40, :delete ); end
290
288
  class DeleteOk < Method( 41, :delete_ok ); end
289
+ class Unbind < Method( 50, :unbind ); end
290
+ class UnbindOk < Method( 51, :unbind_ok ); end
291
291
 
292
292
 
293
293
  class Declare
294
- short :reserved_1
294
+ short :deprecated_ticket
295
295
  shortstr :queue
296
296
  bit :passive
297
297
  bit :durable
298
298
  bit :exclusive
299
299
  bit :auto_delete
300
- bit :no_wait
300
+ bit :nowait
301
301
  table :arguments
302
302
  end
303
303
 
@@ -308,32 +308,21 @@ module Qrack
308
308
  end
309
309
 
310
310
  class Bind
311
- short :reserved_1
311
+ short :deprecated_ticket
312
312
  shortstr :queue
313
313
  shortstr :exchange
314
314
  shortstr :routing_key
315
- bit :no_wait
315
+ bit :nowait
316
316
  table :arguments
317
317
  end
318
318
 
319
319
  class BindOk
320
320
  end
321
321
 
322
- class Unbind
323
- short :reserved_1
324
- shortstr :queue
325
- shortstr :exchange
326
- shortstr :routing_key
327
- table :arguments
328
- end
329
-
330
- class UnbindOk
331
- end
332
-
333
322
  class Purge
334
- short :reserved_1
323
+ short :deprecated_ticket
335
324
  shortstr :queue
336
- bit :no_wait
325
+ bit :nowait
337
326
  end
338
327
 
339
328
  class PurgeOk
@@ -341,17 +330,28 @@ module Qrack
341
330
  end
342
331
 
343
332
  class Delete
344
- short :reserved_1
333
+ short :deprecated_ticket
345
334
  shortstr :queue
346
335
  bit :if_unused
347
336
  bit :if_empty
348
- bit :no_wait
337
+ bit :nowait
349
338
  end
350
339
 
351
340
  class DeleteOk
352
341
  long :message_count
353
342
  end
354
343
 
344
+ class Unbind
345
+ short :deprecated_ticket
346
+ shortstr :queue
347
+ shortstr :exchange
348
+ shortstr :routing_key
349
+ table :arguments
350
+ end
351
+
352
+ class UnbindOk
353
+ end
354
+
355
355
  end
356
356
 
357
357
  class Basic
@@ -368,7 +368,7 @@ module Qrack
368
368
  shortstr :type
369
369
  shortstr :user_id
370
370
  shortstr :app_id
371
- shortstr :reserved
371
+ shortstr :deprecated_cluster_id
372
372
 
373
373
  class Qos < Method( 10, :qos ); end
374
374
  class QosOk < Method( 11, :qos_ok ); end
@@ -399,14 +399,14 @@ module Qrack
399
399
  end
400
400
 
401
401
  class Consume
402
- short :reserved_1
402
+ short :deprecated_ticket
403
403
  shortstr :queue
404
404
  shortstr :consumer_tag
405
405
  bit :no_local
406
406
  bit :no_ack
407
407
  bit :exclusive
408
- bit :no_wait
409
- table :arguments
408
+ bit :nowait
409
+ table :filter
410
410
  end
411
411
 
412
412
  class ConsumeOk
@@ -415,7 +415,7 @@ module Qrack
415
415
 
416
416
  class Cancel
417
417
  shortstr :consumer_tag
418
- bit :no_wait
418
+ bit :nowait
419
419
  end
420
420
 
421
421
  class CancelOk
@@ -423,7 +423,7 @@ module Qrack
423
423
  end
424
424
 
425
425
  class Publish
426
- short :reserved_1
426
+ short :deprecated_ticket
427
427
  shortstr :exchange
428
428
  shortstr :routing_key
429
429
  bit :mandatory
@@ -446,7 +446,7 @@ module Qrack
446
446
  end
447
447
 
448
448
  class Get
449
- short :reserved_1
449
+ short :deprecated_ticket
450
450
  shortstr :queue
451
451
  bit :no_ack
452
452
  end
@@ -460,7 +460,7 @@ module Qrack
460
460
  end
461
461
 
462
462
  class GetEmpty
463
- shortstr :reserved_1
463
+ shortstr :deprecated_cluster_id
464
464
  end
465
465
 
466
466
  class Ack
@@ -31,7 +31,7 @@ module Qrack
31
31
  end
32
32
 
33
33
  def length
34
- @data.length
34
+ @data.bytesize
35
35
  end
36
36
 
37
37
  def empty?
@@ -154,13 +154,13 @@ module Qrack
154
154
  _write([upper, lower], 'NN')
155
155
  when :shortstr
156
156
  data = (data || '').to_s
157
- _write([data.length, data], 'Ca*')
157
+ _write([data.bytesize, data], 'Ca*')
158
158
  when :longstr
159
159
  if data.is_a? Hash
160
160
  write(:table, data)
161
161
  else
162
162
  data = (data || '').to_s
163
- _write([data.length, data], 'Na*')
163
+ _write([data.bytesize, data], 'Na*')
164
164
  end
165
165
  when :timestamp
166
166
  write(:longlong, data.to_i)
@@ -179,7 +179,7 @@ module Qrack
179
179
  when Float
180
180
  table.write(:octet, 68) # 'D'
181
181
  # XXX there's gotta be a better way to do this..
182
- exp = value.to_s.split('.').last.length
182
+ exp = value.to_s.split('.').last.bytesize
183
183
  num = value * 10**exp
184
184
  table.write(:octet, exp)
185
185
  table.write(:long, num)
@@ -269,8 +269,8 @@ module Qrack
269
269
  def _write data, pack = nil
270
270
  data = [*data].pack(pack) if pack
271
271
  @data[@pos,0] = data
272
- @pos += data.length
272
+ @pos += data.bytesize
273
273
  end
274
274
  end
275
275
  end
276
- end
276
+ end
@@ -31,7 +31,7 @@ module Qrack
31
31
  end
32
32
 
33
33
  def length
34
- @data.length
34
+ @data.bytesize
35
35
  end
36
36
 
37
37
  def empty?
@@ -154,13 +154,13 @@ module Qrack
154
154
  _write([upper, lower], 'NN')
155
155
  when :shortstr
156
156
  data = (data || '').to_s
157
- _write([data.length, data], 'Ca*')
157
+ _write([data.bytesize, data], 'Ca*')
158
158
  when :longstr
159
159
  if data.is_a? Hash
160
160
  write(:table, data)
161
161
  else
162
162
  data = (data || '').to_s
163
- _write([data.length, data], 'Na*')
163
+ _write([data.bytesize, data], 'Na*')
164
164
  end
165
165
  when :timestamp
166
166
  write(:longlong, data.to_i)
@@ -179,7 +179,7 @@ module Qrack
179
179
  when Float
180
180
  table.write(:octet, 68) # 'D'
181
181
  # XXX there's gotta be a better way to do this..
182
- exp = value.to_s.split('.').last.length
182
+ exp = value.to_s.split('.').last.bytesize
183
183
  num = value * 10**exp
184
184
  table.write(:octet, exp)
185
185
  table.write(:long, num)
@@ -269,8 +269,8 @@ module Qrack
269
269
  def _write data, pack = nil
270
270
  data = [*data].pack(pack) if pack
271
271
  @data[@pos,0] = data
272
- @pos += data.length
272
+ @pos += data.bytesize
273
273
  end
274
274
  end
275
275
  end
276
- end
276
+ end
@@ -1,24 +1,26 @@
1
1
 
2
2
  #:stopdoc:
3
- # this file was autogenerated on Fri Jun 04 10:11:23 +0100 2009
3
+ # this file was autogenerated on 2009-12-13 13:40:20 +0000
4
4
  #
5
5
  # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
6
6
 
7
7
  module Qrack
8
8
  module Transport
9
9
  class Frame
10
-
10
+
11
11
  FOOTER = 206
12
- ID = 0
12
+ ID = 0
13
13
 
14
- @types = { 1 => 'Method',
15
- 2 => 'Header',
16
- 3 => 'Body',
17
- 4 => 'OobMethod',
18
- 5 => 'OobHeader',
19
- 6 => 'OobBody',
20
- 7 => 'Trace',
21
- 8 => 'Heartbeat'}
14
+ @types = {
15
+ 1 => 'Method',
16
+ 2 => 'Header',
17
+ 3 => 'Body',
18
+ 4 => 'OobMethod',
19
+ 5 => 'OobHeader',
20
+ 6 => 'OobBody',
21
+ 7 => 'Trace',
22
+ 8 => 'Heartbeat',
23
+ }
22
24
 
23
25
  attr_accessor :channel, :payload
24
26
 
@@ -26,10 +28,10 @@ module Qrack
26
28
  @channel, @payload = channel, payload
27
29
  end
28
30
 
29
- def id
30
- self.class::ID
31
- end
32
-
31
+ def id
32
+ self.class::ID
33
+ end
34
+
33
35
  def to_binary
34
36
  buf = Transport::Buffer.new
35
37
  buf.write :octet, id
@@ -50,7 +52,7 @@ module Qrack
50
52
  end
51
53
  end
52
54
 
53
- def self.parse buf
55
+ def self.parse buf
54
56
  buf = Transport::Buffer.new(buf) unless buf.is_a? Transport::Buffer
55
57
  buf.extract do
56
58
  id, channel, payload, footer = buf.read(:octet, :short, :longstr, :octet)
@@ -62,8 +64,8 @@ module Qrack
62
64
 
63
65
  class Method < Frame
64
66
 
65
- ID = 1
66
-
67
+ ID = 1
68
+
67
69
  def initialize payload = nil, channel = 0
68
70
  super
69
71
  unless @payload.is_a? Protocol::Class::Method or @payload.nil?
@@ -73,9 +75,9 @@ module Qrack
73
75
  end
74
76
 
75
77
  class Header < Frame
76
-
77
- ID = 2
78
-
78
+
79
+ ID = 2
80
+
79
81
  def initialize payload = nil, channel = 0
80
82
  super
81
83
  unless @payload.is_a? Protocol::Header or @payload.nil?
@@ -84,29 +86,29 @@ module Qrack
84
86
  end
85
87
  end
86
88
 
87
- class Body < Frame
88
- ID = 3
89
- end
90
-
91
- class OobMethod < Frame
92
- ID = 4
93
- end
94
-
89
+ class Body < Frame
90
+ ID = 3
91
+ end
92
+
93
+ class OobMethod < Frame
94
+ ID = 4
95
+ end
96
+
95
97
  class OobHeader < Frame
96
- ID = 5
97
- end
98
-
98
+ ID = 5
99
+ end
100
+
99
101
  class OobBody < Frame
100
- ID = 6
101
- end
102
-
102
+ ID = 6
103
+ end
104
+
103
105
  class Trace < Frame
104
- ID = 7
105
- end
106
-
106
+ ID = 7
107
+ end
108
+
107
109
  class Heartbeat < Frame
108
- ID = 8
109
- end
110
+ ID = 8
111
+ end
110
112
 
111
113
  end
112
- end
114
+ end
@@ -1,6 +1,6 @@
1
1
 
2
2
  #:stopdoc:
3
- # this file was autogenerated on Wed Jun 17 15:20:32 +0100 2009
3
+ # this file was autogenerated on 2009-12-13 13:38:22 +0000
4
4
  #
5
5
  # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
6
6
 
metadata CHANGED
@@ -1,7 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ hash: 15424111
5
+ prerelease: 6
6
+ segments:
7
+ - 0
8
+ - 6
9
+ - 3
10
+ - rc
11
+ - 1
12
+ version: 0.6.3.rc1
5
13
  platform: ruby
6
14
  authors:
7
15
  - Chris Duncan
@@ -9,8 +17,7 @@ autorequire:
9
17
  bindir: bin
10
18
  cert_chain: []
11
19
 
12
- date: 2009-10-05 00:00:00 +01:00
13
- default_executable:
20
+ date: 2009-10-05 00:00:00 Z
14
21
  dependencies: []
15
22
 
16
23
  description: Another synchronous Ruby AMQP client
@@ -73,7 +80,6 @@ files:
73
80
  - spec/spec_09/exchange_spec.rb
74
81
  - spec/spec_09/queue_spec.rb
75
82
  - spec/spec_09/connection_spec.rb
76
- has_rdoc: true
77
83
  homepage: http://github.com/celldee/bunny/tree/master
78
84
  licenses: []
79
85
 
@@ -84,21 +90,29 @@ rdoc_options:
84
90
  require_paths:
85
91
  - lib
86
92
  required_ruby_version: !ruby/object:Gem::Requirement
93
+ none: false
87
94
  requirements:
88
95
  - - ">="
89
96
  - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
90
100
  version: "0"
91
- version:
92
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
93
103
  requirements:
94
- - - ">="
104
+ - - ">"
95
105
  - !ruby/object:Gem::Version
96
- version: "0"
97
- version:
106
+ hash: 25
107
+ segments:
108
+ - 1
109
+ - 3
110
+ - 1
111
+ version: 1.3.1
98
112
  requirements: []
99
113
 
100
114
  rubyforge_project: bunny-amqp
101
- rubygems_version: 1.3.5
115
+ rubygems_version: 1.8.5
102
116
  signing_key:
103
117
  specification_version: 3
104
118
  summary: A synchronous Ruby AMQP client that enables interaction with AMQP-compliant brokers/servers.