nebulous_stomp 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,446 @@
1
+ require 'time'
2
+ require 'spec_helper'
3
+
4
+ require 'nebulous/stomp_handler'
5
+ require 'nebulous/message'
6
+
7
+ require_relative 'helpers'
8
+
9
+ include Nebulous
10
+
11
+
12
+ RSpec.configure do |c|
13
+ c.include Helpers
14
+ end
15
+
16
+
17
+ describe StompHandler do
18
+
19
+ # Actually these are the real connection params, but we are going to stub, so
20
+ # hopefully it doesn't matter.
21
+ let(:stomp_hash) do
22
+ { hosts: [{ login: 'guest',
23
+ passcode: 'guest',
24
+ host: '10.0.0.150',
25
+ port: 61613,
26
+ ssl: false }],
27
+ reliable: false }
28
+ end
29
+
30
+ let(:client) { double( Stomp::Client ).as_null_object }
31
+
32
+ let(:handler) do
33
+ sh = StompHandler.new(stomp_hash, client)
34
+
35
+ # Attempt to duplicate anything in Stomp::Client that we might need.
36
+ # This does the opposite of making me happy -- it's hella fragile, and
37
+ # we're dealing with implementation details, in code we don't even
38
+ # maintain!
39
+ # But. I don't know of another way to do this. And we only do it here, in
40
+ # the test for StompHandler. Everything else can mock StompHandler or use
41
+ # StompHandlerNull.
42
+ conn = double("connection frame").as_null_object
43
+
44
+ allow(client).to receive(:connection_frame).and_return(conn)
45
+ allow(client).to receive_message_chain("connection_frame.headers").
46
+ and_return({"session" => "123"})
47
+
48
+ sh
49
+ end
50
+
51
+ let(:msg1) do
52
+ stomp_message('application/text', 'verb:Foo', client.calc_reply_id)
53
+ end
54
+
55
+ let(:msg2) do
56
+ stomp_message('application/text', 'verb:Bar', client.calc_reply_id)
57
+ end
58
+
59
+
60
+ describe 'StompHandler.body_to_hash' do
61
+
62
+ it "raises an error unless headers is a hash" do
63
+ expect{ StompHandler.body_to_hash() }.to raise_exception ArgumentError
64
+
65
+ expect{ StompHandler.body_to_hash('foo') }.
66
+ to raise_exception ArgumentError
67
+
68
+ expect{ StompHandler.body_to_hash('foo', 'bar') }.
69
+ to raise_exception ArgumentError
70
+
71
+ expect{ StompHandler.body_to_hash({}, 'baz') }.not_to raise_exception
72
+ end
73
+
74
+ context "when the content type is JSON" do
75
+
76
+ it "parses the json" do
77
+ body = {'one' => 'two', 'three' => [4,5]}
78
+ msg = stomp_message('application/json', body.to_json)
79
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq body
80
+
81
+ body = [ {'one' => 2, 'three' => 4}, {'five' => 6} ]
82
+ msg = stomp_message('application/json', body.to_json)
83
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq body
84
+ end
85
+
86
+ end
87
+
88
+ context "when the content type is not JSON" do
89
+
90
+ it "assumes text lines in key:value format" do
91
+ # Note that all values will be strings, and we can't support arrays.
92
+ result = {'one' => 'two', 'three' => '4'}
93
+ body = result.map{|k,v| "#{k}:#{v}" }.join("\n")
94
+ msg = stomp_message('application/text', body )
95
+
96
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq result
97
+ end
98
+
99
+ end
100
+
101
+ it "allows the caller to override the content type" do
102
+ result = {'one' => 'two', 'three' => '4'}
103
+ body = result.map{|k,v| "#{k}:#{v}" }.join("\n")
104
+ msg = stomp_message('application/json', body )
105
+
106
+ expect( StompHandler.body_to_hash( msg.headers,
107
+ msg.body,
108
+ 'application/text') ).to eq result
109
+
110
+ end
111
+
112
+ it "returns a hash or an array of hashes" do
113
+ # lets check some corner cases to ensure this
114
+ msg = stomp_message('appplication/json', ''.to_json)
115
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq({})
116
+
117
+ msg = stomp_message('appplication/json', nil.to_json)
118
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq({})
119
+
120
+ msg = stomp_message('appplication/text', '')
121
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq({})
122
+
123
+ msg = stomp_message('appplication/text', nil)
124
+ expect( StompHandler.body_to_hash(msg.headers, msg.body) ).to eq({})
125
+ end
126
+
127
+
128
+ end
129
+ ##
130
+
131
+
132
+ describe "StompHandler.with_timeout" do
133
+
134
+ it "should hang for the given timeout period" do
135
+ start = Time.now
136
+ StompHandler.with_timeout(2) do |r|
137
+ end
138
+ stop = Time.now
139
+
140
+ expect(stop - start).to be_within(0.5).of(2)
141
+ end
142
+
143
+ it "should drop out of the block when given the signal" do
144
+ start = Time.now
145
+ StompHandler.with_timeout(2) do |r|
146
+ r.signal
147
+ end
148
+ stop = Time.now
149
+
150
+ expect(stop - start).to be < 0.5
151
+ end
152
+
153
+ end
154
+ ##
155
+
156
+
157
+ describe "#initialize" do
158
+
159
+ it "takes an initialization hash" do
160
+ expect{ StompHandler.new(foo: 'bar') }.not_to raise_exception
161
+ expect{ StompHandler.new }.to raise_exception ArgumentError
162
+ end
163
+
164
+ end
165
+ ##
166
+
167
+
168
+ describe "#stomp_connect" do
169
+
170
+ it "raises ConnectionError if it cannot connect to the STOMP server" do
171
+ hash = stomp_hash.merge( hosts: {passcode:'flurb'} )
172
+ sh = StompHandler.new(hash)
173
+
174
+ expect{sh.stomp_connect}.to raise_exception Nebulous::ConnectionError
175
+ end
176
+
177
+ it "returns self" do
178
+ expect(handler.stomp_connect).to eq handler
179
+ end
180
+
181
+ it "sets client to an instance of STOMP::Client" do
182
+ # Weeeeelllll -- actually... it isn't. It's the double.
183
+ handler.stomp_connect
184
+ expect(handler.client).to eq client
185
+ end
186
+
187
+ it "connects to the STOMP server" do
188
+ # in passing we test #connected? -- there doesn't seem to be a way to (or
189
+ # a point in) test(ing) it seperately.
190
+ handler.stomp_connect
191
+ expect( handler ).to be_connected
192
+ end
193
+
194
+ it 'doesn''t freak out if Nebulous is not "on"' do
195
+ sh = StompHandler.new({})
196
+ expect{ sh.stomp_connect }.not_to raise_exception
197
+ expect( sh.stomp_connect ).to eq sh
198
+ end
199
+
200
+ end
201
+ ##
202
+
203
+
204
+ describe '#nebulous_on?' do
205
+
206
+ it 'should be true if there is anything in the stomp hash' do
207
+ sh = StompHandler.new(foo: 'bar')
208
+ expect( sh.nebulous_on? ).to be_truthy
209
+ end
210
+
211
+ it 'should be false if the stomp hash is nil' do
212
+ sh = StompHandler.new(nil)
213
+ expect( sh.nebulous_on? ).to be_falsy
214
+ end
215
+
216
+ end
217
+ ##
218
+
219
+
220
+ describe "#stomp_disconnect" do
221
+ it "disconnects!" do
222
+ handler.stomp_connect
223
+ handler.stomp_disconnect
224
+
225
+ expect( handler ).not_to be_connected
226
+ end
227
+
228
+ it 'doesn''t freak out if Nebulous is not "on"' do
229
+ sh = StompHandler.new({}).stomp_connect
230
+ expect{ sh.stomp_disconnect }.not_to raise_exception
231
+ expect( sh.stomp_disconnect ).to eq sh
232
+ end
233
+
234
+ end
235
+ ##
236
+
237
+
238
+ describe "#calc_reply_id" do
239
+
240
+ it "raises an error if the client is not connected" do
241
+ handler.stomp_disconnect
242
+
243
+ expect{ handler.calc_reply_id }.
244
+ to raise_exception Nebulous::ConnectionError
245
+
246
+ end
247
+
248
+ it "returns a unique string" do
249
+ # I can't actually check that the string is unique, so this is kinda weak
250
+ handler.stomp_connect
251
+ expect( handler.calc_reply_id ).to respond_to :upcase
252
+ expect( handler.calc_reply_id.size ).to be > 12
253
+ end
254
+
255
+ it 'doesn''t freak out if Nebulous is not "on"' do
256
+ sh = StompHandler.new({}).stomp_connect
257
+ expect{ sh.calc_reply_id }.not_to raise_exception
258
+ expect( sh.calc_reply_id ).to eq nil
259
+ end
260
+
261
+ end
262
+ ##
263
+
264
+
265
+ describe "send_message" do
266
+ # We're kind of navel gazing here because send_message is just one line: a
267
+ # call to client.publish. Still, call it a warming up exercise....
268
+
269
+ let(:mess) { Nebulous::Message.from_parts(nil, nil, 'foo', nil, nil) }
270
+
271
+ before do
272
+ handler.stomp_connect
273
+ end
274
+
275
+ it "accepts a queue name and a Message" do
276
+ expect{ handler.send_message }.to raise_exception ArgumentError
277
+ expect{ handler.send_message('foo') }.to raise_exception ArgumentError
278
+ expect{ handler.send_message(1,2,3) }.to raise_exception ArgumentError
279
+ expect{ handler.send_message('foo', 12) }.
280
+ to raise_exception Nebulous::NebulousError
281
+
282
+ expect{ handler.send_message('foo', mess) }.not_to raise_exception
283
+ end
284
+
285
+ it "returns the message" do
286
+ expect( handler.send_message('foo', mess) ).to eq mess
287
+ end
288
+
289
+ it "tries to publish the message" do
290
+ expect(client).to receive(:publish)
291
+ handler.send_message('foo', mess)
292
+ end
293
+
294
+ it "tries to reconnect if the client is not connected" do
295
+ handler.stomp_disconnect
296
+ expect(client).to receive(:publish)
297
+
298
+ handler.send_message('foo', mess)
299
+ expect{ handler.send_message('foo', mess) }.not_to raise_exception
300
+ end
301
+
302
+ it 'doesn''t freak out if Nebulous is not "on"' do
303
+ sh = StompHandler.new({}).stomp_connect
304
+ expect{ sh.send_message('foo', mess) }.not_to raise_exception
305
+ expect( sh.send_message('foo', mess) ).to eq nil
306
+ end
307
+
308
+
309
+ end
310
+ ##
311
+
312
+
313
+ describe "#listen" do
314
+
315
+ def run_listen(secs)
316
+ got = nil
317
+
318
+ handler.listen('/queue/foo') do |m|
319
+ got = m
320
+ end
321
+ sleep secs
322
+
323
+ got
324
+ end
325
+
326
+
327
+ before do
328
+ handler.stomp_connect
329
+ end
330
+
331
+ it "tries to reconnect if the client is not connected" do
332
+ handler.stomp_disconnect
333
+ expect(client).to receive(:publish)
334
+ expect{ handler.listen('foo') }.not_to raise_exception
335
+ end
336
+
337
+ it "yields a Message if it gets a response on the given queue" do
338
+ allow(client).to receive(:subscribe).and_yield(msg1)
339
+ gotMessage = run_listen(1)
340
+
341
+ expect(gotMessage).not_to be_nil
342
+ expect(gotMessage).to be_a_kind_of Nebulous::Message
343
+ expect( gotMessage.verb ).to eq 'Foo'
344
+ end
345
+
346
+ it "continues blocking after receiving a message" do
347
+ # If it's still blocking, it should receive a second message
348
+ allow(client).to receive(:subscribe).
349
+ and_yield(msg1).
350
+ and_yield(msg2)
351
+
352
+ gotMessage = run_listen(2)
353
+
354
+ expect(gotMessage).not_to be_nil
355
+ expect(gotMessage).to be_a_kind_of Nebulous::Message
356
+ expect( gotMessage.verb ).to eq 'Bar'
357
+ end
358
+
359
+ it 'doesn''t freak out if Nebulous is not "on"' do
360
+ sh = StompHandler.new({}).stomp_connect
361
+ expect{ sh.listen('/queue/x') }.not_to raise_exception
362
+ expect{|y| sh.listen('/queue/x', &y) }.not_to yield_control
363
+ end
364
+
365
+
366
+ end
367
+ ##
368
+
369
+
370
+ describe "listen_with_timeout" do
371
+
372
+ def run_listen_with_timeout(secs)
373
+ got = nil
374
+ handler.listen_with_timeout('/queue/foo', secs) do |m|
375
+ got = m
376
+ end
377
+
378
+ got
379
+ end
380
+
381
+ before do
382
+ handler.stomp_connect
383
+ end
384
+
385
+ it "tries to reconnect if the client is not connected" do
386
+ handler.stomp_disconnect
387
+
388
+ expect(client).to receive(:publish)
389
+ expect{ handler.listen_with_timeout('foo', 1) }.
390
+ to raise_exception NebulousTimeout #as opposed to something nastier
391
+
392
+ end
393
+
394
+ it "yields a Message if it gets a response on the given queue" do
395
+ allow(client).to receive(:subscribe).and_yield(msg1)
396
+
397
+ start = Time.now
398
+ gotMessage = run_listen_with_timeout(2)
399
+ stop = Time.now
400
+
401
+ expect( gotMessage ).not_to be_nil
402
+ expect( gotMessage ).to be_a_kind_of Nebulous::Message
403
+ expect( gotMessage.verb ).to eq 'Foo'
404
+ expect(stop - start).to be < 0.5
405
+ end
406
+
407
+ it "stops after the first message" do
408
+ # The opposite of listen. We yield twice but expect the *first* message.
409
+ allow(client).to receive(:subscribe).
410
+ and_yield(msg1).
411
+ and_yield(msg2)
412
+
413
+ gotMessage = run_listen_with_timeout(2)
414
+
415
+ expect( gotMessage ).not_to be_nil
416
+ expect( gotMessage ).to be_a_kind_of Nebulous::Message
417
+ expect( gotMessage.verb ).to eq 'Foo'
418
+ end
419
+
420
+ it "stops after a timeout" do
421
+ start = Time.now
422
+ run_listen_with_timeout(2) rescue nil #probably raises NebulousTimeout
423
+ stop = Time.now
424
+
425
+ expect(stop - start).to be_within(0.5).of(2)
426
+ end
427
+
428
+ it "raises NebulousTimeout after a timeout" do
429
+ expect{ run_listen_with_timeout(1) }.to raise_exception NebulousTimeout
430
+ end
431
+
432
+ it 'doesn''t freak out if Nebulous is not "on"'do
433
+ sh = StompHandler.new({}).stomp_connect
434
+ expect{ sh.listen_with_timeout('/queue/x', 1) }.not_to raise_exception
435
+ expect{|y| sh.listen_with_timeout('/queue/x', 1, &y) }.
436
+ not_to yield_control
437
+
438
+ end
439
+
440
+
441
+ end
442
+ ##
443
+
444
+
445
+ end
446
+
data/tags ADDED
@@ -0,0 +1,134 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ ConnectionError lib/nebulous.rb /^ class ConnectionError < NebulousError; end$/;" c class:Nebulous inherits:NebulousError
4
+ DocNoPending spec/doc_no_pending.rb /^class DocNoPending < RSpec::Core::Formatters::DocumentationFormatter$/;" c inherits:RSpec.Core.Formatters.DocumentationFormatter
5
+ Helpers spec/helpers.rb /^module Helpers$/;" m
6
+ Message lib/nebulous/message.rb /^ class Message$/;" c class:Nebulous
7
+ NebRequest lib/nebulous/nebrequest.rb /^ class NebRequest$/;" c class:Nebulous
8
+ NebRequestNull lib/nebulous/nebrequest_null.rb /^ class NebRequestNull < NebRequest$/;" c class:Nebulous inherits:NebRequest
9
+ Nebulous lib/nebulous.rb /^module Nebulous$/;" m
10
+ Nebulous lib/nebulous/message.rb /^module Nebulous$/;" m
11
+ Nebulous lib/nebulous/nebrequest.rb /^module Nebulous$/;" m
12
+ Nebulous lib/nebulous/nebrequest_null.rb /^module Nebulous$/;" m
13
+ Nebulous lib/nebulous/param.rb /^module Nebulous$/;" m
14
+ Nebulous lib/nebulous/redis_handler.rb /^module Nebulous$/;" m
15
+ Nebulous lib/nebulous/redis_handler_null.rb /^module Nebulous$/;" m
16
+ Nebulous lib/nebulous/stomp_handler.rb /^module Nebulous$/;" m
17
+ Nebulous lib/nebulous/stomp_handler_null.rb /^module Nebulous$/;" m
18
+ Nebulous lib/nebulous/version.rb /^module Nebulous$/;" m
19
+ NebulousError lib/nebulous.rb /^ class NebulousError < StandardError; end$/;" c class:Nebulous inherits:StandardError
20
+ NebulousTimeout lib/nebulous.rb /^ class NebulousTimeout < StandardError; end$/;" c class:Nebulous inherits:StandardError
21
+ Param lib/nebulous/param.rb /^ module Param$/;" m class:Nebulous
22
+ ParamDefaults lib/nebulous/param.rb /^ ParamDefaults = { stompConnectHash: {},$/;" C class:Nebulous.Param
23
+ RedisHandler lib/nebulous/redis_handler.rb /^ class RedisHandler$/;" c class:Nebulous
24
+ RedisHandlerNull lib/nebulous/redis_handler_null.rb /^ class RedisHandlerNull < RedisHandler$/;" c class:Nebulous inherits:RedisHandler
25
+ StompHandler lib/nebulous/stomp_handler.rb /^ class StompHandler$/;" c class:Nebulous
26
+ StompHandlerNull lib/nebulous/stomp_handler_null.rb /^ class StompHandlerNull < StompHandler$/;" c class:Nebulous inherits:StompHandler
27
+ TargetDefaults lib/nebulous/param.rb /^ TargetDefaults = { sendQueue: nil,$/;" C class:Nebulous.Param
28
+ VERSION lib/nebulous/version.rb /^ VERSION = "1.1.5"$/;" C class:Nebulous
29
+ add_target lib/nebulous.rb /^ def self.add_target(name, targetHash) # -> nil$/;" F class:Nebulous
30
+ add_target lib/nebulous/param.rb /^ def add_target(n, t)$/;" f class:Nebulous.Param
31
+ body_for_stomp lib/nebulous/message.rb /^ def body_for_stomp$/;" f class:Nebulous.Message
32
+ body_to_h lib/nebulous/message.rb /^ def body_to_h$/;" f class:Nebulous.Message
33
+ body_to_hash lib/nebulous/stomp_handler.rb /^ def body_to_hash(headers, body, contentType=nil)$/;" F class:Nebulous.StompHandler
34
+ cTimeout lib/nebulous/nebrequest.rb /^ attr_reader :cTimeout$/;" f class:Nebulous.NebRequest
35
+ calc_reply_id lib/nebulous/stomp_handler.rb /^ def calc_reply_id$/;" f class:Nebulous.StompHandler
36
+ calc_reply_id lib/nebulous/stomp_handler_null.rb /^ def calc_reply_id; 'ABCD123456789'; end$/;" f class:Nebulous.StompHandlerNull
37
+ clear_cache lib/nebulous/nebrequest.rb /^ def clear_cache$/;" f class:Nebulous.NebRequest
38
+ client lib/nebulous/stomp_handler.rb /^ attr_reader :client$/;" f class:Nebulous.StompHandler
39
+ connect lib/nebulous/redis_handler.rb /^ def connect$/;" f class:Nebulous.RedisHandler
40
+ connect lib/nebulous/redis_handler_null.rb /^ def connect$/;" f class:Nebulous.RedisHandlerNull
41
+ connected? lib/nebulous/redis_handler.rb /^ def connected?$/;" f class:Nebulous.RedisHandler
42
+ connected? lib/nebulous/redis_handler_null.rb /^ def connected?$/;" f class:Nebulous.RedisHandlerNull
43
+ connected? lib/nebulous/stomp_handler.rb /^ def connected?$/;" f class:Nebulous.StompHandler
44
+ connected? lib/nebulous/stomp_handler_null.rb /^ def connected? $/;" f class:Nebulous.StompHandlerNull
45
+ content_is_json? lib/nebulous/message.rb /^ def content_is_json?$/;" f class:Nebulous.Message
46
+ content_type lib/nebulous/message.rb /^ attr_reader :content_type$/;" f class:Nebulous.Message
47
+ del lib/nebulous/redis_handler_null.rb /^ def del(key); @fake_pair = {}; end$/;" f class:Nebulous.RedisHandlerNull
48
+ desc lib/nebulous/message.rb /^ attr_reader :verb, :params, :desc$/;" f class:Nebulous.Message
49
+ desc lib/nebulous/nebrequest.rb /^ attr_reader :desc$/;" f class:Nebulous.NebRequest
50
+ description lib/nebulous/message.rb /^ alias :description :desc$/;" a class:Nebulous.Message
51
+ example_pending spec/doc_no_pending.rb /^ def example_pending(notifications); end$/;" f class:DocNoPending
52
+ fake_mess lib/nebulous/stomp_handler_null.rb /^ attr_reader :fake_mess$/;" f class:Nebulous.StompHandlerNull
53
+ fake_pair lib/nebulous/redis_handler_null.rb /^ attr_reader :fake_pair$/;" f class:Nebulous.RedisHandlerNull
54
+ fill_from_message lib/nebulous/message.rb /^ def fill_from_message$/;" f class:Nebulous.Message
55
+ from_cache lib/nebulous/message.rb /^ def from_cache(json)$/;" F class:Nebulous.Message
56
+ from_parts lib/nebulous/message.rb /^ def from_parts(replyTo, inReplyTo, verb, params, desc)$/;" F class:Nebulous.Message
57
+ from_stomp lib/nebulous/message.rb /^ def from_stomp(stompMsg)$/;" F class:Nebulous.Message
58
+ get lib/nebulous/param.rb /^ def get(p)$/;" f class:Nebulous.Param
59
+ get lib/nebulous/redis_handler_null.rb /^ def get(key); @fake_pair.values.first; end$/;" f class:Nebulous.RedisHandlerNull
60
+ get_all lib/nebulous/param.rb /^ def get_all()$/;" f class:Nebulous.Param
61
+ get_logger lib/nebulous/param.rb /^ def get_logger; @logger; end$/;" f class:Nebulous.Param
62
+ get_target lib/nebulous/param.rb /^ def get_target(name)$/;" f class:Nebulous.Param
63
+ headers_for_stomp lib/nebulous/message.rb /^ def headers_for_stomp$/;" f class:Nebulous.Message
64
+ in_reply_to lib/nebulous/message.rb /^ def in_reply_to(msg, verb, params=nil, desc=nil, replyTo=nil)$/;" F class:Nebulous.Message
65
+ in_reply_to lib/nebulous/message.rb /^ attr_reader :reply_to, :in_reply_to $/;" f class:Nebulous.Message
66
+ init lib/nebulous.rb /^ def self.init(paramHash={}) $/;" F class:Nebulous
67
+ initialize lib/nebulous/message.rb /^ def initialize(hash)$/;" f class:Nebulous.Message
68
+ initialize lib/nebulous/nebrequest.rb /^ def initialize( target, $/;" f class:Nebulous.NebRequest
69
+ initialize lib/nebulous/nebrequest_null.rb /^ def initialize( target, verb, params=nil, desc=nil )$/;" f class:Nebulous.NebRequestNull
70
+ initialize lib/nebulous/redis_handler.rb /^ def initialize(connectHash, testRedis=nil)$/;" f class:Nebulous.RedisHandler
71
+ initialize lib/nebulous/redis_handler_null.rb /^ def initialize(connectHash={})$/;" f class:Nebulous.RedisHandlerNull
72
+ initialize lib/nebulous/stomp_handler.rb /^ def initialize(connectHash, testClient=nil)$/;" f class:Nebulous.StompHandler
73
+ initialize lib/nebulous/stomp_handler_null.rb /^ def initialize(hash={})$/;" f class:Nebulous.StompHandlerNull
74
+ insert_fake lib/nebulous/redis_handler_null.rb /^ def insert_fake(key, value)$/;" f class:Nebulous.RedisHandlerNull
75
+ insert_fake lib/nebulous/stomp_handler_null.rb /^ def insert_fake(message)$/;" f class:Nebulous.StompHandlerNull
76
+ insert_fake_redis lib/nebulous/nebrequest_null.rb /^ def insert_fake_redis(key, value)$/;" f class:Nebulous.NebRequestNull
77
+ insert_fake_stomp lib/nebulous/nebrequest_null.rb /^ def insert_fake_stomp(message)$/;" f class:Nebulous.NebRequestNull
78
+ listen lib/nebulous/stomp_handler.rb /^ def listen(queue)$/;" f class:Nebulous.StompHandler
79
+ listen lib/nebulous/stomp_handler_null.rb /^ def listen(queue)$/;" f class:Nebulous.StompHandlerNull
80
+ listen_with_timeout lib/nebulous/stomp_handler.rb /^ def listen_with_timeout(queue, timeout)$/;" f class:Nebulous.StompHandler
81
+ listen_with_timeout lib/nebulous/stomp_handler_null.rb /^ def listen_with_timeout(queue, timeout)$/;" f class:Nebulous.StompHandlerNull
82
+ logger lib/nebulous.rb /^ def self.logger$/;" F class:Nebulous
83
+ mTimeout lib/nebulous/nebrequest.rb /^ attr_reader :mTimeout$/;" f class:Nebulous.NebRequest
84
+ message lib/nebulous/nebrequest.rb /^ attr_reader :message$/;" f class:Nebulous.NebRequest
85
+ method_missing lib/nebulous/redis_handler.rb /^ def method_missing(meth, *args)$/;" f class:Nebulous.RedisHandler
86
+ neb_connect lib/nebulous/nebrequest.rb /^ def neb_connect$/;" f class:Nebulous.NebRequest
87
+ neb_qna lib/nebulous/nebrequest.rb /^ def neb_qna(mTimeout)$/;" f class:Nebulous.NebRequest
88
+ nebulous_on? lib/nebulous/nebrequest.rb /^ def nebulous_on?$/;" f class:Nebulous.NebRequest
89
+ nebulous_on? lib/nebulous/stomp_handler.rb /^ def nebulous_on?$/;" f class:Nebulous.StompHandler
90
+ on? lib/nebulous.rb /^ def self.on?$/;" F class:Nebulous
91
+ parameters lib/nebulous/message.rb /^ alias :parameters :params$/;" a class:Nebulous.Message
92
+ params lib/nebulous/message.rb /^ attr_reader :verb, :params, :desc$/;" f class:Nebulous.Message
93
+ params lib/nebulous/nebrequest.rb /^ attr_reader :params $/;" f class:Nebulous.NebRequest
94
+ protocol_hash lib/nebulous/message.rb /^ def protocol_hash$/;" f class:Nebulous.Message
95
+ protocol_json lib/nebulous/message.rb /^ def protocol_json$/;" f class:Nebulous.Message
96
+ quit lib/nebulous/redis_handler.rb /^ def quit$/;" f class:Nebulous.RedisHandler
97
+ quit lib/nebulous/redis_handler_null.rb /^ def quit$/;" f class:Nebulous.RedisHandlerNull
98
+ redis lib/nebulous/redis_handler.rb /^ attr_reader :redis$/;" f class:Nebulous.RedisHandler
99
+ redis_on? lib/nebulous.rb /^ def self.redis_on?$/;" F class:Nebulous
100
+ redis_on? lib/nebulous/nebrequest.rb /^ def redis_on?$/;" f class:Nebulous.NebRequest
101
+ redis_on? lib/nebulous/redis_handler.rb /^ def redis_on?$/;" f class:Nebulous.RedisHandler
102
+ replyID lib/nebulous/nebrequest.rb /^ attr_reader :replyID$/;" f class:Nebulous.NebRequest
103
+ reply_id lib/nebulous/message.rb /^ attr_accessor :reply_id$/;" f class:Nebulous.Message
104
+ reply_id= lib/nebulous/message.rb /^ attr_accessor :reply_id$/;" f class:Nebulous.Message
105
+ reply_to lib/nebulous/message.rb /^ attr_reader :reply_to, :in_reply_to $/;" f class:Nebulous.Message
106
+ requestQ lib/nebulous/nebrequest.rb /^ attr_reader :requestQ$/;" f class:Nebulous.NebRequest
107
+ reset lib/nebulous/param.rb /^ def reset$/;" f class:Nebulous.Param
108
+ respond_error lib/nebulous/message.rb /^ def respond_error(err,fields=[])$/;" f class:Nebulous.Message
109
+ respond_error lib/nebulous/stomp_handler_null.rb /^ def respond_error(nebMess,err,fields=[])$/;" f class:Nebulous.StompHandlerNull
110
+ respond_success lib/nebulous/message.rb /^ def respond_success$/;" f class:Nebulous.Message
111
+ respond_success lib/nebulous/stomp_handler_null.rb /^ def respond_success(nebMess)$/;" f class:Nebulous.StompHandlerNull
112
+ responseQ lib/nebulous/nebrequest.rb /^ attr_reader :responseQ$/;" f class:Nebulous.NebRequest
113
+ send lib/nebulous/nebrequest.rb /^ def send(mTimeout=@mTimeout, cTimeout=@cTimeout)$/;" f class:Nebulous.NebRequest
114
+ send_message lib/nebulous/stomp_handler.rb /^ def send_message(queue, mess)$/;" f class:Nebulous.StompHandler
115
+ send_message lib/nebulous/stomp_handler_null.rb /^ def send_message(queue, nebMess)$/;" f class:Nebulous.StompHandlerNull
116
+ send_no_cache lib/nebulous/nebrequest.rb /^ def send_no_cache(mTimeout=@mTimeout)$/;" f class:Nebulous.NebRequest
117
+ set lib/nebulous/param.rb /^ def set(p={})$/;" f class:Nebulous.Param
118
+ set lib/nebulous/redis_handler_null.rb /^ def set(key, value, hash=nil); insert_fake(key, value); end$/;" f class:Nebulous.RedisHandlerNull
119
+ set_logger lib/nebulous.rb /^ def self.set_logger(logger)$/;" F class:Nebulous
120
+ set_logger lib/nebulous/param.rb /^ def set_logger(lg)$/;" f class:Nebulous.Param
121
+ stomp_body lib/nebulous/message.rb /^ attr_reader :stomp_headers, :stomp_body$/;" f class:Nebulous.Message
122
+ stomp_connect lib/nebulous/stomp_handler.rb /^ def stomp_connect$/;" f class:Nebulous.StompHandler
123
+ stomp_connect lib/nebulous/stomp_handler_null.rb /^ def stomp_connect$/;" f class:Nebulous.StompHandlerNull
124
+ stomp_disconnect lib/nebulous/stomp_handler.rb /^ def stomp_disconnect$/;" f class:Nebulous.StompHandler
125
+ stomp_disconnect lib/nebulous/stomp_handler_null.rb /^ def stomp_disconnect$/;" f class:Nebulous.StompHandlerNull
126
+ stomp_headers lib/nebulous/message.rb /^ attr_reader :stomp_headers, :stomp_body$/;" f class:Nebulous.Message
127
+ stomp_message spec/helpers.rb /^ def stomp_message(contentType, body, inReplyTo=nil)$/;" f class:Helpers
128
+ target lib/nebulous/nebrequest.rb /^ attr_reader :target$/;" f class:Nebulous.NebRequest
129
+ to_cache lib/nebulous/message.rb /^ def to_cache$/;" f class:Nebulous.Message
130
+ to_s lib/nebulous/message.rb /^ def to_s$/;" f class:Nebulous.Message
131
+ validate lib/nebulous/param.rb /^ def validate(exemplar, hash, message)$/;" f class:Nebulous.Param
132
+ verb lib/nebulous/message.rb /^ attr_reader :verb, :params, :desc$/;" f class:Nebulous.Message
133
+ verb lib/nebulous/nebrequest.rb /^ attr_reader :verb $/;" f class:Nebulous.NebRequest
134
+ with_timeout lib/nebulous/stomp_handler.rb /^ def with_timeout(secs)$/;" F class:Nebulous.StompHandler