clowder-common-ruby 0.3.1 → 0.3.3

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: 3e13c77144baf198f01813107af80aa719296d735f0983e692680e12b9758b20
4
- data.tar.gz: e93a325311403f9be4212729416d44a292d1677a485f112621a73b5e2895407b
3
+ metadata.gz: ba33d3420aae78b4809987412281714f2db552c7dd62b77fb1492f34d3fcd396
4
+ data.tar.gz: 52cadcd45517d7d91cc931da7d1eabf29bf0ac254ac03aa711948a178313465f
5
5
  SHA512:
6
- metadata.gz: 333b12ab4020f08fa2178e68a235c84acccb6ff4cc4fa0d36326aacd082cd3954a80494d4feeb1c21ff1ec58ddc2a7197a6d24c1cb28a81125072ab15b682d36
7
- data.tar.gz: 28477690d1097f97f4ef1d152b5b2d6ebc7b2e0530611ea8ab3e9283b8fbc7e1712dcc7d7779194df575846d67a8a3a4b4ed16616984814b6733da15e2278dba
6
+ metadata.gz: 5cb5963ab36868149b7698f1a822d9b15e7e2509cc9f083d51fa70eebb264756ce5ac8ec89b6209523929b986c97e09e71068738a6e2e1fc896778e2303f25df
7
+ data.tar.gz: ad6f9361510ba8e5d9b3b764979bc8b43da69f558c889c033106275b8899b2ae0676f19fde2ce093178aeea36876a258e9e14b7fbf549f4fb914db72fec5015e
data/bin/schema.json CHANGED
@@ -468,13 +468,17 @@
468
468
  "tlsPort": {
469
469
  "description": "The TLS port of the dependent service.",
470
470
  "type": "integer"
471
+ },
472
+ "apiPath": {
473
+ "description": "The top level api path that the app should serve from /api/<apiPath>"
471
474
  }
472
475
  },
473
476
  "required": [
474
477
  "name",
475
478
  "hostname",
476
479
  "port",
477
- "app"
480
+ "app",
481
+ "apiPath"
478
482
  ]
479
483
  },
480
484
  "PrivateDependencyEndpoint": {
@@ -0,0 +1,17 @@
1
+ require 'clowder-common-ruby/rails_config'
2
+
3
+ if ClowderCommonRuby::Config.clowder_enabled? && defined?(Settings)
4
+ config = ClowderCommonRuby::RailsConfig.to_h
5
+
6
+ if config.dig('tls_ca_path')
7
+ ENV['SSL_CERT_FILE'] = Rails.root.join('tmp', 'cacert.crt')
8
+
9
+ File.open(ENV['SSL_CERT_FILE'], 'w') do |f|
10
+ f.write(File.read('/etc/pki/tls/certs/ca-bundle.crt'))
11
+ f.write(File.read('/cdapp/certs/service-ca.crt'))
12
+ end
13
+ end
14
+
15
+ Settings.add_source!(config)
16
+ Settings.reload!
17
+ end
@@ -406,6 +406,7 @@ module ClowderCommonRuby
406
406
  keys << :port
407
407
  keys << :app
408
408
  keys << :tlsPort
409
+ keys << :apiPath
409
410
  end
410
411
  end
411
412
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.3.1'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.3.3'.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.3.1
4
+ version: 0.3.3
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-06-23 00:00:00.000000000 Z
11
+ date: 2023-06-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby interface for preparing Clowder variables.
14
14
  email:
@@ -23,6 +23,7 @@ files:
23
23
  - bin/json_schema_ruby
24
24
  - bin/ruby_class_converter.rb
25
25
  - bin/schema.json
26
+ - config/initializers/0_clowder_rails.rb
26
27
  - lib/clowder-common-ruby.rb
27
28
  - lib/clowder-common-ruby/config.rb
28
29
  - lib/clowder-common-ruby/engine.rb