Merge commit '82e477b184b5666fff7fb55933dce22ca2925db8' into glitch-soc/merge-upstream

Conflicts:
- `db/migrate/20180831171112_create_bookmarks.rb`:
  Upstream ran a lint fix on this file, but this file is different in
  glitch-soc because the feature was added much earlier.
  Ran the lint fix on our own version of the file.
This commit is contained in:
Claire
2023-07-12 16:03:05 +02:00
458 changed files with 1117 additions and 853 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Post deployment migrations are included by default. This file must be loaded
# before other initializers as Rails may otherwise memoize a list of migrations
# excluding the post deployment migrations.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
ActiveModelSerializers.config.tap do |config|
config.default_includes = '**'
end

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Log cache errors with Rail's logger
# This used to be the default in old Rails versions: https://github.com/rails/rails/commit/7fcf8590e788cef8b64cc266f75931c418902ca9#diff-f0748f0be8a653eea13369ebb1cadabcad71ede7cfaf20282447e64329817befL86
Rails.cache.logger = Rails.logger

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
enabled = ENV['ES_ENABLED'] == 'true'
host = ENV.fetch('ES_HOST') { 'localhost' }
port = ENV.fetch('ES_PORT') { 9200 }

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Define an application-wide content security policy
# For further information see the following documentation
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Avoid CORS issues when API is called from the frontend app.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'devise/strategies/authenticatable'
Warden::Manager.after_set_user except: :fetch do |user, warden|

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Doorkeeper.configure do
# Change the ORM that doorkeeper will use (needs plugins)
orm :active_record

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
if String.method_defined?(:blank_as?)
class String
alias blank? blank_as?

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
if ENV['FFMPEG_BINARY'].present?
FFMPEG.ffmpeg_binary = ENV['FFMPEG_BINARY']
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.configure do
config.x.http_client_proxy = {}

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
HttpLog.configure do |config|
config.logger = Rails.logger
config.color = { color: :yellow }

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
ActionMailer::MailDeliveryJob.class_eval do
discard_on ActiveJob::DeserializationError
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Mime::Type.register 'application/json', :json, %w(text/x-json application/jsonrequest application/jrd+json application/activity+json application/ld+json)

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
Oj.default_options = { mode: :compat, time_format: :ruby, use_to_json: true }

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.config.middleware.use OmniAuth::Builder do
# Vanilla omniauth strategies
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'open-uri'
module OpenURI

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Define an application-wide HTTP permissions policy. For further
# information see https://developers.google.com/web/updates/2018/06/feature-policy
#

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
PgHero.show_migrations = Rails.env.development?

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Since Rails 6.1, ActionView adds preload links for javascript files
# in the Links header per default.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative '../../lib/mastodon/premailer_webpack_strategy'
Premailer::Rails.config.merge!(remove_ids: true,

View File

@@ -5,9 +5,9 @@ require 'doorkeeper/grape/authorization_decorator'
class Rack::Attack
class Request
def authenticated_token
return @token if defined?(@token)
return @authenticated_token if defined?(@authenticated_token)
@token = Doorkeeper::OAuth::Token.authenticate(
@authenticated_token = Doorkeeper::OAuth::Token.authenticate(
Doorkeeper::Grape::AuthorizationDecorator.new(self),
*Doorkeeper.configuration.access_token_methods
)

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
ActiveSupport::Notifications.subscribe(/rack_attack/) do |_name, _start, _finish, _request_id, payload|
req = payload[:request]

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
Redis.sadd_returns_boolean = false

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store,

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Use this setup block to configure all options available in SimpleForm.
module AppendComponent

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'stoplight'
Rails.application.reloader.to_prepare do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Rack
class Request
def trusted_proxy?(ip)

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Twitter::TwitterText
class Configuration
def emoji_parsing_enabled

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
WebAuthn.configure do |config|
# This value needs to match `window.location.origin` evaluated by
# the User Agent during registration and authentication ceremonies.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which