Enable frozen string literals.

Make all string literals immutable by default.
This commit is contained in:
evazion
2021-12-14 19:29:23 -06:00
parent 67b96135dd
commit a7dc05ce63
392 changed files with 786 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Admin
class UsersController < ApplicationController
def edit

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ApiKeysController < ApplicationController
before_action :requires_reauthentication
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
include Pundit
helper_method :search_params

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ArtistCommentariesController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ArtistCommentaryVersionsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ArtistUrlsController < ApplicationController
respond_to :js, :json, :xml, :html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ArtistVersionsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ArtistsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class AutocompleteController < ApplicationController
respond_to :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class BansController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class BulkUpdateRequestsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class CommentVotesController < ApplicationController
respond_to :js, :json, :xml, :html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class CommentsController < ApplicationController
respond_to :html, :xml, :json, :atom
respond_to :js, only: [:new, :update, :destroy, :undelete]

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class CountsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class DelayedJobsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class DmailsController < ApplicationController
respond_to :html, :xml, :js, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class DtextLinksController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class DtextPreviewsController < ApplicationController
def create
@inline = params[:inline].to_s.truthy?

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class EmailsController < ApplicationController
before_action :requires_reauthentication, only: [:edit, :update]
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Explore
class PostsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class FavoriteGroupOrdersController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class FavoriteGroupsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class FavoritesController < ApplicationController
respond_to :js, :json, :html, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ForumPostVotesController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ForumPostsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ForumTopicVisitsController < ApplicationController
respond_to :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ForumTopicsController < ApplicationController
respond_to :html, :xml, :json
respond_to :atom, only: [:index, :show]

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class IpAddressesController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class IpBansController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class IpGeolocationsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class IqdbQueriesController < ApplicationController
respond_to :html, :json, :xml, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class LegacyController < ApplicationController
respond_to :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Maintenance
module User
class CountFixesController < ApplicationController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Maintenance
module User
class DeletionsController < ApplicationController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Maintenance
module User
class EmailNotificationsController < ApplicationController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class MediaAssetsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class MediaMetadataController < ApplicationController
respond_to :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class MockServicesController < ApplicationController
skip_forgery_protection
respond_to :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ModActionsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ModerationReportsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Moderator
class DashboardsController < ApplicationController
def show

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Moderator
class IpAddrsController < ApplicationController
respond_to :html, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Moderator
module Post
class PostsController < ApplicationController

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class ModqueueController < ApplicationController
respond_to :html, :json, :xml
layout "sidebar"

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class NewsUpdatesController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class NotePreviewsController < ApplicationController
respond_to :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class NoteVersionsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class NotesController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PasswordResetsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PasswordsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PixivUgoiraFrameDataController < ApplicationController
respond_to :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PoolElementsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PoolOrdersController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PoolVersionsController < ApplicationController
respond_to :html, :xml, :json
before_action :check_availabililty

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PoolsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostAppealsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostApprovalsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostDisapprovalsController < ApplicationController
respond_to :js, :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostEventsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostFlagsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostRegenerationsController < ApplicationController
respond_to :xml, :json, :html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostReplacementsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostVersionsController < ApplicationController
before_action :check_availabililty
around_action :set_timeout

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostVotesController < ApplicationController
respond_to :js, :json, :xml, :html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class PostsController < ApplicationController
respond_to :html, :xml, :json, :js
layout "sidebar"

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class RateLimitsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class RecommendedPostsController < ApplicationController
respond_to :html, :json, :xml, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class RelatedTagsController < ApplicationController
respond_to :json, :xml, :js, :html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class RobotsController < ApplicationController
respond_to :text

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class SavedSearchesController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class SessionsController < ApplicationController
respond_to :html, :json
skip_forgery_protection only: :create, if: -> { !request.format.html? }

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class SourcesController < ApplicationController
respond_to :js, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class StaticController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class StatusController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class TagAliasesController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class TagImplicationsController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class TagsController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UploadsController < ApplicationController
respond_to :html, :xml, :json, :js
skip_before_action :verify_authenticity_token, only: [:preprocess]

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserEventsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserFeedbacksController < ApplicationController
respond_to :html, :xml, :json, :js

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserNameChangeRequestsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserSessionsController < ApplicationController
respond_to :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserUpgradesController < ApplicationController
respond_to :js, :html, :json, :xml

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class UsersController < ApplicationController
respond_to :html, :xml, :json

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class WebhooksController < ApplicationController
skip_forgery_protection only: :receive
rescue_with Stripe::SignatureVerificationError, status: 400

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class WikiPageVersionsController < ApplicationController
respond_to :html, :xml, :json
layout "sidebar"

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class WikiPagesController < ApplicationController
respond_to :html, :xml, :json, :js
layout "sidebar"