From 472d392c2963b24a6230870bc48c9447bc0d43f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 15:13:57 +0200 Subject: [PATCH] Bump rubocop-rails from 2.24.1 to 2.25.0 in the rubocop group (#570) * Bump rubocop-rails from 2.24.1 to 2.25.0 in the rubocop group Bumps the rubocop group with 1 update: [rubocop-rails](https://github.com/rubocop/rubocop-rails). Updates `rubocop-rails` from 2.24.1 to 2.25.0 - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.24.1...v2.25.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:development update-type: version-update:semver-minor dependency-group: rubocop ... Signed-off-by: dependabot[bot] * Update gemset.nix * Autocorrect * Also change played_after --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Charlotte Van Petegem --- Gemfile | 2 +- Gemfile.lock | 16 ++++++------- app/models/play.rb | 4 ++-- gemset.nix | 24 +++++++++---------- .../auth_tokens_controller_test.rb | 4 ++-- test/controllers/plays_controller_test.rb | 4 ++-- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index 1ae991c7..9377d0c7 100644 --- a/Gemfile +++ b/Gemfile @@ -51,6 +51,6 @@ group :development do gem 'annotate', '~> 3.2' # Remove workaround in lib/tasks/annotate.rb when https://github.com/ctran/annotate_models/issues/696 is fixed gem 'rubocop-factory_bot', '~> 2.25' gem 'rubocop-minitest', '~> 0.35.0' - gem 'rubocop-rails', '~> 2.24' + gem 'rubocop-rails', '~> 2.25' gem 'ruby-lsp', '~> 0.16.6' end diff --git a/Gemfile.lock b/Gemfile.lock index f2a21291..16702219 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -138,7 +138,7 @@ GEM irb (1.13.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.1) + json (2.7.2) jsonapi-renderer (0.2.2) language_server-protocol (3.17.0.3) loofah (2.22.0) @@ -172,7 +172,7 @@ GEM mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc pg (1.5.6) @@ -228,12 +228,12 @@ GEM rake (13.2.1) rdoc (6.6.3.1) psych (>= 4.0.0) - regexp_parser (2.9.0) + regexp_parser (2.9.2) reline (0.5.7) io-console (~> 0.5) rexml (3.2.8) strscan (>= 3.0.9) - rubocop (1.62.1) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -244,14 +244,14 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) rubocop-minitest (0.35.0) rubocop (>= 1.61, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.24.1) + rubocop-rails (2.25.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) @@ -309,7 +309,7 @@ DEPENDENCIES rails (~> 7.1) rubocop-factory_bot (~> 2.25) rubocop-minitest (~> 0.35.0) - rubocop-rails (~> 2.24) + rubocop-rails (~> 2.25) ruby-lsp (~> 0.16.6) simplecov (~> 0.21) tzinfo-data diff --git a/app/models/play.rb b/app/models/play.rb index e0b3a7ae..c29610b1 100644 --- a/app/models/play.rb +++ b/app/models/play.rb @@ -15,6 +15,6 @@ class Play < ApplicationRecord scope :by_album, ->(album) { where(track_id: Track.by_album(album)) } scope :by_artist, ->(artist) { where(track_id: Track.by_artist(artist)) } - scope :played_before, ->(date) { where('played_at < ?', date) } - scope :played_after, ->(date) { where('played_at > ?', date) } + scope :played_before, ->(date) { where(played_at: ...date) } + scope :played_after, ->(date) { where(played_at: date...) } end diff --git a/gemset.nix b/gemset.nix index b638cc30..934dd779 100644 --- a/gemset.nix +++ b/gemset.nix @@ -452,10 +452,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0r9jmjhg2ly3l736flk7r2al47b5c8cayh0gqkq0yhjqzc9a6zhq"; + sha256 = "0b4qsi8gay7ncmigr0pnbxyb17y3h8kavdyhsh7nrlqwr35vb60q"; type = "gem"; }; - version = "2.7.1"; + version = "2.7.2"; }; jsonapi-renderer = { groups = ["default"]; @@ -661,10 +661,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "11r6kp8wam0nkfvnwyc1fmvky102r1vcfr84vi2p1a2wa0z32j3p"; + sha256 = "0i0255l4pw6c1bc0ny98wx5qck25irinq062ijg4002mj8mydwvq"; type = "gem"; }; - version = "3.3.0.5"; + version = "3.3.1.0"; }; pg = { groups = ["default"]; @@ -873,10 +873,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ndxm0xnv27p4gv6xynk6q41irckj76q1jsqpysd9h6f86hhp841"; + sha256 = "0ik40vcv7mqigsfpqpca36hpmnx0536xa825ai5qlkv3mmkyf9ss"; type = "gem"; }; - version = "2.9.0"; + version = "2.9.2"; }; reline = { dependencies = ["io-console"]; @@ -906,10 +906,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0daamn13fbm77rdwwa4w6j6221iq6091asivgdhk6n7g398frcdf"; + sha256 = "1zkdxkhvhmxap5w2rncpmrq40dw0pbz81sa1ivsr7kh0p8j0a9x3"; type = "gem"; }; - version = "1.62.1"; + version = "1.63.5"; }; rubocop-ast = { dependencies = ["parser"]; @@ -917,10 +917,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1v3q8n48w8h809rqbgzihkikr4g3xk72m1na7s97jdsmjjq6y83w"; + sha256 = "063qgvqbyv354icl2sgx758z22wzq38hd9skc3n96sbpv0cdc1qv"; type = "gem"; }; - version = "1.31.2"; + version = "1.31.3"; }; rubocop-factory_bot = { dependencies = ["rubocop"]; @@ -950,10 +950,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06dcxrr71sn0kkw8fwh0w884zbig2ilxpkl66s7lcis9jmkggv83"; + sha256 = "13d6dmkjln887x4z161r3mnn6sqwbzawb9czk51yhrsd2n0j72pn"; type = "gem"; }; - version = "2.24.1"; + version = "2.25.0"; }; ruby-lsp = { dependencies = ["language_server-protocol" "prism" "sorbet-runtime"]; diff --git a/test/controllers/auth_tokens_controller_test.rb b/test/controllers/auth_tokens_controller_test.rb index 1e169dc9..d84c6b4e 100644 --- a/test/controllers/auth_tokens_controller_test.rb +++ b/test/controllers/auth_tokens_controller_test.rb @@ -21,7 +21,7 @@ class AuthTokensControllerTest < ActionDispatch::IntegrationTest } end - assert_response 201 + assert_response :created end test 'should not create auth_token with wrong credentials' do @@ -62,6 +62,6 @@ class AuthTokensControllerTest < ActionDispatch::IntegrationTest delete auth_token_url(auth_token) end - assert_response 204 + assert_response :no_content end end diff --git a/test/controllers/plays_controller_test.rb b/test/controllers/plays_controller_test.rb index d06fe899..21775b79 100644 --- a/test/controllers/plays_controller_test.rb +++ b/test/controllers/plays_controller_test.rb @@ -34,7 +34,7 @@ class PlaysControllerTest < ActionDispatch::IntegrationTest post plays_url, params: { play: { played_at: DateTime.current, track_id: @track.id } } end - assert_response 201 + assert_response :created assert_equal Play.first.user_id, @user.id end @@ -43,7 +43,7 @@ class PlaysControllerTest < ActionDispatch::IntegrationTest post plays_url, params: { play: { played_at: nil, track_id: @track.id } } end - assert_response 422 + assert_response :unprocessable_entity end test 'should get stats and not return play stats for other users' do