istox 0.2.3.pre.50 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/.solargraph.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +22 -33
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/istox/constants/error.rb +0 -0
- data/lib/istox/helpers/f_math.rb +0 -0
- data/lib/istox/helpers/graphql_client.rb +0 -0
- data/lib/istox/helpers/gruf_listener_hook.rb +0 -0
- data/lib/istox/helpers/messaging.rb +2 -7
- data/lib/istox/helpers/my_open_struct.rb +0 -0
- data/lib/istox/helpers/order_book_prorate.rb +0 -0
- data/lib/istox/helpers/rate_limit.rb +0 -0
- data/lib/istox/helpers/regex_helper.rb +0 -0
- data/lib/istox/helpers/result_handler.rb +0 -0
- data/lib/istox/helpers/vault.rb +0 -0
- data/lib/istox/interfaces/chainhub/transaction.rb +0 -0
- data/lib/istox/models/blockchain_receipt.rb +0 -0
- data/lib/istox/models/concerns/blockchain_receipt_query.rb +0 -0
- data/lib/istox/version.rb +1 -1
- metadata +5 -6
- data/lib/istox/helpers/_tmp_07f8e7bcecafce66_common_helper.rb.rb +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aa5c0d11cb873cfd398db44b8f4a139baf6668bf04f578db3091cb049b7d89f
|
4
|
+
data.tar.gz: '02109c5b9c3cb01c288d757cef841357f79cc36186d4245f624a619dbb984489'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdfe781debfdb6c49ab24140562b55bff2e919090fb6e46c71b6e6dfecbb9607843379e0ac97e58edc26a0426527839494294bcb94703d80fc7a0102b244333a
|
7
|
+
data.tar.gz: 88b913cbd976f4d85e2e7a140e7fd3747dd42a5c8da83b2135796b20d3121619ed54b8a1f2040179aafd13ee03cae5646fd4c6634258854e2bfb522681dc649f
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.solargraph.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
istox (0.
|
4
|
+
istox (0.1.157.9)
|
5
5
|
amazing_print
|
6
6
|
awesome_print
|
7
7
|
aws-sdk-sns (~> 1)
|
@@ -64,10 +64,10 @@ GEM
|
|
64
64
|
i18n (>= 0.7, < 2)
|
65
65
|
minitest (~> 5.1)
|
66
66
|
tzinfo (~> 1.1)
|
67
|
-
amazing_print (1.
|
67
|
+
amazing_print (1.2.1)
|
68
68
|
amq-protocol (2.3.2)
|
69
69
|
arel (9.0.0)
|
70
|
-
awesome_print (1.
|
70
|
+
awesome_print (1.8.0)
|
71
71
|
aws-eventstream (1.1.0)
|
72
72
|
aws-partitions (1.318.0)
|
73
73
|
aws-sdk-core (3.96.1)
|
@@ -86,7 +86,7 @@ GEM
|
|
86
86
|
aws-xray-sdk (0.11.4)
|
87
87
|
aws-sdk-xray (~> 1.4.0)
|
88
88
|
multi_json (~> 1)
|
89
|
-
binding_of_caller (
|
89
|
+
binding_of_caller (0.8.0)
|
90
90
|
debug_inspector (>= 0.0.1)
|
91
91
|
builder (3.2.4)
|
92
92
|
bullet (5.7.6)
|
@@ -99,9 +99,8 @@ GEM
|
|
99
99
|
concurrent-ruby (1.1.6)
|
100
100
|
crass (1.0.6)
|
101
101
|
database_cleaner (1.6.2)
|
102
|
-
debug_inspector (
|
102
|
+
debug_inspector (0.0.3)
|
103
103
|
diff-lcs (1.3)
|
104
|
-
e2mmap (0.1.0)
|
105
104
|
erubi (1.9.0)
|
106
105
|
exponential-backoff (0.0.4)
|
107
106
|
factory_bot (4.8.2)
|
@@ -113,40 +112,34 @@ GEM
|
|
113
112
|
i18n (~> 0.5)
|
114
113
|
fakeredis (0.7.0)
|
115
114
|
redis (>= 3.2, < 5.0)
|
116
|
-
faraday (1.
|
117
|
-
faraday-net_http (~> 1.0)
|
115
|
+
faraday (1.0.1)
|
118
116
|
multipart-post (>= 1.2, < 3)
|
119
|
-
ruby2_keywords
|
120
|
-
faraday-net_http (1.0.1)
|
121
117
|
faraday_middleware (1.0.0)
|
122
118
|
faraday (~> 1.0)
|
123
|
-
ffi (1.
|
119
|
+
ffi (1.13.1)
|
124
120
|
globalid (0.4.2)
|
125
121
|
activesupport (>= 4.2.0)
|
126
|
-
google-protobuf (3.
|
127
|
-
googleapis-common-protos-types (1.0.
|
128
|
-
google-protobuf (~> 3.
|
129
|
-
graphlient (0.
|
122
|
+
google-protobuf (3.13.0-universal-darwin)
|
123
|
+
googleapis-common-protos-types (1.0.5)
|
124
|
+
google-protobuf (~> 3.11)
|
125
|
+
graphlient (0.4.0)
|
130
126
|
faraday (>= 1.0)
|
131
127
|
faraday_middleware
|
132
128
|
graphql-client
|
133
|
-
graphql (1.
|
129
|
+
graphql (1.11.4)
|
134
130
|
graphql-client (0.16.0)
|
135
131
|
activesupport (>= 3.0)
|
136
132
|
graphql (~> 1.8)
|
137
|
-
grpc (1.
|
138
|
-
google-protobuf (~> 3.
|
133
|
+
grpc (1.32.0-universal-darwin)
|
134
|
+
google-protobuf (~> 3.13)
|
139
135
|
googleapis-common-protos-types (~> 1.0)
|
140
|
-
grpc-tools (1.
|
141
|
-
gruf (2.
|
136
|
+
grpc-tools (1.32.0)
|
137
|
+
gruf (2.8.1)
|
142
138
|
activesupport (> 4)
|
143
139
|
concurrent-ruby (> 1)
|
144
|
-
e2mmap (~> 0.1)
|
145
140
|
grpc (~> 1.10)
|
146
141
|
grpc-tools (~> 1.10)
|
147
|
-
json (>= 2.3)
|
148
142
|
slop (~> 4.6)
|
149
|
-
thwait (~> 0.1)
|
150
143
|
hashie (3.5.7)
|
151
144
|
i18n (0.9.5)
|
152
145
|
concurrent-ruby (~> 1.0)
|
@@ -157,7 +150,6 @@ GEM
|
|
157
150
|
grpc-tools (~> 1.10)
|
158
151
|
slop (~> 4.6)
|
159
152
|
jmespath (1.4.0)
|
160
|
-
json (2.5.1)
|
161
153
|
listen (3.0.8)
|
162
154
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
163
155
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -178,11 +170,11 @@ GEM
|
|
178
170
|
nio4r (2.3.1)
|
179
171
|
nokogiri (1.10.9)
|
180
172
|
mini_portile2 (~> 2.4.0)
|
181
|
-
oj (3.
|
182
|
-
ougai (
|
173
|
+
oj (3.10.14)
|
174
|
+
ougai (1.8.5)
|
183
175
|
oj (~> 3.10)
|
184
|
-
paranoia (2.4.
|
185
|
-
activerecord (>= 4.0, < 6.
|
176
|
+
paranoia (2.4.2)
|
177
|
+
activerecord (>= 4.0, < 6.1)
|
186
178
|
pry (0.12.2)
|
187
179
|
coderay (~> 1.1.0)
|
188
180
|
method_source (~> 0.9.0)
|
@@ -230,7 +222,7 @@ GEM
|
|
230
222
|
redis-activesupport (5.2.0)
|
231
223
|
activesupport (>= 3, < 7)
|
232
224
|
redis-store (>= 1.3, < 2)
|
233
|
-
redis-namespace (1.8.
|
225
|
+
redis-namespace (1.8.0)
|
234
226
|
redis (>= 3.0.4)
|
235
227
|
redis-rack (2.1.3)
|
236
228
|
rack (>= 2.0.8, < 3)
|
@@ -262,7 +254,6 @@ GEM
|
|
262
254
|
rspec-mocks (~> 3.8.0)
|
263
255
|
rspec-support (~> 3.8.0)
|
264
256
|
rspec-support (3.8.0)
|
265
|
-
ruby2_keywords (0.0.4)
|
266
257
|
slop (4.8.2)
|
267
258
|
sprockets (3.7.2)
|
268
259
|
concurrent-ruby (~> 1.0)
|
@@ -274,13 +265,11 @@ GEM
|
|
274
265
|
sqlite3 (1.3.13)
|
275
266
|
thor (0.20.3)
|
276
267
|
thread_safe (0.3.6)
|
277
|
-
thwait (0.2.0)
|
278
|
-
e2mmap
|
279
268
|
timecop (0.9.1)
|
280
269
|
tzinfo (1.2.6)
|
281
270
|
thread_safe (~> 0.1)
|
282
271
|
uniform_notifier (1.11.0)
|
283
|
-
vault (0.
|
272
|
+
vault (0.15.0)
|
284
273
|
aws-sigv4
|
285
274
|
websocket-driver (0.7.0)
|
286
275
|
websocket-extensions (>= 0.1.0)
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
data/lib/istox/helpers/f_math.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -93,7 +93,6 @@ module Istox
|
|
93
93
|
# sample template data, it should be an array
|
94
94
|
# [{
|
95
95
|
# email: email,
|
96
|
-
# sid: xxxxx,
|
97
96
|
# istoxP1: auth.first_name,
|
98
97
|
# <more other sample template attributes>: <other sample template data>,
|
99
98
|
# }]
|
@@ -131,15 +130,14 @@ module Istox
|
|
131
130
|
next unless ce.present?
|
132
131
|
|
133
132
|
copy_email_data = email_data.clone
|
134
|
-
|
133
|
+
|
135
134
|
# if it is just email to cc
|
136
135
|
if ce.is_a? String
|
137
136
|
copy_email_data[:email] = ce
|
138
137
|
else
|
139
138
|
# if it is a object hash
|
140
139
|
# {
|
141
|
-
# email: xxxx
|
142
|
-
# sid: xxxx,
|
140
|
+
# email: xxxx
|
143
141
|
# params: {
|
144
142
|
# istoxP1: xxxx,
|
145
143
|
# istoxP2: xxxx
|
@@ -148,9 +146,6 @@ module Istox
|
|
148
146
|
next unless ce[:email].present?
|
149
147
|
|
150
148
|
copy_email_data[:email] = ce[:email]
|
151
|
-
log.info "Checking copy email data after assigning #{copy_email_data.inspect}"
|
152
|
-
log.info "Checking ce #{ce[:params].inspect}"
|
153
|
-
|
154
149
|
copy_email_data = copy_email_data.merge(ce[:params])
|
155
150
|
end
|
156
151
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/istox/helpers/vault.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/istox/version.rb
CHANGED
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.2.3
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -494,7 +494,6 @@ files:
|
|
494
494
|
- lib/istox.rb
|
495
495
|
- lib/istox/constants/error.rb
|
496
496
|
- lib/istox/consumers/blockchain_status_handler.rb
|
497
|
-
- lib/istox/helpers/_tmp_07f8e7bcecafce66_common_helper.rb.rb
|
498
497
|
- lib/istox/helpers/blockchain_service.rb
|
499
498
|
- lib/istox/helpers/bunny_boot.rb
|
500
499
|
- lib/istox/helpers/common_helper.rb
|
@@ -543,11 +542,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
543
542
|
version: '0'
|
544
543
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
545
544
|
requirements:
|
546
|
-
- - "
|
545
|
+
- - ">="
|
547
546
|
- !ruby/object:Gem::Version
|
548
|
-
version:
|
547
|
+
version: '0'
|
549
548
|
requirements: []
|
550
|
-
rubygems_version: 3.
|
549
|
+
rubygems_version: 3.0.6
|
551
550
|
signing_key:
|
552
551
|
specification_version: 4
|
553
552
|
summary: istox backend shared gem
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module Istox
|
2
|
-
module CommonHelper
|
3
|
-
def self.to_datetime(input)
|
4
|
-
return nil if input.blank?
|
5
|
-
|
6
|
-
begin
|
7
|
-
is_numeric = true if Integer input
|
8
|
-
rescue StandardError
|
9
|
-
false
|
10
|
-
end
|
11
|
-
|
12
|
-
# is unix timestamp
|
13
|
-
is_numeric ? Time.at(input.to_i).to_datetime : Time.parse(input)
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.to_boolean(input)
|
17
|
-
!(input.blank? || input.to_s.downcase == 'false' || input.to_s.downcase == '0')
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.to_open_struct(model)
|
21
|
-
return nil if model.nil?
|
22
|
-
|
23
|
-
if model.is_a?(Array)
|
24
|
-
model.map do |item|
|
25
|
-
hash = deep_to_h(item).deep_transform_keys { |key| key.to_s.underscore.to_sym }
|
26
|
-
to_recursive_ostruct(hash)
|
27
|
-
end
|
28
|
-
else
|
29
|
-
hash = deep_to_h(model).deep_transform_keys { |key| key.to_s.underscore.to_sym }
|
30
|
-
to_recursive_ostruct(hash)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.to_recursive_ostruct(obj)
|
35
|
-
if obj.is_a?(Hash)
|
36
|
-
::Istox::MyOpenStruct.new(obj.map { |key, val| [key, to_recursive_ostruct(val)] }.to_h)
|
37
|
-
elsif obj.is_a?(Array)
|
38
|
-
obj.map { |o| to_recursive_ostruct(o) }
|
39
|
-
elsif obj.is_a?(OpenStruct)
|
40
|
-
::Istox::MyOpenStruct.new(obj)
|
41
|
-
else # Assumed to be a primitive value
|
42
|
-
obj
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.deep_to_h(obj)
|
47
|
-
if obj.is_a?(Array)
|
48
|
-
obj.map { |r| deep_to_h(r) }
|
49
|
-
elsif obj.is_a?(OpenStruct) || obj.is_a?(Hash) || (obj.methods.include?(:to_h) && obj.present?)
|
50
|
-
obj.to_h.transform_values do |v|
|
51
|
-
if v.is_a?(OpenStruct) || v.is_a?(Array)
|
52
|
-
deep_to_h(v)
|
53
|
-
else
|
54
|
-
v
|
55
|
-
end
|
56
|
-
end
|
57
|
-
else
|
58
|
-
obj
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def self.get_currency_decimal(currency)
|
63
|
-
return 0 if currency&.downcase == 'jpy'
|
64
|
-
|
65
|
-
2 end
|
66
|
-
end
|
67
|
-
end
|