stack_master 2.1.0 → 2.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
  SHA256:
3
- metadata.gz: 07d864d8296f8ef63b16a68d3989ad872bdccf74db2d3b83ce5091f6f9ccc8d2
4
- data.tar.gz: 1ba9e5731843eb3c0c15142d17ec194850c46eee64eb3b272b9b74724def426f
3
+ metadata.gz: 365c8c1252350564177ff9a0827024d27a7600f31c7a76503cac20accfca5e12
4
+ data.tar.gz: '088c89fe1880f1879279b66b8eb26d59e6ec723ec842c81641f7e20f457aefb7'
5
5
  SHA512:
6
- metadata.gz: 984b2b33aa71a12c5c6699308d6d801c721977b308083d93bb2e9e7e8a8d442e433c7a0cfe07a91a069091504351c186989c07df668fec445b4db0432ef1e05f
7
- data.tar.gz: a3349cbe7a82af5a9a7e044ec9a840f25e0284ac6040514b2cc3ef64db540f8ce76185084d4db74b0aab0a2af835fbf60455315412b2d1242e00b24bc1fd426f
6
+ metadata.gz: 6488da7b3d7ad2562e276246f76f2ec304c9b83c43d24469a76ccde609da290c648ac417232e42864b163dbb1b3111a06052322a8ba9037626eef7f0feb956ab
7
+ data.tar.gz: 0f7006a2c2f37f25e771727be69a5823407163ed9ac6a7970ea95a3a8ce07c25fc4f150c9a6fce46c0e5dae9219516699afd095962fdb08f745770a36eccea78
data/bin/stack_master CHANGED
@@ -10,8 +10,7 @@ end
10
10
  trap("SIGINT") { raise StackMaster::CtrlC }
11
11
 
12
12
  begin
13
- result = StackMaster::CLI.new(ARGV.dup).execute!
14
- exit !!result
13
+ StackMaster::CLI.new(ARGV.dup).execute!
15
14
  rescue StackMaster::CtrlC
16
15
  StackMaster.stdout.puts "Exiting..."
17
16
  end
@@ -206,10 +206,11 @@ module StackMaster
206
206
  region = args[0]
207
207
  end
208
208
 
209
- execute_if_allowed_account(allowed_accounts) do
209
+ success = execute_if_allowed_account(allowed_accounts) do
210
210
  StackMaster.cloud_formation_driver.set_region(region)
211
- StackMaster::Commands::Delete.perform(region, stack_name)
211
+ StackMaster::Commands::Delete.perform(region, stack_name).success?
212
212
  end
213
+ @kernel.exit false unless success
213
214
  end
214
215
  end
215
216
 
@@ -227,7 +228,7 @@ module StackMaster
227
228
  StackMaster::Config.load!(stack_file)
228
229
  rescue Errno::ENOENT => e
229
230
  say "Failed to load config file #{stack_file}"
230
- exit 1
231
+ @kernel.exit false
231
232
  end
232
233
 
233
234
  def execute_stacks_command(command, args, options)
@@ -253,7 +254,7 @@ module StackMaster
253
254
  end
254
255
  end
255
256
  end
256
- success
257
+ @kernel.exit false unless success
257
258
  end
258
259
 
259
260
  def execute_if_allowed_account(allowed_accounts, &block)
@@ -178,7 +178,7 @@ module StackMaster
178
178
  stack_name: stack_name,
179
179
  parameters: proposed_stack.aws_parameters,
180
180
  tags: proposed_stack.aws_tags,
181
- capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM'],
181
+ capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', 'CAPABILITY_AUTO_EXPAND'],
182
182
  role_arn: proposed_stack.role_arn,
183
183
  notification_arns: proposed_stack.notification_arns,
184
184
  template_method => template_value
@@ -33,7 +33,7 @@ module StackMaster
33
33
  cf.describe_stacks({stack_name: @stack_name})
34
34
  true
35
35
  rescue Aws::CloudFormation::Errors::ValidationError
36
- StackMaster.stdout.puts "Stack does not exist"
36
+ failed("Stack does not exist")
37
37
  false
38
38
  end
39
39
 
@@ -17,7 +17,7 @@ module StackMaster
17
17
  tp.set :max_width, self.window_size
18
18
  tp stack.outputs, :output_key, :output_value, :description
19
19
  else
20
- StackMaster.stdout.puts "Stack doesn't exist"
20
+ failed("Stack doesn't exist")
21
21
  end
22
22
  end
23
23
 
@@ -1,3 +1,5 @@
1
+ require 'table_print'
2
+
1
3
  module StackMaster
2
4
  module Commands
3
5
  class Resources
@@ -13,14 +15,14 @@ module StackMaster
13
15
  if stack_resources
14
16
  tp stack_resources, :logical_resource_id, :resource_type, :timestamp, :resource_status, :resource_status_reason, :description
15
17
  else
16
- StackMaster.stdout.puts "Stack doesn't exist"
18
+ failed("Stack doesn't exist")
17
19
  end
18
20
  end
19
21
 
20
22
  private
21
23
 
22
24
  def stack_resources
23
- @stack_resources = cf.describe_stack_resources(stack_name: @stack_definition.stack_name).stack_resources
25
+ @stack_resources ||= cf.describe_stack_resources(stack_name: @stack_definition.stack_name).stack_resources
24
26
  rescue Aws::CloudFormation::Errors::ValidationError
25
27
  nil
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module StackMaster
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Hodgkiss
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-06 00:00:00.000000000 Z
12
+ date: 2020-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -141,16 +141,22 @@ dependencies:
141
141
  name: commander
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "<="
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: 4.5.2
147
+ - - "<"
145
148
  - !ruby/object:Gem::Version
146
- version: 4.4.5
149
+ version: '5'
147
150
  type: :runtime
148
151
  prerelease: false
149
152
  version_requirements: !ruby/object:Gem::Requirement
150
153
  requirements:
151
- - - "<="
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 4.5.2
157
+ - - "<"
152
158
  - !ruby/object:Gem::Version
153
- version: 4.4.5
159
+ version: '5'
154
160
  - !ruby/object:Gem::Dependency
155
161
  name: aws-sdk-acm
156
162
  requirement: !ruby/object:Gem::Requirement
@@ -517,8 +523,8 @@ licenses:
517
523
  metadata:
518
524
  bug_tracker_uri: https://github.com/envato/stack_master/issues
519
525
  changelog_uri: https://github.com/envato/stack_master/blob/master/CHANGELOG.md
520
- documentation_uri: https://www.rubydoc.info/gems/stack_master/2.1.0
521
- source_code_uri: https://github.com/envato/stack_master/tree/v2.1.0
526
+ documentation_uri: https://www.rubydoc.info/gems/stack_master/2.2.0
527
+ source_code_uri: https://github.com/envato/stack_master/tree/v2.2.0
522
528
  post_install_message:
523
529
  rdoc_options: []
524
530
  require_paths:
@@ -534,7 +540,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
534
540
  - !ruby/object:Gem::Version
535
541
  version: '0'
536
542
  requirements: []
537
- rubygems_version: 3.1.2
543
+ rubygems_version: 3.0.4
538
544
  signing_key:
539
545
  specification_version: 4
540
546
  summary: StackMaster is a sure-footed way of creating, updating and keeping track