bps 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bps/publisher/abstract.rb +7 -2
- data/lib/bps/subscriber/abstract.rb +5 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ea055a7a6f92d9464ec2a7142a94c414cea104ab54684b561c6dfebf5107f9
|
4
|
+
data.tar.gz: 97c3f004f66bdeca362e188511ff44bbc118ac852b65f362510cf87e9410f93e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28a8bf949c811ca202265494dc7ae1c2277b53b953f6786d74b425b252ce59a98c6f6ff1cf0fff8c8cc7e711710b075b0f9807332c1b89eb42eb1ab5a166d0e9
|
7
|
+
data.tar.gz: 64d9f267c210fc2be7901563050d7f30901f8473a8c3c616b88620edf9aac8e41c13a6295d861b5547fd087a9a24f905805662a7ae4135ecc3a4d9a5d1ccd06f
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
1
3
|
module BPS
|
2
4
|
module Publisher
|
3
5
|
class Abstract
|
@@ -12,7 +14,8 @@ module BPS
|
|
12
14
|
end
|
13
15
|
|
14
16
|
def initialize
|
15
|
-
|
17
|
+
@uuid = SecureRandom.uuid
|
18
|
+
ObjectSpace.define_finalizer(@uuid, proc { close })
|
16
19
|
end
|
17
20
|
|
18
21
|
# Retrieve a topic handle.
|
@@ -22,7 +25,9 @@ module BPS
|
|
22
25
|
end
|
23
26
|
|
24
27
|
# Close the publisher.
|
25
|
-
def close
|
28
|
+
def close
|
29
|
+
ObjectSpace.undefine_finalizer(@uuid)
|
30
|
+
end
|
26
31
|
end
|
27
32
|
end
|
28
33
|
end
|
@@ -2,7 +2,8 @@ module BPS
|
|
2
2
|
module Subscriber
|
3
3
|
class Abstract
|
4
4
|
def initialize
|
5
|
-
|
5
|
+
@uuid = SecureRandom.uuid
|
6
|
+
ObjectSpace.define_finalizer(@uuid, proc { close })
|
6
7
|
end
|
7
8
|
|
8
9
|
# Subscribe to a topic
|
@@ -12,7 +13,9 @@ module BPS
|
|
12
13
|
end
|
13
14
|
|
14
15
|
# Close the subscriber.
|
15
|
-
def close
|
16
|
+
def close
|
17
|
+
ObjectSpace.undefine_finalizer(@uuid)
|
18
|
+
end
|
16
19
|
end
|
17
20
|
end
|
18
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Black Square Media
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Minimalist abstraction for publish-subscribe
|
14
14
|
email: info@blacksquaremedia.com
|
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
|
-
rubygems_version: 3.
|
46
|
+
rubygems_version: 3.2.15
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: Multi-platform pubsub adapter
|