Skip to content

Commit

Permalink
Merge branch 'glitch-soc:main' into reactions-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby authored Oct 10, 2023
2 parents b93eaff + 9af2483 commit 18dbc81
Show file tree
Hide file tree
Showing 157 changed files with 2,201 additions and 1,980 deletions.
4 changes: 0 additions & 4 deletions .bundler-audit.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
hard: -1

libretranslate:
image: libretranslate/libretranslate:v1.3.11
image: libretranslate/libretranslate:v1.3.12
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ jobs:
ports:
- 6379:6379

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.13
search:
image: ${{ matrix.search-image }}
env:
discovery.type: single-node
xpack.security.enabled: false
Expand Down Expand Up @@ -313,6 +313,11 @@ jobs:
- '3.0'
- '3.1'
- '.ruby-version'
search-image:
- docker.elastic.co/elasticsearch/elasticsearch:7.17.13
include:
- ruby-version: '.ruby-version'
search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
# Ignore Vagrant files
.vagrant/

# Ignore Capistrano customizations
/config/deploy/*

# Ignore IDE files
.vscode/
.idea/
Expand Down
16 changes: 5 additions & 11 deletions .haml-lint_todo.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-07-20 09:47:50 -0400 using Haml-Lint version 0.48.0.
# on 2023-10-03 08:32:28 -0400 using Haml-Lint version 0.51.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of Haml-Lint, may require this file to be generated again.

linters:
# Offense count: 951
# Offense count: 944
LineLength:
enabled: false

# Offense count: 22
UnnecessaryStringOutput:
enabled: false

# Offense count: 57
# Offense count: 44
RuboCop:
enabled: false

Expand All @@ -26,22 +26,16 @@ linters:
- 'app/views/admin/reports/show.html.haml'
- 'app/views/disputes/strikes/show.html.haml'

# Offense count: 32
# Offense count: 15
InstanceVariables:
exclude:
- 'app/views/admin/reports/_actions.html.haml'
- 'app/views/admin/roles/_form.html.haml'
- 'app/views/admin/webhooks/_form.html.haml'
- 'app/views/auth/registrations/_status.html.haml'
- 'app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml'
- 'app/views/authorize_interactions/_post_follow_actions.html.haml'
- 'app/views/invites/_form.html.haml'
- 'app/views/relationships/_account.html.haml'
- 'app/views/shared/_og.html.haml'

# Offense count: 3
# Offense count: 2
IdNames:
exclude:
- 'app/views/authorize_interactions/error.html.haml'
- 'app/views/oauth/authorizations/error.html.haml'
- 'app/views/shared/_error_messages.html.haml'
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.7
20.8
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
# Ignore Vagrant files
.vagrant/

# Ignore Capistrano customizations
/config/deploy/*

# Ignore IDE files
.vscode/
.idea/
Expand Down
7 changes: 1 addition & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ AllCops:
- 'Vagrantfile'
- 'vendor/**/*'
- 'lib/json_ld/*' # Generated files
- 'lib/mastodon/migration_helpers.rb' # Vendored from GitLab
- 'lib/templates/**/*'

# Reason: Prefer Hashes without extreme indentation
Expand Down Expand Up @@ -75,12 +76,6 @@ Metrics/AbcSize:
- 'lib/mastodon/cli/*.rb'
- db/*migrate/**/*

# Reason:
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocknesting
Metrics/BlockNesting:
Exclude:
- 'lib/mastodon/cli/*.rb'

# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricscyclomaticcomplexity
Metrics/CyclomaticComplexity:
Expand Down
39 changes: 0 additions & 39 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,13 @@ Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Exclude:
- 'config/initializers/cors.rb'
- 'config/initializers/session_store.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
Exclude:
- 'config/environments/production.rb'
- 'config/initializers/rack_attack.rb'
- 'config/routes.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
Layout/LeadingCommentSpace:
Exclude:
- 'config/application.rb'
- 'config/initializers/3_omniauth.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Exclude:
- 'app/models/account.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: require_no_space, require_space
Layout/SpaceInLambdaLiteral:
Exclude:
- 'config/environments/production.rb'
- 'config/initializers/content_security_policy.rb'

# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
Expand Down Expand Up @@ -291,10 +257,6 @@ RSpec/MultipleMemoizedHelpers:
RSpec/NestedGroups:
Max: 6

RSpec/PendingWithoutReason:
Exclude:
- 'spec/models/account_spec.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationController:
Exclude:
Expand Down Expand Up @@ -844,6 +806,5 @@ Style/TrailingCommaInHashLiteral:
Style/WordArray:
Exclude:
- 'app/helpers/languages_helper.rb'
- 'config/initializers/cors.rb'
- 'spec/controllers/settings/imports_controller_spec.rb'
- 'spec/models/form/import_spec.rb'
15 changes: 0 additions & 15 deletions Capfile

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.4
# This needs to be bookworm-slim because the Ruby image is built on bookworm-slim
ARG NODE_VERSION="20.7-bookworm-slim"
ARG NODE_VERSION="20.8-bookworm-slim"

FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby
FROM node:${NODE_VERSION} as build
Expand Down
6 changes: 0 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ group :development do
# Linter CLI for HAML files
gem 'haml_lint', require: false

# Deployment automation
gem 'capistrano', '~> 3.17'
gem 'capistrano-rails', '~> 1.6'
gem 'capistrano-rbenv', '~> 2.2'
gem 'capistrano-yarn', '~> 2.0'

# Validate missing i18n keys
gem 'i18n-tasks', '~> 1.0', require: false
end
Expand Down
47 changes: 10 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ GEM
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.13)
actionpack (>= 4.1, < 7.1)
activemodel (>= 4.1, < 7.1)
active_model_serializers (0.10.14)
actionpack (>= 4.1)
activemodel (>= 4.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (7.0.8)
Expand All @@ -112,8 +112,6 @@ GEM
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
airbrussh (1.4.1)
sshkit (>= 1.6.1, != 1.7.0)
android_key_attestation (0.3.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
Expand Down Expand Up @@ -175,21 +173,6 @@ GEM
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
capistrano (3.17.3)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.1.0)
capistrano (~> 3.1)
capistrano-rails (1.6.3)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rbenv (2.2.0)
capistrano (~> 3.1)
sshkit (~> 1.3)
capistrano-yarn (2.0.2)
capistrano (~> 3.0)
capybara (3.39.2)
addressable
matrix
Expand Down Expand Up @@ -324,7 +307,7 @@ GEM
ruby-progressbar (~> 1.4)
globalid (1.1.0)
activesupport (>= 5.0)
haml (6.1.2)
haml (6.2.0)
temple (>= 0.8.2)
thor
tilt
Expand All @@ -333,8 +316,8 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.50.0)
haml (>= 4.0, < 6.2)
haml_lint (0.51.0)
haml (>= 4.0)
parallel (~> 1.10)
rainbow
rubocop (>= 1.0)
Expand Down Expand Up @@ -473,11 +456,8 @@ GEM
net-protocol
net-protocol (0.2.1)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-protocol
net-ssh (7.1.0)
nio4r (2.5.9)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
Expand Down Expand Up @@ -640,7 +620,7 @@ GEM
sidekiq (>= 5, < 8)
rspec-support (3.12.1)
rspec_chunked (0.6)
rubocop (1.56.3)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand Down Expand Up @@ -691,7 +671,7 @@ GEM
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
sidekiq (6.5.9)
sidekiq (6.5.10)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
Expand Down Expand Up @@ -726,9 +706,6 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sshkit (1.21.5)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.25)
statsd-ruby (1.5.0)
stoplight (3.0.2)
Expand All @@ -747,7 +724,7 @@ GEM
climate_control (>= 0.0.3, < 1.0)
test-prof (1.2.3)
thor (1.2.2)
tilt (2.2.0)
tilt (2.3.0)
timeout (0.4.0)
tpm-key_attestation (0.12.0)
bindata (~> 2.4)
Expand All @@ -773,7 +750,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
uri (0.12.2)
validate_email (0.1.6)
activemodel (>= 3.0)
Expand Down Expand Up @@ -829,10 +806,6 @@ DEPENDENCIES
brakeman (~> 6.0)
browser
bundler-audit (~> 0.9)
capistrano (~> 3.17)
capistrano-rails (~> 1.6)
capistrano-rbenv (~> 2.2)
capistrano-yarn (~> 2.0)
capybara (~> 3.39)
charlock_holmes (~> 0.7.7)
chewy (~> 7.3)
Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A "vulnerability in Mastodon" is a vulnerability in the code distributed through

| Version | Supported |
| ------- | ---------------- |
| 4.2.x | Yes |
| 4.1.x | Yes |
| 4.0.x | Until 2023-10-31 |
| 3.5.x | Until 2023-12-31 |
Expand Down
8 changes: 0 additions & 8 deletions app/controllers/about_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ class AboutController < ApplicationController

skip_before_action :require_functional!

before_action :set_instance_presenter

def show
expires_in(15.seconds, public: true, stale_while_revalidate: 30.seconds, stale_if_error: 1.day) unless user_signed_in?
end

private

def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
end
Loading

0 comments on commit 18dbc81

Please sign in to comment.