File tree Expand file tree Collapse file tree 5 files changed +10
-14
lines changed
Expand file tree Collapse file tree 5 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ Stackup::RakeTasks.new("demo") do |t|
55 t . template = "template.json"
66 t . parameters = "parameters-verbose.json"
77 t . tags = {
8- "environment" => "dev" ,
9- "team" => "rea-oss"
8+ "environment" => "dev" ,
9+ "team" => "rea-oss"
1010 }
1111 t . capabilities = [
12- "CAPABILITY_IAM" ,
13- "CAPABILITY_NAMED_IAM"
12+ "CAPABILITY_IAM" ,
13+ "CAPABILITY_NAMED_IAM"
1414 ]
1515end
Original file line number Diff line number Diff line change @@ -59,9 +59,7 @@ def create(options = {})
5959 options [ :template_body ] = MultiJson . dump ( options . delete ( :template ) ) if options [ :template ]
6060 # optionally override template_body with the original template to preserve formatting (& comments in YAML)
6161 template_orig = options . delete ( :template_orig )
62- if ( options . delete ( :preserve ) )
63- options [ :template_body ] = template_orig
64- end
62+ options [ :template_body ] = template_orig if options . delete ( :preserve )
6563 options [ :parameters ] = Parameters . new ( options [ :parameters ] ) . to_a if options [ :parameters ]
6664 options [ :tags ] = normalize_tags ( options [ :tags ] ) if options [ :tags ]
6765 options [ :capabilities ] ||= [ "CAPABILITY_NAMED_IAM" ]
Original file line number Diff line number Diff line change @@ -121,9 +121,7 @@ def create_or_update(options)
121121 end
122122 # optionally override template_body with the original template to preserve formatting (& comments in YAML)
123123 template_orig = options . delete ( :template_orig )
124- if ( options . delete ( :preserve ) )
125- options [ :template_body ] = template_orig
126- end
124+ options [ :template_body ] = template_orig if options . delete ( :preserve )
127125 if ( parameters = options [ :parameters ] )
128126 options [ :parameters ] = Parameters . new ( parameters ) . to_a
129127 end
Original file line number Diff line number Diff line change 1- require ' spec_helper'
2- require ' stackup/rake_tasks'
1+ require " spec_helper"
2+ require " stackup/rake_tasks"
33
44RSpec . describe Stackup ::RakeTasks do
5- it ' can be required' do
5+ it " can be required" do
66 expect ( described_class ) . to be_truthy
77 end
88end
Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ def create_or_update
270270
271271 it "converts them to an Array, that uses symbols as keys" do
272272 expected_tags = [
273- { :key => "foo" , :value => "bar" } ,
273+ { :key => "foo" , :value => "bar" }
274274 ]
275275 create_or_update
276276 expect ( cf_client ) . to have_received ( :create_stack ) do |options |
You can’t perform that action at this time.
0 commit comments