tflat 0.1.3 → 0.1.5
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/README.md +1 -1
- data/lib/tflat.rb +9 -2
- data/lib/tflat/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: 6f50b27a6b20c4823c20efb284fb6c0ca6576ef93ccb91431c8b162417dd05e0
|
4
|
+
data.tar.gz: e3410bea1c133c1be6df26e5008662957e04223a83147e17503796b84a747fb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5e5afbd879f2c6c45676b98390c58c49c0c5f9b1ba8e3a6c37d4ccc1fa0b2d3c504df5da254a1b259f6cbe696344833ba6485265e2140e0f8645658232034e
|
7
|
+
data.tar.gz: 784070164340af73dca83a2e5ca3f73d435561390168e964e4ab2d407f93ffd0c1a64176461edb0e022ebe5d9905c872582d06f92029246e89fe96ce17b43486
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.4 - Nov 17 2018
|
4
|
+
- More verbose output to make it easier to catch ERB errors.
|
5
|
+
|
3
6
|
## 0.1.3 - Nov 12 2018
|
4
7
|
- Added helper method `file_sha256(file)` to return the SHA256 of `file`'s content. This is useful for `null_resource` triggers.
|
5
8
|
- Fixed bug when file gets loaded before ERB parsed when using the `file` helper
|
data/README.md
CHANGED
@@ -88,7 +88,7 @@ resource "aws_instance" "web" {
|
|
88
88
|
# ...
|
89
89
|
```
|
90
90
|
|
91
|
-
The line `template = "${file("files/userdata.tpl")}"` has to be written
|
91
|
+
The line `template = "${file("files/userdata.tpl")}"` has to be written in one of the following ways to work with TFlat:
|
92
92
|
|
93
93
|
```
|
94
94
|
# Let Ruby load the file content using the 'file' helper method (easier to read)
|
data/lib/tflat.rb
CHANGED
@@ -22,7 +22,7 @@ module Tflat
|
|
22
22
|
end
|
23
23
|
setup
|
24
24
|
read_variables
|
25
|
-
|
25
|
+
puts "- [tflat] Generating files"
|
26
26
|
flatten_directories
|
27
27
|
parse_erb
|
28
28
|
puts " done!"
|
@@ -58,7 +58,14 @@ module Tflat
|
|
58
58
|
Dir.glob(".tflat/*").each do |entry|
|
59
59
|
next unless File.file?(entry)
|
60
60
|
next if File.binary?(entry)
|
61
|
-
|
61
|
+
puts "- [tflat] -> #{entry}"
|
62
|
+
begin
|
63
|
+
rendered = render(entry)
|
64
|
+
rescue Exception => e
|
65
|
+
puts "- [tflat] ERROR: Could not parse ERB on file #{entry}"
|
66
|
+
puts e.full_message
|
67
|
+
exit 1
|
68
|
+
end
|
62
69
|
File.write(entry, rendered)
|
63
70
|
end
|
64
71
|
end
|
data/lib/tflat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tflat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paulo Arruda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ptools
|