istox 0.2.6 → 0.2.7

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: 3a04c1473346b65b6cbede4d1308cdb2267af42212a76cdec99f77c17cdf7e36
4
- data.tar.gz: 6439d8fba8144230f73eaf7a6d7e388642946508b53b986c925c0cc40a890790
3
+ metadata.gz: 55b3c9aa9a02afcb1419637b7eac9ff25b2ac69c157668826af65e13d3c37c00
4
+ data.tar.gz: bcdcbe386c2ca95a3a4f8e68b617a92dbc8ea37272909a1ab48fb1e95f678f2d
5
5
  SHA512:
6
- metadata.gz: 288bd22b73176d05d9a900dc5b7fe3bc1d8742d03e448520f2f1e087303b2379f4bbd97ff713595d23f391e49de03b419b50ef4f2de11652cea90fe44439a386
7
- data.tar.gz: adf4bef565107e7cfb90cb6cef08bec714ccbaec1b3fcbc2f3f174e5ee5aa24f4d05f036dc88f72bd736c2fe90120682de7ab3af5368ab5a8096bbb57d10368e
6
+ metadata.gz: a9817547969c289454deab78634271d6cb44d9f3a190de1c4de8d3e3def3f0ec7a320522bc601845286412ba215550ef8ed26fc0ffbfd02bc20a48582c8673d7
7
+ data.tar.gz: b071f1d3a181cd90f30e235d7425050f9c8871c4a2b8f7c1c52cf95ffe5137ff1eade6e70782dd8b9e7a9f6ce7e3c4a653e1b99210571e7eaf744f66ed8d3cc4
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
File without changes
data/.solargraph.yml CHANGED
File without changes
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -161,6 +161,25 @@ module Istox
161
161
  end
162
162
  template_data_arr.concat(copy_email_data_arr)
163
163
  end
164
+
165
+ def push_notification(template_name, template_data_arr)
166
+ raise ArgumentError, 'Template name and template data arr cannot be empty' if template_name.blank? || template_data_arr.nil?
167
+
168
+ return log.info 'Template data is empty, skipping this request' if template_data_arr.empty?
169
+
170
+ ::Istox::Publisher.manual_publish(
171
+ exchange: 'message',
172
+ exchange_type: 'direct',
173
+ routing_key: 'push_notification.message',
174
+ message: {
175
+ type: 'SEND_PUSH_NOTIFICATION',
176
+ data: {
177
+ template_name: template_name,
178
+ template_data_arr_json: template_data_arr.to_json
179
+ }
180
+ }
181
+ )
182
+ end
164
183
  end
165
184
  end
166
185
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.2.6'.freeze
2
+ VERSION = '0.2.7'.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
4
+ version: 0.2.7
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-05-19 00:00:00.000000000 Z
11
+ date: 2021-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -546,7 +546,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
546
546
  - !ruby/object:Gem::Version
547
547
  version: '0'
548
548
  requirements: []
549
- rubygems_version: 3.0.6
549
+ rubygems_version: 3.2.11
550
550
  signing_key:
551
551
  specification_version: 4
552
552
  summary: istox backend shared gem