stomp_actors 0.1.0 → 0.1.1
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/.gitignore +1 -0
- data/lib/stomp_actors/consumer.rb +3 -1
- data/lib/stomp_actors/producer.rb +2 -3
- data/lib/stomp_actors/version.rb +1 -1
- data/spec/stomp_actors/consumer_spec.rb +5 -2
- metadata +2 -2
data/.gitignore
CHANGED
@@ -7,6 +7,8 @@ module StompActors
|
|
7
7
|
|
8
8
|
attr_accessor :subscription_id
|
9
9
|
|
10
|
+
finalizer :cleanup
|
11
|
+
|
10
12
|
def initialize
|
11
13
|
async.start
|
12
14
|
end
|
@@ -32,7 +34,7 @@ module StompActors
|
|
32
34
|
client.ack(msg)
|
33
35
|
end
|
34
36
|
|
35
|
-
def
|
37
|
+
def cleanup
|
36
38
|
unsubscribe
|
37
39
|
disconnect
|
38
40
|
end
|
data/lib/stomp_actors/version.rb
CHANGED
@@ -43,9 +43,12 @@ describe StompActors::Consumer do
|
|
43
43
|
sleep 0.1
|
44
44
|
end
|
45
45
|
|
46
|
-
it "should
|
46
|
+
it "should disconnect on termination" do
|
47
47
|
consumer = MyConsumer.new(host, port, queue)
|
48
|
+
client = consumer.client
|
48
49
|
sleep 0.1
|
49
|
-
consumer.
|
50
|
+
consumer.terminate
|
51
|
+
sleep 0.1
|
52
|
+
expect(client.connected?).to be_false
|
50
53
|
end
|
51
54
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stomp_actors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|