terragov 0.2.5.1 → 0.2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8763171ad2f31d1d2348e0f6c4c6605ec9d48a97
4
- data.tar.gz: fc08009de401c77815c7ec1c5b9e628b5c503afa
3
+ metadata.gz: 34fec7129f031849a422749f2d0d9a9f54c3c6a4
4
+ data.tar.gz: f14943b68ac8e627bb12873a43a941ff7c682a41
5
5
  SHA512:
6
- metadata.gz: '087b76868f4019161d0a7bd271e645f7df11cc6862632529f68d7565fbdbadd677d4f227d4679ba222a44eafb99b09df886a0cf9e23bfc597a11427a12be7118'
7
- data.tar.gz: 63e1fb4b308298a786a24e4b539e40784e62f85cc0f58fe3893e72b6265b1ee5a134390b98d79ec9eb05fcfa46fe43ba4ca5a66f497bf5483fcd888f553ed146
6
+ metadata.gz: bf982e8c0e14e751ad7646940b29c2fbf70b5667ee335abf79daf0c17ec3eef9a4fb83acc423685b123d96b86d7c69cdc6b20fae7fc023f02d2e851e3e711ac5
7
+ data.tar.gz: 539b16c5019e21402f4bf975e048bb1f05dfae3be5dd18d5a84cd6a8ce495e073d52aa931d7208aa4b75986b381a9974c2419963a513b70f832885ba079e19fa
@@ -39,19 +39,11 @@ module Terragov
39
39
  }
40
40
  end
41
41
 
42
- def data_validation(path, required = false)
43
- if required
44
- if File.exist?(path)
45
- true
46
- else
47
- abort("Invalid directory or file: #{path}")
48
- end
42
+ def data_validation(path)
43
+ if File.exist?(path)
44
+ true
49
45
  else
50
- if File.exist?(path)
51
- true
52
- else
53
- false
54
- end
46
+ false
55
47
  end
56
48
  end
57
49
 
@@ -88,9 +80,11 @@ module Terragov
88
80
 
89
81
  def build_command(options = {})
90
82
  paths = base(options)
91
- abort('Cannot find main repository') unless data_validation(paths[:terraform_dir], true)
83
+ abort("Error: cannot find main repository (#{paths[:terraform_dir]})") unless data_validation(paths[:terraform_dir])
84
+ abort("Error: cannot find project (#{paths[:project_dir]}).") unless data_validation(paths[:project_dir])
85
+ abort("Error: cannot find backend file (#{paths[:backend_file]}).\nDid you specify the right stack?") unless data_validation(paths[:backend_file])
92
86
  var_paths = data_paths(options)
93
- abort("Can't find any var files") unless check_var_files(var_paths)
87
+ abort("Error: cannot find any var files") unless check_var_files(var_paths)
94
88
 
95
89
  $full_vars = []
96
90
  data_paths(options).each do |path|
@@ -1,3 +1,3 @@
1
1
  module Terragov
2
- VERSION = '0.2.5.1'.freeze
2
+ VERSION = '0.2.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terragov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5.1
4
+ version: 0.2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laura Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-15 00:00:00.000000000 Z
11
+ date: 2017-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander