istox 0.2.6.pre.3 → 0.2.6.pre.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/messaging.rb +3 -2
- data/lib/istox/helpers/sns_publisher.rb +7 -3
- data/lib/istox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daa533366dd4e58cdbe2dbf2119024efef0b274eed309bf9c6b5f521b27b2d06
|
4
|
+
data.tar.gz: 6de8b5551059a22d48c2c133d8b01b553adb8016d1400e197b8a918a281ae161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0f2cf04864c80c4e4042af029aec53063bc11693ef5364988e8782f5b24f609e91e06b4328a42fcf05ac5295b1e20bc67ebaeebb45d93a895c9e53fc74f195
|
7
|
+
data.tar.gz: 266def056b85f12b0027155e58af5ab75eca7f1cf63c85c1351989db7b0be0da1616d2447f639c506114c30d071574347a29561bfbb77a87e7ebf221999b7be8
|
data/Gemfile.lock
CHANGED
@@ -23,7 +23,7 @@ module Istox
|
|
23
23
|
type: 'SEND_SMS',
|
24
24
|
data: {
|
25
25
|
to: targets,
|
26
|
-
subject: subject || 'Message from
|
26
|
+
subject: subject || 'Message from ADDX',
|
27
27
|
body: content
|
28
28
|
}
|
29
29
|
}
|
@@ -130,7 +130,8 @@ module Istox
|
|
130
130
|
email_data[:copy_emails].each do |ce|
|
131
131
|
next unless ce.present?
|
132
132
|
|
133
|
-
|
133
|
+
# uid and sid are reserved fields that should be not cloned
|
134
|
+
copy_email_data = email_data.clone.except(:sid).except(:uid)
|
134
135
|
|
135
136
|
# if it is just email to cc
|
136
137
|
if ce.is_a? String
|
@@ -14,12 +14,16 @@ module Istox
|
|
14
14
|
|
15
15
|
message = JSON.generate(message) unless message.is_a? String
|
16
16
|
|
17
|
-
|
17
|
+
topic = topic_arn || ENV.fetch('SNS_CLIENT_TOPIC', '')
|
18
|
+
|
19
|
+
log.info("Publishing SNS to topic: #{topic} with message: #{message}")
|
20
|
+
|
21
|
+
sns_client.publish(topic_arn: topic, message: message)
|
18
22
|
|
19
23
|
log.info('Publish to SNS successfully.')
|
20
24
|
rescue StandardError => e
|
21
|
-
log.
|
22
|
-
log.
|
25
|
+
log.info 'Unable to publish SNS message.'
|
26
|
+
log.info(e)
|
23
27
|
log.info('Failed to publish SNS, ignoring...') unless throw_exception
|
24
28
|
|
25
29
|
raise e if throw_exception
|
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.6.pre.
|
4
|
+
version: 0.2.6.pre.4
|
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-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|