istox 0.1.157.4 → 0.1.157.9
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/.idea/istox-gem.iml +2 -1852
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/blockchain_service.rb +4 -3
- data/lib/istox/helpers/messaging.rb +20 -1
- data/lib/istox/helpers/subscriber.rb +1 -1
- data/lib/istox/version.rb +1 -1
- metadata +6 -6
data/Gemfile.lock
CHANGED
@@ -8,8 +8,8 @@ module Istox
|
|
8
8
|
@@blockchain_receipt_klass
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.request(sid:, action:, before:, execute:)
|
12
|
-
start(sid: sid, action: action, before: before, execute: execute, is_request: true)
|
11
|
+
def self.request(sid:, action:, before:, execute:, request_reason: nil)
|
12
|
+
start(sid: sid, action: action, before: before, execute: execute, is_request: true, request_reason: request_reason)
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.run(sid:, action:, before:, execute:)
|
@@ -19,7 +19,7 @@ module Istox
|
|
19
19
|
private
|
20
20
|
|
21
21
|
# before is the proc that will be executed before, must return the main model blockchain receipt will bind to
|
22
|
-
def start(sid:, action:, before:, execute:, is_request: false)
|
22
|
+
def start(sid:, action:, before:, execute:, is_request: false, request_reason: nil)
|
23
23
|
# create blockchain receipt first
|
24
24
|
klass = blockchain_receipt_class
|
25
25
|
uuid = ::SecureRandom.uuid
|
@@ -27,6 +27,7 @@ module Istox
|
|
27
27
|
txid: uuid,
|
28
28
|
sid: sid,
|
29
29
|
is_request: is_request,
|
30
|
+
request_reason: request_reason,
|
30
31
|
resource_action: action
|
31
32
|
)
|
32
33
|
|
@@ -114,12 +114,31 @@ module Istox
|
|
114
114
|
type: 'SEND_EMAIL_TEMPLATE',
|
115
115
|
data: {
|
116
116
|
template_name: template_name,
|
117
|
-
template_data_arr_json: template_data_arr.to_json,
|
117
|
+
template_data_arr_json: process_template_data_arr_for_copy_email(template_data_arr).to_json,
|
118
118
|
attachments_json: attachments&.to_json
|
119
119
|
}
|
120
120
|
}
|
121
121
|
)
|
122
122
|
end
|
123
|
+
|
124
|
+
def process_template_data_arr_for_copy_email(template_data_arr)
|
125
|
+
copy_email_data_arr = []
|
126
|
+
template_data_arr.each do |email_data|
|
127
|
+
next unless email_data[:copy_emails].present?
|
128
|
+
|
129
|
+
email_data[:copy_emails].each do |ce|
|
130
|
+
next unless ce.present?
|
131
|
+
|
132
|
+
copy_email_data = email_data.clone
|
133
|
+
copy_email_data[:email] = ce
|
134
|
+
copy_email_data.delete(:copy_emails)
|
135
|
+
copy_email_data_arr << copy_email_data
|
136
|
+
end
|
137
|
+
|
138
|
+
email_data.delete(:copy_emails)
|
139
|
+
end
|
140
|
+
template_data_arr.concat(copy_email_data_arr)
|
141
|
+
end
|
123
142
|
end
|
124
143
|
end
|
125
144
|
end
|
@@ -61,7 +61,7 @@ module Istox
|
|
61
61
|
# Must re-open a new channel, because now channel is already closed
|
62
62
|
active_channel = ::Istox::BunnyBoot.channel(::Istox::BunnyBoot.connection, pool_size: pool_size, prefetch: prefetch)
|
63
63
|
active_channel.queue_delete(queue_name)
|
64
|
-
queue = active_channel.queue(queue_name, durable: queue_durable)
|
64
|
+
queue = active_channel.queue(queue_name, durable: queue_durable, arguments: arguments)
|
65
65
|
end
|
66
66
|
|
67
67
|
# Declare exchange
|
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.1.157.
|
4
|
+
version: 0.1.157.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -539,7 +539,7 @@ files:
|
|
539
539
|
homepage: http://www.abc.com
|
540
540
|
licenses: []
|
541
541
|
metadata: {}
|
542
|
-
post_install_message:
|
542
|
+
post_install_message:
|
543
543
|
rdoc_options: []
|
544
544
|
require_paths:
|
545
545
|
- lib
|
@@ -554,8 +554,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
554
554
|
- !ruby/object:Gem::Version
|
555
555
|
version: '0'
|
556
556
|
requirements: []
|
557
|
-
rubygems_version: 3.0.
|
558
|
-
signing_key:
|
557
|
+
rubygems_version: 3.0.6
|
558
|
+
signing_key:
|
559
559
|
specification_version: 4
|
560
560
|
summary: istox backend shared gem
|
561
561
|
test_files: []
|