Merge pull request #1731 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
This commit is contained in:
		@@ -461,7 +461,7 @@ GEM
 | 
				
			|||||||
    pry-rails (0.3.9)
 | 
					    pry-rails (0.3.9)
 | 
				
			||||||
      pry (>= 0.10.4)
 | 
					      pry (>= 0.10.4)
 | 
				
			||||||
    public_suffix (4.0.6)
 | 
					    public_suffix (4.0.6)
 | 
				
			||||||
    puma (5.6.2)
 | 
					    puma (5.6.4)
 | 
				
			||||||
      nio4r (~> 2.0)
 | 
					      nio4r (~> 2.0)
 | 
				
			||||||
    pundit (2.2.0)
 | 
					    pundit (2.2.0)
 | 
				
			||||||
      activesupport (>= 3.0.0)
 | 
					      activesupport (>= 3.0.0)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,8 +19,11 @@ module ApplicationHelper
 | 
				
			|||||||
    # is looked up from the locales definition, and rails-i18n comes with
 | 
					    # is looked up from the locales definition, and rails-i18n comes with
 | 
				
			||||||
    # values that don't seem to make much sense for many languages, so
 | 
					    # values that don't seem to make much sense for many languages, so
 | 
				
			||||||
    # override these values with a default of 3 digits of precision.
 | 
					    # override these values with a default of 3 digits of precision.
 | 
				
			||||||
    options[:precision] = 3
 | 
					    options = options.merge(
 | 
				
			||||||
    options[:strip_insignificant_zeros] = true
 | 
					      precision: 3,
 | 
				
			||||||
 | 
					      strip_insignificant_zeros: true,
 | 
				
			||||||
 | 
					      significant: true
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    number_to_human(number, **options)
 | 
					    number_to_human(number, **options)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ class ManifestSerializer < ActiveModel::Serializer
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def start_url
 | 
					  def start_url
 | 
				
			||||||
    '/web/timelines/home'
 | 
					    '/web/home'
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def scope
 | 
					  def scope
 | 
				
			||||||
@@ -69,7 +69,7 @@ class ManifestSerializer < ActiveModel::Serializer
 | 
				
			|||||||
    [
 | 
					    [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: 'New toot',
 | 
					        name: 'New toot',
 | 
				
			||||||
        url: '/web/statuses/new',
 | 
					        url: '/web/publish',
 | 
				
			||||||
        icons: [
 | 
					        icons: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            src: '/shortcuts/new-status.png',
 | 
					            src: '/shortcuts/new-status.png',
 | 
				
			||||||
@@ -91,7 +91,7 @@ class ManifestSerializer < ActiveModel::Serializer
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: 'Direct messages',
 | 
					        name: 'Direct messages',
 | 
				
			||||||
        url: '/web/timelines/direct',
 | 
					        url: '/web/conversations',
 | 
				
			||||||
        icons: [
 | 
					        icons: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            src: '/shortcuts/direct.png',
 | 
					            src: '/shortcuts/direct.png',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,6 @@ require_relative '../lib/sanitize_ext/sanitize_config'
 | 
				
			|||||||
require_relative '../lib/redis/namespace_extensions'
 | 
					require_relative '../lib/redis/namespace_extensions'
 | 
				
			||||||
require_relative '../lib/paperclip/url_generator_extensions'
 | 
					require_relative '../lib/paperclip/url_generator_extensions'
 | 
				
			||||||
require_relative '../lib/paperclip/attachment_extensions'
 | 
					require_relative '../lib/paperclip/attachment_extensions'
 | 
				
			||||||
require_relative '../lib/paperclip/storage_extensions'
 | 
					 | 
				
			||||||
require_relative '../lib/paperclip/lazy_thumbnail'
 | 
					require_relative '../lib/paperclip/lazy_thumbnail'
 | 
				
			||||||
require_relative '../lib/paperclip/gif_transcoder'
 | 
					require_relative '../lib/paperclip/gif_transcoder'
 | 
				
			||||||
require_relative '../lib/paperclip/transcoder'
 | 
					require_relative '../lib/paperclip/transcoder'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -83,6 +83,26 @@ if ENV['S3_ENABLED'] == 'true'
 | 
				
			|||||||
      s3_host_alias: ENV['S3_ALIAS_HOST'] || ENV['S3_CLOUDFRONT_HOST']
 | 
					      s3_host_alias: ENV['S3_ALIAS_HOST'] || ENV['S3_CLOUDFRONT_HOST']
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Some S3-compatible providers might not actually be compatible with some APIs
 | 
				
			||||||
 | 
					  # used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822
 | 
				
			||||||
 | 
					  if ENV['S3_FORCE_SINGLE_REQUEST'] == 'true'
 | 
				
			||||||
 | 
					    module Paperclip
 | 
				
			||||||
 | 
					      module Storage
 | 
				
			||||||
 | 
					        module S3Extensions
 | 
				
			||||||
 | 
					          def copy_to_local_file(style, local_dest_path)
 | 
				
			||||||
 | 
					            log("copying #{path(style)} to local file #{local_dest_path}")
 | 
				
			||||||
 | 
					            s3_object(style).download_file(local_dest_path, { mode: 'single_request' })
 | 
				
			||||||
 | 
					          rescue Aws::Errors::ServiceError => e
 | 
				
			||||||
 | 
					            warn("#{e} - cannot copy #{path(style)} to local file #{local_dest_path}")
 | 
				
			||||||
 | 
					            false
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Paperclip::Storage::S3.prepend(Paperclip::Storage::S3Extensions)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
elsif ENV['SWIFT_ENABLED'] == 'true'
 | 
					elsif ENV['SWIFT_ENABLED'] == 'true'
 | 
				
			||||||
  require 'fog/openstack'
 | 
					  require 'fog/openstack'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -598,7 +598,7 @@ en:
 | 
				
			|||||||
      action_taken_by: Action taken by
 | 
					      action_taken_by: Action taken by
 | 
				
			||||||
      actions:
 | 
					      actions:
 | 
				
			||||||
        delete_description_html: The reported posts will be deleted and a strike will be recorded to help you escalate on future infractions by the same account.
 | 
					        delete_description_html: The reported posts will be deleted and a strike will be recorded to help you escalate on future infractions by the same account.
 | 
				
			||||||
        mark_as_sensitive_description_html: The media in the reported posts will be marked as sensitive and a strike will be recorded to help you escalate on future refractions by the same account.
 | 
					        mark_as_sensitive_description_html: The media in the reported posts will be marked as sensitive and a strike will be recorded to help you escalate on future infractions by the same account.
 | 
				
			||||||
        other_description_html: See more options for controlling the account's behaviour and customize communication to the reported account.
 | 
					        other_description_html: See more options for controlling the account's behaviour and customize communication to the reported account.
 | 
				
			||||||
        resolve_description_html: No action will be taken against the reported account, no strike recorded, and the report will be closed.
 | 
					        resolve_description_html: No action will be taken against the reported account, no strike recorded, and the report will be closed.
 | 
				
			||||||
        silence_description_html: The profile will be visible only to those who already follow it or manually look it up, severely limiting its reach. Can always be reverted.
 | 
					        silence_description_html: The profile will be visible only to those who already follow it or manually look it up, severely limiting its reach. Can always be reverted.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,7 @@ module.exports = {
 | 
				
			|||||||
    filename: 'js/[name]-[chunkhash].js',
 | 
					    filename: 'js/[name]-[chunkhash].js',
 | 
				
			||||||
    chunkFilename: 'js/[name]-[chunkhash].chunk.js',
 | 
					    chunkFilename: 'js/[name]-[chunkhash].chunk.js',
 | 
				
			||||||
    hotUpdateChunkFilename: 'js/[id]-[hash].hot-update.js',
 | 
					    hotUpdateChunkFilename: 'js/[id]-[hash].hot-update.js',
 | 
				
			||||||
 | 
					    hashFunction: 'sha256',
 | 
				
			||||||
    path: output.path,
 | 
					    path: output.path,
 | 
				
			||||||
    publicPath: output.publicPath,
 | 
					    publicPath: output.publicPath,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,21 +0,0 @@
 | 
				
			|||||||
# frozen_string_literal: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Some S3-compatible providers might not actually be compatible with some APIs
 | 
					 | 
				
			||||||
# used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822
 | 
					 | 
				
			||||||
if ENV['S3_ENABLED'] == 'true' && ENV['S3_FORCE_SINGLE_REQUEST'] == 'true'
 | 
					 | 
				
			||||||
  module Paperclip
 | 
					 | 
				
			||||||
    module Storage
 | 
					 | 
				
			||||||
      module S3Extensions
 | 
					 | 
				
			||||||
        def copy_to_local_file(style, local_dest_path)
 | 
					 | 
				
			||||||
          log("copying #{path(style)} to local file #{local_dest_path}")
 | 
					 | 
				
			||||||
          s3_object(style).download_file(local_dest_path, { mode: 'single_request' })
 | 
					 | 
				
			||||||
        rescue Aws::Errors::ServiceError => e
 | 
					 | 
				
			||||||
          warn("#{e} - cannot copy #{path(style)} to local file #{local_dest_path}")
 | 
					 | 
				
			||||||
          false
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  Paperclip::Storage::S3.prepend(Paperclip::Storage::S3Extensions)
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user