terragov 0.2.3 → 0.2.4

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: 0d3187ea6e2507304bac2bb4d38e0efc7d012247
4
- data.tar.gz: 33d452899677a07ea2f72c77d2e861327f060a87
3
+ metadata.gz: 707493668e500d3df9dd3676a2a34a6076d2963b
4
+ data.tar.gz: 9d1ab18b21d0b14338d60bcda07926c57f1cf3f8
5
5
  SHA512:
6
- metadata.gz: c6298dde09d8ca0292a442d3c182b7ac48f5568be61509fa62542a67aa39e9cd1c72ed7cdf192e2309fb0e380fe112bdd61f63a668c0f24660527f45adc19bd2
7
- data.tar.gz: 67365897d0ffce2f81960b61a85a6807587be42ef816cacb0d2a5b91534f59416547370567d560e60308b4e030aee03df8f03707c3ee9b711d981ab57cd05507
6
+ metadata.gz: cdcdc9cd6184dc833f5ea4cd3920f6d8ef50532b331aa719b12a9e3695f7be90ac3a027e1eb9b7a4227522fb900a9f53d3e895a8d6314c95133ce7bf2cd891e7
7
+ data.tar.gz: db62d131106c5756c7f148d8ea7a36269d61ef6e6e716bdcead3e29f25e6fe9b28c7d168526adc0a81b88e99a5b5dc9bebdd4a5a1dcbae09788439050c88a042
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 0.2.4 (2017-10-15)
2
+
3
+ - Updated cleaner method to check for both ".terraform" and "terraform.tfstate.backup"
4
+ files, and not exit if they are not found.
5
+
data/README.md CHANGED
@@ -20,6 +20,15 @@ This tool is only meant to be used specifically against the project structure [d
20
20
 
21
21
  Run `--help` for details.
22
22
 
23
+ You can run the following commands:
24
+
25
+ Command | Description
26
+ --- | ---
27
+ `plan` | Plan Terraform resources
28
+ `apply` | Apply Terraform changes
29
+ `delete` | Delete Terraform resources
30
+ `clean` | Delete any files that have been left by Terraform
31
+
23
32
  There are several **required** arguments to pass when running `apply`, `plan` or `destroy`:
24
33
 
25
34
  Argument | Description
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "terragov"
3
+ require 'bundler/setup'
4
+ require 'terragov'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "terragov"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start(__FILE__)
data/lib/terragov.rb CHANGED
@@ -1,5 +1,6 @@
1
- require "terragov/version"
2
- require "terragov/buildpaths"
3
- require "terragov/cli"
4
- require "terragov/terraform"
5
- require "terragov/cleaner"
1
+ require 'terragov/buildpaths'
2
+ require 'terragov/cleaner'
3
+ require 'terragov/cli'
4
+ require 'terragov/git'
5
+ require 'terragov/terraform'
6
+ require 'terragov/version'
@@ -2,9 +2,7 @@ require_relative 'cli'
2
2
 
3
3
  module Terragov
4
4
  class BuildPaths
5
-
6
- def base(options={})
7
-
5
+ def base(options = {})
8
6
  environment = options['environment']
9
7
  data_dir = options['data_dir']
10
8
  repo_dir = options['repo_dir']
@@ -13,51 +11,51 @@ module Terragov
13
11
  extra = options['extra']
14
12
 
15
13
  # Construct variables
16
- terraform_dir = File.join(repo_dir, "terraform")
14
+ terraform_dir = File.join(repo_dir, 'terraform')
17
15
  project_dir = File.join(terraform_dir, "projects/#{project}")
18
16
  backend_file = File.join(project_dir, "#{environment}.#{stack}.backend")
19
17
  common_data_dir = File.join(data_dir, "common/#{environment}")
20
- common_data = File.join(common_data_dir, "common.tfvars")
18
+ common_data = File.join(common_data_dir, 'common.tfvars')
21
19
  stack_common_data = File.join(common_data_dir, "#{stack}.tfvars")
22
20
  project_data_dir = File.join(data_dir, "#{project}/#{environment}")
23
- common_project_data = File.join(project_data_dir, "common.tfvars")
24
- secret_common_project_data = File.join(project_data_dir, "common.secret.tfvars")
21
+ common_project_data = File.join(project_data_dir, 'common.tfvars')
22
+ secret_common_project_data = File.join(project_data_dir, 'common.secret.tfvars')
25
23
  stack_project_data = File.join(project_data_dir, "#{stack}.tfvars")
26
24
  secret_project_data = File.join(project_data_dir, "#{stack}.secret.tfvars")
27
25
 
28
26
  # Return hash to enable testing
29
27
  data_paths = {
30
- :terraform_dir => terraform_dir,
31
- :project_dir => project_dir,
32
- :backend_file => backend_file,
33
- :common_data_dir => common_data_dir,
34
- :common_data => common_data,
35
- :stack_common_data => stack_common_data,
36
- :project_data_dir => project_data_dir,
37
- :common_project_data => common_project_data,
38
- :secret_common_project_data => secret_common_project_data,
39
- :stack_project_data => stack_project_data,
40
- :secret_project_data => secret_project_data,
28
+ terraform_dir: terraform_dir,
29
+ project_dir: project_dir,
30
+ backend_file: backend_file,
31
+ common_data_dir: common_data_dir,
32
+ common_data: common_data,
33
+ stack_common_data: stack_common_data,
34
+ project_data_dir: project_data_dir,
35
+ common_project_data: common_project_data,
36
+ secret_common_project_data: secret_common_project_data,
37
+ stack_project_data: stack_project_data,
38
+ secret_project_data: secret_project_data
41
39
  }
42
40
  end
43
41
 
44
42
  def data_validation(path, required = false)
45
43
  if required
46
44
  if File.exist?(path)
47
- return true
45
+ true
48
46
  else
49
47
  abort("Invalid directory or file: #{path}")
50
48
  end
51
49
  else
52
50
  if File.exist?(path)
53
- return true
51
+ true
54
52
  else
55
- return false
53
+ false
56
54
  end
57
55
  end
58
56
  end
59
57
 
60
- def data_paths(options={})
58
+ def data_paths(options = {})
61
59
  # The path order is important for passing the var files in the correct
62
60
  # order to Terraform as that creates the hierarchy for overrides
63
61
  base = self.base(options)
@@ -67,7 +65,7 @@ module Terragov
67
65
  base[:common_project_data],
68
66
  base[:secret_common_project_data],
69
67
  base[:stack_project_data],
70
- base[:secret_project_data],
68
+ base[:secret_project_data]
71
69
  ]
72
70
  end
73
71
 
@@ -77,20 +75,20 @@ module Terragov
77
75
  $path_array << data_validation(path)
78
76
  end
79
77
 
80
- unless $path_array.include? true
81
- puts "Files checked: "
78
+ if $path_array.include? true
79
+ return true
80
+ else
81
+ puts 'Files checked: '
82
82
  paths.each do |path|
83
83
  puts path
84
84
  end
85
85
  return false
86
- else
87
- return true
88
86
  end
89
87
  end
90
88
 
91
- def build_command(options={})
92
- paths = self.base(options)
93
- abort("Cannot find main repository") unless data_validation(paths[:terraform_dir], true)
89
+ def build_command(options = {})
90
+ paths = base(options)
91
+ abort('Cannot find main repository') unless data_validation(paths[:terraform_dir], true)
94
92
  var_paths = data_paths(options)
95
93
  abort("Can't find any var files") unless check_var_files(var_paths)
96
94
 
@@ -107,9 +105,9 @@ module Terragov
107
105
  end
108
106
  # If defining additional Terraform commands, they need to be passed in as one string,
109
107
  # with any hyphens escaped twice so it does not conflict with commander CLI options
110
- extra = options["extra"].to_s
111
- $full_vars << extra.gsub('\\', '')
112
- return $full_vars.join(" ")
108
+ extra = options['extra'].to_s
109
+ $full_vars << extra.delete('\\')
110
+ $full_vars.join(' ')
113
111
  end
114
112
  end
115
113
  end
@@ -3,28 +3,32 @@ require 'highline'
3
3
 
4
4
  module Terragov
5
5
  class Cleaner
6
- def delete(path, pattern, force=false)
7
- files = Find.find(path).grep(pattern)
6
+ def delete(path, patterns = [], force = false)
7
+ patterns.each do |pattern|
8
+ puts path
8
9
 
9
- if files.empty?
10
- puts "No files found matching #{pattern} in #{path}"
11
- exit
12
- end
10
+ files = Find.find(path).grep(pattern)
13
11
 
14
- puts "Files matching #{pattern} found:"
12
+ if files.empty?
13
+ puts "No files found matching #{pattern} in #{path}"
14
+ next
15
+ end
15
16
 
16
- files.each do |file|
17
- puts File.expand_path(file)
18
- end
17
+ puts "Files matching #{pattern} found:"
19
18
 
20
- unless force
21
- exit unless HighLine.agree('Do you wish to delete?')
22
- end
19
+ files.each do |file|
20
+ puts File.expand_path(file)
21
+ end
22
+
23
+ unless force
24
+ next unless HighLine.agree('Do you wish to delete?')
25
+ end
23
26
 
24
- files.each do |file|
25
- File.delete(File.expand_path(file))
27
+ files.each do |file|
28
+ File.delete(File.expand_path(file))
29
+ end
30
+ puts 'Done'
26
31
  end
27
- puts "Done"
28
32
  end
29
33
  end
30
34
  end
data/lib/terragov/cli.rb CHANGED
@@ -16,27 +16,27 @@ module Terragov
16
16
  program :version, Terragov::VERSION
17
17
  program :description, 'Wrapper for GOV.UK Terraform deployments.'
18
18
 
19
- global_option('-c', "--config-file FILE", 'Specify a config file. Has less precedence than environment variables, which in turn have less precedence than CLI options') do |config_file|
19
+ global_option('-c', '--config-file FILE', 'Specify a config file. Has less precedence than environment variables, which in turn have less precedence than CLI options') do |config_file|
20
20
  $config_file = config_file
21
21
  end
22
22
 
23
- global_option('-d', "--data-dir DIRECTORY", String, 'Location of the data directory') do |data_dir|
23
+ global_option('-d', '--data-dir DIRECTORY', String, 'Location of the data directory') do |data_dir|
24
24
  $data_dir = data_dir
25
25
  end
26
26
 
27
- global_option( '-e', '--environment STRING', String, 'Select environment') do |environment|
27
+ global_option('-e', '--environment STRING', String, 'Select environment') do |environment|
28
28
  $environment = environment
29
29
  end
30
30
 
31
- global_option( '-p', '--project STRING', String, 'Name of the project') do |project|
31
+ global_option('-p', '--project STRING', String, 'Name of the project') do |project|
32
32
  $project = project
33
33
  end
34
34
 
35
- global_option( '-r', '--repo-dir DIRECTORY', String, 'Location of the main terraform repository') do |repo_dir|
35
+ global_option('-r', '--repo-dir DIRECTORY', String, 'Location of the main terraform repository') do |repo_dir|
36
36
  $repo_dir = repo_dir
37
37
  end
38
38
 
39
- global_option( '-s', '--stack STRING', String, 'Name of the stack') do |stack|
39
+ global_option('-s', '--stack STRING', String, 'Name of the stack') do |stack|
40
40
  $stack = stack
41
41
  end
42
42
 
@@ -58,23 +58,23 @@ module Terragov
58
58
  end
59
59
 
60
60
  def data_dir
61
- return $data_dir ? $data_dir : false
61
+ $data_dir ? $data_dir : false
62
62
  end
63
63
 
64
64
  def environment
65
- return $environment ? $environment : false
65
+ $environment ? $environment : false
66
66
  end
67
67
 
68
68
  def project
69
- return $project ? $project : false
69
+ $project ? $project : false
70
70
  end
71
71
 
72
72
  def repo_dir
73
- return $repo_dir ? $repo_dir : false
73
+ $repo_dir ? $repo_dir : false
74
74
  end
75
75
 
76
76
  def stack
77
- return $stack ? $stack : false
77
+ $stack ? $stack : false
78
78
  end
79
79
 
80
80
  def extra
@@ -82,26 +82,26 @@ module Terragov
82
82
  end
83
83
 
84
84
  def verbose
85
- return true ? $verbose : false
85
+ true ? $verbose : false
86
86
  end
87
87
 
88
88
  def dryrun
89
- return true ? $dryrun : false
89
+ true ? $dryrun : false
90
90
  end
91
91
 
92
92
  def skip_git_check
93
- return true ? $skip_git_check : false
93
+ true ? $skip_git_check : false
94
94
  end
95
95
 
96
96
  def load_config_file
97
97
  if $config_file || ENV['TERRAGOV_CONFIG_FILE']
98
98
  file = $config_file || ENV['TERRAGOV_CONFIG_FILE']
99
99
  $values = YAML.load_file(File.expand_path(file))
100
- return $values
100
+ $values
101
101
  end
102
102
  end
103
103
 
104
- def config(option, file=false, required=true)
104
+ def config(option, file = false, required = true)
105
105
  env_var = "TERRAGOV_#{option.upcase}"
106
106
  error_message = "Must set #{option}. Use --help for details."
107
107
  if public_send(option)
@@ -117,18 +117,18 @@ module Terragov
117
117
  return ENV[env_var]
118
118
  end
119
119
  elsif !load_config_file.nil?
120
- unless load_config_file[option].nil?
121
- if file
122
- return File.expand_path(load_config_file[option])
123
- else
124
- return load_config_file[option]
125
- end
126
- else
120
+ if load_config_file[option].nil?
127
121
  if required
128
122
  abort(error_message)
129
123
  else
130
124
  return false
131
125
  end
126
+ else
127
+ if file
128
+ return File.expand_path(load_config_file[option])
129
+ else
130
+ return load_config_file[option]
131
+ end
132
132
  end
133
133
  else
134
134
  if required
@@ -141,19 +141,19 @@ module Terragov
141
141
 
142
142
  def cmd_options
143
143
  cmd_options_hash = {
144
- "environment" => config('environment'),
145
- "data_dir" => config('data_dir', true),
146
- "project" => config('project'),
147
- "stack" => config('stack'),
148
- "repo_dir" => config('repo_dir', true),
149
- "extra" => extra,
144
+ 'environment' => config('environment'),
145
+ 'data_dir' => config('data_dir', true),
146
+ 'project' => config('project'),
147
+ 'stack' => config('stack'),
148
+ 'repo_dir' => config('repo_dir', true),
149
+ 'extra' => extra
150
150
  }
151
- return cmd_options_hash
151
+ cmd_options_hash
152
152
  end
153
153
 
154
- def git_compare_repo_and_data(skip=false)
154
+ def git_compare_repo_and_data(skip = false)
155
155
  git_helper = Terragov::Git.new
156
- # FIXME this is confusing as we want to check the repository git status from
156
+ # FIXME: this is confusing as we want to check the repository git status from
157
157
  # the root, but the "data" directory is one level down in the repository
158
158
  repo_dir_root = cmd_options['repo_dir']
159
159
  data_dir_root = File.expand_path(File.join(cmd_options['data_dir'], '../'))
@@ -162,8 +162,8 @@ module Terragov
162
162
  data_dir_branch = git_helper.branch_name(data_dir_root)
163
163
 
164
164
  branches = {
165
- "repo_dir" => repo_dir_branch,
166
- "data_dir" => data_dir_branch,
165
+ 'repo_dir' => repo_dir_branch,
166
+ 'data_dir' => data_dir_branch
167
167
  }
168
168
 
169
169
  unless skip
@@ -175,7 +175,7 @@ module Terragov
175
175
 
176
176
  unless git_helper.compare_branch(repo_dir_root, data_dir_root)
177
177
  puts "Warning: repo_dir(#{repo_dir_branch}) and data_dir(#{data_dir_branch}) on different branches"
178
- exit unless HighLine.agree("Do you wish to continue?")
178
+ exit unless HighLine.agree('Do you wish to continue?')
179
179
  end
180
180
  end
181
181
  end
@@ -190,16 +190,12 @@ module Terragov
190
190
 
191
191
  do_dryrun = config('dryrun', false, false)
192
192
 
193
- skip_check = config('skip_git_check', false, false)
193
+ skip_check = config('skip_git_check', false, false)
194
194
  git_compare_repo_and_data(skip_check)
195
195
 
196
- if be_verbose
197
- puts cmd_options.to_yaml
198
- end
196
+ puts cmd_options.to_yaml if be_verbose
199
197
 
200
- if opt
201
- cmd = "#{cmd} #{opt}"
202
- end
198
+ cmd = "#{cmd} #{opt}" if opt
203
199
  Terragov::Terraform.new.execute(cmd, varfiles, backend, project_dir, do_dryrun, be_verbose)
204
200
  end
205
201
 
@@ -207,8 +203,7 @@ module Terragov
207
203
  command :plan do |c|
208
204
  c.syntax = 'terragov plan'
209
205
  c.description = 'Runs a plan of your code'
210
- c.action do |args, options|
211
-
206
+ c.action do |_args, _options|
212
207
  run_terraform_cmd(c.name)
213
208
  end
214
209
  end
@@ -216,8 +211,7 @@ module Terragov
216
211
  command :apply do |c|
217
212
  c.syntax = 'terragov apply'
218
213
  c.description = 'Apply your code'
219
- c.action do |args, options|
220
-
214
+ c.action do |_args, _options|
221
215
  run_terraform_cmd(c.name)
222
216
  end
223
217
  end
@@ -226,7 +220,7 @@ module Terragov
226
220
  c.syntax = 'terragov destroy'
227
221
  c.description = 'Destroy your selected project'
228
222
  c.option '--force', 'Force destroy'
229
- c.action do |args, options|
223
+ c.action do |_args, options|
230
224
  if options.force
231
225
  run_terraform_cmd("#{c.name} -force")
232
226
  else
@@ -239,12 +233,19 @@ module Terragov
239
233
  c.syntax = 'terragov clean'
240
234
  c.description = 'Clean your directory of any files terraform may have left lying around'
241
235
  c.option '--force', 'Force removal of files'
242
- c.action do |args, options|
236
+ c.action do |_args, options|
243
237
  if config('verbose', false, false)
244
238
  puts "Selecting directory #{repo_dir}"
245
239
  end
246
240
 
247
- Terragov::Cleaner.new.delete(repo_dir, /terraform\.tfstate\.backup/, options.force)
241
+ files_to_delete = [
242
+ /\.terraform/,
243
+ /terraform\.tfstate\.backup/,
244
+ ]
245
+
246
+ path = config('repo_dir', true)
247
+
248
+ Terragov::Cleaner.new.delete(path, files_to_delete, options.force)
248
249
  end
249
250
  end
250
251
 
data/lib/terragov/git.rb CHANGED
@@ -8,18 +8,13 @@ module Terragov
8
8
  exit unless HighLine.agree("#{directory} not a git repository, do you wish to continue?")
9
9
  end
10
10
 
11
- branch = ::Git.open(directory).current_branch
11
+ branch = ::Git.open(directory).current_branch
12
12
 
13
- return branch
13
+ branch
14
14
  end
15
15
 
16
16
  def compare_branch(dir_a, dir_b)
17
- if branch_name(dir_a) == branch_name(dir_b)
18
- return true
19
- else
20
- return false
21
- end
17
+ branch_name(dir_a) == branch_name(dir_b)
22
18
  end
23
-
24
19
  end
25
20
  end
@@ -1,19 +1,18 @@
1
1
  module Terragov
2
2
  class Terraform
3
-
4
3
  def package_check(package)
5
4
  unless system("which #{package} >/dev/null")
6
5
  abort("Must install #{package}") unless HighLine.agree("Can't find #{package}. Install using Homebrew?")
7
- if system("which brew >/dev/null")
6
+ if system('which brew >/dev/null')
8
7
  system("brew install #{package}")
9
8
  else
10
- abort("Error: cannot find brew")
9
+ abort('Error: cannot find brew')
11
10
  end
12
11
  end
13
12
  end
14
13
 
15
- def execute(command, vars, backend, directory, dryrun=false, verbose=false)
16
- packages = [ 'terraform', 'sops' ]
14
+ def execute(command, vars, backend, directory, dryrun = false, verbose = false)
15
+ packages = %w[terraform sops]
17
16
 
18
17
  packages.each do |pkg|
19
18
  package_check(pkg)
@@ -29,23 +28,21 @@ module Terragov
29
28
 
30
29
  full_command = "bash -c 'terraform #{command} #{vars}'"
31
30
 
32
- if dryrun
33
- puts full_command
34
- else
35
- puts "#{command} command: #{full_command}" if verbose
36
- abort("There was an issue running the command") unless system(full_command)
37
- end
31
+ run(full_command, dryrun, verbose)
38
32
  end
39
33
 
40
- def init(backend_file, dryrun=false, verbose=false)
34
+ def init(backend_file, dryrun = false, verbose = false)
41
35
  init_cmd = "terraform init -backend-config #{backend_file}"
36
+ run(init_cmd, dryrun, verbose)
37
+ end
38
+
39
+ def run(command, dryrun = false, verbose = false)
42
40
  if dryrun
43
- puts init_cmd
41
+ puts command
44
42
  else
45
- puts "init command: #{init_cmd}" if verbose
46
- abort("Issue running: terraform init -backend-config #{backend_file}") unless system(init_cmd)
43
+ puts command if verbose
44
+ abort("There was an issue running the command: #{command}") unless system(full_command)
47
45
  end
48
46
  end
49
-
50
47
  end
51
48
  end
@@ -1,3 +1,3 @@
1
1
  module Terragov
2
- VERSION = "0.2.3"
2
+ VERSION = '0.2.4'.freeze
3
3
  end
data/terragov.gemspec CHANGED
@@ -1,34 +1,36 @@
1
- # coding: utf-8
1
+
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'terragov/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "terragov"
7
+ spec.name = 'terragov'
8
8
  spec.version = Terragov::VERSION
9
- spec.authors = ["Laura Martin"]
10
- spec.email = ["surminus@gmail.com"]
9
+ spec.authors = ['Laura Martin']
10
+ spec.email = ['surminus@gmail.com']
11
11
 
12
- spec.summary = "Wrapper for GOV.UK Terraform deployments."
13
- spec.description = "GOV.UK deploy infrastructure using Terraform. This is a wrapper to help deployments."
14
- spec.homepage = "https://github.com/surminus/terragov"
15
- spec.license = "MIT"
12
+ spec.summary = 'Wrapper for GOV.UK Terraform deployments.'
13
+ spec.description = 'GOV.UK deploy infrastructure using Terraform. This is a wrapper to help deployments.'
14
+ spec.homepage = 'https://github.com/surminus/terragov'
15
+ spec.license = 'MIT'
16
16
 
17
17
  spec.required_ruby_version = '>= 2.2.2'
18
18
 
19
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
20
  f.match(%r{^(test|spec|features)/})
21
21
  end
22
22
  spec.executables = ['terragov']
23
- spec.require_paths = ["lib"]
23
+ spec.require_paths = ['lib']
24
24
 
25
- spec.add_runtime_dependency "commander"
26
- spec.add_runtime_dependency "git"
25
+ spec.add_runtime_dependency 'commander'
26
+ spec.add_runtime_dependency 'git'
27
27
 
28
- spec.add_development_dependency "bundler"
29
- spec.add_development_dependency "rake", "~> 10.5"
30
- spec.add_development_dependency "rspec", "~> 3.6"
31
- spec.add_development_dependency "pry"
32
- spec.add_development_dependency "simplecov", ">= 0.8.2"
28
+ spec.add_development_dependency 'bundler'
29
+ spec.add_development_dependency 'rake', '~> 10.5'
30
+ spec.add_development_dependency 'rspec', '~> 3.6'
31
+ spec.add_development_dependency 'rspec-mocks'
32
+ spec.add_development_dependency 'rubocop'
33
+ spec.add_development_dependency 'pry'
34
+ spec.add_development_dependency 'simplecov', '>= 0.8.2'
33
35
  spec.add_development_dependency 'coveralls', '>= 0.7.0'
34
36
  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.3
4
+ version: 0.2.4
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-09-23 00:00:00.000000000 Z
11
+ date: 2017-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.6'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-mocks
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: pry
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +162,7 @@ files:
134
162
  - ".gitignore"
135
163
  - ".rspec"
136
164
  - ".travis.yml"
165
+ - CHANGELOG.md
137
166
  - CODE_OF_CONDUCT.md
138
167
  - Gemfile
139
168
  - LICENSE.txt
@@ -172,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
201
  version: '0'
173
202
  requirements: []
174
203
  rubyforge_project:
175
- rubygems_version: 2.5.1
204
+ rubygems_version: 2.6.11
176
205
  signing_key:
177
206
  specification_version: 4
178
207
  summary: Wrapper for GOV.UK Terraform deployments.