istox 0.1.157.4 → 0.1.157.8.1

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.157.4)
4
+ istox (0.1.157.9)
5
5
  amazing_print
6
6
  awesome_print
7
7
  aws-sdk-sns (~> 1)
@@ -86,14 +86,13 @@ GEM
86
86
  aws-xray-sdk (0.11.4)
87
87
  aws-sdk-xray (~> 1.4.0)
88
88
  multi_json (~> 1)
89
- bigdecimal (2.0.0)
90
89
  binding_of_caller (0.8.0)
91
90
  debug_inspector (>= 0.0.1)
92
91
  builder (3.2.4)
93
92
  bullet (5.7.6)
94
93
  activesupport (>= 3.0.0)
95
94
  uniform_notifier (~> 1.11.0)
96
- bunny (2.16.1)
95
+ bunny (2.17.0)
97
96
  amq-protocol (~> 2.3, >= 2.3.1)
98
97
  byebug (11.1.3)
99
98
  coderay (1.1.2)
@@ -127,14 +126,14 @@ GEM
127
126
  faraday (>= 1.0)
128
127
  faraday_middleware
129
128
  graphql-client
130
- graphql (1.11.3)
129
+ graphql (1.11.4)
131
130
  graphql-client (0.16.0)
132
131
  activesupport (>= 3.0)
133
132
  graphql (~> 1.8)
134
- grpc (1.31.1-universal-darwin)
135
- google-protobuf (~> 3.12)
133
+ grpc (1.32.0-universal-darwin)
134
+ google-protobuf (~> 3.13)
136
135
  googleapis-common-protos-types (~> 1.0)
137
- grpc-tools (1.31.1)
136
+ grpc-tools (1.32.0)
138
137
  gruf (2.8.1)
139
138
  activesupport (> 4)
140
139
  concurrent-ruby (> 1)
@@ -171,8 +170,7 @@ GEM
171
170
  nio4r (2.3.1)
172
171
  nokogiri (1.10.9)
173
172
  mini_portile2 (~> 2.4.0)
174
- oj (3.10.9)
175
- bigdecimal (~> 2.0)
173
+ oj (3.10.14)
176
174
  ougai (1.8.5)
177
175
  oj (~> 3.10)
178
176
  paranoia (2.4.2)
@@ -114,12 +114,49 @@ 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
+
134
+ # if it is just email to cc
135
+ if ce.is_a? String
136
+ copy_email_data[:email] = ce
137
+ else
138
+ # if it is a object hash
139
+ # {
140
+ # email: xxxx
141
+ # params: {
142
+ # istoxP1: xxxx,
143
+ # istoxP2: xxxx
144
+ # }
145
+ # }
146
+ next unless ce[:email].present?
147
+
148
+ copy_email_data[:email] = ce[:email]
149
+ copy_email_data = copy_email_data.merge(ce[:params])
150
+ end
151
+
152
+ copy_email_data.delete(:copy_emails)
153
+ copy_email_data_arr << copy_email_data
154
+ end
155
+
156
+ email_data.delete(:copy_emails)
157
+ end
158
+ template_data_arr.concat(copy_email_data_arr)
159
+ end
123
160
  end
124
161
  end
125
162
  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
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.157.4'.freeze
2
+ VERSION = '0.1.157.8.1'.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.157.4
4
+ version: 0.1.157.8.1
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-10 00:00:00.000000000 Z
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.8
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: []