Merge pull request #3481 from openSUSE/depfu/update/rubocop-rails-2.27.0

Update rubocop-rails 2.24.1 → 2.27.0 (minor)
This commit is contained in:
Henne Vogelsang 2024-12-02 13:31:03 +01:00 committed by GitHub
commit 16c95b0fc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 12 additions and 12 deletions

View file

@ -292,7 +292,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
minitest (5.25.2)
monetize (1.13.0)
money (~> 6.12)
money (6.19.0)
@ -390,7 +390,7 @@ GEM
puma (6.4.3)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.9)
rack (2.2.10)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
@ -490,10 +490,10 @@ GEM
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.24.1)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)

View file

@ -9,8 +9,8 @@ class Conference < ApplicationRecord
resourcify :roles, dependent: :delete_all
default_scope { order('start_date DESC') }
scope :upcoming, (-> { where('end_date >= ?', Date.current) })
scope :past, (-> { where('end_date < ?', Date.current) })
scope :upcoming, (-> { where(end_date: Date.current..) })
scope :past, (-> { where(end_date: ...Date.current) })
has_paper_trail ignore: %i(updated_at guid revision events_per_week), meta: { conference_id: :id }
@ -96,7 +96,7 @@ class Conference < ApplicationRecord
after_create :create_free_ticket
after_update :delete_event_schedules
enum ticket_layout: [:portrait, :landscape]
enum :ticket_layout, [:portrait, :landscape]
##
# Checks if the user is registered to the conference

View file

@ -12,7 +12,7 @@ class Payment < ApplicationRecord
validates :user_id, presence: true
validates :conference_id, presence: true
enum status: {
enum :status, {
unpaid: 0,
success: 1,
failure: 2

View file

@ -5,7 +5,7 @@ class Survey < ActiveRecord::Base
has_many :survey_questions, dependent: :destroy
has_many :survey_submissions, dependent: :destroy
enum target: [:after_conference, :during_registration, :after_event]
enum :target, [:after_conference, :during_registration, :after_event]
validates :title, presence: true
##

View file

@ -5,7 +5,7 @@ class SurveyQuestion < ActiveRecord::Base
has_many :survey_replies, dependent: :destroy
# Order of this list should not be changed without proper action!
enum kind: [:boolean, :choice, :string, :text, :datetime, :numeric]
enum :kind, [:boolean, :choice, :string, :text, :datetime, :numeric]
ICONS = { boolean: 'circle-dot', choice: 'square-check', string: 'pen-to-square', text: 'align-left', datetime: 'clock', numeric: 'hashtag' }.freeze

View file

@ -44,7 +44,7 @@ class User < ApplicationRecord
where('last_sign_in_at > ?', Date.today - 3.months).where(is_disabled: false)
}
scope :unconfirmed, -> { where('confirmed_at IS NULL') }
scope :dead, -> { where('last_sign_in_at < ?', Date.today - 1.year) }
scope :dead, -> { where(last_sign_in_at: ...(Date.today - 1.year)) }
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,

View file

@ -35,7 +35,7 @@ include ERB::Util
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
Rails.root.glob('spec/support/**/*.rb').each { |f| require f }
RSpec.configure do |config|
# ## Mock Framework