Commit 0ee114742bc4689c2f0d315c72185d8f52acefa2
1 parent
9df008d6
Exists in
master
and in
1 other branch
Rubocop: fail with separate arguments
Showing
3 changed files
with
2 additions
and
7 deletions
Show diff stats
.rubocop_todo.yml
@@ -220,11 +220,6 @@ Style/Proc: | @@ -220,11 +220,6 @@ Style/Proc: | ||
220 | - 'app/models/notice.rb' | 220 | - 'app/models/notice.rb' |
221 | - 'app/models/problem.rb' | 221 | - 'app/models/problem.rb' |
222 | 222 | ||
223 | -# Offense count: 2 | ||
224 | -# Configuration parameters: EnforcedStyle, SupportedStyles. | ||
225 | -Style/RaiseArgs: | ||
226 | - Enabled: false | ||
227 | - | ||
228 | # Offense count: 3 | 223 | # Offense count: 3 |
229 | # Cop supports --auto-correct. | 224 | # Cop supports --auto-correct. |
230 | # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. | 225 | # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. |
app/controllers/notices_controller.rb
@@ -39,7 +39,7 @@ private | @@ -39,7 +39,7 @@ private | ||
39 | return @notice_params if @notice_params | 39 | return @notice_params if @notice_params |
40 | @notice_params = params[:data] || request.raw_post | 40 | @notice_params = params[:data] || request.raw_post |
41 | if @notice_params.blank? | 41 | if @notice_params.blank? |
42 | - fail ParamsError.new('Need a data params in GET or raw post data') | 42 | + fail ParamsError, 'Need a data params in GET or raw post data' |
43 | end | 43 | end |
44 | @notice_params | 44 | @notice_params |
45 | end | 45 | end |
app/interactors/problem_merge.rb
@@ -5,7 +5,7 @@ class ProblemMerge | @@ -5,7 +5,7 @@ class ProblemMerge | ||
5 | problems = problems.flatten.uniq | 5 | problems = problems.flatten.uniq |
6 | @merged_problem = problems[0] | 6 | @merged_problem = problems[0] |
7 | @child_problems = problems[1..-1] | 7 | @child_problems = problems[1..-1] |
8 | - fail ArgumentError.new("need almost 2 uniq different problems") if @child_problems.empty? | 8 | + fail ArgumentError, "need almost 2 uniq different problems" if @child_problems.empty? |
9 | end | 9 | end |
10 | attr_reader :merged_problem, :child_problems | 10 | attr_reader :merged_problem, :child_problems |
11 | 11 |