istox 0.1.127 → 0.1.128

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.126)
4
+ istox (0.1.127)
5
5
  awesome_print
6
6
  binding_of_caller
7
7
  bunny (>= 2.12.0)
@@ -97,7 +97,7 @@ GEM
97
97
  ffi (1.12.2)
98
98
  globalid (0.4.2)
99
99
  activesupport (>= 4.2.0)
100
- google-protobuf (3.11.4-universal-darwin)
100
+ google-protobuf (3.11.4)
101
101
  googleapis-common-protos-types (1.0.4)
102
102
  google-protobuf (~> 3.0)
103
103
  graphlient (0.3.7)
@@ -108,7 +108,7 @@ GEM
108
108
  graphql-client (0.16.0)
109
109
  activesupport (>= 3.0)
110
110
  graphql (~> 1.8)
111
- grpc (1.27.0-universal-darwin)
111
+ grpc (1.27.0)
112
112
  google-protobuf (~> 3.11)
113
113
  googleapis-common-protos-types (~> 1.0)
114
114
  grpc-tools (1.27.0)
@@ -23,7 +23,7 @@ module Istox
23
23
  # create blockchain receipt first
24
24
  klass = blockchain_receipt_class
25
25
  uuid = ::SecureRandom.uuid
26
- @receipt = klass.create!(
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
- @receipt.update!(resource_id: model.id, resource_name: model.class.name)
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
- @receipt&.destroy!
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
- @receipt&.destroy
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
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.127'.freeze
2
+ VERSION = '0.1.128'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.127
4
+ version: 0.1.128
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -445,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
445
445
  - !ruby/object:Gem::Version
446
446
  version: '0'
447
447
  requirements: []
448
- rubygems_version: 3.0.3
448
+ rubygems_version: 3.0.6
449
449
  signing_key:
450
450
  specification_version: 4
451
451
  summary: istox backend shared gem