lono 6.1.6 → 6.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/lono/template/dsl/builder/fn.rb +15 -3
- data/lib/lono/template/dsl/builder/helpers/core_helper.rb +5 -1
- data/lib/lono/version.rb +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: 87f4d3a51484e76af1308434e1d244f95aa327d12db1211243e20064e2e9fa09
|
4
|
+
data.tar.gz: 7f90e0346d71229a09de3af0283d1bfa14799bf1946a6d6bc5f0a3bbe8661438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa404e26de9101dba2de7e8412a3865624d64ffd479d9ba9d6c48826e6c0afdbc7e77f5f4dcca1c2c1f129814f5570ad80dac3fb9c43eca704d0ff9d563bd666
|
7
|
+
data.tar.gz: a062d07213d4eb375ed9f0501e7db3ffbd93e386a03582b1ab3f75132e0bf7703046e609545831155aa495f3a387b1c4e099af8162cdc75bcf72f37a011ba311
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
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
|
+
## [6.1.7]
|
7
|
+
- #25 add stack_name helper
|
8
|
+
- #26 ref Split: true option
|
9
|
+
- #27 fix ref Split: true option
|
10
|
+
|
6
11
|
## [6.1.6]
|
7
12
|
- #24 auto remove properties with nil value
|
8
13
|
- lono seed: change default optional value to nothing
|
@@ -69,13 +69,25 @@ class Lono::Template::Dsl::Builder
|
|
69
69
|
# special cases
|
70
70
|
def ref(name, options={})
|
71
71
|
name = name.to_s.camelize
|
72
|
-
|
73
|
-
|
72
|
+
conditional = options.delete(:Conditional) || options.delete(:conditional)
|
73
|
+
if conditional
|
74
|
+
conditional_ref(name, options)
|
74
75
|
else
|
75
|
-
|
76
|
+
split_separator = options.delete(:Split) || options.delete(:split)
|
77
|
+
if split_separator
|
78
|
+
split_separator = ',' if split_separator == true
|
79
|
+
split(split_separator, ref(name))
|
80
|
+
else
|
81
|
+
{ "Ref" => name }
|
82
|
+
end
|
76
83
|
end
|
77
84
|
end
|
78
85
|
|
86
|
+
def conditional_ref(name, options)
|
87
|
+
fallback = options[:Fallback] || options[:fallback] || ref("AWS::NoValue")
|
88
|
+
if!("Has#{name}", ref(name, options), fallback)
|
89
|
+
end
|
90
|
+
|
79
91
|
# Examples:
|
80
92
|
# get_attr("logical_id.attribute")
|
81
93
|
# get_attr("logical_id", "attribute")
|
@@ -41,12 +41,16 @@ module Lono::Template::Dsl::Builder::Helpers
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def dimensions(hash, casing: :camelize)
|
44
|
-
|
44
|
+
tag_list(hash, casing: casing).map { |h|
|
45
45
|
h[:Name] = h.delete(:Key) || h.delete(:key)
|
46
46
|
h
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
50
|
+
def stack_name
|
51
|
+
@options[:stack]
|
52
|
+
end
|
53
|
+
|
50
54
|
def content(path)
|
51
55
|
render_file(Lono.config.content_path, path)
|
52
56
|
end
|
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: 6.1.
|
4
|
+
version: 6.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|