istox 0.2.6.pre.3 → 0.2.6.pre.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58150bd882c8acb94f29bfb0f500e0fef591b26784393f2ae4af21f3ebd96454
4
- data.tar.gz: 764e72ff54fb7d0a44dc2fed52662b06423451c3c60aa2527989a53731bcb584
3
+ metadata.gz: daa533366dd4e58cdbe2dbf2119024efef0b274eed309bf9c6b5f521b27b2d06
4
+ data.tar.gz: 6de8b5551059a22d48c2c133d8b01b553adb8016d1400e197b8a918a281ae161
5
5
  SHA512:
6
- metadata.gz: e66ec39a109ef5f4fb9d76026836c4ebce7a8046f45895fd3a6a36a795f1a457f2b399bfd4ae62d64d0b1d888d73c010e61a6e7b95843a57f622c7a3f2be58bb
7
- data.tar.gz: 0fc7ab7132d24a856729c87172f0a68119e4a98f64c450820d278779021ae80baff22070ac71b1031184e9ef1078a88966618bf6f5b156eface51567c7919886
6
+ metadata.gz: 6b0f2cf04864c80c4e4042af029aec53063bc11693ef5364988e8782f5b24f609e91e06b4328a42fcf05ac5295b1e20bc67ebaeebb45d93a895c9e53fc74f195
7
+ data.tar.gz: 266def056b85f12b0027155e58af5ab75eca7f1cf63c85c1351989db7b0be0da1616d2447f639c506114c30d071574347a29561bfbb77a87e7ebf221999b7be8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.2.6.pre.3)
4
+ istox (0.2.6.pre.4)
5
5
  amazing_print
6
6
  awesome_print
7
7
  aws-sdk-sns (~> 1)
@@ -23,7 +23,7 @@ module Istox
23
23
  type: 'SEND_SMS',
24
24
  data: {
25
25
  to: targets,
26
- subject: subject || 'Message from iSTOX',
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
- copy_email_data = email_data.clone
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
- sns_client.publish(topic_arn: topic_arn || ENV.fetch('SNS_CLIENT_TOPIC', ''), message: message)
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.fatal 'Unable to publish SNS message.'
22
- log.fatal(e)
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
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.2.6-3'.freeze
2
+ VERSION = '0.2.6-4'.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.2.6.pre.3
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-04-30 00:00:00.000000000 Z
11
+ date: 2021-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print