diff --git a/.rubocop.yml b/.rubocop.yml index 73a91c1e84..eaf886c3bd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,9 @@ inherit_from: .rubocop_todo.yml AllCops: TargetRubyVersion: 3.3 - TargetRailsVersion: 7.1 + TargetRailsVersion: 8.0 + # used so rubocop doesn't edit old migrations, doesn't need to be perfectly up to date + MigratedSchemaVersion: 20241222000400 DisabledByDefault: false Exclude: - 'config/initializers/audited.rb' diff --git a/spec/controllers/api/v1/characters_controller_spec.rb b/spec/controllers/api/v1/characters_controller_spec.rb index dcc2ea3e00..b204877189 100644 --- a/spec/controllers/api/v1/characters_controller_spec.rb +++ b/spec/controllers/api/v1/characters_controller_spec.rb @@ -202,7 +202,7 @@ get :show, params: { id: character.id } expect(response).to have_http_status(200) expect(response.parsed_body['galleries'].size).to eq(1) - expect(response.parsed_body['galleries'][0]['icons'].map { |i| i['keyword'] }).to eq(['xxx', 'yyy', 'zzz']) # rubocop:disable Rails/Pluck + expect(response.parsed_body['galleries'][0]['icons'].map { |i| i['keyword'] }).to eq(['xxx', 'yyy', 'zzz']) end it "has associations when present", :show_in_doc do diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb index f09115a930..89e60304f8 100644 --- a/spec/models/tag_spec.rb +++ b/spec/models/tag_spec.rb @@ -111,7 +111,7 @@ def create_tags tags = create_tags fetched = GalleryGroup.where(id: tags.map(&:id)).select(:id).ordered_by_id.with_character_counts expect(fetched).to eq(tags) - expect(fetched.map { |x| x[:character_count] }).to eq([0, 1, 2]) # rubocop:disable Rails/Pluck + expect(fetched.map { |x| x[:character_count] }).to eq([0, 1, 2]) end it "works without with_character_counts scope" do