bps 0.2.1 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dcfafba4e1ba7aec2d812ed9a900d8c456b3805aaa7fc06b3aaa09a25a82fe7
4
- data.tar.gz: a26e3d94327c39234daad0381504dda9024a26ff61640935d5e911746601fb46
3
+ metadata.gz: 8249adbd43e304f0f036a3b07c85d7aa647eaaf86a8a2b77ee0b23555d8e7ff8
4
+ data.tar.gz: 19a97724fbe9944e73a90b9eb8fd9a30a6869b75a7480a54aa114b772f158044
5
5
  SHA512:
6
- metadata.gz: 593c087d4fd8dc66cb737c8da308269cbf2d0aa1cff40a7eb88dc29532405eceb075b92ba11f90e06c527eb20b83a7a4c923a3e0b8db73289ea55a23bf5e0ed7
7
- data.tar.gz: fabb9c003aff6112f935fcf4e41e5c1f21a5ed29d731bde44e8efef332e45b6a8dab708977ce8e8789fa24775c3b9628a65876114f103d07df9c9c168b2ce710
6
+ metadata.gz: 95fb7377d7c40d63aedd7325b312c6c681db678d65f5355cc548a86afc09dc6f768a13a456c758853b0a8b087babdd3a6f9acf0a9420eb708373dac637a79737
7
+ data.tar.gz: 427ad475181963c4bc659b1e4e46be6e1e2e2a6e9e0662b63ed4a046c0290ad1548fa4e7ca99ab319d64dc5cd128cf78b2f5ec00692e0ae88e473dd83c1cc7fa
data/bps.gemspec CHANGED
@@ -15,5 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.test_files = `git ls-files -- spec/*`.split("\n")
17
17
  s.require_paths = ['lib']
18
- s.required_ruby_version = '>= 2.6.0'
18
+ s.required_ruby_version = '>= 2.7'
19
+ s.metadata['rubygems_mfa_required'] = 'true'
19
20
  end
@@ -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
- ObjectSpace.define_finalizer(self, proc { close })
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; end
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
- ObjectSpace.define_finalizer(self, proc { close })
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; end
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.1
4
+ version: 0.2.4
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-03-05 00:00:00.000000000 Z
11
+ date: 2022-03-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Minimalist abstraction for publish-subscribe
14
14
  email: info@blacksquaremedia.com
@@ -27,7 +27,8 @@ files:
27
27
  homepage: https://github.com/bsm/bps
28
28
  licenses:
29
29
  - Apache-2.0
30
- metadata: {}
30
+ metadata:
31
+ rubygems_mfa_required: 'true'
31
32
  post_install_message:
32
33
  rdoc_options: []
33
34
  require_paths:
@@ -36,14 +37,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - ">="
38
39
  - !ruby/object:Gem::Version
39
- version: 2.6.0
40
+ version: '2.7'
40
41
  required_rubygems_version: !ruby/object:Gem::Requirement
41
42
  requirements:
42
43
  - - ">="
43
44
  - !ruby/object:Gem::Version
44
45
  version: '0'
45
46
  requirements: []
46
- rubygems_version: 3.1.4
47
+ rubygems_version: 3.3.3
47
48
  signing_key:
48
49
  specification_version: 4
49
50
  summary: Multi-platform pubsub adapter