clowder-common-ruby 0.4.2 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d985797cbb80f7e818fad33debe6861ca96f58a8d182b6ac82bc95ff60c1364
4
- data.tar.gz: b96fc768b33ae6dc985b5846e3f299fb24e3156215b7f06f02134ef0d552d9cd
3
+ metadata.gz: eaad1ec25f009d5c0f4d3bbefd6d0bf86df648bf4ac720c5950818c9ac5b6f8c
4
+ data.tar.gz: a22c70b356e1bd289501792b627ddf6de8be1f32e0d7b3bfc670f2349d1a2dd2
5
5
  SHA512:
6
- metadata.gz: 61e7cb2eab0652a6ba3ee485215b279f80625326bb5dc5a7cab69a8999691aecf5e0ad294e6e059ca736805b048d51cd339395f30e75c55598adc0a6b5298134
7
- data.tar.gz: 8ae0b436d8a729f77b77de864ab59c3dd56cf40bb9faaee5f08f2c45777bd6c407399b680cef5e80d7cd16d978cce99a6d3490cb7866018d38bb3b74ee22a153
6
+ metadata.gz: 242ff896a7cec23fb9396868e950f4a3796e9f9fc6b63df41f0aaeaf19aa4c940fcf34e6bf8cfee3c9c5e1caf24bf4b224f1981462b04138edb6081dbd28f506
7
+ data.tar.gz: b1a121df03523947b412c161e374de1ef48abf2858dbdf77c38c2c0d3138d5ec79db9eb77c9ccbbff1d4b8153b8091e99d3c667b619c07bcefe2670f8db26350
data/bin/schema.json CHANGED
@@ -342,6 +342,14 @@
342
342
  "name": {
343
343
  "description": "The actual name of the bucket being accessed.",
344
344
  "type": "string"
345
+ },
346
+ "tls": {
347
+ "description": "Details if the Object Server uses TLS.",
348
+ "type": "boolean"
349
+ },
350
+ "endpoint": {
351
+ "description": "Defines the endpoint for the Object Storage server configuration.",
352
+ "type": "string"
345
353
  }
346
354
  },
347
355
  "required": [
@@ -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
@@ -306,6 +306,8 @@ module ClowderCommonRuby
306
306
  keys << :region
307
307
  keys << :requestedName
308
308
  keys << :name
309
+ keys << :tls
310
+ keys << :endpoint
309
311
  end
310
312
  end
311
313
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.4.2'.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.2
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-08-31 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: