istox 0.2.5.3 → 0.2.6.pre.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccf4e9eef0dc952b34d1c76c533d9345b6e475671049be6020278d47bcd67f09
4
- data.tar.gz: 654ca1f3a138268f2942588962315357ad80de06613c09b0eacfa77834558711
3
+ metadata.gz: e8961398a3a359f60a4df90adea1f6d1578cafde68a8be2cf496afba08fc069d
4
+ data.tar.gz: ab96f1d839238cb29019adf29137823ea670b23c23b0d86201da08cecc80dacc
5
5
  SHA512:
6
- metadata.gz: 1b5b7894925dcd7f9ebc8bc6d8e9c707a4888df5691754dcc4820ddc773f050ee024842ab6a72dd5143f7681203a75f80c63918b304d6f0c6cba4fe4e0b372e4
7
- data.tar.gz: 0e2a37b36caed13f534c4455ed0a4b9525ab10248a083ff72c13c0c744ebe5f9d2b64c2c58f2a098a1449d9747ba65bd0cdca27a00213c5863953b357ecf5821
6
+ metadata.gz: 1b4e009fad77eaa93910e5ffdc43888bbb3aa11da46caa3855736acaebaf548db141a7b0a8d0b48002ea6ddbe355bea69e5fbfffa29e19b53f8ddfbdbeff8a66
7
+ data.tar.gz: 275a41eb82bd672f0a376a099a6d64670bd336215c46be6384f6f32f7d528975c3af301af8ec588343dcdc1531f5d80a3d351572215761134e2c403eb00a7723
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.2.3.pre.1)
4
+ istox (0.2.6.pre.0)
5
5
  amazing_print
6
6
  awesome_print
7
7
  aws-sdk-sns (~> 1)
@@ -67,7 +67,7 @@ GEM
67
67
  amazing_print (1.3.0)
68
68
  amq-protocol (2.3.2)
69
69
  arel (9.0.0)
70
- awesome_print (1.9.2)
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)
@@ -123,21 +123,21 @@ GEM
123
123
  ffi (1.15.0)
124
124
  globalid (0.4.2)
125
125
  activesupport (>= 4.2.0)
126
- google-protobuf (3.15.6-universal-darwin)
127
- googleapis-common-protos-types (1.0.6)
128
- google-protobuf (~> 3.14)
126
+ google-protobuf (3.13.0-universal-darwin)
127
+ googleapis-common-protos-types (1.0.5)
128
+ google-protobuf (~> 3.11)
129
129
  graphlient (0.5.0)
130
130
  faraday (>= 1.0)
131
131
  faraday_middleware
132
132
  graphql-client
133
- graphql (1.12.6)
133
+ graphql (1.11.5)
134
134
  graphql-client (0.16.0)
135
135
  activesupport (>= 3.0)
136
136
  graphql (~> 1.8)
137
- grpc (1.36.0-universal-darwin)
138
- google-protobuf (~> 3.14)
137
+ grpc (1.32.0-universal-darwin)
138
+ google-protobuf (~> 3.13)
139
139
  googleapis-common-protos-types (~> 1.0)
140
- grpc-tools (1.36.0)
140
+ grpc-tools (1.32.0)
141
141
  gruf (2.9.1)
142
142
  activesupport (> 4)
143
143
  concurrent-ruby (> 1)
@@ -157,7 +157,7 @@ GEM
157
157
  grpc-tools (~> 1.10)
158
158
  slop (~> 4.6)
159
159
  jmespath (1.4.0)
160
- json (2.5.1)
160
+ json (2.3.1)
161
161
  listen (3.0.8)
162
162
  rb-fsevent (~> 0.9, >= 0.9.4)
163
163
  rb-inotify (~> 0.9, >= 0.9.7)
@@ -178,8 +178,8 @@ GEM
178
178
  nio4r (2.3.1)
179
179
  nokogiri (1.10.9)
180
180
  mini_portile2 (~> 2.4.0)
181
- oj (3.11.3)
182
- ougai (2.0.0)
181
+ oj (3.10.14)
182
+ ougai (1.8.5)
183
183
  oj (~> 3.10)
184
184
  paranoia (2.4.3)
185
185
  activerecord (>= 4.0, < 6.2)
@@ -230,7 +230,7 @@ GEM
230
230
  redis-activesupport (5.2.0)
231
231
  activesupport (>= 3, < 7)
232
232
  redis-store (>= 1.3, < 2)
233
- redis-namespace (1.8.1)
233
+ redis-namespace (1.8.0)
234
234
  redis (>= 3.0.4)
235
235
  redis-rack (2.1.3)
236
236
  rack (>= 2.0.8, < 3)
@@ -262,7 +262,7 @@ GEM
262
262
  rspec-mocks (~> 3.8.0)
263
263
  rspec-support (~> 3.8.0)
264
264
  rspec-support (3.8.0)
265
- ruby2_keywords (0.0.4)
265
+ ruby2_keywords (0.0.2)
266
266
  slop (4.8.2)
267
267
  sprockets (3.7.2)
268
268
  concurrent-ruby (~> 1.0)
@@ -23,7 +23,7 @@ module Istox
23
23
  type: 'SEND_SMS',
24
24
  data: {
25
25
  to: targets,
26
- subject: subject || 'Message from ADDX',
26
+ subject: subject || 'Message from iSTOX',
27
27
  body: content
28
28
  }
29
29
  }
@@ -130,8 +130,7 @@ module Istox
130
130
  email_data[:copy_emails].each do |ce|
131
131
  next unless ce.present?
132
132
 
133
- # uid and sid are reserved fields that should be not cloned
134
- copy_email_data = email_data.clone.except(:sid).except(:uid)
133
+ copy_email_data = email_data.clone
135
134
 
136
135
  # if it is just email to cc
137
136
  if ce.is_a? String
@@ -16,6 +16,14 @@ module Istox
16
16
  db: 6
17
17
  ))
18
18
  end
19
+
20
+ # for general redis cache
21
+ def redis
22
+ @redis ||= Redis::Namespace.new(:redis_cache, redis: Redis.new(
23
+ url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379',
24
+ db: 6
25
+ ))
26
+ end
19
27
  end
20
28
  end
21
29
  end
@@ -14,16 +14,12 @@ module Istox
14
14
 
15
15
  message = JSON.generate(message) unless message.is_a? String
16
16
 
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)
17
+ sns_client.publish(topic_arn: topic_arn || ENV.fetch('SNS_CLIENT_TOPIC', ''), message: message)
22
18
 
23
19
  log.info('Publish to SNS successfully.')
24
20
  rescue StandardError => e
25
- log.info 'Unable to publish SNS message.'
26
- log.info(e)
21
+ log.fatal 'Unable to publish SNS message.'
22
+ log.fatal(e)
27
23
  log.info('Failed to publish SNS, ignoring...') unless throw_exception
28
24
 
29
25
  raise e if throw_exception
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.2.5.3'.freeze
2
+ VERSION = '0.2.6-0'.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.5.3
4
+ version: 0.2.6.pre.0
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: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2021-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -531,7 +531,7 @@ files:
531
531
  homepage: http://www.abc.com
532
532
  licenses: []
533
533
  metadata: {}
534
- post_install_message:
534
+ post_install_message:
535
535
  rdoc_options: []
536
536
  require_paths:
537
537
  - lib
@@ -542,12 +542,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
542
542
  version: '0'
543
543
  required_rubygems_version: !ruby/object:Gem::Requirement
544
544
  requirements:
545
- - - ">="
545
+ - - ">"
546
546
  - !ruby/object:Gem::Version
547
- version: '0'
547
+ version: 1.3.1
548
548
  requirements: []
549
- rubygems_version: 3.0.6
550
- signing_key:
549
+ rubygems_version: 3.0.8
550
+ signing_key:
551
551
  specification_version: 4
552
552
  summary: istox backend shared gem
553
553
  test_files: []