Merge remote-tracking branch 'parent/main' into upstream-20241119
This commit is contained in:
commit
055045981f
221 changed files with 2006 additions and 1127 deletions
|
@ -8,7 +8,6 @@ module Mastodon
|
|||
class LengthValidationError < ValidationError; end
|
||||
class DimensionsValidationError < ValidationError; end
|
||||
class StreamValidationError < ValidationError; end
|
||||
class FilterValidationError < ValidationError; end
|
||||
class RaceConditionError < Error; end
|
||||
class RateLimitExceededError < Error; end
|
||||
class SyntaxError < Error; end
|
||||
|
|
|
@ -45,12 +45,7 @@ module Mastodon::CLI
|
|||
end
|
||||
|
||||
other_domains = []
|
||||
if options[:with_dns_records]
|
||||
Resolv::DNS.open do |dns|
|
||||
dns.timeouts = 5
|
||||
other_domains = dns.getresources(@email_domain_block.domain, Resolv::DNS::Resource::IN::MX).to_a
|
||||
end
|
||||
end
|
||||
other_domains = DomainResource.new(domain).mx if options[:with_dns_records]
|
||||
|
||||
email_domain_block = EmailDomainBlock.new(domain: domain, other_domains: other_domains)
|
||||
email_domain_block.save!
|
||||
|
|
|
@ -76,7 +76,7 @@ module Mastodon::CLI
|
|||
def self_destruct_value
|
||||
Rails
|
||||
.application
|
||||
.message_verifier('self-destruct')
|
||||
.message_verifier(SelfDestructHelper::VERIFY_PURPOSE)
|
||||
.generate(Rails.configuration.x.local_domain)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -122,6 +122,10 @@ module Mastodon
|
|||
end
|
||||
end
|
||||
|
||||
def source_commit
|
||||
ENV.fetch('SOURCE_COMMIT', nil)
|
||||
end
|
||||
|
||||
def user_agent
|
||||
@user_agent ||= "Mastodon/#{Version} (#{HTTP::Request::USER_AGENT}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
|
||||
end
|
||||
|
|
|
@ -52,6 +52,7 @@ module Paperclip
|
|||
# implement. If cropping ever becomes necessary for other situations, this will
|
||||
# need to be expanded.
|
||||
crop_width = crop_height = [target_width, target_height].min if @target_geometry&.square?
|
||||
crop_width = crop_height = "'min(iw,ih)'" if crop_width == 'ih'
|
||||
|
||||
filter = begin
|
||||
if @crop
|
||||
|
|
10
lib/tasks/annotate_rb.rake
Normal file
10
lib/tasks/annotate_rb.rake
Normal file
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# This rake task was added by annotate_rb gem.
|
||||
|
||||
# Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this
|
||||
if Rails.env.development? && ENV['ANNOTATERB_SKIP_ON_DB_TASKS'].nil?
|
||||
require 'annotate_rb'
|
||||
|
||||
AnnotateRb::Core.load_rake_tasks
|
||||
end
|
|
@ -1,46 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
if Rails.env.development?
|
||||
task :set_annotation_options do
|
||||
Annotate.set_defaults(
|
||||
'routes' => 'false',
|
||||
'models' => 'true',
|
||||
'position_in_routes' => 'before',
|
||||
'position_in_class' => 'before',
|
||||
'position_in_test' => 'before',
|
||||
'position_in_fixture' => 'before',
|
||||
'position_in_factory' => 'before',
|
||||
'position_in_serializer' => 'before',
|
||||
'show_foreign_keys' => 'false',
|
||||
'show_indexes' => 'false',
|
||||
'simple_indexes' => 'false',
|
||||
'model_dir' => 'app/models',
|
||||
'root_dir' => '',
|
||||
'include_version' => 'false',
|
||||
'require' => '',
|
||||
'exclude_tests' => 'true',
|
||||
'exclude_fixtures' => 'true',
|
||||
'exclude_factories' => 'true',
|
||||
'exclude_serializers' => 'true',
|
||||
'exclude_scaffolds' => 'true',
|
||||
'exclude_controllers' => 'true',
|
||||
'exclude_helpers' => 'true',
|
||||
'ignore_model_sub_dir' => 'false',
|
||||
'ignore_columns' => nil,
|
||||
'ignore_routes' => nil,
|
||||
'ignore_unknown_models' => 'false',
|
||||
'hide_limit_column_types' => 'integer,boolean',
|
||||
'skip_on_db_migrate' => 'false',
|
||||
'format_bare' => 'true',
|
||||
'format_rdoc' => 'false',
|
||||
'format_markdown' => 'false',
|
||||
'sort' => 'false',
|
||||
'force' => 'false',
|
||||
'trace' => 'false',
|
||||
'wrapper_open' => nil,
|
||||
'wrapper_close' => nil
|
||||
)
|
||||
end
|
||||
|
||||
Annotate.load_tasks
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue