steplib 0.9.0.5 → 0.9.0.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 +4 -4
- data/lib/steplib/steplib_updater.rb +47 -0
- data/lib/steplib/workflow_updater.rb +7 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac2ab879cd2d14f65be39f5e31dfb1a9f50c83eb
|
4
|
+
data.tar.gz: 550f989699a6e3575479ed61ce32a8e0fb692340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecb3c5e44bde0e8124d1e55d3e6e0a5199310e6c92afd6492d3903947aa26c208127c773be7aded7aec2d428286e7e8aa85b2c7f8873af026baf100d38fe5651
|
7
|
+
data.tar.gz: b0bfb6e6419be8939f9e77761705b865443ab1125ceb1278e33c55c82510c7e59a7f61348361a456e33123d648c8ec051eb10e2a9fe172f5f3b23d260d5c9c5c
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_relative 'hash_utils'
|
2
|
+
|
3
|
+
module Steplib
|
4
|
+
class SteplibUpdater
|
5
|
+
class << self
|
6
|
+
|
7
|
+
#
|
8
|
+
# of course this can only fill-out properties
|
9
|
+
# which have a pre-defined valid default value
|
10
|
+
def set_defaults_for_missing_properties_in_step_version(step_version_data)
|
11
|
+
step_version_data = HashUtils.set_missing_defaults(step_version_data, [
|
12
|
+
{key: 'fork_url', value: step_version_data['website']},
|
13
|
+
{key: 'icon_url_256', value: nil},
|
14
|
+
{key: 'project_type_tags', value: []},
|
15
|
+
{key: 'type_tags', value: []},
|
16
|
+
{key: 'inputs', value: []},
|
17
|
+
{key: 'outputs', value: []},
|
18
|
+
])
|
19
|
+
#
|
20
|
+
# inputs
|
21
|
+
step_version_data['inputs'] = step_version_data['inputs'].map { |a_step_inp|
|
22
|
+
a_step_inp = HashUtils.set_missing_defaults(a_step_inp, [
|
23
|
+
{key: 'description', value: ''},
|
24
|
+
{key: 'is_expand', value: true},
|
25
|
+
{key: 'is_required', value: false},
|
26
|
+
{key: 'value_options', value: []},
|
27
|
+
{key: 'value', value: ''},
|
28
|
+
{key: 'is_dont_change_value', value: false},
|
29
|
+
])
|
30
|
+
# return:
|
31
|
+
a_step_inp
|
32
|
+
}
|
33
|
+
#
|
34
|
+
# outputs
|
35
|
+
step_version_data['outputs'] = step_version_data['outputs'].map { |a_step_output|
|
36
|
+
a_step_output = HashUtils.set_missing_defaults(a_step_output, [
|
37
|
+
{key: 'description', value: ''}
|
38
|
+
])
|
39
|
+
# return:
|
40
|
+
a_step_output
|
41
|
+
}
|
42
|
+
return step_version_data
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -60,6 +60,13 @@ module Steplib
|
|
60
60
|
# return:
|
61
61
|
a_step_inp
|
62
62
|
}
|
63
|
+
workflow_step_data['outputs'] = workflow_step_data['outputs'].map { |a_step_output|
|
64
|
+
a_step_output = HashUtils.set_missing_defaults(a_step_output, [
|
65
|
+
{key: 'description', value: ''}
|
66
|
+
])
|
67
|
+
# return:
|
68
|
+
a_step_output
|
69
|
+
}
|
63
70
|
return workflow_step_data
|
64
71
|
end
|
65
72
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steplib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0.
|
4
|
+
version: 0.9.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bitrise
|
@@ -21,6 +21,7 @@ extra_rdoc_files: []
|
|
21
21
|
files:
|
22
22
|
- lib/steplib.rb
|
23
23
|
- lib/steplib/hash_utils.rb
|
24
|
+
- lib/steplib/steplib_updater.rb
|
24
25
|
- lib/steplib/steplib_validator.rb
|
25
26
|
- lib/steplib/workflow_updater.rb
|
26
27
|
- lib/steplib/workflow_utils.rb
|