Commit 0ee114742bc4689c2f0d315c72185d8f52acefa2

Authored by Laust Rud Jacobsen
1 parent 9df008d6
Exists in master and in 1 other branch production

Rubocop: fail with separate arguments

.rubocop_todo.yml
... ... @@ -220,11 +220,6 @@ Style/Proc:
220 220 - 'app/models/notice.rb'
221 221 - 'app/models/problem.rb'
222 222  
223   -# Offense count: 2
224   -# Configuration parameters: EnforcedStyle, SupportedStyles.
225   -Style/RaiseArgs:
226   - Enabled: false
227   -
228 223 # Offense count: 3
229 224 # Cop supports --auto-correct.
230 225 # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
... ...
app/controllers/notices_controller.rb
... ... @@ -39,7 +39,7 @@ private
39 39 return @notice_params if @notice_params
40 40 @notice_params = params[:data] || request.raw_post
41 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 43 end
44 44 @notice_params
45 45 end
... ...
app/interactors/problem_merge.rb
... ... @@ -5,7 +5,7 @@ class ProblemMerge
5 5 problems = problems.flatten.uniq
6 6 @merged_problem = problems[0]
7 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 9 end
10 10 attr_reader :merged_problem, :child_problems
11 11  
... ...