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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a05f119cf6a123acfb8155610f67c5231628fd8228b81298fc414f44ea2dd583
4
- data.tar.gz: d30ea93dea72be960b8ebafb9013ccbd48313a705af17db1bfdfa86d14dffe46
3
+ metadata.gz: eaad1ec25f009d5c0f4d3bbefd6d0bf86df648bf4ac720c5950818c9ac5b6f8c
4
+ data.tar.gz: a22c70b356e1bd289501792b627ddf6de8be1f32e0d7b3bfc670f2349d1a2dd2
5
5
  SHA512:
6
- metadata.gz: 024de310bf5780c99af49baa20e91a468b28b5b55521a1517569aa208d9398365bfd25dacd91fdc32994adfb7b6fdc676c7f3e8fcde0851c336ed2c01b9ed418
7
- data.tar.gz: 8e90789beff7f331c58ca417c832d21cfb89f4d1f2d9e35dc07dc038f3b0c9f0e482d956efdedfedf6191db3bc441f05136b888609fe19899f0a8a99ff280cd4
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
- kafka_config[:ssl_ca_location] = Rails.root.join('tmp', 'kafka_ca.crt')
67
+ ssl_ca_location = Rails.root.join('tmp', 'kafka_ca.crt')
68
68
 
69
- write_temporary_file(kafka_config[:ssl_ca_location], cacert)
69
+ write_temporary_file(ssl_ca_location, cacert)
70
70
 
71
- kafka_config[:ssl_ca_location]
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
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.4.3'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.5.0'.freeze # Patch version is being automatically bumped
3
3
  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.3
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-09-22 00:00:00.000000000 Z
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: