lono 7.0.4 → 7.0.5
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/CHANGELOG.md +3 -0
- data/lib/lono/output/template.rb +18 -4
- data/lib/lono/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978e40e7263ef0cc011601eec42c5581e580c4bc7c74feea55658776d2f60f61
|
4
|
+
data.tar.gz: b8ef03d604d0145577c58a9b2aef532d7e0ac033145bba7b56e5182314f2fef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6df32378a05c9d8279cafb2f6e379b39bfdc3aba799371c1fafd7318fcd1d68aed09f75a01817723b3de2852917d3e7ac9b1c5cec86a2617aa19d56a814a82ab
|
7
|
+
data.tar.gz: 02c7f8fc999daecb2a87889123ce49ced93cc72bdbf0ff2e6b9d1880ea40fa2e8d5d565229d941dee0c746d829f5dd841fc084f41aa42f04392386214d35a722
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [7.0.5]
|
7
|
+
- #41 sort parameter with required at top
|
8
|
+
|
6
9
|
## [7.0.4]
|
7
10
|
- #40 fix lono summary total
|
8
11
|
|
data/lib/lono/output/template.rb
CHANGED
@@ -15,7 +15,12 @@ module Lono::Output
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def parameters
|
18
|
-
data["Parameters"] || []
|
18
|
+
list = data["Parameters"] || []
|
19
|
+
# Not using sort_parameter_group because structure is different
|
20
|
+
list.sort_by do |name, data|
|
21
|
+
optional = !data["Default"].nil?
|
22
|
+
[optional, name].join('-')
|
23
|
+
end.to_h
|
19
24
|
end
|
20
25
|
|
21
26
|
def parameter_groups
|
@@ -23,9 +28,9 @@ module Lono::Output
|
|
23
28
|
return unless interface
|
24
29
|
pgs = interface["ParameterGroups"]
|
25
30
|
pgs.inject({}) do |result, pg|
|
26
|
-
|
27
|
-
|
28
|
-
result.merge(
|
31
|
+
label = pg["Label"]["default"]
|
32
|
+
parameters = sort_parameter_group(pg["Parameters"])
|
33
|
+
result.merge(label => parameters)
|
29
34
|
end
|
30
35
|
end
|
31
36
|
|
@@ -37,6 +42,15 @@ module Lono::Output
|
|
37
42
|
memoize :data
|
38
43
|
|
39
44
|
private
|
45
|
+
def sort_parameter_group(list)
|
46
|
+
list.sort_by do |name|
|
47
|
+
raw_parameters = data["Parameters"] || []
|
48
|
+
param = raw_parameters[name]
|
49
|
+
optional = !param["Default"].nil?
|
50
|
+
[optional, name].join('-')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
40
54
|
# Check if the template exists and print friendly error message. Exits if it
|
41
55
|
# does not exist.
|
42
56
|
def check_template_exists!(template_path)
|
data/lib/lono/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -717,8 +717,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
717
717
|
- !ruby/object:Gem::Version
|
718
718
|
version: '0'
|
719
719
|
requirements: []
|
720
|
-
|
721
|
-
rubygems_version: 2.7.6.2
|
720
|
+
rubygems_version: 3.1.2
|
722
721
|
signing_key:
|
723
722
|
specification_version: 4
|
724
723
|
summary: The CloudFormation Framework
|