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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d15b9198d7b98f7db2eebf26bc45cde58a272fc185b994df397944ef4c5eca1
4
- data.tar.gz: cff2e13e095dfdf4d48c644afa3a59ed2230fda74045a2b854c59d6861044c0c
3
+ metadata.gz: 6f50b27a6b20c4823c20efb284fb6c0ca6576ef93ccb91431c8b162417dd05e0
4
+ data.tar.gz: e3410bea1c133c1be6df26e5008662957e04223a83147e17503796b84a747fb1
5
5
  SHA512:
6
- metadata.gz: 3484b425066f7d77e27f98a61d7d80d349133127dd578eb1254032da3e9eac8cb3b98b9e1bcc0a1cabe8648af049d75b22508bf9e9d5d3bbe74c99f106096d92
7
- data.tar.gz: a8afe6be65b184561fa55512e26223d6081a433fc39df7394ba339a90c6fce92c7d4e6774f3f151daaa788787888b28d70c941b1d33df2d03c3032b3f5e46bf0
6
+ metadata.gz: 8a5e5afbd879f2c6c45676b98390c58c49c0c5f9b1ba8e3a6c37d4ccc1fa0b2d3c504df5da254a1b259f6cbe696344833ba6485265e2140e0f8645658232034e
7
+ data.tar.gz: 784070164340af73dca83a2e5ca3f73d435561390168e964e4ab2d407f93ffd0c1a64176461edb0e022ebe5d9905c872582d06f92029246e89fe96ce17b43486
@@ -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 the in one of the following ways to work with TFlat:
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)
@@ -22,7 +22,7 @@ module Tflat
22
22
  end
23
23
  setup
24
24
  read_variables
25
- print "- [tflat] Generating files..."
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
- rendered = render(entry)
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
@@ -1,3 +1,3 @@
1
1
  module Tflat
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ptools