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 +4 -4
- data/lib/state/component_def.rb +1 -1
- data/lib/state/component_def/attribute_type_info.rb +5 -5
- data/lib/state/executable_action.rb +2 -2
- data/lib/state/executable_action/attribute_type_info.rb +5 -5
- data/lib/state/workflow_instance.rb +1 -1
- data/lib/state/workflow_instance/attribute_type_info.rb +3 -5
- data/persistence-providers.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62b3d49ea7a138d6f1f9e99e0b8f776dcc0212ea24e8fba1bc35a2876f466951
|
4
|
+
data.tar.gz: 4fecccfff86f73b5b9ab5f647294bb5b866b465bfcc2f59c1991722da5cc0b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7be9867552f0c0cc2cf66cdea3295b6c02c41909d92c645178244b256b4a67079f595ead4a48c91c33a116ba4323498001665ea9e089d68b37941c1618111a7e
|
7
|
+
data.tar.gz: 7bc22d498ec484b7466853e5ca550554f6567769596417b41f086e515fb58ac20b62b2074638cebee00a7f0c5af396dce8f68684b098374407d673338d6749e7
|
data/lib/state/component_def.rb
CHANGED
@@ -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.
|
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 =
|
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.
|
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.
|
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 =
|
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.
|
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.
|
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.
|
19
|
-
|
20
|
-
|
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
|
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
|
+
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-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kubeclient
|