Merge pull request #4215 from consul/dependabot/bundler/rubocop-0.93.1

Bump rubocop from 0.91.1 to 0.93.1
This commit is contained in:
Javi Martín
2021-08-10 13:15:52 +02:00
committed by GitHub
19 changed files with 52 additions and 48 deletions

View File

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

View File

@@ -26,7 +26,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
private
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"]

View File

@@ -105,7 +105,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
def restrict_access
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
@@ -114,7 +114,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
Budget::ValuatorAssignment.exists?(investment_id: params[:id],
valuator_id: current_user.valuator.id)
raise ActionController::RoutingError.new("Not Found")
raise ActionController::RoutingError, "Not Found"
end
def valid_price_params?

View File

@@ -130,9 +130,7 @@ module GlobalizeHelper
hidden_field_tag("enabled_translations[#{locale}]", (enabled ? 1 : 0))
end
def globalize(locale)
Globalize.with_locale(locale) do
yield
end
def globalize(locale, &block)
Globalize.with_locale(locale, &block)
end
end

View File

@@ -4,7 +4,7 @@ module MilestonesHelper
tag.div class: "progress",
role: "progressbar",
"aria-valuenow": "#{progress_bar.percentage}",
"aria-valuenow": progress_bar.percentage,
"aria-valuetext": "#{progress_bar.percentage}%",
"aria-valuemax": ProgressBar::RANGE.max,
"aria-valuemin": "0",

View File

@@ -1,8 +1,6 @@
module TranslatableFormHelper
def translatable_form_for(record, options = {})
form_for(record, options.merge(builder: TranslatableFormBuilder)) do |f|
yield(f)
end
def translatable_form_for(record, options = {}, &block)
form_for(record, options.merge(builder: TranslatableFormBuilder), &block)
end
def translations_interface_enabled?
@@ -48,10 +46,8 @@ module TranslatableFormHelper
end
end
def fields_for_translation(translation)
fields_for(:translations, translation, builder: TranslationsFieldsBuilder) do |f|
yield f
end
def fields_for_translation(translation, &block)
fields_for(:translations, translation, builder: TranslationsFieldsBuilder, &block)
end
def translation_for(locale)

View File

@@ -34,7 +34,7 @@ module WelcomeHelper
def calculate_carousel_size(debates, proposals, apply_offset)
offset = calculate_offset(debates, proposals, apply_offset)
centered = calculate_centered(debates, proposals)
"#{offset if offset} #{centered if centered}"
"#{offset} #{centered}"
end
def calculate_centered(debates, proposals)

View File

@@ -129,10 +129,8 @@ class Mailer < ApplicationMailer
private
def with_user(user)
I18n.with_locale(user.locale) do
yield
end
def with_user(user, &block)
I18n.with_locale(user.locale, &block)
end
def prevent_delivery_to_users_without_email