Skip to content

Commit

Permalink
Merge pull request #2356 from glowfic-constellation/upgrade/rubocop
Browse files Browse the repository at this point in the history
Bump Rubocop TargetRailsVersion, fix cops
  • Loading branch information
Throne3d authored Dec 27, 2024
2 parents e769f7f + 62d290a commit d67b052
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/api/v1/characters_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/models/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d67b052

Please sign in to comment.