Add an apply Style/RaiseArgs rubocop rule

We were already applying it most of the time.
This commit is contained in:
Javi Martín
2021-08-09 17:32:45 +02:00
parent 8979472820
commit 57d8a59d10
4 changed files with 7 additions and 4 deletions

View File

@@ -449,6 +449,9 @@ Style/PercentLiteralDelimiters:
Style/Proc: Style/Proc:
Enabled: true Enabled: true
Style/RaiseArgs:
Enabled: true
Style/RedundantFileExtensionInRequire: Style/RedundantFileExtensionInRequire:
Enabled: true Enabled: true

View File

@@ -13,7 +13,7 @@ class Management::BaseController < ActionController::Base
private private
def verify_manager def verify_manager
raise ActionController::RoutingError.new("Not Found") if current_manager.blank? raise ActionController::RoutingError, "Not Found" if current_manager.blank?
end end
def current_manager def current_manager

View File

@@ -26,7 +26,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
private private
def sign_in_with(feature, provider) def sign_in_with(feature, provider)
raise ActionController::RoutingError.new("Not Found") unless Setting["feature.#{feature}"] raise ActionController::RoutingError, "Not Found" unless Setting["feature.#{feature}"]
auth = request.env["omniauth.auth"] auth = request.env["omniauth.auth"]

View File

@@ -105,7 +105,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
def restrict_access def restrict_access
unless current_user.administrator? || current_budget.valuating? unless current_user.administrator? || current_budget.valuating?
raise CanCan::AccessDenied.new(I18n.t("valuation.budget_investments.not_in_valuating_phase")) raise CanCan::AccessDenied, I18n.t("valuation.budget_investments.not_in_valuating_phase")
end end
end end
@@ -114,7 +114,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
Budget::ValuatorAssignment.exists?(investment_id: params[:id], Budget::ValuatorAssignment.exists?(investment_id: params[:id],
valuator_id: current_user.valuator.id) valuator_id: current_user.valuator.id)
raise ActionController::RoutingError.new("Not Found") raise ActionController::RoutingError, "Not Found"
end end
def valid_price_params? def valid_price_params?