Compare commits

...

4 Commits

Author SHA1 Message Date
Matt Jankowski
51f581e03e
Fix Rails/ReversibleMigration cop for remove (#30833)
Some checks are pending
Bundler Audit / security (push) Waiting to run
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Haml Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / pre_job (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Blocked by required conditions
Historical data migration test / test (15-alpine) (push) Blocked by required conditions
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
2024-06-26 13:51:44 +00:00
Matt Jankowski
528a7f57fa
Fix Rails/ReversibleMigration cop for change_column (#30835) 2024-06-26 13:51:11 +00:00
Claire
7a84b76bb1
Drop favicon.ico generation (#30375) 2024-06-26 13:44:08 +00:00
renovate[bot]
2b43c05a6a
chore(deps): update dependency aws-sdk-s3 to v1.154.0 (#30838)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-26 13:42:25 +00:00
11 changed files with 25 additions and 25 deletions

View File

@ -101,16 +101,16 @@ GEM
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.947.0)
aws-sdk-core (3.198.0)
aws-sdk-core (3.199.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.86.0)
aws-sdk-core (~> 3, >= 3.198.0)
aws-sdk-kms (1.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.153.0)
aws-sdk-core (~> 3, >= 3.198.0)
aws-sdk-s3 (1.154.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)

View File

@ -31,17 +31,10 @@ class SiteUpload < ApplicationRecord
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
end.freeze,
favicon: {
ico: {
format: 'ico',
geometry: '48x48#',
file_geometry_parser: FastGeometryParser,
}.freeze,
}.merge(
favicon:
FAVICON_SIZES.to_h do |size|
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
end
).freeze,
end.freeze,
thumbnail: {
'@1x': {

View File

@ -11,8 +11,6 @@
- if storage_host?
%link{ rel: 'dns-prefetch', href: storage_host }/
%link{ rel: 'icon', href: favicon_path('ico') || '/favicon.ico', type: 'image/x-icon' }/
- SiteUpload::FAVICON_SIZES.each do |size|
%link{ rel: 'icon', sizes: "#{size}x#{size}", href: favicon_path(size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/

View File

@ -23,5 +23,5 @@
<!-- Disallow any coder by default, and only enable ones required by Mastodon -->
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read | write" pattern="{JPEG,PNG,GIF,WEBP,HEIC,AVIF}" />
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO,ICO}" />
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO}" />
</policymap>

View File

@ -1,7 +1,11 @@
# frozen_string_literal: true
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
def change
def up
change_column :statuses, :uri, :string, null: true, default: nil
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
def change
def up
change_table(:statuses, bulk: true) do |t|
t.change :id, :bigint
t.change :reblog_of_id, :bigint
@ -16,4 +16,8 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
change_column :statuses_tags, :status_id, :bigint
change_column :stream_entries, :activity_id, :bigint
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -5,7 +5,7 @@ class ChangeLanguageFilterToOptOut < ActiveRecord::Migration[5.0]
remove_index :users, :allowed_languages
change_table(:users, bulk: true) do |t|
t.remove :allowed_languages
t.remove :allowed_languages, type: :string, array: true, default: [], null: false
t.column :filtered_languages, :string, array: true, default: [], null: false
end

View File

@ -1,7 +1,11 @@
# frozen_string_literal: true
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
def change
def up
change_column :statuses, :language, :string, default: nil, null: true
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -42,7 +42,6 @@ namespace :branding do
output_dest = Rails.root.join('app', 'javascript', 'icons')
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size --keep-aspect-ratio :input -o :output')
convert = Terrapin::CommandLine.new('convert', ':input :output', environment: { 'MAGICK_CONFIGURE_PATH' => nil })
favicon_sizes = [16, 32, 48]
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
@ -56,8 +55,6 @@ namespace :branding do
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
end
convert.run(input: favicons, output: Rails.public_path.join('favicon.ico'))
apple_icon_sizes.each do |size|
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png"))
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -9,7 +9,7 @@ describe 'The account show page' do
get '/@alice'
expect(head_link_icons.size).to eq(4) # One general favicon and three with sizes
expect(head_link_icons.size).to eq(3) # Three favicons with sizes
expect(head_meta_content('og:title')).to match alice.display_name
expect(head_meta_content('og:type')).to eq 'profile'