clowder-common-ruby 0.5.1 → 0.5.2

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: 2eb27069341b3726423c02088d23f56a4dcb659044ead344028da876a7dfb01a
4
- data.tar.gz: d816b9eb821d8bb5a6841c804168dad27ff2627596a91fd5fc172d97ebc7178a
3
+ metadata.gz: 5f5724ba3decfd80d5680e28006c976a72bd03868586b0afd0d16415f2d30ca7
4
+ data.tar.gz: 14e7f2f3882001c06ee7391dad86f73269b2ad315691612827120bef7f228e02
5
5
  SHA512:
6
- metadata.gz: 591aaa8a7be6e2fbcc7119a74de0c94cb95d8dbce2555db27784d62d2245561824b77393d5b29028c43a6008165fa7eee8d572a5bc1adf017b0df776a36efa44
7
- data.tar.gz: 1fcaf4ad4eefedd3cfbba5f00e2757a0d0c0a7fa47d3e0c53245d3ba50de8dea039363e72f72cceee30b68e5b3802e1681ca5ba24079e2739fbf3ba4027b76e8
6
+ metadata.gz: 7fcf609b925a9d9de2fd8654e9effd592a6476bced6395acb745b7179bed5235e9b41ab7ca969f5538f57ac5c83369410f1b6a30753417127b4f75455c2c916b
7
+ data.tar.gz: d9dae30e257647850eadff44027175855ca17c9a65775422285726b373fc4dc315ca3d94271d3f74fbe2b71123df850246402844e69b3a0d49a1a6eab28a8c5d
@@ -82,11 +82,18 @@ class RubyClassConverter
82
82
  init_function << "\n"
83
83
  value.properties.each_pair do |k, v|
84
84
  if v.send(:type) == "array"
85
- klass = v.items.send("$ref").rpartition('/').last
86
- init_function << " @#{k} = []\n"
87
- init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
88
- init_function << " @#{k} << #{klass}.new(attr)\n"
89
- init_function << " end\n"
85
+ if v.items.send("$ref")
86
+ klass = v.items.send("$ref").rpartition('/').last
87
+ init_function << " @#{k} = []\n"
88
+ init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
89
+ init_function << " @#{k} << #{klass}.new(attr)\n"
90
+ init_function << " end\n"
91
+ else
92
+ init_function << " @#{k} = []\n"
93
+ init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
94
+ init_function << " @#{k} << attr\n"
95
+ init_function << " end\n"
96
+ end
90
97
  elsif v.send('$ref')
91
98
  klass = v.send('$ref').rpartition('/').last
92
99
  init_function << " @#{k} = #{klass}.new(attributes.fetch(:#{k.to_sym}, {}))\n"
data/bin/schema.json CHANGED
@@ -482,7 +482,15 @@
482
482
  "type": "integer"
483
483
  },
484
484
  "apiPath": {
485
- "description": "The top level api path that the app should serve from /api/<apiPath>"
485
+ "description": "The top level api path that the app should serve from /api/<apiPath> (deprecated, use apiPaths)",
486
+ "type": "string"
487
+ },
488
+ "apiPaths": {
489
+ "description": "The list of API paths (each matching format: '/api/some-path/') that this app will serve requests from",
490
+ "type": "array",
491
+ "items": {
492
+ "type": "string"
493
+ }
486
494
  }
487
495
  },
488
496
  "required": [
@@ -390,6 +390,7 @@ module ClowderCommonRuby
390
390
  end
391
391
 
392
392
  class DependencyEndpoint < OpenStruct
393
+ attr_accessor :apiPaths
393
394
 
394
395
  def initialize(attributes)
395
396
  super
@@ -400,6 +401,10 @@ module ClowderCommonRuby
400
401
  h[k.to_sym] = v
401
402
  end
402
403
 
404
+ @apiPaths = []
405
+ attributes.fetch(:apiPaths, []).each do |attr|
406
+ @apiPaths << attr
407
+ end
403
408
  end
404
409
 
405
410
  def valid_keys
@@ -410,6 +415,7 @@ module ClowderCommonRuby
410
415
  keys << :app
411
416
  keys << :tlsPort
412
417
  keys << :apiPath
418
+ keys << :apiPaths
413
419
  end
414
420
  end
415
421
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.5.1'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.5.2'.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.5.1
4
+ version: 0.5.2
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-10-06 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby interface for preparing Clowder variables.
14
14
  email: