From 86643d99789002eca3f064f3450fe48dcd316753 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 18 Jan 2016 09:12:29 -0800 Subject: Autofixing Style/PercentLiteralDelimeters See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book. --- spec/functional/resource/deploy_revision_spec.rb | 24 ++++++++++++------------ spec/functional/resource/user/useradd_spec.rb | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'spec/functional') diff --git a/spec/functional/resource/deploy_revision_spec.rb b/spec/functional/resource/deploy_revision_spec.rb index 8b888ddf6a..c9f17f9702 100644 --- a/spec/functional/resource/deploy_revision_spec.rb +++ b/spec/functional/resource/deploy_revision_spec.rb @@ -193,7 +193,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do it "restarts the application" do expect(File).to exist(rel_path("current/restart.txt")) - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev}) end it "is marked as updated" do @@ -214,7 +214,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:latest_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev deploy_to_previous_rev deploy_to_latest_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev deploy_to_previous_rev deploy_to_latest_rev_again}) end it "is marked updated" do @@ -248,7 +248,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do it "restarts the application" do expect(File).to exist(rel_path("current/restart.txt")) - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev}) end it "is marked as updated" do @@ -265,7 +265,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:latest_rev) it "does not restart the app" do - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev}) end it "is not marked updated" do @@ -283,7 +283,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:latest_rev) it "restarts the app" do - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev deploy_to_latest_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev deploy_to_latest_rev_again}) end it "is marked updated" do @@ -301,7 +301,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:latest_rev) it "restarts the application after the new deploy" do - expect(actual_operations_order).to eq(%w[deploy_to_previous_rev deploy_to_latest_rev]) + expect(actual_operations_order).to eq(%w{deploy_to_previous_rev deploy_to_latest_rev}) end it "is marked updated" do @@ -324,7 +324,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:latest_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_latest_rev deploy_to_previous_rev deploy_to_latest_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_latest_rev deploy_to_previous_rev deploy_to_latest_rev_again}) end it "is marked updated" do @@ -349,7 +349,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:previous_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_previous_rev deploy_to_latest_rev deploy_to_latest_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_previous_rev deploy_to_latest_rev deploy_to_latest_rev_again}) end it "is marked updated" do @@ -392,7 +392,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:previous_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_previous_rev deploy_to_latest_rev deploy_to_previous_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_previous_rev deploy_to_latest_rev deploy_to_previous_rev_again}) end it "is marked updated" do @@ -437,7 +437,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:second_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_second_rev deploy_to_previous_rev deploy_to_previous_rev_again deploy_to_latest_rev deploy_to_latest_rev_again]) + expect(actual_operations_order).to eq(%w{deploy_to_second_rev deploy_to_previous_rev deploy_to_previous_rev_again deploy_to_latest_rev deploy_to_latest_rev_again}) end it "is marked updated" do @@ -474,7 +474,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do the_app_is_deployed_at_revision(:second_rev) it "restarts the application after rolling back" do - expect(actual_operations_order).to eq(%w[deploy_to_second_rev deploy_to_previous_rev deploy_to_second_rev_again deploy_to_latest_rev deploy_to_second_rev_again_again]) + expect(actual_operations_order).to eq(%w{deploy_to_second_rev deploy_to_previous_rev deploy_to_second_rev_again deploy_to_latest_rev deploy_to_second_rev_again_again}) end it "is marked updated" do @@ -689,7 +689,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do end it "runs migrations in between the before_migrate and before_symlink steps" do - expect(actual_operations_order).to eq(%w[before_migrate migration before_symlink before_restart after_restart]) + expect(actual_operations_order).to eq(%w{before_migrate migration before_symlink before_restart after_restart}) end end diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb index 5ab6a403da..9335aa8505 100644 --- a/spec/functional/resource/user/useradd_spec.rb +++ b/spec/functional/resource/user/useradd_spec.rb @@ -644,7 +644,7 @@ describe Chef::Provider::User::Useradd, metadata do context "and has no password" do # TODO: platform_family should be setup in spec_helper w/ tags - if %w[suse opensuse].include?(OHAI_SYSTEM["platform_family"]) + if %w{suse opensuse}.include?(OHAI_SYSTEM["platform_family"]) # suse gets this right: it "errors out trying to unlock the user" do expect(@error).to be_a(Mixlib::ShellOut::ShellCommandFailed) -- cgit v1.2.1