radiator 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/radiator/api.rb +1 -10
- data/lib/radiator/transaction.rb +18 -0
- data/lib/radiator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad2c2c627c82f4b7a77eba148cb884e274c704a6
|
4
|
+
data.tar.gz: '0308a2266cbf4a54ef069d66ce22579aedba05ef'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ef349ae2137e72426b98bb2c15528066689250f5b4fa1cd3f2a38da4a2db8c7ec770c2560c6275dfc4d096477d33d4e100c69b2b8a4a290035834f5d45cbc6
|
7
|
+
data.tar.gz: d84a08d33554048527c224655f91646c61a9a36ef7151071c77ea4b3e5f11eca858e182b283078d274b309317e109b13aa18d122b50eeb0d4e6021da0ad20b8f
|
data/Gemfile.lock
CHANGED
data/lib/radiator/api.rb
CHANGED
@@ -250,8 +250,6 @@ module Radiator
|
|
250
250
|
@api = nil
|
251
251
|
@block_api = nil
|
252
252
|
@backoff_at = nil
|
253
|
-
|
254
|
-
ObjectSpace.define_finalizer(self, self.class.finalize(self))
|
255
253
|
end
|
256
254
|
|
257
255
|
# Get a specific block or range of blocks.
|
@@ -537,7 +535,7 @@ module Radiator
|
|
537
535
|
http.read_timeout = 10
|
538
536
|
http.open_timeout = 10
|
539
537
|
http.verify_mode = ssl_verify_mode
|
540
|
-
http.ssl_timeout = 30
|
538
|
+
http.ssl_timeout = 30 if defined? http.ssl_timeout
|
541
539
|
http
|
542
540
|
end
|
543
541
|
|
@@ -767,12 +765,5 @@ module Radiator
|
|
767
765
|
@backoff_sleep = nil
|
768
766
|
end
|
769
767
|
end
|
770
|
-
|
771
|
-
def self.finalize(obj)
|
772
|
-
proc {
|
773
|
-
puts "DESTROY OBJECT #{obj.inspect}" if ENV['LOG'] == 'TRACE'
|
774
|
-
obj.shutdown
|
775
|
-
}
|
776
|
-
end
|
777
768
|
end
|
778
769
|
end
|
data/lib/radiator/transaction.rb
CHANGED
@@ -50,6 +50,8 @@ module Radiator
|
|
50
50
|
options = options.merge(url: @url, chain: @chain)
|
51
51
|
@api = Api.new(options)
|
52
52
|
@network_broadcast_api = NetworkBroadcastApi.new(options)
|
53
|
+
|
54
|
+
ObjectSpace.define_finalizer(self, self.class.finalize(@api, @network_broadcast_api))
|
53
55
|
end
|
54
56
|
|
55
57
|
def chain_id(chain_id = nil)
|
@@ -225,5 +227,21 @@ module Radiator
|
|
225
227
|
((sig[33] & 0x80 ) != 0)
|
226
228
|
)
|
227
229
|
end
|
230
|
+
|
231
|
+
def self.finalize(api, network_broadcast_api)
|
232
|
+
proc {
|
233
|
+
if !!api
|
234
|
+
puts "DESTROY: #{api.inspect}" if ENV['LOG'] == 'TRACE'
|
235
|
+
api.shutdown
|
236
|
+
api = nil
|
237
|
+
end
|
238
|
+
|
239
|
+
if !!network_broadcast_api
|
240
|
+
puts "DESTROY: #{network_broadcast_api.inspect}" if ENV['LOG'] == 'TRACE'
|
241
|
+
network_broadcast_api.shutdown
|
242
|
+
network_broadcast_api = nil
|
243
|
+
end
|
244
|
+
}
|
245
|
+
end
|
228
246
|
end
|
229
247
|
end
|
data/lib/radiator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|