onstomp 1.0.5 → 1.0.6
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/.autotest +0 -1
- data/.gitignore +4 -0
- data/.travis.yml +5 -0
- data/extra_doc/API.md +178 -2
- data/lib/onstomp/components/frame_headers.rb +1 -1
- data/lib/onstomp/components/scopes/receipt_scope.rb +1 -1
- data/lib/onstomp/version.rb +1 -1
- data/spec/onstomp/components/scopes/header_scope_spec.rb +6 -0
- data/spec/onstomp/components/scopes/receipt_scope_spec.rb +6 -0
- data/spec/onstomp/components/scopes/transaction_scope_spec.rb +4 -0
- metadata +13 -11
data/.autotest
CHANGED
data/.gitignore
CHANGED
data/extra_doc/API.md
CHANGED
|
@@ -14,6 +14,22 @@
|
|
|
14
14
|
<tfoot>
|
|
15
15
|
</tfoot>
|
|
16
16
|
<tbody>
|
|
17
|
+
<tr>
|
|
18
|
+
<td>{OnStomp::Interfaces::ClientEvents#:begin :begin}</td>
|
|
19
|
+
<td>
|
|
20
|
+
<code>:begin</code>
|
|
21
|
+
</td>
|
|
22
|
+
<td style="background-color: #bfb;">true</td>
|
|
23
|
+
<td style="background-color: #bfb;">true</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td>{OnStomp::Interfaces::ClientEvents#abort abort}</td>
|
|
27
|
+
<td>
|
|
28
|
+
<code>abort</code>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="background-color: #bfb;">true</td>
|
|
31
|
+
<td style="background-color: #bfb;">true</td>
|
|
32
|
+
</tr>
|
|
17
33
|
<tr>
|
|
18
34
|
<td>{OnStomp::Interfaces::FrameMethods#abort abort}</td>
|
|
19
35
|
<td>
|
|
@@ -22,6 +38,14 @@
|
|
|
22
38
|
<td style="background-color: #bfb;">true</td>
|
|
23
39
|
<td style="background-color: #bfb;">true</td>
|
|
24
40
|
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td>{OnStomp::Interfaces::ClientEvents#ack ack}</td>
|
|
43
|
+
<td>
|
|
44
|
+
<code>ack</code>
|
|
45
|
+
</td>
|
|
46
|
+
<td style="background-color: #bfb;">true</td>
|
|
47
|
+
<td style="background-color: #bfb;">true</td>
|
|
48
|
+
</tr>
|
|
25
49
|
<tr>
|
|
26
50
|
<td>{OnStomp::Interfaces::FrameMethods#ack ack}</td>
|
|
27
51
|
<td>
|
|
@@ -206,6 +230,30 @@
|
|
|
206
230
|
<td style="background-color: #bfb;">true</td>
|
|
207
231
|
<td style="background-color: #bfb;">true</td>
|
|
208
232
|
</tr>
|
|
233
|
+
<tr>
|
|
234
|
+
<td>{OnStomp::Interfaces::ConnectionEvents#blocked blocked}</td>
|
|
235
|
+
<td>
|
|
236
|
+
<code>blocked</code>
|
|
237
|
+
</td>
|
|
238
|
+
<td style="background-color: #bfb;">true</td>
|
|
239
|
+
<td style="background-color: #bfb;">true</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td>{OnStomp::Interfaces::ClientEvents#broker_beat broker_beat}</td>
|
|
243
|
+
<td>
|
|
244
|
+
<code>broker_beat</code>
|
|
245
|
+
</td>
|
|
246
|
+
<td style="background-color: #fbb;">false</td>
|
|
247
|
+
<td style="background-color: #bfb;">true</td>
|
|
248
|
+
</tr>
|
|
249
|
+
<tr>
|
|
250
|
+
<td>{OnStomp::Interfaces::ClientEvents#client_beat client_beat}</td>
|
|
251
|
+
<td>
|
|
252
|
+
<code>client_beat</code>
|
|
253
|
+
</td>
|
|
254
|
+
<td style="background-color: #fbb;">false</td>
|
|
255
|
+
<td style="background-color: #bfb;">true</td>
|
|
256
|
+
</tr>
|
|
209
257
|
<tr>
|
|
210
258
|
<td>{OnStomp::Client#close! close!}</td>
|
|
211
259
|
<td>
|
|
@@ -214,6 +262,22 @@
|
|
|
214
262
|
<td style="background-color: #bfb;">true</td>
|
|
215
263
|
<td style="background-color: #bfb;">true</td>
|
|
216
264
|
</tr>
|
|
265
|
+
<tr>
|
|
266
|
+
<td>{OnStomp::Interfaces::ConnectionEvents#closed closed}</td>
|
|
267
|
+
<td>
|
|
268
|
+
<code>closed</code>
|
|
269
|
+
</td>
|
|
270
|
+
<td style="background-color: #bfb;">true</td>
|
|
271
|
+
<td style="background-color: #bfb;">true</td>
|
|
272
|
+
</tr>
|
|
273
|
+
<tr>
|
|
274
|
+
<td>{OnStomp::Interfaces::ClientEvents#commit commit}</td>
|
|
275
|
+
<td>
|
|
276
|
+
<code>commit</code>
|
|
277
|
+
</td>
|
|
278
|
+
<td style="background-color: #bfb;">true</td>
|
|
279
|
+
<td style="background-color: #bfb;">true</td>
|
|
280
|
+
</tr>
|
|
217
281
|
<tr>
|
|
218
282
|
<td>{OnStomp::Interfaces::FrameMethods#commit commit}</td>
|
|
219
283
|
<td>
|
|
@@ -222,6 +286,14 @@
|
|
|
222
286
|
<td style="background-color: #bfb;">true</td>
|
|
223
287
|
<td style="background-color: #bfb;">true</td>
|
|
224
288
|
</tr>
|
|
289
|
+
<tr>
|
|
290
|
+
<td>{OnStomp::Interfaces::ClientEvents#connect connect}</td>
|
|
291
|
+
<td>
|
|
292
|
+
<code>connect</code>
|
|
293
|
+
</td>
|
|
294
|
+
<td style="background-color: #bfb;">true</td>
|
|
295
|
+
<td style="background-color: #bfb;">true</td>
|
|
296
|
+
</tr>
|
|
225
297
|
<tr>
|
|
226
298
|
<td>{OnStomp::Client#connect connect}</td>
|
|
227
299
|
<td>
|
|
@@ -238,6 +310,22 @@
|
|
|
238
310
|
<td style="background-color: #bfb;">true</td>
|
|
239
311
|
<td style="background-color: #bfb;">true</td>
|
|
240
312
|
</tr>
|
|
313
|
+
<tr>
|
|
314
|
+
<td>{OnStomp::Interfaces::ConnectionEvents#died died}</td>
|
|
315
|
+
<td>
|
|
316
|
+
<code>died</code>
|
|
317
|
+
</td>
|
|
318
|
+
<td style="background-color: #fbb;">false</td>
|
|
319
|
+
<td style="background-color: #bfb;">true</td>
|
|
320
|
+
</tr>
|
|
321
|
+
<tr>
|
|
322
|
+
<td>{OnStomp::Interfaces::ClientEvents#disconnect disconnect}</td>
|
|
323
|
+
<td>
|
|
324
|
+
<code>disconnect</code>
|
|
325
|
+
</td>
|
|
326
|
+
<td style="background-color: #bfb;">true</td>
|
|
327
|
+
<td style="background-color: #bfb;">true</td>
|
|
328
|
+
</tr>
|
|
241
329
|
<tr>
|
|
242
330
|
<td>{OnStomp::Client#disconnect disconnect}</td>
|
|
243
331
|
<td>
|
|
@@ -262,6 +350,22 @@
|
|
|
262
350
|
<td style="background-color: #bfb;">true</td>
|
|
263
351
|
<td style="background-color: #bfb;">true</td>
|
|
264
352
|
</tr>
|
|
353
|
+
<tr>
|
|
354
|
+
<td>{OnStomp::Interfaces::ClientEvents#error error}</td>
|
|
355
|
+
<td>
|
|
356
|
+
<code>error</code>
|
|
357
|
+
</td>
|
|
358
|
+
<td style="background-color: #bfb;">true</td>
|
|
359
|
+
<td style="background-color: #bfb;">true</td>
|
|
360
|
+
</tr>
|
|
361
|
+
<tr>
|
|
362
|
+
<td>{OnStomp::Interfaces::ConnectionEvents#established established}</td>
|
|
363
|
+
<td>
|
|
364
|
+
<code>established</code>
|
|
365
|
+
</td>
|
|
366
|
+
<td style="background-color: #bfb;">true</td>
|
|
367
|
+
<td style="background-color: #bfb;">true</td>
|
|
368
|
+
</tr>
|
|
265
369
|
<tr>
|
|
266
370
|
<td>{OnStomp::Client#initialize initialize}</td>
|
|
267
371
|
<td>
|
|
@@ -270,10 +374,26 @@
|
|
|
270
374
|
<td style="background-color: #bfb;">true</td>
|
|
271
375
|
<td style="background-color: #bfb;">true</td>
|
|
272
376
|
</tr>
|
|
377
|
+
<tr>
|
|
378
|
+
<td>{OnStomp::Interfaces::ClientEvents#message message}</td>
|
|
379
|
+
<td>
|
|
380
|
+
<code>message</code>
|
|
381
|
+
</td>
|
|
382
|
+
<td style="background-color: #bfb;">true</td>
|
|
383
|
+
<td style="background-color: #bfb;">true</td>
|
|
384
|
+
</tr>
|
|
273
385
|
<tr>
|
|
274
386
|
<td>{OnStomp::Interfaces::FrameMethods#nack nack}</td>
|
|
275
387
|
<td>
|
|
276
|
-
<code>nack(
|
|
388
|
+
<code>nack(message_frame, headers=<optional hash>)</code>
|
|
389
|
+
</td>
|
|
390
|
+
<td style="background-color: #fbb;">false</td>
|
|
391
|
+
<td style="background-color: #bfb;">true</td>
|
|
392
|
+
</tr>
|
|
393
|
+
<tr>
|
|
394
|
+
<td>{OnStomp::Interfaces::ClientEvents#nack nack}</td>
|
|
395
|
+
<td>
|
|
396
|
+
<code>nack</code>
|
|
277
397
|
</td>
|
|
278
398
|
<td style="background-color: #fbb;">false</td>
|
|
279
399
|
<td style="background-color: #bfb;">true</td>
|
|
@@ -281,7 +401,7 @@
|
|
|
281
401
|
<tr>
|
|
282
402
|
<td>{OnStomp::Interfaces::FrameMethods#nack nack}</td>
|
|
283
403
|
<td>
|
|
284
|
-
<code>nack(
|
|
404
|
+
<code>nack(message_id, subscription_id, heders=<optional hash>)</code>
|
|
285
405
|
</td>
|
|
286
406
|
<td style="background-color: #fbb;">false</td>
|
|
287
407
|
<td style="background-color: #bfb;">true</td>
|
|
@@ -462,6 +582,22 @@
|
|
|
462
582
|
<td style="background-color: #bfb;">true</td>
|
|
463
583
|
<td style="background-color: #bfb;">true</td>
|
|
464
584
|
</tr>
|
|
585
|
+
<tr>
|
|
586
|
+
<td>{OnStomp::Interfaces::ClientEvents#receipt receipt}</td>
|
|
587
|
+
<td>
|
|
588
|
+
<code>receipt</code>
|
|
589
|
+
</td>
|
|
590
|
+
<td style="background-color: #bfb;">true</td>
|
|
591
|
+
<td style="background-color: #bfb;">true</td>
|
|
592
|
+
</tr>
|
|
593
|
+
<tr>
|
|
594
|
+
<td>{OnStomp::Interfaces::ClientEvents#receiving receiving}</td>
|
|
595
|
+
<td>
|
|
596
|
+
<code>receiving</code>
|
|
597
|
+
</td>
|
|
598
|
+
<td style="background-color: #bfb;">true</td>
|
|
599
|
+
<td style="background-color: #bfb;">true</td>
|
|
600
|
+
</tr>
|
|
465
601
|
<tr>
|
|
466
602
|
<td>{OnStomp::Interfaces::FrameMethods#send send}</td>
|
|
467
603
|
<td>
|
|
@@ -470,6 +606,22 @@
|
|
|
470
606
|
<td style="background-color: #bfb;">true</td>
|
|
471
607
|
<td style="background-color: #bfb;">true</td>
|
|
472
608
|
</tr>
|
|
609
|
+
<tr>
|
|
610
|
+
<td>{OnStomp::Interfaces::ClientEvents#send send}</td>
|
|
611
|
+
<td>
|
|
612
|
+
<code>send</code>
|
|
613
|
+
</td>
|
|
614
|
+
<td style="background-color: #bfb;">true</td>
|
|
615
|
+
<td style="background-color: #bfb;">true</td>
|
|
616
|
+
</tr>
|
|
617
|
+
<tr>
|
|
618
|
+
<td>{OnStomp::Interfaces::ClientEvents#subscribe subscribe}</td>
|
|
619
|
+
<td>
|
|
620
|
+
<code>subscribe</code>
|
|
621
|
+
</td>
|
|
622
|
+
<td style="background-color: #bfb;">true</td>
|
|
623
|
+
<td style="background-color: #bfb;">true</td>
|
|
624
|
+
</tr>
|
|
473
625
|
<tr>
|
|
474
626
|
<td>{OnStomp::Interfaces::FrameMethods#subscribe subscribe}</td>
|
|
475
627
|
<td>
|
|
@@ -478,6 +630,22 @@
|
|
|
478
630
|
<td style="background-color: #bfb;">true</td>
|
|
479
631
|
<td style="background-color: #bfb;">true</td>
|
|
480
632
|
</tr>
|
|
633
|
+
<tr>
|
|
634
|
+
<td>{OnStomp::Interfaces::ConnectionEvents#terminated terminated}</td>
|
|
635
|
+
<td>
|
|
636
|
+
<code>terminated</code>
|
|
637
|
+
</td>
|
|
638
|
+
<td style="background-color: #bfb;">true</td>
|
|
639
|
+
<td style="background-color: #bfb;">true</td>
|
|
640
|
+
</tr>
|
|
641
|
+
<tr>
|
|
642
|
+
<td>{OnStomp::Interfaces::ClientEvents#transmitting transmitting}</td>
|
|
643
|
+
<td>
|
|
644
|
+
<code>transmitting</code>
|
|
645
|
+
</td>
|
|
646
|
+
<td style="background-color: #bfb;">true</td>
|
|
647
|
+
<td style="background-color: #bfb;">true</td>
|
|
648
|
+
</tr>
|
|
481
649
|
<tr>
|
|
482
650
|
<td>{OnStomp::Interfaces::FrameMethods#unsubscribe unsubscribe}</td>
|
|
483
651
|
<td>
|
|
@@ -494,6 +662,14 @@
|
|
|
494
662
|
<td style="background-color: #bfb;">true</td>
|
|
495
663
|
<td style="background-color: #bfb;">true</td>
|
|
496
664
|
</tr>
|
|
665
|
+
<tr>
|
|
666
|
+
<td>{OnStomp::Interfaces::ClientEvents#unsubscribe unsubscribe}</td>
|
|
667
|
+
<td>
|
|
668
|
+
<code>unsubscribe</code>
|
|
669
|
+
</td>
|
|
670
|
+
<td style="background-color: #bfb;">true</td>
|
|
671
|
+
<td style="background-color: #bfb;">true</td>
|
|
672
|
+
</tr>
|
|
497
673
|
</tbody>
|
|
498
674
|
</table>
|
|
499
675
|
|
|
@@ -46,7 +46,7 @@ class OnStomp::Components::FrameHeaders
|
|
|
46
46
|
def set?(name)
|
|
47
47
|
@values.key?(name.to_sym)
|
|
48
48
|
end
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
# Returns true if a header value has been set for the supplied header, and
|
|
51
51
|
# the value is neither `nil` nor an empty string.
|
|
52
52
|
# @param [#to_sym] name the header name to test
|
|
@@ -9,7 +9,7 @@ class OnStomp::Components::Scopes::ReceiptScope
|
|
|
9
9
|
def initialize callback, client
|
|
10
10
|
@callback = callback
|
|
11
11
|
@client = client
|
|
12
|
-
@
|
|
12
|
+
@connection = client.connection
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# Wraps {OnStomp::Client#transmit}, applying the {#callback} as a receipt
|
data/lib/onstomp/version.rb
CHANGED
|
@@ -15,6 +15,12 @@ module OnStomp::Components::Scopes
|
|
|
15
15
|
|
|
16
16
|
let(:frame_method_interface) { scope }
|
|
17
17
|
it_should_behave_like "frame method interfaces"
|
|
18
|
+
|
|
19
|
+
it "sets up the connection attribute" do
|
|
20
|
+
connection = stub('connection')
|
|
21
|
+
client.should_receive(:connection).and_return(connection)
|
|
22
|
+
scope.connection.should == connection
|
|
23
|
+
end
|
|
18
24
|
|
|
19
25
|
describe ".transmit" do
|
|
20
26
|
it "should add all its headers to a frame, unless that header name is set" do
|
|
@@ -15,6 +15,12 @@ module OnStomp::Components::Scopes
|
|
|
15
15
|
|
|
16
16
|
let(:frame_method_interface) { scope }
|
|
17
17
|
it_should_behave_like "frame method interfaces"
|
|
18
|
+
|
|
19
|
+
it "sets up the connection attribute" do
|
|
20
|
+
connection = stub('connection')
|
|
21
|
+
client.should_receive(:connection).and_return(connection)
|
|
22
|
+
scope.connection.should == connection
|
|
23
|
+
end
|
|
18
24
|
|
|
19
25
|
describe ".transmit" do
|
|
20
26
|
it "should add its receipt callback to frames transmitted without one" do
|
|
@@ -11,6 +11,10 @@ module OnStomp::Components::Scopes
|
|
|
11
11
|
let(:scope) {
|
|
12
12
|
TransactionScope.new 't-1234', client
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
it "sets up the connection attribute" do
|
|
16
|
+
scope.connection.should == scope
|
|
17
|
+
end
|
|
14
18
|
|
|
15
19
|
describe ".begin" do
|
|
16
20
|
it "should use the scope's transaction id by default" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onstomp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2012-02-21 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &2153282120 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: 2.4.0
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *2153282120
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: simplecov
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &2153281520 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ! '>='
|
|
@@ -32,10 +32,10 @@ dependencies:
|
|
|
32
32
|
version: 0.3.0
|
|
33
33
|
type: :development
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *2153281520
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: yard
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &2153280580 !ruby/object:Gem::Requirement
|
|
39
39
|
none: false
|
|
40
40
|
requirements:
|
|
41
41
|
- - ! '>='
|
|
@@ -43,10 +43,10 @@ dependencies:
|
|
|
43
43
|
version: 0.6.0
|
|
44
44
|
type: :development
|
|
45
45
|
prerelease: false
|
|
46
|
-
version_requirements: *
|
|
46
|
+
version_requirements: *2153280580
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: rake
|
|
49
|
-
requirement: &
|
|
49
|
+
requirement: &2153280180 !ruby/object:Gem::Requirement
|
|
50
50
|
none: false
|
|
51
51
|
requirements:
|
|
52
52
|
- - ! '>='
|
|
@@ -54,7 +54,7 @@ dependencies:
|
|
|
54
54
|
version: '0'
|
|
55
55
|
type: :development
|
|
56
56
|
prerelease: false
|
|
57
|
-
version_requirements: *
|
|
57
|
+
version_requirements: *2153280180
|
|
58
58
|
description: Client library for message passing with brokers that support the Stomp
|
|
59
59
|
protocol.
|
|
60
60
|
email:
|
|
@@ -66,6 +66,7 @@ files:
|
|
|
66
66
|
- .autotest
|
|
67
67
|
- .gitignore
|
|
68
68
|
- .rspec
|
|
69
|
+
- .travis.yml
|
|
69
70
|
- .yardopts
|
|
70
71
|
- CHANGELOG.md
|
|
71
72
|
- Gemfile
|
|
@@ -211,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
211
212
|
version: '0'
|
|
212
213
|
requirements: []
|
|
213
214
|
rubyforge_project: onstomp-core
|
|
214
|
-
rubygems_version: 1.8.
|
|
215
|
+
rubygems_version: 1.8.12
|
|
215
216
|
signing_key:
|
|
216
217
|
specification_version: 3
|
|
217
218
|
summary: Client for message queues implementing the Stomp protocol interface.
|
|
@@ -279,3 +280,4 @@ test_files:
|
|
|
279
280
|
- spec/support/custom_argument_matchers.rb
|
|
280
281
|
- spec/support/frame_matchers.rb
|
|
281
282
|
- spec/support/shared_frame_method_examples.rb
|
|
283
|
+
has_rdoc:
|