lono 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lono/dsl.rb +8 -2
- data/lib/lono/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9236c10e7fcf57b75bbbb57b7ad87ada43f7c1d
|
4
|
+
data.tar.gz: c453a06115c4263f8955c97e566c5a6261365195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae90a7b3e39be326fedd087551570cfb0b33ce5081befccfa53f14b6e04868735b6b2d1de5c2d463cf66e53ccbffa58e672fb5b730a73307a0f1d797622deb7
|
7
|
+
data.tar.gz: 0bd752bb836cc1567be6be4fb20ebdc8509f7ca068ab59905299ca828764b931f956523bedc8e8309ecec7aafcfed08e57d2bd647edd49b6fbe25d53a546db4d
|
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
|
+
## [1.0.2]
|
7
|
+
- remove blank lines from yaml output
|
8
|
+
|
6
9
|
## [1.0.1]
|
7
10
|
- update starter project instance type allowed values
|
8
11
|
|
data/lib/lono/dsl.rb
CHANGED
@@ -108,9 +108,15 @@ module Lono
|
|
108
108
|
@options[:pretty] ? prettify(text) : text
|
109
109
|
end
|
110
110
|
|
111
|
-
#
|
111
|
+
# Input text is either yaml or json.
|
112
|
+
# Do not prettify yaml format because it removes the !Ref like CloudFormation notation
|
112
113
|
def prettify(text)
|
113
|
-
@detected_format == "json" ? JSON.pretty_generate(JSON.parse(text)) : text
|
114
|
+
@detected_format == "json" ? JSON.pretty_generate(JSON.parse(text)) : remove_blank_lines(text)
|
115
|
+
end
|
116
|
+
|
117
|
+
# ERB templates leaves blank lines around, remove those lines
|
118
|
+
def remove_blank_lines(text)
|
119
|
+
text.split("\n").reject { |l| l.strip == '' }.join("\n") + "\n"
|
114
120
|
end
|
115
121
|
|
116
122
|
def ensure_parent_dir(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: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|