Skip to content

Commit

Permalink
Bump rubocop from 1.70.0 to 1.71.0 (#10707)
Browse files Browse the repository at this point in the history
* Bump rubocop from 1.70.0 to 1.71.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.70.0 to 1.71.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.70.0...v1.71.0)

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

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

* Fix v1.71 RuboCop complaint

* Shut up RuboCop instead of using 'slice'

This reverts commit 4166295.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregor Billing <[email protected]>
  • Loading branch information
dependabot[bot] and gregorbg authored Jan 27, 2025
1 parent 1e4d31f commit 1bbb6b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ GEM
rexml (>= 3.3.9)
package_json (0.1.0)
parallel (1.26.3)
parser (3.3.6.0)
parser (3.3.7.0)
ast (~> 2.4.1)
racc
pp (0.6.2)
Expand Down Expand Up @@ -656,7 +656,7 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
rubocop (1.70.0)
rubocop (1.71.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down
5 changes: 5 additions & 0 deletions app/models/competition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,12 @@ def self.search(query, params: {}, managed_by_user: nil)
reverse, field = part.match(/^(-)?(\w+)$/).captures
[field.to_sym, reverse ? :desc : :asc]
end
# rubocop:disable Style/HashSlice
# RuboCop suggests using `slice` here, which is a noble intention but breaks the order
# of sort arguments. However, this order is crucial (sorting by "name then start_date"
# is different from sorting by "start_date then name") so we insist on doing it our way.
.select { |field, _| orderable_fields.include?(field) }
# rubocop:enable Style/HashSlice
.to_h
else
order = { start_date: :desc }
Expand Down

0 comments on commit 1bbb6b6

Please sign in to comment.