Skip to content

Commit

Permalink
almost fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lodewiges committed Oct 24, 2024
1 parent f719a28 commit 76ff395
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/controllers/v1/books_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def isbn_lookup # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
author = ActionView::Base.full_sanitizer.sanitize(info['authors'].to_sentence)
description = ActionView::Base.full_sanitizer.sanitize(info['description'])
cover_photo = get_cover_photo(volume['id'])
data = { title: title, author: author, description: description, isbn: isbn,
cover_photo: cover_photo }
data = { title:, author:, description:, isbn:,
cover_photo:}

Check failure on line 18 in app/controllers/v1/books_controller.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/SpaceInsideHashLiteralBraces: Space inside } missing. (https://rubystyle.guide#spaces-braces)
render json: data
end

Expand Down
3 changes: 1 addition & 2 deletions app/models/photo_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class PhotoTag < ApplicationRecord
private

def user_not_already_tagged
existing_tag = PhotoTag.where(photo_id: photo_id,
tagged_user_id: tagged_user_id).where.not(id: id).exists?
existing_tag = PhotoTag.where(photo_id:, tagged_user_id:).where.not(id:).exists?
errors.add(:tagged_user, 'has already been tagged in this photo') if existing_tag
end
end
14 changes: 7 additions & 7 deletions spec/jobs/user_archive_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@

describe 'other entities are destroyed' do
before do
create(:board_room_presence, user:)
create(:mandate, user:)
create(:transaction, user:)
create(:mail_alias, user:)
create(:membership, user:)
create(:permissions_users, user:)
create(:photo_tag, tagged_user:)
create(:board_room_presence, user: user)

Check failure on line 46 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:mandate, user: user)

Check failure on line 47 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:transaction, user: user)

Check failure on line 48 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:mail_alias, user: user)

Check failure on line 49 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:membership, user: user)

Check failure on line 50 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:permissions_users, user: user)

Check failure on line 51 in spec/jobs/user_archive_job_spec.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
create(:photo_tag, tagged_user: user)
end

it { expect { job }.to change(BoardRoomPresence, :count).by(-1) }
Expand Down

0 comments on commit 76ff395

Please sign in to comment.