diff options
author | Erick Sasse <esasse@gmail.com> | 2015-07-18 01:20:04 -0300 |
---|---|---|
committer | Erick Sasse <esasse@gmail.com> | 2015-07-19 11:51:55 -0300 |
commit | 1bedb85afd03d5d20c1eda1e1b387feaeda0c500 (patch) | |
tree | 695995d62bdddbae110a9ae5e763ed391bf9fa2e | |
parent | 3760c0a8854ac9f52004249d94fb94e9cce5b815 (diff) | |
download | bundler-1bedb85afd03d5d20c1eda1e1b387feaeda0c500.tar.gz |
Fix Style/SignalException
-rw-r--r-- | .rubocop_todo.yml | 6 | ||||
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | lib/bundler/retry.rb | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e1ac3b73..24a617e2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -390,12 +390,6 @@ Style/RescueModifier: Enabled: false # Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SignalException: - Enabled: false - -# Offense count: 2 # Configuration parameters: Methods. Style/SingleLineBlockParams: Enabled: false @@ -265,7 +265,7 @@ begin end unless specs && sudos && realworld - fail "Spec run failed, please review the log for more information" + raise "Spec run failed, please review the log for more information" end end end diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb index c0563e34..55e57957 100644 --- a/lib/bundler/retry.rb +++ b/lib/bundler/retry.rb @@ -39,10 +39,10 @@ module Bundler @current_run += 1 @result = block.call rescue => e - fail(e) + fail_attempt(e) end - def fail(e) + def fail_attempt(e) @failed = true raise e if last_attempt? || @exceptions.any? {|k| e.is_a?(k) } return true unless name |