clowder-common-ruby 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clowder-common-ruby/rails_config.rb +11 -11
- data/lib/clowder-common-ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaad1ec25f009d5c0f4d3bbefd6d0bf86df648bf4ac720c5950818c9ac5b6f8c
|
4
|
+
data.tar.gz: a22c70b356e1bd289501792b627ddf6de8be1f32e0d7b3bfc670f2349d1a2dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 242ff896a7cec23fb9396868e950f4a3796e9f9fc6b63df41f0aaeaf19aa4c940fcf34e6bf8cfee3c9c5e1caf24bf4b224f1981462b04138edb6081dbd28f506
|
7
|
+
data.tar.gz: b1a121df03523947b412c161e374de1ef48abf2858dbdf77c38c2c0d3138d5ec79db9eb77c9ccbbff1d4b8153b8091e99d3c667b619c07bcefe2670f8db26350
|
@@ -23,18 +23,18 @@ module ClowderCommonRuby
|
|
23
23
|
# Short path for db config
|
24
24
|
def db_config
|
25
25
|
config = ClowderCommonRuby::Config.load
|
26
|
-
|
26
|
+
|
27
27
|
configure_database(config)
|
28
28
|
end
|
29
|
-
|
30
|
-
private
|
29
|
+
|
30
|
+
private
|
31
31
|
|
32
32
|
# Kafka configuration hash
|
33
33
|
def configure_kafka(config)
|
34
34
|
# In case there are no kafka brokers, an empty string is ensured in place of ':'
|
35
35
|
build_kafka_security(config).merge(
|
36
36
|
brokers: build_kafka_brokers(config) || '',
|
37
|
-
topics: build_kafka_topics(config)
|
37
|
+
topics: build_kafka_topics(config)
|
38
38
|
)
|
39
39
|
end
|
40
40
|
|
@@ -47,7 +47,7 @@ module ClowderCommonRuby
|
|
47
47
|
return { security_protocol: 'plaintext' } unless authtype
|
48
48
|
|
49
49
|
unless authtype == 'sasl'
|
50
|
-
raise "Unsupported Kafka security protocol '#{authtype}'"
|
50
|
+
raise "Unsupported Kafka security protocol '#{authtype}'"
|
51
51
|
end
|
52
52
|
|
53
53
|
{
|
@@ -62,13 +62,13 @@ module ClowderCommonRuby
|
|
62
62
|
|
63
63
|
# Gives location of ssl certificate and makes sure it exists
|
64
64
|
def build_kafka_certificate(cacert)
|
65
|
-
return unless cacert.present?
|
65
|
+
return unless cacert.present?
|
66
66
|
|
67
|
-
|
67
|
+
ssl_ca_location = Rails.root.join('tmp', 'kafka_ca.crt')
|
68
68
|
|
69
|
-
write_temporary_file(
|
69
|
+
write_temporary_file(ssl_ca_location, cacert)
|
70
70
|
|
71
|
-
|
71
|
+
ssl_ca_location
|
72
72
|
end
|
73
73
|
|
74
74
|
# Kafka brokers list
|
@@ -154,7 +154,7 @@ module ClowderCommonRuby
|
|
154
154
|
ssl_root_cert: build_database_certificate(config.database.rdsCa)
|
155
155
|
}
|
156
156
|
end
|
157
|
-
|
157
|
+
|
158
158
|
# Gives location of database ssl certificate and makes sure it exists
|
159
159
|
def build_database_certificate(rdsca)
|
160
160
|
return unless rdsca.present?
|
@@ -170,7 +170,7 @@ module ClowderCommonRuby
|
|
170
170
|
def write_temporary_file(path, content)
|
171
171
|
File.open(path, 'w') do |f|
|
172
172
|
f.write(content)
|
173
|
-
end unless File.exist?(path)
|
173
|
+
end unless File.exist?(path)
|
174
174
|
end
|
175
175
|
end
|
176
176
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clowder-common-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Red Hat Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a ruby interface for preparing Clowder variables.
|
14
14
|
email:
|