From 3f6e4dbcde8db84f137288ffa89af71b64c35d85 Mon Sep 17 00:00:00 2001 From: William Johnston Date: Tue, 1 Mar 2016 09:07:42 -0600 Subject: [PATCH] Enable SignalException cop --- .rubocop.yml | 2 -- features/support/vagrant_helpers.rb | 2 +- lib/capistrano/version_validator.rb | 2 +- spec/lib/capistrano/configuration_spec.rb | 2 +- spec/support/tasks/fail.rake | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e3897daa..514f06fb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,8 +27,6 @@ Style/SpaceAfterComma: Enabled: false Style/RegexpLiteral: Enabled: false -Style/SignalException: - Enabled: false Style/PercentLiteralDelimiters: Enabled: false Style/BlockDelimiters: diff --git a/features/support/vagrant_helpers.rb b/features/support/vagrant_helpers.rb index 9a30d116..a42fdb23 100644 --- a/features/support/vagrant_helpers.rb +++ b/features/support/vagrant_helpers.rb @@ -28,7 +28,7 @@ module VagrantHelpers if (status = vagrant_cli_command("ssh -c #{command.inspect}")).success? true else - fail VagrantSSHCommandError, status + raise VagrantSSHCommandError, status end end end diff --git a/lib/capistrano/version_validator.rb b/lib/capistrano/version_validator.rb index 59861dfa..0c9843f0 100644 --- a/lib/capistrano/version_validator.rb +++ b/lib/capistrano/version_validator.rb @@ -8,7 +8,7 @@ module Capistrano if match? self else - fail "Capfile locked at #{version}, but #{current_version} is loaded" + raise "Capfile locked at #{version}, but #{current_version} is loaded" end end diff --git a/spec/lib/capistrano/configuration_spec.rb b/spec/lib/capistrano/configuration_spec.rb index fd16e0a5..e29485b0 100644 --- a/spec/lib/capistrano/configuration_spec.rb +++ b/spec/lib/capistrano/configuration_spec.rb @@ -136,7 +136,7 @@ module Capistrano end context "block is passed to fetch" do - subject { config.fetch(:key, :default) { fail "we need this!" } } + subject { config.fetch(:key, :default) { raise "we need this!" } } it "returns the block value" do expect { subject }.to raise_error(RuntimeError) diff --git a/spec/support/tasks/fail.rake b/spec/support/tasks/fail.rake index bfa422cc..ec4092e5 100644 --- a/spec/support/tasks/fail.rake +++ b/spec/support/tasks/fail.rake @@ -1,4 +1,4 @@ -set :fail, proc { fail } +set :fail, proc { raise } before "deploy:starting", :fail do on roles :all do execute :mkdir, "-p", shared_path