mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Use config_for for Mastodon::Version metadata/prerelease values (#33548)
This commit is contained in:
@@ -21,11 +21,11 @@ module Mastodon
|
||||
end
|
||||
|
||||
def prerelease
|
||||
ENV['MASTODON_VERSION_PRERELEASE'].presence || default_prerelease
|
||||
version_configuration[:prerelease].presence || default_prerelease
|
||||
end
|
||||
|
||||
def build_metadata
|
||||
ENV.fetch('MASTODON_VERSION_METADATA', nil)
|
||||
version_configuration[:metadata]
|
||||
end
|
||||
|
||||
def to_a
|
||||
@@ -77,5 +77,9 @@ 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
|
||||
Rails.configuration.x.mastodon.version
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user