Skip to content

Commit 6fd5145

Browse files
author
Danial Pearce
committed
rubocop -a
1 parent 1b1f99c commit 6fd5145

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

examples/Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
]
1515
end

lib/stackup/change_set.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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"]

lib/stackup/stack.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

spec/stackup/rake_tasks_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require 'spec_helper'
2-
require 'stackup/rake_tasks'
1+
require "spec_helper"
2+
require "stackup/rake_tasks"
33

44
RSpec.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
88
end

spec/stackup/stack_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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|

0 commit comments

Comments
 (0)