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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5287a846ea6db17b4e422e6bb43c6f534b7b5ee39b82e6e96cb5c514c8fc5b4f
4
- data.tar.gz: e73157d630908be59706a1e000b5ec32ccaf9076914e8f1d38723014ff364a69
3
+ metadata.gz: 87f4d3a51484e76af1308434e1d244f95aa327d12db1211243e20064e2e9fa09
4
+ data.tar.gz: 7f90e0346d71229a09de3af0283d1bfa14799bf1946a6d6bc5f0a3bbe8661438
5
5
  SHA512:
6
- metadata.gz: bfc052f5ac5103d0877490292f1b21e66f59f7dce54ded27830edf044418fbce1d75b00bc0ccb815e950c8a47b8520c130ff56d830f195b08202b0ced8212517
7
- data.tar.gz: 1dd8964b59340d0aec5fbaaa98d8f24dcbf518aedea5c630b675c263619ee64aae7d1657a8b3b518418571cec23653a62be048f678717d17ed13bbb7fa0f7aa6
6
+ metadata.gz: aa404e26de9101dba2de7e8412a3865624d64ffd479d9ba9d6c48826e6c0afdbc7e77f5f4dcca1c2c1f129814f5570ad80dac3fb9c43eca704d0ff9d563bd666
7
+ data.tar.gz: a062d07213d4eb375ed9f0501e7db3ffbd93e386a03582b1ab3f75132e0bf7703046e609545831155aa495f3a387b1c4e099af8162cdc75bcf72f37a011ba311
@@ -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
- if options[:Conditional] || options[:conditional]
73
- if!("Has#{name}", ref(name), ref("AWS::NoValue"))
72
+ conditional = options.delete(:Conditional) || options.delete(:conditional)
73
+ if conditional
74
+ conditional_ref(name, options)
74
75
  else
75
- { "Ref" => name }
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
- tags(hash, casing: casing).map { |h|
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
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "6.1.6"
2
+ VERSION = "6.1.7"
3
3
  end
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.6
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-08 00:00:00.000000000 Z
11
+ date: 2019-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport