Skip to content

Commit

Permalink
Switch to maintained fork of annotate (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp authored Nov 9, 2024
1 parent 15606f4 commit 33312f9
Show file tree
Hide file tree
Showing 90 changed files with 745 additions and 79 deletions.
58 changes: 58 additions & 0 deletions .annotaterb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
:position: before
:position_in_additional_file_patterns: before
:position_in_class: before
:position_in_factory: before
:position_in_fixture: before
:position_in_routes: before
:position_in_serializer: before
:position_in_test: before
:classified_sort: true
:exclude_controllers: true
:exclude_factories: false
:exclude_fixtures: false
:exclude_helpers: true
:exclude_scaffolds: true
:exclude_serializers: false
:exclude_sti_subclasses: false
:exclude_tests: false
:force: false
:format_markdown: false
:format_rdoc: false
:format_yard: false
:frozen: false
:ignore_model_sub_dir: false
:ignore_unknown_models: false
:include_version: false
:show_check_constraints: false
:show_complete_foreign_keys: false
:show_foreign_keys: true
:show_indexes: true
:simple_indexes: false
:sort: false
:timestamp: false
:trace: false
:with_comment: true
:with_column_comments: true
:with_table_comments: true
:active_admin: false
:command:
:debug: false
:hide_default_column_types: ''
:hide_limit_column_types: ''
:ignore_columns:
:ignore_routes:
:models: true
:routes: false
:skip_on_db_migrate: false
:target_action: :do_annotations
:wrapper:
:wrapper_close:
:wrapper_open:
:classes_default_to_s: []
:additional_file_patterns: []
:model_dir:
- app/models
:require: []
:root_dir:
- ''
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ group :development, :test do
end

group :development do
gem 'annotate', '~> 3.2', require: false # Remove workaround in lib/tasks/annotate.rb when https://github.com/ctran/annotate_models/issues/696 is fixed
gem 'annotaterb', '~> 4.13', require: false
gem 'rubocop', '~> 1.68', require: false
gem 'rubocop-factory_bot', '~> 2.26', require: false
gem 'rubocop-minitest', '~> 0.36.0', require: false
Expand Down
8 changes: 3 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
annotaterb (4.13.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
Expand Down Expand Up @@ -293,7 +291,7 @@ PLATFORMS

DEPENDENCIES
active_model_serializers (~> 0.10)
annotate (~> 3.2)
annotaterb (~> 4.13)
bcrypt (~> 3.1)
bootsnap (~> 1.18.4)
brakeman
Expand Down Expand Up @@ -324,4 +322,4 @@ RUBY VERSION
ruby 3.3.0p0

BUNDLED WITH
2.5.11
2.5.16
9 changes: 9 additions & 0 deletions app/models/album.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
# updated_at :datetime not null
# image_id :bigint
#
# Indexes
#
# index_albums_on_image_id (image_id) UNIQUE
# index_albums_on_normalized_title (normalized_title)
#
# Foreign Keys
#
# fk_rails_... (image_id => images.id)
#

class Album < ApplicationRecord
include HasImage
Expand Down
12 changes: 12 additions & 0 deletions app/models/album_artist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
# album_id :bigint not null
# artist_id :bigint not null
#
# Indexes
#
# index_album_artists_on_album_id (album_id)
# index_album_artists_on_album_id_and_artist_id_and_name (album_id,artist_id,name) UNIQUE
# index_album_artists_on_artist_id (artist_id)
# index_album_artists_on_normalized_name (normalized_name)
#
# Foreign Keys
#
# fk_rails_... (album_id => albums.id)
# fk_rails_... (artist_id => artists.id)
#

class AlbumArtist < ApplicationRecord
include HasNormalized
Expand Down
11 changes: 11 additions & 0 deletions app/models/album_label.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
# album_id :bigint not null
# label_id :bigint not null
#
# Indexes
#
# index_album_labels_on_album_id (album_id)
# index_album_labels_on_album_id_and_label_id (album_id,label_id) UNIQUE
# index_album_labels_on_label_id (label_id)
#
# Foreign Keys
#
# fk_rails_... (album_id => albums.id)
# fk_rails_... (label_id => labels.id)
#

class AlbumLabel < ApplicationRecord
belongs_to :album
Expand Down
9 changes: 9 additions & 0 deletions app/models/artist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
# updated_at :datetime not null
# image_id :bigint
#
# Indexes
#
# index_artists_on_image_id (image_id) UNIQUE
# index_artists_on_normalized_name (normalized_name)
#
# Foreign Keys
#
# fk_rails_... (image_id => images.id)
#

class Artist < ApplicationRecord
include HasImage
Expand Down
11 changes: 11 additions & 0 deletions app/models/audio_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
# codec_id :bigint not null
# location_id :bigint not null
#
# Indexes
#
# index_audio_files_on_codec_id (codec_id)
# index_audio_files_on_location_id (location_id)
# index_audio_files_on_location_id_and_filename (location_id,filename) UNIQUE
#
# Foreign Keys
#
# fk_rails_... (codec_id => codecs.id)
# fk_rails_... (location_id => locations.id)
#

class AudioFile < ApplicationRecord
class FailedTranscode < StandardError; end
Expand Down
9 changes: 9 additions & 0 deletions app/models/auth_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
# device_id :string not null
# user_id :bigint not null
#
# Indexes
#
# index_auth_tokens_on_device_id (device_id) UNIQUE
# index_auth_tokens_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#

class AuthToken < ApplicationRecord
belongs_to :user
Expand Down
4 changes: 4 additions & 0 deletions app/models/codec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# extension :string not null
# mimetype :string not null
#
# Indexes
#
# index_codecs_on_extension (extension) UNIQUE
#

class Codec < ApplicationRecord
has_many :audio_files, dependent: :restrict_with_error
Expand Down
9 changes: 9 additions & 0 deletions app/models/codec_conversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
# name :string not null
# resulting_codec_id :bigint not null
#
# Indexes
#
# index_codec_conversions_on_name (name) UNIQUE
# index_codec_conversions_on_resulting_codec_id (resulting_codec_id)
#
# Foreign Keys
#
# fk_rails_... (resulting_codec_id => codecs.id)
#

class CodecConversion < ApplicationRecord
belongs_to :resulting_codec, class_name: 'Codec'
Expand Down
4 changes: 4 additions & 0 deletions app/models/cover_filename.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# id :bigint not null, primary key
# filename :string not null
#
# Indexes
#
# index_cover_filenames_on_filename (filename) UNIQUE
#

class CoverFilename < ApplicationRecord
validates :filename, presence: true, uniqueness: true
Expand Down
5 changes: 5 additions & 0 deletions app/models/genre.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
# name :string not null
# normalized_name :string not null
#
# Indexes
#
# index_genres_on_name (name) UNIQUE
# index_genres_on_normalized_name (normalized_name)
#

class Genre < ApplicationRecord
include HasNormalized
Expand Down
8 changes: 8 additions & 0 deletions app/models/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
# id :bigint not null, primary key
# image_type_id :bigint not null
#
# Indexes
#
# index_images_on_image_type_id (image_type_id)
#
# Foreign Keys
#
# fk_rails_... (image_type_id => image_types.id)
#

class Image < ApplicationRecord
has_one_attached :image
Expand Down
4 changes: 4 additions & 0 deletions app/models/image_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# extension :string not null
# mimetype :string not null
#
# Indexes
#
# index_image_types_on_extension (extension) UNIQUE
#

class ImageType < ApplicationRecord
validates :mimetype, presence: true
Expand Down
4 changes: 4 additions & 0 deletions app/models/label.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# name :string not null
# normalized_name :string not null
#
# Indexes
#
# index_labels_on_normalized_name (normalized_name)
#

class Label < ApplicationRecord
include HasNormalized
Expand Down
4 changes: 4 additions & 0 deletions app/models/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# id :bigint not null, primary key
# path :string not null
#
# Indexes
#
# index_locations_on_path (path) UNIQUE
#

class Location < ApplicationRecord
has_many :audio_files, dependent: :destroy
Expand Down
11 changes: 11 additions & 0 deletions app/models/play.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
# track_id :bigint not null
# user_id :bigint not null
#
# Indexes
#
# index_plays_on_track_id (track_id)
# index_plays_on_user_id (user_id)
# index_plays_on_user_id_and_track_id (user_id,track_id)
#
# Foreign Keys
#
# fk_rails_... (track_id => tracks.id)
# fk_rails_... (user_id => users.id)
#
class Play < ApplicationRecord
belongs_to :track
belongs_to :user
Expand Down
8 changes: 8 additions & 0 deletions app/models/playlist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
# updated_at :datetime not null
# user_id :bigint not null
#
# Indexes
#
# index_playlists_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
class Playlist < ApplicationRecord
belongs_to :user
has_many :items, class_name: 'PlaylistItem', dependent: :destroy
Expand Down
9 changes: 9 additions & 0 deletions app/models/playlist_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
# item_id :integer not null
# playlist_id :bigint not null
#
# Indexes
#
# index_playlist_items_on_playlist_id (playlist_id)
# index_playlist_items_on_playlist_id_and_item_id (playlist_id,item_id) UNIQUE
#
# Foreign Keys
#
# fk_rails_... (playlist_id => playlists.id)
#
class PlaylistItem < ApplicationRecord
belongs_to :playlist
belongs_to :item, polymorphic: true
Expand Down
8 changes: 8 additions & 0 deletions app/models/rescan_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
# warning_text :text
# location_id :bigint not null
#
# Indexes
#
# index_rescan_runners_on_location_id (location_id)
#
# Foreign Keys
#
# fk_rails_... (location_id => locations.id)
#

class RescanRunner < ApplicationRecord
belongs_to :location
Expand Down
11 changes: 11 additions & 0 deletions app/models/track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
# album_id :bigint not null
# audio_file_id :bigint
#
# Indexes
#
# index_tracks_on_album_id (album_id)
# index_tracks_on_audio_file_id (audio_file_id) UNIQUE
# index_tracks_on_normalized_title (normalized_title)
#
# Foreign Keys
#
# fk_rails_... (album_id => albums.id)
# fk_rails_... (audio_file_id => audio_files.id)
#

class Track < ApplicationRecord
include HasNormalized
Expand Down
12 changes: 12 additions & 0 deletions app/models/track_artist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
# artist_id :bigint not null
# track_id :bigint not null
#
# Indexes
#
# index_track_artists_on_artist_id (artist_id)
# index_track_artists_on_normalized_name (normalized_name)
# index_track_artists_on_track_id (track_id)
# index_track_artists_on_track_id_and_artist_id_and_name_and_role (track_id,artist_id,name,role) UNIQUE
#
# Foreign Keys
#
# fk_rails_... (artist_id => artists.id)
# fk_rails_... (track_id => tracks.id)
#

class TrackArtist < ApplicationRecord
include HasNormalized
Expand Down
Loading

0 comments on commit 33312f9

Please sign in to comment.