istox 0.1.131 → 0.1.132
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/blockchain_service.rb +5 -7
- data/lib/istox/helpers/subscriber.rb +2 -2
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6f9c10ee44d70a98501078da3d052b9533b1920c24ac42b41bce9aa42b209a5
|
4
|
+
data.tar.gz: 6a126fcc4c28acf5b0630fb5002a4b61157d189f11a96cdeb17021678c70c52c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5f9014a153df8032a28aeca26c3df5ccefcc47e432376faef69c1c7c9bcc309bb5f7baa3423d8476d90b14e6fd974efd64592d8d2713f5a410b14ca22cb25d3
|
7
|
+
data.tar.gz: 2b315e6851f32cd28de13f9b54355ee3acf480a89dab4fb6e956670eaf73b4f158a954bbbed21332dd3fb3450e949f73606bf4fad8a78a00196c0a6b2e23d6c5
|
data/Gemfile.lock
CHANGED
@@ -23,7 +23,7 @@ module Istox
|
|
23
23
|
# create blockchain receipt first
|
24
24
|
klass = blockchain_receipt_class
|
25
25
|
uuid = ::SecureRandom.uuid
|
26
|
-
|
26
|
+
receipt = klass.create!(
|
27
27
|
txid: uuid,
|
28
28
|
sid: sid,
|
29
29
|
is_request: is_request,
|
@@ -40,7 +40,7 @@ module Istox
|
|
40
40
|
klass.where(resource_name: model.class.name, resource_id: model.id).destroy_all
|
41
41
|
|
42
42
|
# then update receipt
|
43
|
-
|
43
|
+
receipt.update!(resource_id: model.id, resource_name: model.class.name)
|
44
44
|
|
45
45
|
# execute the actual call to chainhub
|
46
46
|
result = execute.call(uuid)
|
@@ -50,7 +50,7 @@ module Istox
|
|
50
50
|
count = result.send('txn_count')
|
51
51
|
|
52
52
|
if count.to_i <= 0
|
53
|
-
|
53
|
+
receipt&.destroy!
|
54
54
|
chainhub_processing = false
|
55
55
|
end
|
56
56
|
end
|
@@ -58,7 +58,7 @@ module Istox
|
|
58
58
|
|
59
59
|
chainhub_processing
|
60
60
|
rescue StandardError => e
|
61
|
-
|
61
|
+
receipt&.destroy
|
62
62
|
raise e
|
63
63
|
end
|
64
64
|
|
@@ -67,9 +67,7 @@ module Istox
|
|
67
67
|
|
68
68
|
blockchain_receipt_klass = get_blockchain_receipt_klass
|
69
69
|
klass = class_eval("::#{blockchain_receipt_klass.name}", __FILE__, __LINE__)
|
70
|
-
unless klass <= ::Istox::BlockchainReceipt
|
71
|
-
raise "#{blockchain_receipt_klass.name} does not inherit istox blockchain receipt"
|
72
|
-
end
|
70
|
+
raise "#{blockchain_receipt_klass.name} does not inherit istox blockchain receipt" unless klass <= ::Istox::BlockchainReceipt
|
73
71
|
|
74
72
|
klass
|
75
73
|
end
|
@@ -113,11 +113,11 @@ module Istox
|
|
113
113
|
end
|
114
114
|
|
115
115
|
# Initiate klass
|
116
|
-
ruby_class = ::Istox::BunnyBoot.ruby_class consumer_key
|
116
|
+
ruby_class = ::Istox::BunnyBoot.ruby_class(consumer_key) || "#{consumer_key.to_s.underscore}_consumer"
|
117
117
|
@workers = {} if @workers.nil?
|
118
118
|
unless block || @workers[ruby_class]
|
119
119
|
klass = Object.const_get(
|
120
|
-
'::' + (ruby_class
|
120
|
+
'::' + (ruby_class).camelize
|
121
121
|
)
|
122
122
|
param = ::Istox::BunnyBoot.queue_worker_param consumer_key
|
123
123
|
if param.nil?
|
data/lib/istox/version.rb
CHANGED