Skip to content

Commit 1f9810b

Browse files
authored
Rubocop updates (v1.73) (#418)
1 parent 251f404 commit 1f9810b

File tree

107 files changed

+287
-362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+287
-362
lines changed

.rubocop.yml

+3-55
Original file line numberDiff line numberDiff line change
@@ -4,85 +4,33 @@ inherit_gem:
44
require:
55
- rubocop-capybara
66
- rubocop-factory_bot
7+
- rubocop-rspec_rails
8+
9+
plugins:
710
- rubocop-performance
811
- rubocop-rake
912
- rubocop-rspec
10-
- rubocop-rspec_rails
1113

1214
AllCops:
13-
Exclude:
14-
- bin/*
15-
- db/**/*
16-
- vendor/**/*
17-
- lib/tasks/*
1815
NewCops: enable
1916
TargetRubyVersion: 3.4.1
2017

2118
FactoryBot/ExcessiveCreateList:
2219
Enabled: false
23-
Layout/EmptyLineAfterGuardClause:
24-
Enabled: false
25-
Layout/EmptyLineAfterMagicComment:
26-
Enabled: false
27-
Layout/LineLength:
28-
Max: 100
29-
Metrics/BlockLength:
30-
Exclude:
31-
- spec/**/*
32-
- app/api/**/*
33-
- config/routes.rb
34-
Metrics/ClassLength:
35-
Max: 250
36-
Metrics/ModuleLength:
37-
Max: 250
38-
RSpec/DescribeClass:
39-
Exclude:
40-
- spec/features/**/*
4120
RSpec/ExampleLength:
4221
Exclude:
4322
- spec/features/**/*
4423
- spec/requests/**/*
4524
RSpec/IndexedLet:
4625
Enabled: false
47-
Rails/EnvironmentVariableAccess:
48-
Enabled: false
49-
Rails/Exit:
50-
Enabled: false
51-
Rails/FilePath:
52-
Enabled: false
53-
Rails/HttpPositionalArguments:
54-
Enabled: false
55-
Rails/I18nLocaleTexts:
56-
Enabled: false
57-
Rails/SkipsModelValidations:
58-
Enabled: false
59-
RSpec/ImplicitSubject:
60-
EnforcedStyle: single_statement_only
6126
RSpec/MultipleExpectations:
6227
Exclude:
6328
- spec/features/**/*
6429
- spec/requests/**/*
6530
Max: 4
66-
Rails/Output:
67-
Enabled: false
68-
Rails/OutputSafety:
69-
Enabled: false
7031
RSpec/MultipleMemoizedHelpers:
7132
Enabled: false
7233
RSpec/NestedGroups:
7334
Max: 4
7435
RSpecRails/HaveHttpStatus: # We use Rack::MockResponse
7536
Enabled: false
76-
Style/ClassAndModuleChildren:
77-
Enabled: false
78-
Style/Documentation:
79-
Enabled: false
80-
Style/FormatStringToken:
81-
Enabled: false
82-
Style/FrozenStringLiteralComment:
83-
EnforcedStyle: never
84-
Style/HashTransformValues:
85-
Enabled: false
86-
Style/MissingRespondToMissing:
87-
Exclude:
88-
- app/services/**/*

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ group :development do
4646
gem "rubocop-capybara"
4747
gem "rubocop-factory_bot"
4848
gem "rubocop-performance"
49-
gem "rubocop-rails-omakase", require: false
5049
gem "rubocop-rake"
5150
gem "rubocop-rspec_rails"
5251
gem "rubocop-rspec"

Gemfile.lock

+4-20
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ GEM
387387
rspec-mocks (~> 3.13)
388388
rspec-support (~> 3.13)
389389
rspec-support (3.13.2)
390-
rubocop (1.72.2)
390+
rubocop (1.73.0)
391391
json (~> 2.3)
392392
language_server-protocol (~> 3.17.0.2)
393393
lint_roller (~> 1.1.0)
@@ -398,31 +398,16 @@ GEM
398398
rubocop-ast (>= 1.38.0, < 2.0)
399399
ruby-progressbar (~> 1.7)
400400
unicode-display_width (>= 2.4.0, < 4.0)
401-
rubocop-ast (1.38.0)
401+
rubocop-ast (1.38.1)
402402
parser (>= 3.3.1.0)
403403
rubocop-capybara (2.21.0)
404404
rubocop (~> 1.41)
405405
rubocop-factory_bot (2.26.1)
406406
rubocop (~> 1.61)
407-
rubocop-minitest (0.37.1)
408-
lint_roller (~> 1.1)
409-
rubocop (>= 1.72.1, < 2.0)
410-
rubocop-ast (>= 1.38.0, < 2.0)
411407
rubocop-performance (1.24.0)
412408
lint_roller (~> 1.1)
413409
rubocop (>= 1.72.1, < 2.0)
414410
rubocop-ast (>= 1.38.0, < 2.0)
415-
rubocop-rails (2.30.1)
416-
activesupport (>= 4.2.0)
417-
lint_roller (~> 1.1)
418-
rack (>= 1.1)
419-
rubocop (>= 1.72.1, < 2.0)
420-
rubocop-ast (>= 1.38.0, < 2.0)
421-
rubocop-rails-omakase (1.0.0)
422-
rubocop
423-
rubocop-minitest
424-
rubocop-performance
425-
rubocop-rails
426411
rubocop-rake (0.7.1)
427412
lint_roller (~> 1.1)
428413
rubocop (>= 1.72.1)
@@ -512,9 +497,9 @@ GEM
512497
unicode-emoji (~> 4.0, >= 4.0.4)
513498
unicode-emoji (4.0.4)
514499
uniform_notifier (1.16.0)
515-
uri (1.0.2)
500+
uri (1.0.3)
516501
useragent (0.16.11)
517-
version_gem (1.1.5)
502+
version_gem (1.1.6)
518503
waveform (0.1.3)
519504
chunky_png
520505
ruby-audio
@@ -566,7 +551,6 @@ DEPENDENCIES
566551
rubocop-capybara
567552
rubocop-factory_bot
568553
rubocop-performance
569-
rubocop-rails-omakase
570554
rubocop-rake
571555
rubocop-rspec
572556
rubocop-rspec_rails

db/migrate/20120816185619_create_tracks.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateTracks < ActiveRecord::Migration
32
def change
43
create_table :tracks do |t|

db/migrate/20120816185625_create_songs_tracks.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateSongsTracks < ActiveRecord::Migration
32
def change
43
create_table :songs_tracks do |t|

db/migrate/20120816234607_add_audio_file_field_to_track.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddAudioFileFieldToTrack < ActiveRecord::Migration
32
def up
43
add_attachment :tracks, :audio_file

db/migrate/20121107030749_create_venues.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateVenues < ActiveRecord::Migration
32
def change
43
create_table :venues do |t|

db/migrate/20121107055322_add_venue_id_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddVenueIdToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :venue_id, :integer

db/migrate/20121108010949_create_tours.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateTours < ActiveRecord::Migration
32
def change
43
create_table :tours do |t|

db/migrate/20121108011416_add_tour_id_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddTourIdToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :tour_id, :integer

db/migrate/20121111015203_add_set_to_track.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddSetToTrack < ActiveRecord::Migration
32
def change
43
add_column :tracks, :set, :string

db/migrate/20121202033002_create_albums.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateAlbums < ActiveRecord::Migration
32
def change
43
create_table :albums do |t|

db/migrate/20130223222601_add_counter_caches_to_venues_and_tours.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddCounterCachesToVenuesAndTours < ActiveRecord::Migration
32
def change
43
add_column :venues, :shows_count, :integer, default: 0

db/migrate/20130225005015_devise_create_users.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class DeviseCreateUsers < ActiveRecord::Migration
32
def change
43
create_table(:users) do |t|

db/migrate/20130225044130_add_lyrical_excerpt_to_songs.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddLyricalExcerptToSongs < ActiveRecord::Migration
32
def change
43
add_column :songs, :lyrical_excerpt, :string

db/migrate/20130302031026_create_likes.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateLikes < ActiveRecord::Migration
32
def change
43
create_table :likes do |t|

db/migrate/20130303234422_add_error_to_albums.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddErrorToAlbums < ActiveRecord::Migration
32
def change
43
add_column :albums, :error_at, :datetime

db/migrate/20130323013212_add_geocoding_to_venues.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddGeocodingToVenues < ActiveRecord::Migration
32
def change
43
add_column :venues, :latitude, :float

db/migrate/20130324014414_create_rails_admin_histories_table.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
32
def self.up
43
create_table :rails_admin_histories do |t|

db/migrate/20130330035726_add_slug_to_tracks.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddSlugToTracks < ActiveRecord::Migration
32
def change
43
add_column :tracks, :slug, :string

db/migrate/20130331022600_create_track_request.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateTrackRequest < ActiveRecord::Migration
32
def change
43
create_table :track_requests do |t|

db/migrate/20130331022752_create_album_requests.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateAlbumRequests < ActiveRecord::Migration
32
def change
43
create_table :album_requests do |t|

db/migrate/20130406004938_add_username_to_users.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddUsernameToUsers < ActiveRecord::Migration
32
def change
43
add_column :users, :username, :string, null: false, default: ''

db/migrate/20130406075115_add_completion_flags_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddCompletionFlagsToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :incomplete, :boolean, default: false

db/migrate/20130407050657_add_admin_notes_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddAdminNotesToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :admin_notes, :text

db/migrate/20130407215439_remove_location_from_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class RemoveLocationFromShows < ActiveRecord::Migration
32
def change
43
remove_column :shows, :location

db/migrate/20130414231746_change_venues.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class ChangeVenues < ActiveRecord::Migration
32
def change
43
remove_column :venues, :vague_location

db/migrate/20130415030315_add_duration_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddDurationToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :duration, :integer, null: false, default: 0

db/migrate/20130416030421_create_playlists.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreatePlaylists < ActiveRecord::Migration
32
def change
43
create_table :playlists do |t|

db/migrate/20130421233021_create_tags.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class CreateTags < ActiveRecord::Migration
32
def change
43
create_table :tags do |t|

db/migrate/20130525010829_playlist_bookmark.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class PlaylistBookmark < ActiveRecord::Migration
32
def change
43
create_table :playlist_bookmarks do |t|

db/migrate/20130526053130_add_duration_to_playlists.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddDurationToPlaylists < ActiveRecord::Migration
32
def change
43
add_column :playlists, :duration, :integer, default: 0

db/migrate/20140801220314_add_taper_notes_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddTaperNotesToShows < ActiveRecord::Migration
32
def change
43
add_column :shows, :taper_notes, :text

db/migrate/20150831021223_add_authentication_token_to_users.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddAuthenticationTokenToUsers < ActiveRecord::Migration
32
def change
43
add_column :users, :authentication_token, :string

db/migrate/20150908184304_add_counts_to_tags.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddCountsToTags < ActiveRecord::Migration
32
def change
43
add_column :tags, :shows_count, :integer, default: 0

db/migrate/20150908220110_add_priority_to_tags.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddPriorityToTags < ActiveRecord::Migration
32
def change
43
add_column :tags, :priority, :integer, default: 0

db/migrate/20151011195107_add_tags_count_to_shows_and_tracks.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddTagsCountToShowsAndTracks < ActiveRecord::Migration
32
def change
43
add_column :shows, :tags_count, :integer, default: 0

db/migrate/20151011195314_populate_tags_counts.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class PopulateTagsCounts < ActiveRecord::Migration
32
def up
43
execute 'update shows set tags_count=(select count(*) from show_tags where show_id=shows.id)'

db/migrate/20170811053628_add_alt_title_to_songs.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddAltTitleToSongs < ActiveRecord::Migration
32
def change
43
add_column :songs, :alt_title, :string

db/migrate/20181027220035_add_notes_to_tag_intersections.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddNotesToTagIntersections < ActiveRecord::Migration[5.2]
32
def change
43
add_column :show_tags, :notes, :text

db/migrate/20181028213134_add_slug_to_tags.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddSlugToTags < ActiveRecord::Migration[5.2]
32
def change
43
add_column :tags, :slug, :string

db/migrate/20181117192618_drop_album_tables.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class DropAlbumTables < ActiveRecord::Migration[5.2]
32
def change
43
drop_table :albums

db/migrate/20181117234052_drop_track_requests.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class DropTrackRequests < ActiveRecord::Migration[5.2]
32
def change
43
drop_table :track_requests

db/migrate/20181120044655_drop_rails_admin_histories.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class DropRailsAdminHistories < ActiveRecord::Migration[5.2]
32
def change
43
drop_table :rails_admin_histories

db/migrate/20181213215523_add_missing_foreign_key_indexes.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddMissingForeignKeyIndexes < ActiveRecord::Migration[5.2]
32
def change
43
add_index :songs_tracks, :song_id

db/migrate/20181214055931_add_missing_unique_indexes.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddMissingUniqueIndexes < ActiveRecord::Migration[5.2]
32
disable_ddl_transaction!
43

db/migrate/20181214071912_set_required_columns_null_false.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class SetRequiredColumnsNullFalse < ActiveRecord::Migration[5.2]
32
def change
43
change_column_null :playlists, :name, false

db/migrate/20181214074204_add_timestamps_to_tags.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddTimestampsToTags < ActiveRecord::Migration[5.2]
32
def change
43
add_column :track_tags, :starts_at_second, :integer

db/migrate/20181214080858_venue_rename.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class VenueRename < ActiveRecord::Migration[5.2]
32
def change
43
create_table :venue_renames do |t|

db/migrate/20181217065408_remove_venue_past_names.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class RemoveVenuePastNames < ActiveRecord::Migration[5.2]
32
def change
43
remove_column :venues, :past_names, :string

db/migrate/20181217070430_add_published_to_shows.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
class AddPublishedToShows < ActiveRecord::Migration[5.2]
32
def change
43
add_column :shows, :published, :boolean, null: false, default: false

0 commit comments

Comments
 (0)