Skip to content

Commit

Permalink
Remove frozen string literal comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcraigk committed Oct 3, 2023
1 parent 6ee8c48 commit 2e86995
Show file tree
Hide file tree
Showing 193 changed files with 13 additions and 205 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Style/Documentation:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
EnforcedStyle: never
Style/HashTransformValues:
Enabled: false
Style/MissingRespondToMissing:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# frozen_string_literal: true
require_relative 'config/application'
Rails.application.load_tasks
1 change: 0 additions & 1 deletion app/controllers/ambiguity_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class AmbiguityController < ApplicationController
include Ambiguity::Date
include Ambiguity::DayOfYear
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/api_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::ApiController < ActionController::Base # rubocop:disable Rails/ApplicationController
include ApiAuth

Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/eras_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::ErasController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show, %i[id]
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/playlists_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::PlaylistsController < Api::V1::ApiController
caches_action_params :show, %i[id]

Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/search_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::SearchController < Api::V1::ApiController
def index
return respond_with_invalid_term unless results
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/shows_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::ShowsController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/songs_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::SongsController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/tags_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::TagsController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/tours_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::ToursController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/tracks_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::TracksController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/venues_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::VenuesController < Api::V1::ApiController
caches_action_params :index
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/v1/years_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Api::V1::YearsController < Api::V1::ApiController
caches_action_params :index, %i[include_show_counts]
caches_action_params :show
Expand Down
1 change: 0 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
include ApplicationHelper
protect_from_forgery
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/date.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::Date
def slug_as_date
return false if date_from_slug.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/day_of_year.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::DayOfYear
TODAY_SLUGS = %w[today today-in-history].freeze

Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/song_title.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::SongTitle
def slug_as_song
return false if song.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/tour_name.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::TourName
def slug_as_tour
return false if tour.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/venue_name.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::VenueName
def slug_as_venue
return false if venue.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/year.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::Year
def slug_as_year
return false if year_from_slug.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/ambiguity/year_range.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Ambiguity::YearRange
def slug_as_year_range
return false if year_range_from_slug.blank?
Expand Down
1 change: 0 additions & 1 deletion app/controllers/concerns/api_auth.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module ApiAuth
def require_auth
return true if phish_od? # Skip auth for legacy iOS PhishOD app
Expand Down
1 change: 0 additions & 1 deletion app/controllers/downloads_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class DownloadsController < ApplicationController
def track_info # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
return render json: { success: false } unless track
Expand Down
1 change: 0 additions & 1 deletion app/controllers/eras_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ErasController < ApplicationController
caches_action_params :index

Expand Down
1 change: 0 additions & 1 deletion app/controllers/feeds_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class FeedsController < ApplicationController
def rss
@announcements = Announcement.order(created_at: :desc)
Expand Down
1 change: 0 additions & 1 deletion app/controllers/likes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class LikesController < ApplicationController
before_action :authorize_user!

Expand Down
1 change: 0 additions & 1 deletion app/controllers/map_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class MapController < ApplicationController
def index
params[:date_start] ||= '1983-01-01'
Expand Down
1 change: 0 additions & 1 deletion app/controllers/my_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class MyController < ApplicationController
def my_shows
return unless current_user
Expand Down
1 change: 0 additions & 1 deletion app/controllers/playlists_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class PlaylistsController < ApplicationController
EMPTY_PLAYLIST = {
tracks: [],
Expand Down
1 change: 0 additions & 1 deletion app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ReportsController < ApplicationController
caches_action_params :missing_content

Expand Down
1 change: 0 additions & 1 deletion app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class SearchController < ApplicationController
def results
perform_search
Expand Down
1 change: 0 additions & 1 deletion app/controllers/songs_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class SongsController < ApplicationController
caches_action_params :index, %i[char sort]

Expand Down
1 change: 0 additions & 1 deletion app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class StaticPagesController < ApplicationController
def faq
render_xhr_without_layout
Expand Down
1 change: 0 additions & 1 deletion app/controllers/tags_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class TagsController < ApplicationController
caches_action_params :index
caches_action_params :show, %i[entity]
Expand Down
1 change: 0 additions & 1 deletion app/controllers/top_shows_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class TopShowsController < ApplicationController
caches_action_params :index

Expand Down
1 change: 0 additions & 1 deletion app/controllers/top_tracks_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class TopTracksController < ApplicationController
caches_action_params :index

Expand Down
1 change: 0 additions & 1 deletion app/controllers/venues_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class VenuesController < ApplicationController
caches_action_params :index

Expand Down
1 change: 0 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module ApplicationHelper
def clear_both
tag.div(style: 'clear: both;')
Expand Down
1 change: 0 additions & 1 deletion app/helpers/navigation_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module NavigationHelper
def global_nav(controller) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
str = ''
Expand Down
1 change: 0 additions & 1 deletion app/helpers/playlist_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module PlaylistHelper
def playlist_filter_hash
{
Expand Down
1 change: 0 additions & 1 deletion app/helpers/sort_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module SortHelper
def sort_songs_and_venues_links(item_hash)
item_hash.map do |k, v|
Expand Down
1 change: 0 additions & 1 deletion app/helpers/tag_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module TagHelper
def display_tag_instances(tag_instances, css_class = 'show_tag_container')
tag_groups =
Expand Down
1 change: 0 additions & 1 deletion app/helpers/track_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module TrackHelper
def next_gap_link(song, date) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
next_show =
Expand Down
1 change: 0 additions & 1 deletion app/models/announcement.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# frozen_string_literal: true
class Announcement < ApplicationRecord
end
1 change: 0 additions & 1 deletion app/models/api_key.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ApiKey < ApplicationRecord
scope :revoked, -> { where.not(revoked_at: nil) }
scope :not_revoked, -> { where(revoked_at: nil) }
Expand Down
1 change: 0 additions & 1 deletion app/models/application_record.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
1 change: 0 additions & 1 deletion app/models/known_date.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class KnownDate < ApplicationRecord
validates :date, uniqueness: true
validates :phishnet_url, :venue, :location, presence: true
Expand Down
1 change: 0 additions & 1 deletion app/models/like.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Like < ApplicationRecord
belongs_to :likable, polymorphic: true, counter_cache: true
belongs_to :user
Expand Down
1 change: 0 additions & 1 deletion app/models/playlist.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Playlist < ApplicationRecord
MAX_TRACKS = 100

Expand Down
1 change: 0 additions & 1 deletion app/models/playlist_bookmark.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class PlaylistBookmark < ApplicationRecord
belongs_to :playlist
belongs_to :user
Expand Down
1 change: 0 additions & 1 deletion app/models/playlist_track.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class PlaylistTrack < ApplicationRecord
belongs_to :playlist
belongs_to :track
Expand Down
1 change: 0 additions & 1 deletion app/models/show.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Show < ApplicationRecord
belongs_to :tour, counter_cache: true
belongs_to :venue, counter_cache: true
Expand Down
1 change: 0 additions & 1 deletion app/models/show_tag.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ShowTag < ApplicationRecord
belongs_to :show, counter_cache: :tags_count
belongs_to :tag, counter_cache: :shows_count
Expand Down
1 change: 0 additions & 1 deletion app/models/song.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Song < ApplicationRecord
has_many :songs_tracks, dependent: :destroy
has_many :tracks, through: :songs_tracks
Expand Down
1 change: 0 additions & 1 deletion app/models/songs_track.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class SongsTrack < ApplicationRecord
belongs_to :track
belongs_to :song, counter_cache: :tracks_count
Expand Down
1 change: 0 additions & 1 deletion app/models/tag.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Tag < ApplicationRecord
has_many :show_tags, dependent: :destroy
has_many :shows, through: :show_tags
Expand Down
1 change: 0 additions & 1 deletion app/models/tour.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Tour < ApplicationRecord
has_many :shows, dependent: :nullify

Expand Down
1 change: 0 additions & 1 deletion app/models/track.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Track < ApplicationRecord
belongs_to :show
has_many :songs_tracks, dependent: :destroy
Expand Down
1 change: 0 additions & 1 deletion app/models/track_tag.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class TrackTag < ApplicationRecord
belongs_to :track, counter_cache: :tags_count
belongs_to :tag, counter_cache: :tracks_count
Expand Down
1 change: 0 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class User < ApplicationRecord
has_many :playlists, dependent: :destroy
has_many :playlist_bookmarks, dependent: :destroy
Expand Down
1 change: 0 additions & 1 deletion app/models/venue.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class Venue < ApplicationRecord
has_many :shows, dependent: :nullify
has_many :venue_renames, dependent: :destroy
Expand Down
1 change: 0 additions & 1 deletion app/models/venue_rename.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class VenueRename < ApplicationRecord
belongs_to :venue

Expand Down
1 change: 0 additions & 1 deletion app/services/date_parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class DateParser
attr_reader :str, :date_parts

Expand Down
1 change: 0 additions & 1 deletion app/services/duration_formatter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class DurationFormatter
attr_reader :duration, :seconds, :minutes, :hours, :days, :style

Expand Down
3 changes: 1 addition & 2 deletions app/services/google_spreadsheet_fetcher.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true
class GoogleSpreadsheetFetcher
attr_reader :spreadsheet_id, :range, :has_headers

OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'
OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'.freeze
TOKEN_PATH = Rails.root.join('config/google_api.yml')

def initialize(spreadsheet_id, range, opts = {})
Expand Down
1 change: 0 additions & 1 deletion app/services/id3_tagger.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'mp3info'

class Id3Tagger
Expand Down
3 changes: 1 addition & 2 deletions app/services/jamcharts_importer.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true
class JamchartsImporter
include ActionView::Helpers::SanitizeHelper

BASE_URL = 'https://api.phish.net/v5'
BASE_URL = 'https://api.phish.net/v5'.freeze
API_KEY = ENV.fetch('PNET_API_KEY', nil)

attr_reader :api_key, :invalid_items, :missing_shows, :matched_ids
Expand Down
1 change: 0 additions & 1 deletion app/services/mp3_duration_query.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'mp3info'

class Mp3DurationQuery
Expand Down
1 change: 0 additions & 1 deletion app/services/search_service.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class SearchService
attr_reader :term

Expand Down
1 change: 0 additions & 1 deletion app/services/show_importer/cli.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'readline'

class ShowImporter::Cli
Expand Down
1 change: 0 additions & 1 deletion app/services/show_importer/filename_matcher.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ShowImporter::FilenameMatcher
attr_reader :matches, :dir

Expand Down
1 change: 0 additions & 1 deletion app/services/show_importer/orchestrator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
class ShowImporter::Orchestrator
attr_reader :fm, :date, :show_found, :path, :show_info

Expand Down
3 changes: 1 addition & 2 deletions app/services/show_importer/show_info.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true
class ShowImporter::ShowInfo
BASE_URL = 'https://api.phish.net/v5'
BASE_URL = 'https://api.phish.net/v5'.freeze
API_KEY = ENV.fetch('PNET_API_KEY', nil)

attr_reader :date, :data, :songs
Expand Down
1 change: 0 additions & 1 deletion app/services/show_importer/track_replacer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'highline'

class ShowImporter::TrackReplacer
Expand Down
1 change: 0 additions & 1 deletion app/services/syncable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
module Syncable
private

Expand Down
Loading

0 comments on commit 2e86995

Please sign in to comment.