sparqcode_bunny 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -1
- data/lib/bunny/version.rb +1 -1
- data/lib/qrack/transport/buffer08.rb +19 -0
- data/lib/qrack/transport/buffer09.rb +17 -0
- metadata +6 -7
data/README.textile
CHANGED
@@ -43,7 +43,7 @@ expected_msg = nil
|
|
43
43
|
|
44
44
|
# get message from the queue
|
45
45
|
q.subscribe(:ack => true) do |msg|
|
46
|
-
if msg[:header].
|
46
|
+
if msg[:header].properties[:correlation_id].to_i == correlation_id
|
47
47
|
expected_msg = msg[:payload]
|
48
48
|
msg[:subscribed] = false
|
49
49
|
end
|
data/lib/bunny/version.rb
CHANGED
@@ -123,6 +123,12 @@ module Qrack
|
|
123
123
|
table.read(:timestamp)
|
124
124
|
when 70 # 'F'
|
125
125
|
table.read(:table)
|
126
|
+
when 65 # 'A'
|
127
|
+
table.read(:array)
|
128
|
+
when 108 # 'l'
|
129
|
+
table.read(:longlong)
|
130
|
+
when 116 # 't'
|
131
|
+
table.read(:octet)
|
126
132
|
end
|
127
133
|
end
|
128
134
|
|
@@ -134,6 +140,19 @@ module Qrack
|
|
134
140
|
end
|
135
141
|
|
136
142
|
@bits.shift
|
143
|
+
when :array
|
144
|
+
a = Array.new
|
145
|
+
|
146
|
+
array = Buffer.new(read(:longstr))
|
147
|
+
until array.empty?
|
148
|
+
type = array.read(:octet)
|
149
|
+
a << case type
|
150
|
+
when 70 # 'F'
|
151
|
+
array.read(:table)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
a
|
137
156
|
else
|
138
157
|
raise Qrack::InvalidTypeError, "Cannot read data of type #{type}"
|
139
158
|
end
|
@@ -123,6 +123,10 @@ module Qrack
|
|
123
123
|
table.read(:timestamp)
|
124
124
|
when 70 # 'F'
|
125
125
|
table.read(:table)
|
126
|
+
when 65 # 'A'
|
127
|
+
table.read(:array)
|
128
|
+
when 108 # 'l'
|
129
|
+
table.read(:longlong)
|
126
130
|
when 116 # 't'
|
127
131
|
table.read(:octet)
|
128
132
|
end
|
@@ -136,6 +140,19 @@ module Qrack
|
|
136
140
|
end
|
137
141
|
|
138
142
|
@bits.shift
|
143
|
+
when :array
|
144
|
+
a = Array.new
|
145
|
+
|
146
|
+
array = Buffer.new(read(:longstr))
|
147
|
+
until array.empty?
|
148
|
+
type = array.read(:octet)
|
149
|
+
a << case type
|
150
|
+
when 70 # 'F'
|
151
|
+
array.read(:table)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
a
|
139
156
|
else
|
140
157
|
raise Qrack::InvalidTypeError, "Cannot read data of type #{type}"
|
141
158
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sparqcode_bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Duncan
|
@@ -19,8 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date:
|
23
|
-
default_executable:
|
22
|
+
date: 2012-06-07 00:00:00 Z
|
24
23
|
dependencies: []
|
25
24
|
|
26
25
|
description: A synchronous Ruby AMQP client that enables interaction with AMQP-compliant brokers with minor modifications to make RPC easier. The official gem will be best for you 99.9973% of the time.
|
@@ -104,7 +103,6 @@ files:
|
|
104
103
|
- spec/spec_09/connection_spec.rb
|
105
104
|
- spec/spec_09/exchange_spec.rb
|
106
105
|
- spec/spec_09/queue_spec.rb
|
107
|
-
has_rdoc: true
|
108
106
|
homepage: http://github.com/sparqcode/bunny
|
109
107
|
licenses: []
|
110
108
|
|
@@ -135,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
133
|
requirements: []
|
136
134
|
|
137
135
|
rubyforge_project:
|
138
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 1.8.22
|
139
137
|
signing_key:
|
140
138
|
specification_version: 3
|
141
139
|
summary: Bunny with some RPC friendly extensions
|
@@ -149,3 +147,4 @@ test_files:
|
|
149
147
|
- spec/spec_09/connection_spec.rb
|
150
148
|
- spec/spec_09/exchange_spec.rb
|
151
149
|
- spec/spec_09/queue_spec.rb
|
150
|
+
has_rdoc: true
|