clowder-common-ruby 0.5.5 → 0.5.6

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: '058cbff417aa79f446e8e81d2ee9cc753a6c4fc22e35e3e05a406664491529ce'
4
- data.tar.gz: f94b08c8c58dd3d55326900ef6cfcf9235c95454ca48c6d2f559da5748552d89
3
+ metadata.gz: 2a0183d53d4a43907739edb12a4563ada87e5b1264280c1eb6bfd9ac3d1f6d63
4
+ data.tar.gz: 611254dedf957e0742eb6ae96015db798358c588fabe2b83de047aaeac79a2eb
5
5
  SHA512:
6
- metadata.gz: 92f425524d66fcc0b4224d0d72011219e97f6a3a04552a87e44a5d261ae662c82081298b50487bf853e82be2e89a18085651ffb40d6e418aa43ed3971cff6a1d
7
- data.tar.gz: 54d598f742ae92dc98ba1ef40dcaba4d6e3cf9cb31652ec81e9dfd7016db59bfd2046cd3a7c3a31b3bcf3cf3453156d43a386d32f70b27eab793da13835f3c09
6
+ metadata.gz: 14b05ed1a3bc92792a2caa004d1d0be3935134778ce15e6865f8e7d099d9df16f7834dac9ced6def83d04576fccb78bc0aa53d434750608ea44d119bebb0338f
7
+ data.tar.gz: 3c6ef3e9b0302902f89b126e83df570c28a878d55d094e4b87ce11e3037c157258400f0cb3b6f03407099c685aff362c7ba59f56f49b07228d022300423cb920
data/bin/schema.json CHANGED
@@ -78,6 +78,9 @@
78
78
  "hostname": {
79
79
  "description": "The external hostname of the deployment, where applicable",
80
80
  "type": "string"
81
+ },
82
+ "prometheusGateway": {
83
+ "$ref": "#/definitions/PrometheusGatewayConfig"
81
84
  }
82
85
  },
83
86
  "required": [
@@ -544,6 +547,25 @@
544
547
  "port",
545
548
  "app"
546
549
  ]
550
+ },
551
+ "PrometheusGatewayConfig": {
552
+ "id": "prometheusGatewayConfig",
553
+ "type": "object",
554
+ "description": "Prometheus Gateway Configuration",
555
+ "properties": {
556
+ "hostname": {
557
+ "description": "Defines the hostname for the Prometheus Gateway server configuration.",
558
+ "type": "string"
559
+ },
560
+ "port": {
561
+ "description": "Defines the port for the Prometheus Gateway server configuration.",
562
+ "type": "integer"
563
+ }
564
+ },
565
+ "required": [
566
+ "hostname",
567
+ "port"
568
+ ]
547
569
  }
548
570
  }
549
571
  }
@@ -12,6 +12,7 @@ module ClowderCommonRuby
12
12
  attr_accessor :featureFlags
13
13
  attr_accessor :endpoints
14
14
  attr_accessor :privateEndpoints
15
+ attr_accessor :prometheusGateway
15
16
 
16
17
  def initialize(attributes)
17
18
  super
@@ -37,6 +38,7 @@ module ClowderCommonRuby
37
38
  attributes.fetch(:privateEndpoints, []).each do |attr|
38
39
  @privateEndpoints << PrivateDependencyEndpoint.new(attr)
39
40
  end
41
+ @prometheusGateway = PrometheusGatewayConfig.new(attributes.fetch(:prometheusGateway, {}))
40
42
  end
41
43
 
42
44
  def valid_keys
@@ -59,6 +61,7 @@ module ClowderCommonRuby
59
61
  keys << :BOPURL
60
62
  keys << :hashCache
61
63
  keys << :hostname
64
+ keys << :prometheusGateway
62
65
  end
63
66
  end
64
67
  end
@@ -444,4 +447,25 @@ module ClowderCommonRuby
444
447
  end
445
448
  end
446
449
  end
450
+
451
+ class PrometheusGatewayConfig < OpenStruct
452
+
453
+ def initialize(attributes)
454
+ super
455
+ raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
456
+
457
+ attributes = attributes.each_with_object({}) do |(k, v), h|
458
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
459
+ h[k.to_sym] = v
460
+ end
461
+
462
+ end
463
+
464
+ def valid_keys
465
+ [].tap do |keys|
466
+ keys << :hostname
467
+ keys << :port
468
+ end
469
+ end
470
+ end
447
471
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.5.5'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.5.6'.freeze # Patch version is being automatically bumped
3
3
  end
data/test.json CHANGED
@@ -27,6 +27,13 @@
27
27
  }
28
28
  ]
29
29
  },
30
+ "inMemoryDb": {
31
+ "hostname": "redis",
32
+ "username": "username",
33
+ "password": "password",
34
+ "sslMode": "false",
35
+ "port": "6379"
36
+ },
30
37
  "database": {
31
38
  "name": "dBaseName",
32
39
  "username": "username",
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.5.5
4
+ version: 0.5.6
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: 2025-02-20 00:00:00.000000000 Z
11
+ date: 2025-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby interface for preparing Clowder variables.
14
14
  email: