rake-terraform 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWFiNjc0NjliYzBiNGEyNTUzZWUzMTIyOGIwNTM3NjUyMjkxNjAwZg==
4
+ YzQ2MGQyYjFkMTUzMGUwOTdkZGMzNzRkYmRiOTMzMjE5MGQ3NWMyNw==
5
5
  data.tar.gz: !binary |-
6
- MGU4ZTNlZDk2ODdmZWMyMGNjZjljZmY0NjUzN2YxZGNlYWMyYTkyYw==
6
+ MGNhYmQwMWM5MDIyZGRiOGQ3ZTUyNDBkZDg5NDFjZWEyY2I5ZmEwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2Q5NTdlZjk4YjNhN2NhOTE0ZTliNmU5M2VjYTUwZDRjZWI4MTcxOTUwM2Q3
10
- MjZjODg3ZTFlMmM3OTQyODU2Y2RlNjkyN2VmNzExOGU5YjgwNWI5ZWQzNTQ4
11
- NzM0MThkMTMwMjM1MDFjODQ1NjEzODg3YTZmMGJmZTg5Y2ZhMmU=
9
+ YWExY2YzZmUxNzgyYzRmOGM5N2VmZjc0M2ZjMWFkNjZlYjg4MmIzZGJiNjgw
10
+ MTFhMjFkODZlODg4ODQ2ODU5MjkwOTAwY2ViNzdhOWViZDRjOTUwMjk0NTE3
11
+ MTMyZTE4NTU2N2ZkMjFiYjJjYzBhOGQ5ZGRiN2U3YWY2YmFmYzU=
12
12
  data.tar.gz: !binary |-
13
- ZGNhYjA1Zjk1MWRjYWFlNWJhODAxMTBhMjAwYmY2MjZjNTUwNzI3ZjM5YThj
14
- N2RiNGE3MWQ1MjgwYmU3YzNlOTNiNzMxMjQ2YTEwZTBjNDNhNGU3NTE5NGIz
15
- MDcwNDczNjI4ZGNjNmZlZTlmYjEyYjZjNDY5MmQyMzBjNDgyNGY=
13
+ NzNiNmVjM2RhNGNkZmNjZWQ2NDRhYjdhNThiYWRiNGQ5Y2Q0MzgzYjY3MmY0
14
+ MjgyN2E0MmU4Y2U1OWE5ZTc4MDJkYzc2NDY5NTgzYTRiZWYwZTE4ZjQxMTNj
15
+ NmFjMTliNjkxYTM5NDgxMzcwNDU0MTk3YzM1N2Q2ZWRhNzczNTY=
@@ -6,13 +6,16 @@ namespace :terraform do
6
6
  credential_file = ENV['TERRAFORM_CREDENTIAL_FILE'] || '~/.aws/credentials'
7
7
  aws_project = ENV['TERRAFORM_AWS_PROJECT'] || 'default'
8
8
 
9
+ # Set to string 'false' instead of bool so users can more-easily override
10
+ hide_tasks = ENV['TERRAFORM_HIDE_TASKS'] || 'false'
11
+
9
12
  environments = (Dir.glob env_glob).map { |f| File.dirname f }.uniq
10
13
 
11
14
  environments.each do |env|
12
15
  short_name = File.basename env
13
16
  plan_path = File.expand_path File.join(output_base, "#{short_name}.tf")
14
17
 
15
- desc "Plan migration of #{short_name}"
18
+ desc "Plan migration of #{short_name}" if hide_tasks == 'false'
16
19
  terraform_plan "plan_#{short_name}" do |t|
17
20
  t.input_dir = env
18
21
  t.aws_project = aws_project
@@ -20,13 +23,13 @@ namespace :terraform do
20
23
  t.credentials = credential_file
21
24
  end
22
25
 
23
- desc "Execute plan for #{short_name}"
26
+ desc "Execute plan for #{short_name}" if hide_tasks == 'false'
24
27
  terraform_apply "apply_#{short_name}" do |t|
25
28
  t.plan = plan_path
26
29
  t.execution_path = env
27
30
  end
28
31
 
29
- desc "Plan and migrate #{short_name}"
32
+ desc "Plan and migrate #{short_name}" if hide_tasks == 'false'
30
33
  task short_name => %W(plan_#{short_name} apply_#{short_name})
31
34
  end
32
35
 
@@ -1,4 +1,4 @@
1
1
  # Version of the gem
2
2
  module RakeTerraform
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.6'
4
4
  end
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.license = 'MIT'
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0")
20
- spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
21
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
20
+ spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
21
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norm MacLennan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler