persistence-providers 0.0.3.4 → 0.0.3.5

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: b03aea719007459fa5bbbc7511a9bfbb7954ea02946e46de899af9e258f5954c
4
- data.tar.gz: a258ff130fd0083d9e2dea997ad5e7dab842a6e687351e039abd5b2f421b53b6
3
+ metadata.gz: 62b3d49ea7a138d6f1f9e99e0b8f776dcc0212ea24e8fba1bc35a2876f466951
4
+ data.tar.gz: 4fecccfff86f73b5b9ab5f647294bb5b866b465bfcc2f59c1991722da5cc0b68
5
5
  SHA512:
6
- metadata.gz: 441f55458ed7e431479bbc8651d1f7757d7dfc5b74eeacdae06d0d1b20778570eaed87abefb054de962dcaee9a1a4fd52449a0f3d90b7ae4b722ed2978040b49
7
- data.tar.gz: 93b8f0502f34f89f4d01683bb253d82fd4c4fefb8d6bc2fa26c4d6565762aeed229a5ceda2ae3b7c71aa119fa8bcc8e53b55197532efcde4d173162b81035e2e
6
+ metadata.gz: 7be9867552f0c0cc2cf66cdea3295b6c02c41909d92c645178244b256b4a67079f595ead4a48c91c33a116ba4323498001665ea9e089d68b37941c1618111a7e
7
+ data.tar.gz: 7bc22d498ec484b7466853e5ca550554f6567769596417b41f086e515fb58ac20b62b2074638cebee00a7f0c5af396dce8f68684b098374407d673338d6749e7
@@ -8,7 +8,7 @@ module DTK::State
8
8
  @name = name
9
9
  @namespace = namespace
10
10
  @executable_actions = content[:spec][:actions]
11
- @attribute_type_info = AttributeTypeInfo.create_from_kube_array(content[:spec][:attributes] || [])
11
+ @attribute_type_info = AttributeTypeInfo.create_from_kube_hash(content[:spec][:attributes] || {})
12
12
  end
13
13
 
14
14
  def self.get(namespace, name, opts = {})
@@ -4,8 +4,8 @@ module DTK::State
4
4
 
5
5
  attr_reader :name, :type, :required, :dynamic, :encrypted, :temporal
6
6
 
7
- def initialize(params)
8
- @name = params[:name]
7
+ def initialize(name, params)
8
+ @name = name.to_s
9
9
  @type = params[:type]
10
10
  @required = params[:required] || false
11
11
  @dynamic = params[:dynamic] || false
@@ -13,9 +13,9 @@ module DTK::State
13
13
  @encrypted = params[:encrypted] || false
14
14
  end
15
15
 
16
- def self.create_from_kube_array(kube_attributes)
17
- kube_attributes.map do |attribute_content|
18
- AttributeTypeInfo.new(attribute_content)
16
+ def self.create_from_kube_hash(kube_attributes)
17
+ kube_attributes.to_hash.map do |attribute_name, attribute_content|
18
+ AttributeTypeInfo.new(attribute_name, attribute_content)
19
19
  end
20
20
  end
21
21
 
@@ -9,7 +9,7 @@ module DTK::State
9
9
  @entrypoint = params[:entrypoint]
10
10
  @type = params[:type]
11
11
  @bash_script = params[:bash_script]
12
- @attribute_type_info = AttributeTypeInfo.create_from_kube_array(params[:attributes] || [])
12
+ @attribute_type_info = AttributeTypeInfo.create_from_kube_hash(params[:attributes] || {})
13
13
  end
14
14
 
15
15
  def self.get(crd_assembly_namespace, crd_assembly_name, component_name, action_name, opts = {})
@@ -25,7 +25,7 @@ module DTK::State
25
25
  entrypoint: action[:entrypoint] || '',
26
26
  type: action[:type] || '',
27
27
  bash_script: action[:bash_script] || '',
28
- attributes: action[:attributes] || []
28
+ attributes: action[:attributes] || {}
29
29
  }
30
30
  )
31
31
  end
@@ -4,8 +4,8 @@ module DTK::State
4
4
 
5
5
  attr_reader :name, :type, :required, :dynamic, :encrypted, :temporal
6
6
 
7
- def initialize(params)
8
- @name = params[:name]
7
+ def initialize(name, params)
8
+ @name = name.to_s
9
9
  @type = params[:type]
10
10
  @required = params[:required] || false
11
11
  @dynamic = params[:dynamic] || false
@@ -13,9 +13,9 @@ module DTK::State
13
13
  @encrypted = params[:encrypted] || false
14
14
  end
15
15
 
16
- def self.create_from_kube_array(kube_attributes)
17
- kube_attributes.map do |attribute_content|
18
- AttributeTypeInfo.new(attribute_content)
16
+ def self.create_from_kube_hash(kube_attributes)
17
+ kube_attributes.to_hash.map do |attribute_name, attribute_content|
18
+ AttributeTypeInfo.new(attribute_name, attribute_content)
19
19
  end
20
20
  end
21
21
 
@@ -11,7 +11,7 @@ module DTK::State
11
11
  @workflow_template = crd_content.references.workflow
12
12
  @attributes = crd_content.spec.attributes
13
13
  @workflow = crd_content.spec.workflow
14
- @attribute_type_info = AttributeTypeInfo.create_from_kube_obj(@attributes.to_h || {})
14
+ @attribute_type_info = AttributeTypeInfo.create_from_kube_hash(@attributes.to_h || {})
15
15
  end
16
16
 
17
17
  def self.get(namespace, name, opts = {})
@@ -15,12 +15,10 @@ module DTK::State
15
15
  @encrypted = params[:encrypted] || false
16
16
  end
17
17
 
18
- def self.create_from_kube_obj(kube_attributes)
19
- attributes = []
20
- kube_attributes.each do |name, content|
21
- attributes.push(AttributeTypeInfo.new(name, content))
18
+ def self.create_from_kube_hash(kube_attributes)
19
+ kube_attributes.to_hash.map do |attribute_name, attribute_content|
20
+ AttributeTypeInfo.new(attribute_name, attribute_content)
22
21
  end
23
- attributes
24
22
  end
25
23
 
26
24
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'persistence-providers'
3
- spec.version = '0.0.3.4'
3
+ spec.version = '0.0.3.5'
4
4
  spec.author = 'Reactor8'
5
5
  spec.email = 'support@reactor8.com'
6
6
  spec.description = %q{Persistence providers plugin}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persistence-providers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.4
4
+ version: 0.0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reactor8
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kubeclient