Skip to content

Commit

Permalink
Made rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminfaure committed Jun 14, 2024
1 parent 6f7ce4c commit bda5b6e
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/models/identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def value=(val)
base += '/' unless base.ends_with?('/')
super("#{base}#{val.to_s.strip}")
else
super(val)
super
end
end
# rubocop:enable Metrics/AbcSize
Expand Down
2 changes: 1 addition & 1 deletion app/models/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def abbreviation=(value)
value = '' if value.nil?
value = value.downcase
if value.blank? || value =~ /\A[a-z]{2}\Z/i
super(value)
super
else
super(LocaleService.to_i18n(locale: value).to_s)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Org < ApplicationRecord
before_validation :check_for_missing_logo_file

# This gives all managed orgs api access whenever saved or updated.
before_save :ensure_api_access, if: ->(org) { org.managed? }
before_save :ensure_api_access, if: lambda(&:managed?)

# If the physical logo file is no longer on disk we do not want it to prevent the
# model from saving. This typically happens when you copy the database to another
Expand Down
2 changes: 1 addition & 1 deletion app/models/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Section < ApplicationRecord
def phase_id=(value)
phase = Phase.where(id: value).first
self.number = (phase.sections.where.not(id: id).maximum(:number).to_i + 1) if phase.present?
super(value)
super
end

# =====================
Expand Down
2 changes: 1 addition & 1 deletion app/models/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Template < ApplicationRecord
# overwriting the accessors. We want to ensure this template is published
# before we remove the published_version
# That being said, there's a potential race_condition where we have multiple-published-versions
after_update :reconcile_published, if: ->(template) { template.published? }
after_update :reconcile_published, if: lambda(&:published?)

# ==========
# = Scopes =
Expand Down
2 changes: 1 addition & 1 deletion app/policies/api/v0/guidance_group_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(user, guidance_group)
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
end

super(user, guidance_group)
super
end

##
Expand Down
2 changes: 1 addition & 1 deletion app/policies/api/v0/guidance_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(user, guidance)
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
end

super(user, guidance)
super
end

##
Expand Down
2 changes: 1 addition & 1 deletion app/policies/api/v0/plans_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(user, plan)
raise Pundit::NotAuthorizedError, _('must have access to plans api')
end

super(user, plan)
super
end

##
Expand Down
2 changes: 1 addition & 1 deletion app/policies/api/v0/statistics_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(user, statistic)
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
end

super(user, statistic)
super
end

##
Expand Down
2 changes: 1 addition & 1 deletion app/policies/api/v0/template_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(user, template)
raise Pundit::NotAuthorizedError, _('must have access to templates api')
end

super(user, template)
super
end

##
Expand Down
2 changes: 1 addition & 1 deletion app/policies/usage_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UsagePolicy < Struct.new(:user, :usage)
def initialize(user, usage)
raise Pundit::NotAuthorizedError, 'must be logged in' unless user

super(user, usage)
super
@user = user
end

Expand Down
6 changes: 2 additions & 4 deletions config/initializers/new_framework_defaults_7_1.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.1 framework defaults upgrade.
Expand Down Expand Up @@ -241,7 +243,6 @@
# this file):
# config.active_support.cache_format_version = 7.1


###
# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
# platform.
Expand All @@ -253,7 +254,6 @@
#++
# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor


###
# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
# platform.
Expand All @@ -265,14 +265,12 @@
#++
# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor


###
# Configure the log level used by the DebugExceptions middleware when logging
# uncaught exceptions during requests.
#++
# Rails.application.config.action_dispatch.debug_exception_log_level = :error


###
# Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
# parsers.
Expand Down

0 comments on commit bda5b6e

Please sign in to comment.