From 686113531d23f30e9973d659c456ae33eb9cff1f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 5 Feb 2016 15:00:00 -0800 Subject: autofixing whitespace cops 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment --- spec/unit/application/apply_spec.rb | 2 +- spec/unit/application/client_spec.rb | 3 +-- spec/unit/application/knife_spec.rb | 6 +++--- spec/unit/application/solo_spec.rb | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) (limited to 'spec/unit/application') diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb index 61d4150950..d7298d07fa 100644 --- a/spec/unit/application/apply_spec.rb +++ b/spec/unit/application/apply_spec.rb @@ -92,7 +92,7 @@ describe Chef::Application::Apply do end describe "when the json_attribs configuration option is specified" do - let(:json_attribs) { {"a" => "b"} } + let(:json_attribs) { { "a" => "b" } } let(:config_fetcher) { double(Chef::ConfigFetcher, :fetch_json => json_attribs) } let(:json_source) { "https://foo.com/foo.json" } diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index dc3add6fd9..b675c9384a 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -156,7 +156,7 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config describe "when the json_attribs configuration option is specified" do - let(:json_attribs) { {"a" => "b"} } + let(:json_attribs) { { "a" => "b" } } let(:config_fetcher) { double(Chef::ConfigFetcher, :fetch_json => json_attribs) } let(:json_source) { "https://foo.com/foo.json" } @@ -255,7 +255,6 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config end end - describe Chef::Application::Client, "setup_application" do before do @app = Chef::Application::Client.new diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb index ba02e44481..90ecde608e 100644 --- a/spec/unit/application/knife_spec.rb +++ b/spec/unit/application/knife_spec.rb @@ -182,7 +182,7 @@ describe Chef::Application::Knife do end it "should load the environment from the config file" do - config_file = File.join(CHEF_SPEC_DATA,"environment-config.rb") + config_file = File.join(CHEF_SPEC_DATA, "environment-config.rb") with_argv(*%W{noop knife command -c #{config_file}}) do expect(@knife).to receive(:exit).with(0) @knife.run @@ -199,7 +199,7 @@ describe Chef::Application::Knife do end it "should override the config file environment with the CLI environment" do - config_file = File.join(CHEF_SPEC_DATA,"environment-config.rb") + config_file = File.join(CHEF_SPEC_DATA, "environment-config.rb") with_argv(*%W{noop knife command -c #{config_file} -E override}) do expect(@knife).to receive(:exit).with(0) @knife.run @@ -208,7 +208,7 @@ describe Chef::Application::Knife do end it "should override the config file environment with the CLI environment regardless of order" do - config_file = File.join(CHEF_SPEC_DATA,"environment-config.rb") + config_file = File.join(CHEF_SPEC_DATA, "environment-config.rb") with_argv(*%W{noop knife command -E override -c #{config_file}}) do expect(@knife).to receive(:exit).with(0) @knife.run diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb index 0f95e9d0d6..e2de4aa7b1 100644 --- a/spec/unit/application/solo_spec.rb +++ b/spec/unit/application/solo_spec.rb @@ -87,7 +87,7 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config end describe "when the json_attribs configuration option is specified" do - let(:json_attribs) { {"a" => "b"} } + let(:json_attribs) { { "a" => "b" } } let(:config_fetcher) { double(Chef::ConfigFetcher, :fetch_json => json_attribs) } let(:json_source) { "https://foo.com/foo.json" } @@ -107,7 +107,7 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config let(:tarfile) { StringIO.new("remote_tarball_content") } let(:target_file) { StringIO.new } let(:shellout) { double(run_command: nil, error!: nil, stdout: "") } - + before do Chef::Config[:cookbook_path] = "#{Dir.tmpdir}/chef-solo/cookbooks" Chef::Config[:recipe_url] = "http://junglist.gen.nz/recipes.tgz" @@ -137,14 +137,14 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config end it "should untar the target file to the parent of the cookbook path" do - expect(Mixlib::ShellOut).to receive(:new).with("tar zxvf #{Dir.tmpdir}/chef-solo/recipes.tgz -C #{Dir.tmpdir}/chef-solo") + expect(Mixlib::ShellOut).to receive(:new).with("tar zxvf #{Dir.tmpdir}/chef-solo/recipes.tgz -C #{Dir.tmpdir}/chef-solo") app.reconfigure end end end describe "when the json_attribs and recipe_url configuration options are both specified" do - let(:json_attribs) { {"a" => "b"} } + let(:json_attribs) { { "a" => "b" } } let(:config_fetcher) { double(Chef::ConfigFetcher, :fetch_json => json_attribs) } let(:json_source) { "https://foo.com/foo.json" } -- cgit v1.2.1