triglav-agent 1.0.0.pre1 → 1.0.0.pre2
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 +4 -4
- data/lib/triglav/agent/api_client.rb +61 -4
- data/lib/triglav/agent/version.rb +1 -1
- data/triglav-agent.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c8497478c30bab836963959fcf1421dd29636f
|
4
|
+
data.tar.gz: bdeb425a24166e46ab9a5d3d3dc32f6bbc9f64b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44dde53afed7799a462955cb40447049eda0c729b9b667466f9cc9f80e7abee92e7db2920a43561a1e2fa24c021ca3c64d4a4d7b45143f730541067393c7b90a
|
7
|
+
data.tar.gz: 77ac7e13d7325623f1f5c81761fd8f2a96cb67c0c4470f54418ced18c21f1f3b9e35580eb851f6ed61ef0f6b2fac64d79f7836b3e0e1326e0dd9a4c3ef24f311
|
@@ -34,8 +34,13 @@ module Triglav::Agent
|
|
34
34
|
uri = URI.parse(triglav_url)
|
35
35
|
config.scheme = uri.scheme
|
36
36
|
config.host = "#{uri.host}:#{uri.port}"
|
37
|
-
config.timeout = timeout
|
38
|
-
config.debugging = debugging
|
37
|
+
config.timeout = timeout unless timeout.nil?
|
38
|
+
config.debugging = debugging unless debugging.nil?
|
39
|
+
config.verify_ssl = verify_ssl unless verify_ssl.nil?
|
40
|
+
config.verify_ssl_host = verify_ssl_host unless verify_ssl_host.nil?
|
41
|
+
config.ssl_ca_cert = ssl_ca_cert unless ssl_ca_cert.nil?
|
42
|
+
config.cert_file = cert_file unless cert_file.nil?
|
43
|
+
config.key_file = key_file unless key_file.nil?
|
39
44
|
end
|
40
45
|
@api_client = TriglavClient::ApiClient.new(config)
|
41
46
|
initialize_current_token
|
@@ -176,12 +181,64 @@ module Triglav::Agent
|
|
176
181
|
@opts.dig(:credential, :authenticator) || $setting.dig(:triglav, :credential, :authenticator)
|
177
182
|
end
|
178
183
|
|
184
|
+
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
185
|
+
# details will be logged with `logger.debug` (see the `logger` attribute).
|
186
|
+
# Default to false.
|
187
|
+
#
|
188
|
+
# @return [true, false]
|
189
|
+
def debugging
|
190
|
+
@opts.has_key?(:debugging) ? @opts[:debugging] : $setting.dig(:triglav, :debugging)
|
191
|
+
end
|
192
|
+
|
193
|
+
# The time limit for HTTP request in seconds.
|
194
|
+
# Default to 0 (never times out).
|
179
195
|
def timeout
|
180
196
|
@opts[:timeout] || $setting.dig(:triglav, :timeout)
|
181
197
|
end
|
182
198
|
|
183
|
-
|
184
|
-
|
199
|
+
### TLS/SSL setting
|
200
|
+
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
201
|
+
# Default to true.
|
202
|
+
#
|
203
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
204
|
+
#
|
205
|
+
# @return [true, false]
|
206
|
+
def verify_ssl
|
207
|
+
@opts.has_key?(:verify_ssl) ? @opts[:verify_ssl] : $setting.dig(:triglav, :verify_ssl)
|
208
|
+
end
|
209
|
+
|
210
|
+
### TLS/SSL setting
|
211
|
+
# Set this to false to skip verifying SSL host name
|
212
|
+
# Default to true.
|
213
|
+
#
|
214
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
215
|
+
#
|
216
|
+
# @return [true, false]
|
217
|
+
def verify_ssl_host
|
218
|
+
@opts.has_key?(:verify_ssl_host) ? @opts[:verify_ssl_host] : $setting.dig(:triglav, :verify_ssl_host)
|
219
|
+
end
|
220
|
+
|
221
|
+
### TLS/SSL setting
|
222
|
+
# Set this to customize the certificate file to verify the peer.
|
223
|
+
#
|
224
|
+
# @return [String] the path to the certificate file
|
225
|
+
#
|
226
|
+
# @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
|
227
|
+
# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
|
228
|
+
def ssl_ca_cert
|
229
|
+
@opts[:ssl_ca_cert] || $setting.dig(:triglav, :ssl_ca_cert)
|
230
|
+
end
|
231
|
+
|
232
|
+
### TLS/SSL setting
|
233
|
+
# Client certificate file (for client certificate)
|
234
|
+
def cert_file
|
235
|
+
@opts[:cert_file] || $setting.dig(:triglav, :cert_file)
|
236
|
+
end
|
237
|
+
|
238
|
+
### TLS/SSL setting
|
239
|
+
# Client private key file (for client certificate)
|
240
|
+
def key_file
|
241
|
+
@opts[:key_file] || $setting.dig(:triglav, :key_file)
|
185
242
|
end
|
186
243
|
|
187
244
|
def max_retries
|
data/triglav-agent.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Triglav Team"]
|
10
10
|
spec.email = ["triglav_admin_my@dena.jp"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.description = %q{
|
12
|
+
spec.summary = %q{Agent framework of triglav, data-driven workflow tool.}
|
13
|
+
spec.description = %q{Agent framework of triglav, data-driven workflow tool.}
|
14
14
|
spec.homepage = "https://github.com/triglav-dataflow/triglav-agent-framework-ruby"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: triglav-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Triglav Team
|
@@ -150,7 +150,7 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
description:
|
153
|
+
description: Agent framework of triglav, data-driven workflow tool.
|
154
154
|
email:
|
155
155
|
- triglav_admin_my@dena.jp
|
156
156
|
executables: []
|
@@ -246,5 +246,5 @@ rubyforge_project:
|
|
246
246
|
rubygems_version: 2.5.2
|
247
247
|
signing_key:
|
248
248
|
specification_version: 4
|
249
|
-
summary:
|
249
|
+
summary: Agent framework of triglav, data-driven workflow tool.
|
250
250
|
test_files: []
|