istox 0.1.157.10.1 → 0.1.157.11.pre.t1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/istox/helpers/grpc_client.rb +9 -1
- data/lib/istox/helpers/sns_publisher.rb +3 -3
- data/lib/istox/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c153059c45a80a2943535a6a7d117a427155c92c51788f6b1a2dc8ead1af8fa
|
4
|
+
data.tar.gz: 5fa6c306be3c8944f0c2168f1e54a0446bd84b8e838f2ffde341be38acd0b98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a468734220c0bc70784c9f756f23509ab09c1982febb133ac8a879be8227a2650c9c1021c981a6ec2b1a8de9e5b5204b965ea4283069ab986164806b01f23c56
|
7
|
+
data.tar.gz: 9fa45e75bea57560e8eab88d8ebb57e3565562b6be77c97890b4372f9cf76ae55b9a0f4ccce19218b8e08397b5206bf33911527f46d5c764ec9ab6cc28d331fb
|
@@ -82,7 +82,15 @@ module Istox
|
|
82
82
|
|
83
83
|
log.info 'Reinitiating to grpc host at ' + host_url
|
84
84
|
t1 = Time.now
|
85
|
-
|
85
|
+
grpc_options = { hostname: host_url }
|
86
|
+
if ENV.fetch('SSL_CHANNEL_CREDENTIALS', false)
|
87
|
+
grpc_options[:channel_credentials] = ENV['SSL_CHANNEL_CREDENTIALS']
|
88
|
+
elsif ENV.fetch('SSL_CERTIFICATE', false)
|
89
|
+
grpc_options[:ssl_certificate] = ENV['SSL_CERTIFICATE']
|
90
|
+
elsif ENV.fetch('SSL_CERTIFICATE_FILE', false)
|
91
|
+
grpc_options[:ssl_certificate_file] = ENV['SSL_CERTIFICATE_FILE']
|
92
|
+
end
|
93
|
+
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: grpc_options, client_options: client_options)
|
86
94
|
log.info "Time taken for reinitiating grpc host: #{Time.now - t1} seconds"
|
87
95
|
end
|
88
96
|
|
@@ -14,7 +14,7 @@ module Istox
|
|
14
14
|
|
15
15
|
message = JSON.generate(message) unless message.is_a? String
|
16
16
|
|
17
|
-
sns_client.publish(
|
17
|
+
sns_client.publish(topic_arn: topic_arn || ENV.fetch('SNS_CLIENT_TOPIC', ''), message: message)
|
18
18
|
|
19
19
|
log.info('Publish to SNS successfully.')
|
20
20
|
rescue StandardError => e
|
@@ -28,8 +28,8 @@ module Istox
|
|
28
28
|
def sns_client
|
29
29
|
return @sns_client if @sns_client.present?
|
30
30
|
|
31
|
-
Aws.config.update(
|
32
|
-
|
31
|
+
Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'),
|
32
|
+
credentials: Aws::Credentials.new(ENV.fetch('AWS_STS_ACCESS_KEY_ID'), ENV.fetch('AWS_STS_SECRET_ACCESS_KEY')))
|
33
33
|
|
34
34
|
@sns_client = Aws::SNS::Client.new(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'))
|
35
35
|
end
|
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.1.157.
|
4
|
+
version: 0.1.157.11.pre.t1
|
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-01-
|
11
|
+
date: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -542,9 +542,9 @@ 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:
|
547
|
+
version: 1.3.1
|
548
548
|
requirements: []
|
549
549
|
rubygems_version: 3.0.6
|
550
550
|
signing_key:
|