Merge remote-tracking branch 'parent/main' into upstream-20240117

This commit is contained in:
KMY 2025-01-17 16:29:11 +09:00
commit 5d79bd078c
150 changed files with 2982 additions and 1485 deletions

View file

@ -4,7 +4,7 @@ module Mastodon
module MigrationWarning
WARNING_SECONDS = 10
DEFAULT_WARNING = <<~WARNING_MESSAGE
DEFAULT_WARNING = <<~WARNING_MESSAGE.freeze
WARNING: This migration may take a *long* time for large instances.
It will *not* lock tables for any significant time, but it may run
for a very long time. We will pause for #{WARNING_SECONDS} seconds to allow you to

View file

@ -35,11 +35,11 @@ module Mastodon
end
def default_prerelease
'alpha.1'
'alpha.2'
end
def prerelease
ENV['MASTODON_VERSION_PRERELEASE'].presence || default_prerelease
version_configuration[:prerelease].presence || default_prerelease
end
def to_a_of_kmyblue
@ -63,7 +63,7 @@ module Mastodon
end
def build_metadata_of_mastodon
ENV.fetch('MASTODON_VERSION_METADATA', nil)
version_configuration[:metadata]
end
def to_a
@ -102,16 +102,16 @@ module Mastodon
end
def repository
ENV.fetch('GITHUB_REPOSITORY', 'kmycode/mastodon')
source_configuration[:repository]
end
def source_base_url
ENV.fetch('SOURCE_BASE_URL', "https://github.com/#{repository}")
source_configuration[:base_url] || "https://github.com/#{repository}"
end
# specify git tag or commit hash here
def source_tag
ENV.fetch('SOURCE_TAG', nil)
source_configuration[:tag]
end
def source_url
@ -129,5 +129,17 @@ module Mastodon
def user_agent
@user_agent ||= "Mastodon/#{Version} (#{HTTP::Request::USER_AGENT}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
end
def version_configuration
mastodon_configuration.version
end
def source_configuration
mastodon_configuration.source
end
def mastodon_configuration
Rails.configuration.x.mastodon
end
end
end