Skip to content

Commit

Permalink
Bump rubocop-rails from 2.25.1 to 2.26.1 (#457)
Browse files Browse the repository at this point in the history
* Bump rubocop-rails from 2.25.1 to 2.26.1

Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.25.1 to 2.26.1.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop-rails@v2.25.1...v2.26.1)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix RuboCop Rails/CompactBlank: Use compact_blank instead.

* Fix RuboCop Rails/EnumSyntax: Enum defined with keyword arguments in enum declaration. Use positional arguments instead.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niels Bennke <[email protected]>
  • Loading branch information
dependabot[bot] and nbennke authored Sep 11, 2024
1 parent a7e8a52 commit b35834c
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ GEM
faraday (>= 1, < 3)
sawyer (~> 0.9)
parallel (1.26.3)
parser (3.3.4.2)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pdfkit (0.8.7.3)
Expand Down Expand Up @@ -318,17 +318,17 @@ GEM
rgeo-activerecord (7.0.1)
activerecord (>= 5.0)
rgeo (>= 1.0.0)
rubocop (1.66.0)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
Expand All @@ -338,10 +338,10 @@ GEM
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.1)
rubocop-rails (2.26.1)
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)
ruby-progressbar (1.13.0)
ruby-vips (2.2.2)
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/issues_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def grouped_categories_for_kind(kind)
end

def status_note_templates
Config.for(:status_note_template, env: nil).select { |_k, v| v.present? }.sort
Config.for(:status_note_template, env: nil).compact_blank.sort
end

def possible_group_ids(issue)
Expand Down
4 changes: 2 additions & 2 deletions app/models/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Completion < ApplicationRecord

self.omit_field_log += %w[prev_issue_status author]

enum status: { open: 0, closed: 1, rejected: 2 }, _prefix: true
enum prev_issue_status: Issue.statuses, _prefix: true
enum :status, { open: 0, closed: 1, rejected: 2 }, prefix: true
enum :prev_issue_status, Issue.statuses, prefix: true

belongs_to :issue

Expand Down
2 changes: 1 addition & 1 deletion app/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Group < ApplicationRecord
include FullTextFilter
include Logging

enum kind: { internal: 0, external: 1, field_service_team: 2 }, _prefix: true
enum :kind, { internal: 0, external: 1, field_service_team: 2 }, prefix: true

belongs_to :main_user, class_name: 'User', optional: Settings::Group.main_user_optional

Expand Down
8 changes: 4 additions & 4 deletions app/models/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class Issue < ApplicationRecord
self.omit_field_log += %w[updated_by_auth_code_id updated_by_user_id]

with_options _prefix: true do
enum description_status: { internal: 0, external: 1, deleted: 2 }
enum priority: { low: 0, middle: 1, high: 2 }
enum status: { pending: 0, received: 1, reviewed: 2, in_process: 3, not_solvable: 4, duplicate: 5, closed: 6,
enum :description_status, { internal: 0, external: 1, deleted: 2 }
enum :priority, { low: 0, middle: 1, high: 2 }
enum :status, { pending: 0, received: 1, reviewed: 2, in_process: 3, not_solvable: 4, duplicate: 5, closed: 6,
deleted: 7 }
enum trust_level: { external: 0, internal: 1, field_service_team: 2 }
enum :trust_level, { external: 0, internal: 1, field_service_team: 2 }
end

CLOSED_STATUSES = %i[not_solvable duplicate closed deleted].freeze
Expand Down
2 changes: 1 addition & 1 deletion app/models/issue_filter/extended_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def filter_delegation(params)
end

def filter_districts(params)
return if (districts = (params[:districts] || []).select(&:present?)).blank?
return if (districts = (params[:districts] || []).compact_blank).blank?
@collection = @collection.where(districts_sql, districts)
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Job < ApplicationRecord
include Logging

enum status: { unchecked: 0, checked: 1, uncheckable: 2 }, _prefix: true
enum :status, { unchecked: 0, checked: 1, uncheckable: 2 }, prefix: true

has_one :issue, dependent: :nullify
belongs_to :group, -> { where(kind: :field_service_team) }, inverse_of: :jobs
Expand Down
2 changes: 1 addition & 1 deletion app/models/main_category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MainCategory < ApplicationRecord
has_many :categories, dependent: :destroy
has_many :sub_categories, through: :categories

enum kind: { idea: 0, problem: 1, tip: 2 }, _prefix: true
enum :kind, { idea: 0, problem: 1, tip: 2 }, prefix: true

validates :kind, :name, presence: true

Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class User < ApplicationRecord

self.omit_field_log_values += %w[password_digest password_history]

enum role: { admin: 0, regional_admin: 1, editor: 2 }, _prefix: true
enum :role, { admin: 0, regional_admin: 1, editor: 2 }, prefix: true

with_options after_add: :log_habtm_add, after_remove: :log_habtm_remove do
has_and_belongs_to_many :groups
Expand Down
2 changes: 1 addition & 1 deletion lib/consolidation_email_interceptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def delivering_email(message)

def original_recipients(message)
{ To: message.header['To'], CC: message.header['Cc'], BCC: message.header['Bcc'] }
.select { |_, v| v.present? }.map { |k, v| "#{k}: #{v}" }.join ', '
.compact_blank.map { |k, v| "#{k}: #{v}" }.join ', '
end
end
end

0 comments on commit b35834c

Please sign in to comment.