terragov 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: efde38002a354278423dd04e272889773b1f12dc
4
- data.tar.gz: 0e6ef6a6f2467e1e5068099d0a8834fcea7242ae
3
+ metadata.gz: 87f96c82addb19f7bef1a8cfe8d13f6ae8e4934a
4
+ data.tar.gz: 4e3c853e0546749ba0d540b47914362ab866bf65
5
5
  SHA512:
6
- metadata.gz: a6606cfa8752caeb244ff7331f51df36ace492410b66eac6180f5786aa736fc016c831225ce80e34f46c27c49d0552f54689a91d68720f772c0fb573eba2094d
7
- data.tar.gz: 7210b3b4da942245aa24a67a5be44171813cd751000d195e5c4a2499f92e264c85a6b977761b26a1c5263afe797184999857aa14a312581fb5a99eef4c740b9c
6
+ metadata.gz: a2d28c592c38238cb6d3276771689fa5079727f9f95505a82de7be36a5281eab71617cac21c7dc88a89c0e26896f1995612dc4086a7e79646eb17f1d9d2d2e62
7
+ data.tar.gz: 189846a9f1ed46f1c790b5b5ca79725d46b85ac166467c45aad8566a2e5e6d0f818dc5110fd01bfbf905710e2cd5fb4254f94c5d5ac0035f91e72f9aba627067
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require 'terragov/cli'
2
+ require 'terragov'
3
3
 
4
4
  Terragov::Cli.new.run
@@ -2,7 +2,4 @@ require "terragov/version"
2
2
  require "terragov/buildpaths"
3
3
  require "terragov/cli"
4
4
  require "terragov/terraform"
5
-
6
- module Terragov
7
- # Your code goes here...
8
- end
5
+ require "terragov/cleaner"
@@ -3,6 +3,7 @@ require 'yaml'
3
3
  require_relative 'buildpaths'
4
4
  require_relative 'terraform'
5
5
  require_relative 'cleaner'
6
+ require_relative 'version'
6
7
 
7
8
  module Terragov
8
9
  class Cli
@@ -21,8 +22,8 @@ module Terragov
21
22
  $data_dir = data_dir
22
23
  end
23
24
 
24
- global_option( '-e', '--env STRING', String, 'Select environment') do |env|
25
- $environment = env
25
+ global_option( '-e', '--environment STRING', String, 'Select environment') do |environment|
26
+ $environment = environment
26
27
  end
27
28
 
28
29
  global_option( '-p', '--project STRING', String, 'Name of the project') do |project|
@@ -55,8 +56,10 @@ module Terragov
55
56
  if $config_file || ENV['TERRAGOV_CONFIG_FILE']
56
57
  file = $config_file || ENV['TERRAGOV_CONFIG_FILE']
57
58
  $values = YAML.load_file(File.expand_path(file))
59
+ return $values
60
+ else
61
+ return false
58
62
  end
59
- return $values
60
63
  end
61
64
 
62
65
  def data_dir
@@ -65,7 +68,7 @@ module Terragov
65
68
  return File.expand_path($data_dir)
66
69
  elsif ENV['TERRAGOV_DATA_DIR']
67
70
  return File.expand_path(ENV['TERRAGOV_DATA_DIR'])
68
- elsif load_config_file['data_dir']
71
+ elsif load_config_file
69
72
  return File.expand_path(load_config_file['data_dir'])
70
73
  else
71
74
  abort(error_message)
@@ -78,7 +81,7 @@ module Terragov
78
81
  return $environment
79
82
  elsif ENV['TERRAGOV_ENVIRONMENT']
80
83
  return ENV['TERRAGOV_ENVIRONMENT']
81
- elsif load_config_file['environment']
84
+ elsif load_config_file
82
85
  return load_config_file['environment']
83
86
  else
84
87
  abort(error_message)
@@ -92,7 +95,7 @@ module Terragov
92
95
  return $project
93
96
  elsif ENV['TERRAGOV_PROJECT']
94
97
  return ENV['TERRAGOV_PROJECT']
95
- elsif load_config_file['project']
98
+ elsif load_config_file
96
99
  return load_config_file['project']
97
100
  else
98
101
  abort(error_message)
@@ -105,7 +108,7 @@ module Terragov
105
108
  return File.expand_path($repo_dir)
106
109
  elsif ENV['TERRAGOV_REPO_DIR']
107
110
  return File.expand_path(ENV['TERRAGOV_REPO_DIR'])
108
- elsif load_config_file['repo_dir']
111
+ elsif load_config_file
109
112
  return File.expand_path(load_config_file['repo_dir'])
110
113
  else
111
114
  return File.expand_path('.')
@@ -119,7 +122,7 @@ module Terragov
119
122
  return $stack
120
123
  elsif ENV['TERRAGOV_STACK']
121
124
  return ENV['TERRAGOV_STACK']
122
- elsif load_config_file['stack']
125
+ elsif load_config_file
123
126
  return load_config_file['stack']
124
127
  else
125
128
  abort(error_message)
@@ -1,3 +1,3 @@
1
1
  module Terragov
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terragov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laura Martin