diff --git a/.rubocop.yml b/.rubocop.yml index 0e332ff6..65898a22 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -24,6 +24,10 @@ Metrics/BlockLength: Style/Documentation: Enabled: false +Rails/Exit: + Exclude: + - spec/rails_helper.rb + Lint/MissingSuper: Enabled: false diff --git a/app/views/shared/_account_logo.html.erb b/app/views/shared/_account_logo.html.erb index 69895a79..69e7741e 100644 --- a/app/views/shared/_account_logo.html.erb +++ b/app/views/shared/_account_logo.html.erb @@ -4,11 +4,10 @@ class: CSS class string forwarded to / width: pixel width (default 37) height: pixel height (default 37) %> -acc = local_assigns[:account] - klass = local_assigns[:class] - w = local_assigns.fetch(:width, '37') - h = local_assigns.fetch(:height, '37') -%> +<% acc = local_assigns[:account] + klass = local_assigns[:class] + w = local_assigns.fetch(:width, '37') + h = local_assigns.fetch(:height, '37') %> <% if acc&.logo&.attached? %> <%= image_tag rails_blob_path(acc.logo, disposition: 'inline'), class: klass, diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index ab92db03..207b243f 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -4,7 +4,7 @@ require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' ENV['TZ'] ||= 'UTC' require_relative '../config/environment' -abort('The Rails environment is running in production mode!') if Rails.env.production? # rubocop:disable Rails/Exit +abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' require 'capybara/cuprite' require 'capybara/rspec' @@ -42,7 +42,7 @@ Rails.root.glob('spec/support/**/*.rb').each { |f| require f } begin ActiveRecord::Migration.maintain_test_schema! rescue ActiveRecord::PendingMigrationError => e - abort e.to_s.strip # rubocop:disable Rails/Exit + abort e.to_s.strip end RSpec.configure do |config|