Merge branch 'main' of https://git.barkshark.xyz/mirror/mastodon
This commit is contained in:
commit
5508db58ea
3
.bundler-audit.yml
Normal file
3
.bundler-audit.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ignore:
|
||||||
|
- CVE-2015-9284 # Mitigation following https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284#mitigating-in-rails-applications
|
|
@ -1,225 +0,0 @@
|
||||||
version: 2.1
|
|
||||||
|
|
||||||
orbs:
|
|
||||||
ruby: circleci/ruby@2.0.0
|
|
||||||
node: circleci/node@5.0.3
|
|
||||||
|
|
||||||
executors:
|
|
||||||
default:
|
|
||||||
parameters:
|
|
||||||
ruby-version:
|
|
||||||
type: string
|
|
||||||
docker:
|
|
||||||
- image: cimg/ruby:<< parameters.ruby-version >>
|
|
||||||
environment:
|
|
||||||
BUNDLE_JOBS: 3
|
|
||||||
BUNDLE_RETRY: 3
|
|
||||||
CONTINUOUS_INTEGRATION: true
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: root
|
|
||||||
DISABLE_SIMPLECOV: true
|
|
||||||
RAILS_ENV: test
|
|
||||||
- image: cimg/postgres:14.5
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
- image: cimg/redis:7.0
|
|
||||||
|
|
||||||
commands:
|
|
||||||
install-system-dependencies:
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: Install system dependencies
|
|
||||||
command: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libicu-dev libidn11-dev
|
|
||||||
install-ruby-dependencies:
|
|
||||||
parameters:
|
|
||||||
ruby-version:
|
|
||||||
type: string
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
command: |
|
|
||||||
bundle config clean 'true'
|
|
||||||
bundle config frozen 'true'
|
|
||||||
bundle config without 'development production'
|
|
||||||
name: Set bundler settings
|
|
||||||
- ruby/install-deps:
|
|
||||||
bundler-version: '2.3.26'
|
|
||||||
key: ruby<< parameters.ruby-version >>-gems-v1
|
|
||||||
wait-db:
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
command: dockerize -wait tcp://localhost:5432 -wait tcp://localhost:6379 -timeout 1m
|
|
||||||
name: Wait for PostgreSQL and Redis
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
docker:
|
|
||||||
- image: cimg/ruby:3.0-node
|
|
||||||
environment:
|
|
||||||
RAILS_ENV: test
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- install-system-dependencies
|
|
||||||
- install-ruby-dependencies:
|
|
||||||
ruby-version: '3.0'
|
|
||||||
- node/install-packages:
|
|
||||||
cache-version: v1
|
|
||||||
pkg-manager: yarn
|
|
||||||
- run:
|
|
||||||
command: |
|
|
||||||
export NODE_OPTIONS=--openssl-legacy-provider
|
|
||||||
./bin/rails assets:precompile
|
|
||||||
name: Precompile assets
|
|
||||||
- persist_to_workspace:
|
|
||||||
paths:
|
|
||||||
- public/assets
|
|
||||||
- public/packs-test
|
|
||||||
root: .
|
|
||||||
|
|
||||||
test:
|
|
||||||
parameters:
|
|
||||||
ruby-version:
|
|
||||||
type: string
|
|
||||||
executor:
|
|
||||||
name: default
|
|
||||||
ruby-version: << parameters.ruby-version >>
|
|
||||||
environment:
|
|
||||||
ALLOW_NOPAM: true
|
|
||||||
PAM_ENABLED: true
|
|
||||||
PAM_DEFAULT_SERVICE: pam_test
|
|
||||||
PAM_CONTROLLED_SERVICE: pam_test_controlled
|
|
||||||
parallelism: 4
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- install-system-dependencies
|
|
||||||
- run:
|
|
||||||
command: sudo apt-get install -y ffmpeg imagemagick libpam-dev
|
|
||||||
name: Install additional system dependencies
|
|
||||||
- run:
|
|
||||||
command: bundle config with 'pam_authentication'
|
|
||||||
name: Enable PAM authentication
|
|
||||||
- install-ruby-dependencies:
|
|
||||||
ruby-version: << parameters.ruby-version >>
|
|
||||||
- attach_workspace:
|
|
||||||
at: .
|
|
||||||
- wait-db
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:create db:schema:load db:seed
|
|
||||||
name: Load database schema
|
|
||||||
- ruby/rspec-test
|
|
||||||
|
|
||||||
test-migrations:
|
|
||||||
executor:
|
|
||||||
name: default
|
|
||||||
ruby-version: '3.0'
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- install-system-dependencies
|
|
||||||
- install-ruby-dependencies:
|
|
||||||
ruby-version: '3.0'
|
|
||||||
- wait-db
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:create
|
|
||||||
name: Create database
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20171010025614
|
|
||||||
name: Run migrations up to v2.0.0
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20180514140000
|
|
||||||
name: Run migrations up to v2.4.0
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2_4
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20180707154237
|
|
||||||
name: Run migrations up to v2.4.3
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2_4_3
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate
|
|
||||||
name: Run all remaining migrations
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:check_database
|
|
||||||
name: Check migration result
|
|
||||||
|
|
||||||
test-two-step-migrations:
|
|
||||||
executor:
|
|
||||||
name: default
|
|
||||||
ruby-version: '3.0'
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- install-system-dependencies
|
|
||||||
- install-ruby-dependencies:
|
|
||||||
ruby-version: '3.0'
|
|
||||||
- wait-db
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:create
|
|
||||||
name: Create database
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20171010025614
|
|
||||||
name: Run migrations up to v2.0.0
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20180514140000
|
|
||||||
name: Run pre-deployment migrations up to v2.4.0
|
|
||||||
environment:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2_4
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate VERSION=20180707154237
|
|
||||||
name: Run migrations up to v2.4.3
|
|
||||||
environment:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:populate_v2_4_3
|
|
||||||
name: Populate database with test data
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate
|
|
||||||
name: Run all remaining pre-deployment migrations
|
|
||||||
environment:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails db:migrate
|
|
||||||
name: Run all post-deployment migrations
|
|
||||||
- run:
|
|
||||||
command: ./bin/rails tests:migrations:check_database
|
|
||||||
name: Check migration result
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
build-and-test:
|
|
||||||
jobs:
|
|
||||||
- build
|
|
||||||
- test:
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
ruby-version:
|
|
||||||
- '2.7'
|
|
||||||
- '3.0'
|
|
||||||
name: test-ruby<< matrix.ruby-version >>
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
- test-migrations:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
- test-two-step-migrations:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
- node/run:
|
|
||||||
cache-version: v1
|
|
||||||
name: test-webui
|
|
||||||
pkg-manager: yarn
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
version: '16.18'
|
|
||||||
yarn-run: test:jest
|
|
|
@ -1,39 +0,0 @@
|
||||||
version: '2'
|
|
||||||
checks:
|
|
||||||
argument-count:
|
|
||||||
enabled: false
|
|
||||||
complex-logic:
|
|
||||||
enabled: false
|
|
||||||
file-lines:
|
|
||||||
enabled: false
|
|
||||||
method-complexity:
|
|
||||||
enabled: false
|
|
||||||
method-count:
|
|
||||||
enabled: false
|
|
||||||
method-lines:
|
|
||||||
enabled: false
|
|
||||||
nested-control-flow:
|
|
||||||
enabled: false
|
|
||||||
return-statements:
|
|
||||||
enabled: false
|
|
||||||
similar-code:
|
|
||||||
enabled: false
|
|
||||||
identical-code:
|
|
||||||
enabled: false
|
|
||||||
plugins:
|
|
||||||
brakeman:
|
|
||||||
enabled: true
|
|
||||||
bundler-audit:
|
|
||||||
enabled: true
|
|
||||||
eslint:
|
|
||||||
enabled: false
|
|
||||||
rubocop:
|
|
||||||
enabled: false
|
|
||||||
sass-lint:
|
|
||||||
enabled: false
|
|
||||||
exclude_patterns:
|
|
||||||
- spec/
|
|
||||||
- vendor/asset/
|
|
||||||
|
|
||||||
- app/javascript/mastodon/locales/**/*.json
|
|
||||||
- config/locales/**/*.yml
|
|
|
@ -1,16 +1,14 @@
|
||||||
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
|
||||||
ARG VARIANT=3.1-bullseye
|
FROM mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
|
||||||
|
|
||||||
# Install Rails
|
# Install Rails
|
||||||
# RUN gem install rails webdrivers
|
# RUN gem install rails webdrivers
|
||||||
|
|
||||||
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
|
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
|
||||||
# The value is a comma-separated list of allowed domains
|
# The value is a comma-separated list of allowed domains
|
||||||
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
|
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev"
|
||||||
|
|
||||||
# [Choice] Node.js version: lts/*, 18, 16, 14
|
ARG NODE_VERSION="16"
|
||||||
ARG NODE_VERSION="lts/*"
|
|
||||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
||||||
|
|
||||||
# [Optional] Uncomment this section to install additional OS packages.
|
# [Optional] Uncomment this section to install additional OS packages.
|
||||||
|
@ -22,3 +20,5 @@ RUN gem install foreman
|
||||||
|
|
||||||
# [Optional] Uncomment this line to install global node packages.
|
# [Optional] Uncomment this line to install global node packages.
|
||||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g yarn" 2>&1
|
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g yarn" 2>&1
|
||||||
|
|
||||||
|
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
||||||
|
|
|
@ -1,24 +1,13 @@
|
||||||
|
// For more details, see https://aka.ms/devcontainer.json.
|
||||||
{
|
{
|
||||||
"name": "Mastodon",
|
"name": "Mastodon",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "app",
|
"service": "app",
|
||||||
"workspaceFolder": "/mastodon",
|
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
|
||||||
"settings": {},
|
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
|
||||||
"extensions": [
|
|
||||||
"EditorConfig.EditorConfig",
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"rebornix.Ruby",
|
|
||||||
"webben.browserslist"
|
|
||||||
],
|
|
||||||
|
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/sshd:1": {
|
"ghcr.io/devcontainers/features/sshd:1": {}
|
||||||
"version": "latest"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
@ -26,8 +15,18 @@
|
||||||
"forwardPorts": [3000, 4000],
|
"forwardPorts": [3000, 4000],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
||||||
"postCreateCommand": ".devcontainer/post-create.sh",
|
"postCreateCommand": ".devcontainer/post-create.sh",
|
||||||
|
"waitFor": "postCreateCommand",
|
||||||
|
|
||||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
// Configure tool-specific properties.
|
||||||
"remoteUser": "vscode"
|
"customizations": {
|
||||||
|
// Configure properties specific to VS Code.
|
||||||
|
"vscode": {
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {},
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,19 +5,12 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
|
||||||
# Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6
|
|
||||||
# Append -bullseye or -buster to pin to an OS version.
|
|
||||||
# Use -bullseye variants on local arm64/Apple Silicon.
|
|
||||||
VARIANT: '3.0-bullseye'
|
|
||||||
# Optional Node.js version to install
|
|
||||||
NODE_VERSION: '16'
|
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/mastodon:cached
|
- ../..:/workspaces:cached
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: development
|
RAILS_ENV: development
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
BIND: 0.0.0.0
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: '6379'
|
REDIS_PORT: '6379'
|
||||||
DB_HOST: db
|
DB_HOST: db
|
||||||
|
@ -30,10 +23,12 @@ services:
|
||||||
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
|
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
|
||||||
# Overrides default command so things don't shut down after the process ends.
|
# Overrides default command so things don't shut down after the process ends.
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
|
ports:
|
||||||
|
- '127.0.0.1:3000:3000'
|
||||||
|
- '127.0.0.1:4000:4000'
|
||||||
networks:
|
networks:
|
||||||
- external_network
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
user: vscode
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
|
@ -49,7 +44,7 @@ services:
|
||||||
- internal_network
|
- internal_network
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:6-alpine
|
image: redis:7-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- redis-data:/data
|
- redis-data:/data
|
||||||
|
@ -74,15 +69,19 @@ services:
|
||||||
hard: -1
|
hard: -1
|
||||||
|
|
||||||
libretranslate:
|
libretranslate:
|
||||||
image: libretranslate/libretranslate:v1.2.9
|
image: libretranslate/libretranslate:v1.3.11
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- lt-data:/home/libretranslate/.local
|
||||||
networks:
|
networks:
|
||||||
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
es-data:
|
es-data:
|
||||||
|
lt-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external_network:
|
external_network:
|
||||||
|
|
|
@ -3,17 +3,22 @@
|
||||||
set -e # Fail the whole script on first error
|
set -e # Fail the whole script on first error
|
||||||
|
|
||||||
# Fetch Ruby gem dependencies
|
# Fetch Ruby gem dependencies
|
||||||
bundle install --path vendor/bundle --with='development test'
|
bundle config path 'vendor/bundle'
|
||||||
|
bundle config with 'development test'
|
||||||
# Fetch Javascript dependencies
|
bundle install
|
||||||
yarn install
|
|
||||||
|
|
||||||
# Make Gemfile.lock pristine again
|
# Make Gemfile.lock pristine again
|
||||||
git checkout -- Gemfile.lock
|
git checkout -- Gemfile.lock
|
||||||
|
|
||||||
|
# Fetch Javascript dependencies
|
||||||
|
yarn --frozen-lockfile
|
||||||
|
|
||||||
# [re]create, migrate, and seed the test database
|
# [re]create, migrate, and seed the test database
|
||||||
RAILS_ENV=test ./bin/rails db:setup
|
RAILS_ENV=test ./bin/rails db:setup
|
||||||
|
|
||||||
|
# [re]create, migrate, and seed the development database
|
||||||
|
RAILS_ENV=development ./bin/rails db:setup
|
||||||
|
|
||||||
# Precompile assets for development
|
# Precompile assets for development
|
||||||
RAILS_ENV=development ./bin/rails assets:precompile
|
RAILS_ENV=development ./bin/rails assets:precompile
|
||||||
|
|
||||||
|
|
8
.devcontainer/welcome-message.txt
Normal file
8
.devcontainer/welcome-message.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
👋 Welcome to "Mastodon" in GitHub Codespaces!
|
||||||
|
|
||||||
|
🛠️ Your environment is fully setup with all the required software.
|
||||||
|
|
||||||
|
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).
|
||||||
|
|
||||||
|
📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.
|
||||||
|
|
|
@ -10,3 +10,4 @@ insert_final_newline = true
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
250
.eslintrc.js
250
.eslintrc.js
|
@ -4,71 +4,65 @@ module.exports = {
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:react/recommended',
|
'plugin:react/recommended',
|
||||||
|
'plugin:react-hooks/recommended',
|
||||||
'plugin:jsx-a11y/recommended',
|
'plugin:jsx-a11y/recommended',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
'plugin:promise/recommended',
|
||||||
|
'plugin:jsdoc/recommended',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
],
|
],
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
jest: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
globals: {
|
globals: {
|
||||||
ATTACHMENT_HOST: false,
|
ATTACHMENT_HOST: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
parser: '@babel/eslint-parser',
|
parser: '@typescript-eslint/parser',
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'react',
|
'react',
|
||||||
'jsx-a11y',
|
'jsx-a11y',
|
||||||
'import',
|
'import',
|
||||||
'promise',
|
'promise',
|
||||||
|
'@typescript-eslint',
|
||||||
|
'formatjs',
|
||||||
],
|
],
|
||||||
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
experimentalObjectRestSpread: true,
|
|
||||||
jsx: true,
|
jsx: true,
|
||||||
},
|
},
|
||||||
ecmaVersion: 2021,
|
ecmaVersion: 2021,
|
||||||
|
requireConfigFile: false,
|
||||||
|
babelOptions: {
|
||||||
|
configFile: false,
|
||||||
|
presets: ['@babel/react', '@babel/env'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
version: 'detect',
|
version: 'detect',
|
||||||
},
|
},
|
||||||
'import/extensions': [
|
|
||||||
'.js',
|
|
||||||
],
|
|
||||||
'import/ignore': [
|
'import/ignore': [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'\\.(css|scss|json)$',
|
'\\.(css|scss|json)$',
|
||||||
],
|
],
|
||||||
'import/resolver': {
|
'import/resolver': {
|
||||||
node: {
|
typescript: {},
|
||||||
paths: ['app/javascript'],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
'brace-style': 'warn',
|
|
||||||
'comma-dangle': ['error', 'always-multiline'],
|
|
||||||
'comma-spacing': [
|
|
||||||
'warn',
|
|
||||||
{
|
|
||||||
before: false,
|
|
||||||
after: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'comma-style': ['warn', 'last'],
|
|
||||||
'consistent-return': 'error',
|
'consistent-return': 'error',
|
||||||
'dot-notation': 'error',
|
'dot-notation': 'error',
|
||||||
eqeqeq: 'error',
|
eqeqeq: ['error', 'always', { 'null': 'ignore' }],
|
||||||
indent: ['warn', 2],
|
|
||||||
'jsx-quotes': ['error', 'prefer-single'],
|
'jsx-quotes': ['error', 'prefer-single'],
|
||||||
'no-case-declarations': 'off',
|
'no-case-declarations': 'off',
|
||||||
'no-catch-shadow': 'error',
|
'no-catch-shadow': 'error',
|
||||||
|
@ -87,42 +81,43 @@ module.exports = {
|
||||||
{ property: 'substring', message: 'Use .slice instead of .substring.' },
|
{ property: 'substring', message: 'Use .slice instead of .substring.' },
|
||||||
{ property: 'substr', message: 'Use .slice instead of .substr.' },
|
{ property: 'substr', message: 'Use .slice instead of .substr.' },
|
||||||
],
|
],
|
||||||
|
'no-restricted-syntax': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
// eslint-disable-next-line no-restricted-syntax
|
||||||
|
selector: 'Literal[value=/•/], JSXText[value=/•/]',
|
||||||
|
// eslint-disable-next-line no-restricted-syntax
|
||||||
|
message: "Use '·' (middle dot) instead of '•' (bullet)",
|
||||||
|
},
|
||||||
|
],
|
||||||
'no-self-assign': 'off',
|
'no-self-assign': 'off',
|
||||||
'no-trailing-spaces': 'warn',
|
|
||||||
'no-unused-expressions': 'error',
|
'no-unused-expressions': 'error',
|
||||||
'no-unused-vars': [
|
'no-unused-vars': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
vars: 'all',
|
vars: 'all',
|
||||||
args: 'after-used',
|
args: 'after-used',
|
||||||
|
destructuredArrayIgnorePattern: '^_',
|
||||||
ignoreRestSiblings: true,
|
ignoreRestSiblings: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'no-useless-escape': 'off',
|
|
||||||
'object-curly-spacing': ['error', 'always'],
|
|
||||||
'padded-blocks': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
classes: 'always',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
quotes: ['error', 'single'],
|
|
||||||
semi: 'error',
|
|
||||||
'valid-typeof': 'error',
|
'valid-typeof': 'error',
|
||||||
|
|
||||||
|
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', 'tsx'] }],
|
||||||
'react/jsx-boolean-value': 'error',
|
'react/jsx-boolean-value': 'error',
|
||||||
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
|
|
||||||
'react/jsx-curly-spacing': 'error',
|
|
||||||
'react/display-name': 'off',
|
'react/display-name': 'off',
|
||||||
|
'react/jsx-fragments': ['error', 'syntax'],
|
||||||
'react/jsx-equals-spacing': 'error',
|
'react/jsx-equals-spacing': 'error',
|
||||||
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
|
|
||||||
'react/jsx-indent': ['error', 2],
|
|
||||||
'react/jsx-no-bind': 'error',
|
'react/jsx-no-bind': 'error',
|
||||||
|
'react/jsx-no-useless-fragment': 'error',
|
||||||
'react/jsx-no-target-blank': 'off',
|
'react/jsx-no-target-blank': 'off',
|
||||||
'react/jsx-tag-spacing': 'error',
|
'react/jsx-tag-spacing': 'error',
|
||||||
|
'react/jsx-uses-react': 'off', // not needed with new JSX transform
|
||||||
'react/jsx-wrap-multilines': 'error',
|
'react/jsx-wrap-multilines': 'error',
|
||||||
'react/no-deprecated': 'off',
|
'react/no-deprecated': 'off',
|
||||||
'react/no-unknown-property': 'off',
|
'react/no-unknown-property': 'off',
|
||||||
|
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
|
||||||
'react/self-closing-comp': 'error',
|
'react/self-closing-comp': 'error',
|
||||||
|
|
||||||
// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js
|
// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js
|
||||||
|
@ -178,32 +173,211 @@ module.exports = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js
|
||||||
'import/extensions': [
|
'import/extensions': [
|
||||||
'error',
|
'error',
|
||||||
'always',
|
'always',
|
||||||
{
|
{
|
||||||
js: 'never',
|
js: 'never',
|
||||||
|
jsx: 'never',
|
||||||
|
mjs: 'never',
|
||||||
|
ts: 'never',
|
||||||
|
tsx: 'never',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'import/first': 'error',
|
||||||
'import/newline-after-import': 'error',
|
'import/newline-after-import': 'error',
|
||||||
|
'import/no-anonymous-default-export': 'error',
|
||||||
'import/no-extraneous-dependencies': [
|
'import/no-extraneous-dependencies': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
devDependencies: [
|
devDependencies: [
|
||||||
'config/webpack/**',
|
'config/webpack/**',
|
||||||
|
'app/javascript/mastodon/performance.js',
|
||||||
'app/javascript/mastodon/test_setup.js',
|
'app/javascript/mastodon/test_setup.js',
|
||||||
'app/javascript/**/__tests__/**',
|
'app/javascript/**/__tests__/**',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'import/no-unresolved': 'error',
|
'import/no-amd': 'error',
|
||||||
|
'import/no-commonjs': 'error',
|
||||||
|
'import/no-import-module-exports': 'error',
|
||||||
|
'import/no-relative-packages': 'error',
|
||||||
|
'import/no-self-import': 'error',
|
||||||
|
'import/no-useless-path-segments': 'error',
|
||||||
'import/no-webpack-loader-syntax': 'error',
|
'import/no-webpack-loader-syntax': 'error',
|
||||||
|
|
||||||
|
'import/order': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
alphabetize: { order: 'asc' },
|
||||||
|
'newlines-between': 'always',
|
||||||
|
groups: [
|
||||||
|
'builtin',
|
||||||
|
'external',
|
||||||
|
'internal',
|
||||||
|
'parent',
|
||||||
|
['index', 'sibling'],
|
||||||
|
'object',
|
||||||
|
],
|
||||||
|
pathGroups: [
|
||||||
|
// React core packages
|
||||||
|
{
|
||||||
|
pattern: '{react,react-dom,react-dom/client,prop-types}',
|
||||||
|
group: 'builtin',
|
||||||
|
position: 'after',
|
||||||
|
},
|
||||||
|
// I18n
|
||||||
|
{
|
||||||
|
pattern: '{react-intl,intl-messageformat}',
|
||||||
|
group: 'builtin',
|
||||||
|
position: 'after',
|
||||||
|
},
|
||||||
|
// Common React utilities
|
||||||
|
{
|
||||||
|
pattern: '{classnames,react-helmet,react-router-dom}',
|
||||||
|
group: 'external',
|
||||||
|
position: 'before',
|
||||||
|
},
|
||||||
|
// Immutable / Redux / data store
|
||||||
|
{
|
||||||
|
pattern: '{immutable,react-redux,react-immutable-proptypes,react-immutable-pure-component,reselect}',
|
||||||
|
group: 'external',
|
||||||
|
position: 'before',
|
||||||
|
},
|
||||||
|
// Internal packages
|
||||||
|
{
|
||||||
|
pattern: '{mastodon/**,flavours/glitch-soc/**}',
|
||||||
|
group: 'internal',
|
||||||
|
position: 'after',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
pathGroupsExcludedImportTypes: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
'promise/always-return': 'off',
|
||||||
'promise/catch-or-return': [
|
'promise/catch-or-return': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
allowFinally: true,
|
allowFinally: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'promise/no-callback-in-promise': 'off',
|
||||||
|
'promise/no-nesting': 'off',
|
||||||
|
'promise/no-promise-in-callback': 'off',
|
||||||
|
|
||||||
|
'formatjs/blocklist-elements': 'error',
|
||||||
|
'formatjs/enforce-default-message': ['error', 'literal'],
|
||||||
|
'formatjs/enforce-description': 'off', // description values not currently used
|
||||||
|
'formatjs/enforce-id': 'off', // Explicit IDs are used in the project
|
||||||
|
'formatjs/enforce-placeholders': 'off', // Issues in short_number.jsx
|
||||||
|
'formatjs/enforce-plural-rules': 'error',
|
||||||
|
'formatjs/no-camel-case': 'off', // disabledAccount is only non-conforming
|
||||||
|
'formatjs/no-complex-selectors': 'error',
|
||||||
|
'formatjs/no-emoji': 'error',
|
||||||
|
'formatjs/no-id': 'off', // IDs are used for translation keys
|
||||||
|
'formatjs/no-invalid-icu': 'error',
|
||||||
|
'formatjs/no-literal-string-in-jsx': 'off', // Should be looked at, but mainly flagging punctuation outside of strings
|
||||||
|
'formatjs/no-multiple-plurals': 'off', // Only used by hashtag.jsx
|
||||||
|
'formatjs/no-multiple-whitespaces': 'error',
|
||||||
|
'formatjs/no-offset': 'error',
|
||||||
|
'formatjs/no-useless-message': 'error',
|
||||||
|
'formatjs/prefer-formatted-message': 'error',
|
||||||
|
'formatjs/prefer-pound-in-plural': 'error',
|
||||||
|
|
||||||
|
'jsdoc/check-types': 'off',
|
||||||
|
'jsdoc/no-undefined-types': 'off',
|
||||||
|
'jsdoc/require-jsdoc': 'off',
|
||||||
|
'jsdoc/require-param-description': 'off',
|
||||||
|
'jsdoc/require-property-description': 'off',
|
||||||
|
'jsdoc/require-returns-description': 'off',
|
||||||
|
'jsdoc/require-returns': 'off',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'*.config.js',
|
||||||
|
'.*rc.js',
|
||||||
|
'ide-helper.js',
|
||||||
|
'config/webpack/**/*',
|
||||||
|
'config/formatjs-formatter.js',
|
||||||
|
],
|
||||||
|
|
||||||
|
env: {
|
||||||
|
commonjs: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: 'script',
|
||||||
|
},
|
||||||
|
|
||||||
|
rules: {
|
||||||
|
'import/no-commonjs': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'**/*.ts',
|
||||||
|
'**/*.tsx',
|
||||||
|
],
|
||||||
|
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:react-hooks/recommended',
|
||||||
|
'plugin:jsx-a11y/recommended',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
'plugin:import/typescript',
|
||||||
|
'plugin:promise/recommended',
|
||||||
|
'plugin:jsdoc/recommended-typescript',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
|
],
|
||||||
|
|
||||||
|
parserOptions: {
|
||||||
|
project: './tsconfig.json',
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
|
||||||
|
rules: {
|
||||||
|
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
||||||
|
|
||||||
|
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
||||||
|
'@typescript-eslint/consistent-type-exports': 'error',
|
||||||
|
'@typescript-eslint/consistent-type-imports': 'error',
|
||||||
|
|
||||||
|
'jsdoc/require-jsdoc': 'off',
|
||||||
|
|
||||||
|
// Those rules set stricter rules for TS files
|
||||||
|
// to enforce better practices when converting from JS
|
||||||
|
'import/no-default-export': 'warn',
|
||||||
|
'react/prefer-stateless-function': 'warn',
|
||||||
|
'react/function-component-definition': ['error', { namedComponents: 'arrow-function' }],
|
||||||
|
'react/jsx-uses-react': 'off', // not needed with new JSX transform
|
||||||
|
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
|
||||||
|
'react/prop-types': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'**/__tests__/*.js',
|
||||||
|
'**/__tests__/*.jsx',
|
||||||
|
],
|
||||||
|
|
||||||
|
env: {
|
||||||
|
jest: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'streaming/**/*',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'import/no-commonjs': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
114
.github/renovate.json5
vendored
Normal file
114
.github/renovate.json5
vendored
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
|
||||||
|
extends: [
|
||||||
|
'config:base',
|
||||||
|
':dependencyDashboard',
|
||||||
|
':labels(dependencies)',
|
||||||
|
':maintainLockFilesMonthly', // update non-direct dependencies monthly
|
||||||
|
':prConcurrentLimit10', // only 10 open PRs at the same time
|
||||||
|
],
|
||||||
|
stabilityDays: 3, // Wait 3 days after the package has been published before upgrading it
|
||||||
|
// packageRules order is important, they are applied from top to bottom and are merged,
|
||||||
|
// so for example grouping rules needs to be at the bottom
|
||||||
|
packageRules: [
|
||||||
|
{
|
||||||
|
// Ignore major version bumps for these node packages
|
||||||
|
matchManagers: ['npm'],
|
||||||
|
matchPackageNames: [
|
||||||
|
'@rails/ujs', // Needs to match the major Rails version
|
||||||
|
'tesseract.js', // Requires code changes
|
||||||
|
'react-hotkeys', // Requires code changes
|
||||||
|
|
||||||
|
// Requires Webpacker upgrade or replacement
|
||||||
|
'@types/webpack',
|
||||||
|
'babel-loader',
|
||||||
|
'compression-webpack-plugin',
|
||||||
|
'css-loader',
|
||||||
|
'imports-loader',
|
||||||
|
'mini-css-extract-plugin',
|
||||||
|
'postcss-loader',
|
||||||
|
'sass-loader',
|
||||||
|
'terser-webpack-plugin',
|
||||||
|
'webpack',
|
||||||
|
'webpack-assets-manifest',
|
||||||
|
'webpack-bundle-analyzer',
|
||||||
|
'webpack-dev-server',
|
||||||
|
'webpack-cli',
|
||||||
|
|
||||||
|
// react-router: Requires manual upgrade
|
||||||
|
'history',
|
||||||
|
'react-router-dom',
|
||||||
|
],
|
||||||
|
matchUpdateTypes: ['major'],
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Ignore major version bumps for these Ruby packages
|
||||||
|
matchManagers: ['bundler'],
|
||||||
|
matchPackageNames: [
|
||||||
|
'sprockets', // Requires manual upgrade https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x
|
||||||
|
'strong_migrations', // Requires manual upgrade
|
||||||
|
'sidekiq', // Requires manual upgrade
|
||||||
|
'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
|
||||||
|
'redis', // Requires manual upgrade and sync with Sidekiq version
|
||||||
|
'fog-openstack', // TODO: was ignored in https://github.com/mastodon/mastodon/pull/13964
|
||||||
|
|
||||||
|
// Needs major Rails version bump
|
||||||
|
'rack',
|
||||||
|
'rails',
|
||||||
|
'rails-i18n',
|
||||||
|
],
|
||||||
|
matchUpdateTypes: ['major'],
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Update Github Actions and Docker images weekly
|
||||||
|
matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
|
||||||
|
extends: ['schedule:weekly'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Ignore major & minor bumps for the ruby image, this needs to be synced with .ruby-version
|
||||||
|
matchManagers: ['dockerfile'],
|
||||||
|
matchPackageNames: ['moritzheiber/ruby-jemalloc'],
|
||||||
|
matchUpdateTypes: ['minor', 'major'],
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Ignore major bump for the node image, this needs to be synced with .nvmrc
|
||||||
|
matchManagers: ['dockerfile'],
|
||||||
|
matchPackageNames: ['node'],
|
||||||
|
matchUpdateTypes: ['major'],
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Ignore major postgres bumps in the docker-compose file, as those break dev environments
|
||||||
|
matchManagers: ['docker-compose'],
|
||||||
|
matchPackageNames: ['postgres'],
|
||||||
|
matchUpdateTypes: ['major'],
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Update devDependencies every week, with one grouped PR
|
||||||
|
matchDepTypes: 'devDependencies',
|
||||||
|
matchUpdateTypes: ['patch', 'minor'],
|
||||||
|
excludePackageNames: [
|
||||||
|
'typescript', // Typescript has many changes in minor versions, needs to be checked every time
|
||||||
|
],
|
||||||
|
groupName: 'devDependencies (non-major)',
|
||||||
|
extends: ['schedule:weekly'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Update @types/* packages every week, with one grouped PR
|
||||||
|
matchPackagePrefixes: '@types/',
|
||||||
|
matchUpdateTypes: ['patch', 'minor'],
|
||||||
|
groupName: 'DefinitelyTyped types (non-major)',
|
||||||
|
extends: ['schedule:weekly'],
|
||||||
|
addLabels: ['typescript'],
|
||||||
|
},
|
||||||
|
// Add labels depending on package manager
|
||||||
|
{ matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
|
||||||
|
{ matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
|
||||||
|
{ matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
|
||||||
|
{ matchManagers: ['github-actions'], addLabels: ['github_actions'] },
|
||||||
|
],
|
||||||
|
}
|
18
.github/workflows/build-image.yml
vendored
18
.github/workflows/build-image.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -25,12 +25,15 @@ jobs:
|
||||||
- uses: hadolint/hadolint-action@v3.1.0
|
- uses: hadolint/hadolint-action@v3.1.0
|
||||||
- uses: docker/setup-qemu-action@v2
|
- uses: docker/setup-qemu-action@v2
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
- uses: docker/login-action@v2
|
|
||||||
|
- name: Log in to the Github Container registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
|
||||||
- uses: docker/metadata-action@v4
|
- uses: docker/metadata-action@v4
|
||||||
id: meta
|
id: meta
|
||||||
with:
|
with:
|
||||||
|
@ -39,13 +42,22 @@ jobs:
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
type=edge,branch=main
|
type=edge,branch=main
|
||||||
type=sha,prefix=,format=long
|
type=sha,prefix=,format=long
|
||||||
|
|
||||||
|
- name: Generate version suffix
|
||||||
|
id: version_vars
|
||||||
|
if: github.repository == 'mastodon/mastodon' && github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
run: |
|
||||||
|
echo mastodon_version_suffix=+edge-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: docker/build-push-action@v4
|
- uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
build-args: MASTODON_VERSION_SUFFIX=${{ steps.version_vars.outputs.mastodon_version_suffix }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
provenance: false
|
provenance: false
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
60
.github/workflows/build-nightly.yml
vendored
Normal file
60
.github/workflows/build-nightly.yml
vendored
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
name: Build nightly container image
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-nightly-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: hadolint/hadolint-action@v3.1.0
|
||||||
|
- uses: docker/setup-qemu-action@v2
|
||||||
|
- uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Log in to the Github Container registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: docker/metadata-action@v4
|
||||||
|
id: meta
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/mastodon/mastodon
|
||||||
|
flavor: |
|
||||||
|
latest=auto
|
||||||
|
tags: |
|
||||||
|
type=raw,value=nightly
|
||||||
|
type=schedule,pattern=nightly-{{date 'YYYY-MM-DD' tz='Etc/UTC'}}
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.description=Nightly build image used for testing purposes
|
||||||
|
|
||||||
|
- name: Generate version suffix
|
||||||
|
id: version_vars
|
||||||
|
run: |
|
||||||
|
echo mastodon_version_suffix=+nightly-$(date +'%Y%m%d') >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
build-args: MASTODON_VERSION_SUFFIX=${{ steps.version_vars.outputs.mastodon_version_suffix }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
provenance: false
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
push: ${{ github.repository == 'mastodon/mastodon' && github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
27
.github/workflows/check-i18n.yml
vendored
27
.github/workflows/check-i18n.yml
vendored
|
@ -14,24 +14,49 @@ permissions:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-i18n:
|
check-i18n:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libicu-dev libidn11-dev
|
sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: .ruby-version
|
ruby-version: .ruby-version
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Check for missing strings in English JSON
|
||||||
|
run: |
|
||||||
|
yarn i18n:extract --throws
|
||||||
|
git diff --exit-code
|
||||||
|
|
||||||
- name: Check locale file normalization
|
- name: Check locale file normalization
|
||||||
run: bundle exec i18n-tasks check-normalized
|
run: bundle exec i18n-tasks check-normalized
|
||||||
|
|
||||||
- name: Check for unused strings
|
- name: Check for unused strings
|
||||||
run: bundle exec i18n-tasks unused
|
run: bundle exec i18n-tasks unused
|
||||||
|
|
||||||
|
- name: Check for missing strings in English YML
|
||||||
|
run: |
|
||||||
|
bundle exec i18n-tasks add-missing -l en
|
||||||
|
git diff --exit-code
|
||||||
|
|
||||||
- name: Check for wrong string interpolations
|
- name: Check for wrong string interpolations
|
||||||
run: bundle exec i18n-tasks check-consistent-interpolations
|
run: bundle exec i18n-tasks check-consistent-interpolations
|
||||||
|
|
||||||
- name: Check that all required locale files exist
|
- name: Check that all required locale files exist
|
||||||
run: bundle exec rake repo:check_locales_files
|
run: bundle exec rake repo:check_locales_files
|
||||||
|
|
17
.github/workflows/haml-lint-problem-matcher.json
vendored
Normal file
17
.github/workflows/haml-lint-problem-matcher.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "haml-lint",
|
||||||
|
"severity": "warning",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^(.*):(\\d+)\\s\\[W]\\s(.*):\\s(.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"code": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
6
.github/workflows/lint-css.yml
vendored
6
.github/workflows/lint-css.yml
vendored
|
@ -3,9 +3,11 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- 'stylelint.config.js'
|
- 'stylelint.config.js'
|
||||||
- '**/*.css'
|
- '**/*.css'
|
||||||
|
@ -17,6 +19,7 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- 'stylelint.config.js'
|
- 'stylelint.config.js'
|
||||||
- '**/*.css'
|
- '**/*.css'
|
||||||
|
@ -36,6 +39,7 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install all yarn packages
|
- name: Install all yarn packages
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
|
@ -45,4 +49,4 @@ jobs:
|
||||||
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
||||||
|
|
||||||
- name: Stylelint
|
- name: Stylelint
|
||||||
run: yarn test:lint:sass
|
run: yarn lint:sass
|
||||||
|
|
47
.github/workflows/lint-haml.yml
vendored
Normal file
47
.github/workflows/lint-haml.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: Haml Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/haml-lint-problem-matcher.json'
|
||||||
|
- '.github/workflows/lint-haml.yml'
|
||||||
|
- '.haml-lint*.yml'
|
||||||
|
- '.rubocop*.yml'
|
||||||
|
- '.ruby-version'
|
||||||
|
- '**/*.haml'
|
||||||
|
- 'Gemfile*'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/haml-lint-problem-matcher.json'
|
||||||
|
- '.github/workflows/lint-haml.yml'
|
||||||
|
- '.haml-lint*.yml'
|
||||||
|
- '.rubocop*.yml'
|
||||||
|
- '.ruby-version'
|
||||||
|
- '**/*.haml'
|
||||||
|
- 'Gemfile*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Set up Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: .ruby-version
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Run haml-lint
|
||||||
|
run: |
|
||||||
|
echo "::add-matcher::.github/workflows/haml-lint-problem-matcher.json"
|
||||||
|
bundle exec haml-lint
|
17
.github/workflows/lint-js.yml
vendored
17
.github/workflows/lint-js.yml
vendored
|
@ -3,21 +3,32 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- 'tsconfig.json'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '.eslint*'
|
- '.eslint*'
|
||||||
- '**/*.js'
|
- '**/*.js'
|
||||||
|
- '**/*.jsx'
|
||||||
|
- '**/*.ts'
|
||||||
|
- '**/*.tsx'
|
||||||
- '.github/workflows/lint-js.yml'
|
- '.github/workflows/lint-js.yml'
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- 'tsconfig.json'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '.eslint*'
|
- '.eslint*'
|
||||||
- '**/*.js'
|
- '**/*.js'
|
||||||
|
- '**/*.jsx'
|
||||||
|
- '**/*.ts'
|
||||||
|
- '**/*.tsx'
|
||||||
- '.github/workflows/lint-js.yml'
|
- '.github/workflows/lint-js.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -32,9 +43,13 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install all yarn packages
|
- name: Install all yarn packages
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
run: yarn test:lint:js
|
run: yarn lint:js --max-warnings 0
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: yarn typecheck
|
||||||
|
|
6
.github/workflows/lint-json.yml
vendored
6
.github/workflows/lint-json.yml
vendored
|
@ -3,9 +3,11 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '**/*.json'
|
- '**/*.json'
|
||||||
- '.github/workflows/lint-json.yml'
|
- '.github/workflows/lint-json.yml'
|
||||||
|
@ -15,6 +17,7 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '**/*.json'
|
- '**/*.json'
|
||||||
- '.github/workflows/lint-json.yml'
|
- '.github/workflows/lint-json.yml'
|
||||||
|
@ -32,9 +35,10 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install all yarn packages
|
- name: Install all yarn packages
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
- name: Prettier
|
- name: Prettier
|
||||||
run: yarn prettier --check "**/*.json"
|
run: yarn lint:json
|
||||||
|
|
44
.github/workflows/lint-md.yml
vendored
Normal file
44
.github/workflows/lint-md.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: Markdown Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/lint-md.yml'
|
||||||
|
- '.nvmrc'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.md'
|
||||||
|
- '!AUTHORS.md'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/lint-md.yml'
|
||||||
|
- '.nvmrc'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.md'
|
||||||
|
- '!AUTHORS.md'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Prettier
|
||||||
|
run: yarn lint:md
|
41
.github/workflows/lint-ruby.yml
vendored
41
.github/workflows/lint-ruby.yml
vendored
|
@ -3,9 +3,12 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
paths:
|
paths:
|
||||||
- 'Gemfile*'
|
- 'Gemfile*'
|
||||||
- '.rubocop.yml'
|
- '.rubocop*.yml'
|
||||||
|
- '.ruby-version'
|
||||||
|
- '.bundler-audit.yml'
|
||||||
- '**/*.rb'
|
- '**/*.rb'
|
||||||
- '**/*.rake'
|
- '**/*.rake'
|
||||||
- '.github/workflows/lint-ruby.yml'
|
- '.github/workflows/lint-ruby.yml'
|
||||||
|
@ -13,7 +16,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'Gemfile*'
|
- 'Gemfile*'
|
||||||
- '.rubocop.yml'
|
- '.rubocop*.yml'
|
||||||
|
- '.ruby-version'
|
||||||
|
- '.bundler-audit.yml'
|
||||||
- '**/*.rb'
|
- '**/*.rb'
|
||||||
- '**/*.rake'
|
- '**/*.rake'
|
||||||
- '.github/workflows/lint-ruby.yml'
|
- '.github/workflows/lint-ruby.yml'
|
||||||
|
@ -21,21 +26,25 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set-up RuboCop Problem Mathcher
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Set up Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: .ruby-version
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Set-up RuboCop Problem Matcher
|
||||||
uses: r7kamura/rubocop-problem-matchers-action@v1
|
uses: r7kamura/rubocop-problem-matchers-action@v1
|
||||||
|
|
||||||
- name: Run rubocop
|
- name: Run rubocop
|
||||||
uses: github/super-linter@v4
|
run: bundle exec rubocop
|
||||||
env:
|
|
||||||
DEFAULT_BRANCH: main
|
- name: Run bundler-audit
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
run: bundle exec bundler-audit
|
||||||
LINTER_RULES_PATH: .
|
|
||||||
RUBY_CONFIG_FILE: .rubocop.yml
|
|
||||||
VALIDATE_ALL_CODEBASE: false
|
|
||||||
VALIDATE_RUBY: true
|
|
||||||
|
|
6
.github/workflows/lint-yml.yml
vendored
6
.github/workflows/lint-yml.yml
vendored
|
@ -3,9 +3,11 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '**/*.yaml'
|
- '**/*.yaml'
|
||||||
- '**/*.yml'
|
- '**/*.yml'
|
||||||
|
@ -16,6 +18,7 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
- '.prettier*'
|
- '.prettier*'
|
||||||
- '**/*.yaml'
|
- '**/*.yaml'
|
||||||
- '**/*.yml'
|
- '**/*.yml'
|
||||||
|
@ -34,9 +37,10 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install all yarn packages
|
- name: Install all yarn packages
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
- name: Prettier
|
- name: Prettier
|
||||||
run: yarn prettier --check "**/*.{yml,yaml}"
|
run: yarn lint:yml
|
||||||
|
|
19
.github/workflows/rebase-needed.yml
vendored
19
.github/workflows/rebase-needed.yml
vendored
|
@ -2,16 +2,35 @@ name: PR Needs Rebase
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
- 'l10n_main'
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
- 'l10n_main'
|
||||||
types: [synchronize]
|
types: [synchronize]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
label-rebase-needed:
|
label-rebase-needed:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check for merge conflicts
|
- name: Check for merge conflicts
|
||||||
uses: eps1lon/actions-label-merge-conflict@releases/2.x
|
uses: eps1lon/actions-label-merge-conflict@releases/2.x
|
||||||
with:
|
with:
|
||||||
dirtyLabel: 'rebase needed :construction:'
|
dirtyLabel: 'rebase needed :construction:'
|
||||||
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
commentOnClean: This pull request has resolved merge conflicts and is ready for review.
|
||||||
commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
|
commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
|
||||||
|
retryMax: 10
|
||||||
|
continueOnMissingPermissions: false
|
||||||
|
|
48
.github/workflows/test-js.yml
vendored
Normal file
48
.github/workflows/test-js.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: JavaScript Testing
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
|
- '**/*.js'
|
||||||
|
- '**/*.jsx'
|
||||||
|
- '**/*.ts'
|
||||||
|
- '**/*.tsx'
|
||||||
|
- '**/*.snap'
|
||||||
|
- '.github/workflows/test-js.yml'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.nvmrc'
|
||||||
|
- '**/*.js'
|
||||||
|
- '**/*.jsx'
|
||||||
|
- '**/*.ts'
|
||||||
|
- '**/*.tsx'
|
||||||
|
- '**/*.snap'
|
||||||
|
- '.github/workflows/test-js.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Jest testing
|
||||||
|
run: yarn jest --reporters github-actions summary
|
111
.github/workflows/test-migrations-one-step.yml
vendored
Normal file
111
.github/workflows/test-migrations-one-step.yml
vendored
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
name: Test one step migrations
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
|
with:
|
||||||
|
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-one-step.yml", "lib/tasks/tests.rake"]'
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_job
|
||||||
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
postgres:
|
||||||
|
- 14-alpine
|
||||||
|
- 15-alpine
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:${{ matrix.postgres}}
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
options: >-
|
||||||
|
--health-cmd "redis-cli ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONTINUOUS_INTEGRATION: true
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_USER: postgres
|
||||||
|
DB_PASS: postgres
|
||||||
|
DISABLE_SIMPLECOV: true
|
||||||
|
RAILS_ENV: test
|
||||||
|
BUNDLE_CLEAN: true
|
||||||
|
BUNDLE_FROZEN: true
|
||||||
|
BUNDLE_WITHOUT: 'development production'
|
||||||
|
BUNDLE_JOBS: 3
|
||||||
|
BUNDLE_RETRY: 3
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Set up bundler cache
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: .ruby-version
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Create database
|
||||||
|
run: './bin/rails db:create'
|
||||||
|
|
||||||
|
- name: Run migrations up to v2.0.0
|
||||||
|
run: './bin/rails db:migrate VERSION=20171010025614'
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2'
|
||||||
|
|
||||||
|
- name: Run migrations up to v2.4.0
|
||||||
|
run: './bin/rails db:migrate VERSION=20180514140000'
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2_4'
|
||||||
|
|
||||||
|
- name: Run migrations up to v2.4.3
|
||||||
|
run: './bin/rails db:migrate VERSION=20180707154237'
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2_4_3'
|
||||||
|
|
||||||
|
- name: Run all remaining migrations
|
||||||
|
run: './bin/rails db:migrate'
|
||||||
|
|
||||||
|
- name: Check migration result
|
||||||
|
run: './bin/rails tests:migrations:check_database'
|
119
.github/workflows/test-migrations-two-step.yml
vendored
Normal file
119
.github/workflows/test-migrations-two-step.yml
vendored
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
name: Test two step migrations
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
|
with:
|
||||||
|
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-two-step.yml", "lib/tasks/tests.rake"]'
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pre_job
|
||||||
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
postgres:
|
||||||
|
- 14-alpine
|
||||||
|
- 15-alpine
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:${{ matrix.postgres}}
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
options: >-
|
||||||
|
--health-cmd "redis-cli ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONTINUOUS_INTEGRATION: true
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_USER: postgres
|
||||||
|
DB_PASS: postgres
|
||||||
|
DISABLE_SIMPLECOV: true
|
||||||
|
RAILS_ENV: test
|
||||||
|
BUNDLE_CLEAN: true
|
||||||
|
BUNDLE_FROZEN: true
|
||||||
|
BUNDLE_WITHOUT: 'development production'
|
||||||
|
BUNDLE_JOBS: 3
|
||||||
|
BUNDLE_RETRY: 3
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Set up bundler cache
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: .ruby-version
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Create database
|
||||||
|
run: './bin/rails db:create'
|
||||||
|
|
||||||
|
- name: Run migrations up to v2.0.0
|
||||||
|
run: './bin/rails db:migrate VERSION=20171010025614'
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2'
|
||||||
|
|
||||||
|
- name: Run pre-deployment migrations up to v2.4.0
|
||||||
|
run: './bin/rails db:migrate VERSION=20180514140000'
|
||||||
|
env:
|
||||||
|
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2_4'
|
||||||
|
|
||||||
|
- name: Run migrations up to v2.4.3
|
||||||
|
run: './bin/rails db:migrate VERSION=20180707154237'
|
||||||
|
env:
|
||||||
|
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
||||||
|
|
||||||
|
- name: Populate database with test data
|
||||||
|
run: './bin/rails tests:migrations:populate_v2_4_3'
|
||||||
|
|
||||||
|
- name: Run all remaining pre-deployment migrations
|
||||||
|
run: './bin/rails db:migrate'
|
||||||
|
env:
|
||||||
|
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
||||||
|
|
||||||
|
- name: Run all post-deployment migrations
|
||||||
|
run: './bin/rails db:migrate'
|
||||||
|
|
||||||
|
- name: Check migration result
|
||||||
|
run: './bin/rails tests:migrations:check_database'
|
151
.github/workflows/test-ruby.yml
vendored
Normal file
151
.github/workflows/test-ruby.yml
vendored
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
name: Ruby Testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
- 'renovate/**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUNDLE_CLEAN: true
|
||||||
|
BUNDLE_FROZEN: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
mode:
|
||||||
|
- production
|
||||||
|
- test
|
||||||
|
env:
|
||||||
|
RAILS_ENV: ${{ matrix.mode }}
|
||||||
|
BUNDLE_WITH: ${{ matrix.mode }}
|
||||||
|
OTP_SECRET: precompile_placeholder
|
||||||
|
SECRET_KEY_BASE: precompile_placeholder
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Set up bundler cache
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: .ruby-version
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- run: yarn --frozen-lockfile --production
|
||||||
|
- name: Precompile assets
|
||||||
|
# Previously had set this, but it's not supported
|
||||||
|
# export NODE_OPTIONS=--openssl-legacy-provider
|
||||||
|
run: |-
|
||||||
|
./bin/rails assets:precompile
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: matrix.mode == 'test'
|
||||||
|
with:
|
||||||
|
path: |-
|
||||||
|
./public/assets
|
||||||
|
./public/packs-test
|
||||||
|
name: ${{ github.sha }}
|
||||||
|
retention-days: 0
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:14-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
options: >-
|
||||||
|
--health-cmd "redis-cli ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
|
env:
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_USER: postgres
|
||||||
|
DB_PASS: postgres
|
||||||
|
DISABLE_SIMPLECOV: true
|
||||||
|
RAILS_ENV: test
|
||||||
|
ALLOW_NOPAM: true
|
||||||
|
PAM_ENABLED: true
|
||||||
|
PAM_DEFAULT_SERVICE: pam_test
|
||||||
|
PAM_CONTROLLED_SERVICE: pam_test_controlled
|
||||||
|
BUNDLE_WITH: 'pam_authentication test'
|
||||||
|
CI_JOBS: ${{ matrix.ci_job }}/4
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
ruby-version:
|
||||||
|
- '3.0'
|
||||||
|
- '3.1'
|
||||||
|
- '.ruby-version'
|
||||||
|
ci_job:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: './public'
|
||||||
|
name: ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Update package index
|
||||||
|
run: sudo apt-get update
|
||||||
|
|
||||||
|
- name: Install native Ruby dependencies
|
||||||
|
run: sudo apt-get install -y libicu-dev libidn11-dev
|
||||||
|
|
||||||
|
- name: Install additional system dependencies
|
||||||
|
run: sudo apt-get install -y ffmpeg imagemagick libpam-dev
|
||||||
|
|
||||||
|
- name: Set up bundler cache
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: ${{ matrix.ruby-version}}
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Load database schema
|
||||||
|
run: './bin/rails db:create db:schema:load db:seed'
|
||||||
|
|
||||||
|
- run: bundle exec rake rspec_chunked
|
106
.haml-lint.yml
106
.haml-lint.yml
|
@ -1,108 +1,14 @@
|
||||||
# Whether to ignore frontmatter at the beginning of HAML documents for
|
inherits_from: .haml-lint_todo.yml
|
||||||
# frameworks such as Jekyll/Middleman
|
|
||||||
skip_frontmatter: false
|
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
- 'vendor/**/*'
|
- 'vendor/**/*'
|
||||||
- 'spec/**/*'
|
- lib/templates/haml/scaffold/_form.html.haml
|
||||||
- 'lib/templates/**/*'
|
|
||||||
- 'app/views/kaminari/**/*'
|
require:
|
||||||
|
- ./lib/linter/haml_middle_dot.rb
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
AltText:
|
AltText:
|
||||||
enabled: false
|
|
||||||
|
|
||||||
ClassAttributeWithStaticValue:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
|
MiddleDot:
|
||||||
ClassesBeforeIds:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
ConsecutiveComments:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
ConsecutiveSilentScripts:
|
|
||||||
enabled: true
|
|
||||||
max_consecutive: 2
|
|
||||||
|
|
||||||
EmptyObjectReference:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
EmptyScript:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
FinalNewline:
|
|
||||||
enabled: true
|
|
||||||
present: true
|
|
||||||
|
|
||||||
HtmlAttributes:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
ImplicitDiv:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
LeadingCommentSpace:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
LineLength:
|
|
||||||
enabled: false
|
|
||||||
max: 80
|
|
||||||
|
|
||||||
MultilinePipe:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
MultilineScript:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
ObjectReferenceAttributes:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
RuboCop:
|
|
||||||
enabled: true
|
|
||||||
# These cops are incredibly noisy when it comes to HAML templates, so we
|
|
||||||
# ignore them.
|
|
||||||
ignored_cops:
|
|
||||||
- Lint/BlockAlignment
|
|
||||||
- Lint/EndAlignment
|
|
||||||
- Lint/Void
|
|
||||||
- Metrics/BlockLength
|
|
||||||
- Metrics/LineLength
|
|
||||||
- Style/AlignParameters
|
|
||||||
- Style/BlockNesting
|
|
||||||
- Style/ElseAlignment
|
|
||||||
- Style/EndOfLine
|
|
||||||
- Style/FileName
|
|
||||||
- Style/FinalNewline
|
|
||||||
- Style/FrozenStringLiteralComment
|
|
||||||
- Style/IfUnlessModifier
|
|
||||||
- Style/IndentationWidth
|
|
||||||
- Style/Next
|
|
||||||
- Style/TrailingBlankLines
|
|
||||||
- Style/TrailingWhitespace
|
|
||||||
- Style/WhileUntilModifier
|
|
||||||
|
|
||||||
RubyComments:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
SpaceBeforeScript:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
SpaceInsideHashAttributes:
|
|
||||||
enabled: true
|
|
||||||
style: space
|
|
||||||
|
|
||||||
Indentation:
|
|
||||||
enabled: true
|
|
||||||
character: space # or tab
|
|
||||||
|
|
||||||
TagName:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
TrailingWhitespace:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
UnnecessaryInterpolation:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
UnnecessaryStringOutput:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
106
.haml-lint_todo.yml
Normal file
106
.haml-lint_todo.yml
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
# This configuration was generated by
|
||||||
|
# `haml-lint --auto-gen-config`
|
||||||
|
# on 2023-03-15 00:55:01 -0400 using Haml-Lint version 0.45.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: 63
|
||||||
|
RuboCop:
|
||||||
|
exclude:
|
||||||
|
- 'app/views/accounts/_og.html.haml'
|
||||||
|
- 'app/views/admin/account_warnings/_account_warning.html.haml'
|
||||||
|
- 'app/views/admin/accounts/index.html.haml'
|
||||||
|
- 'app/views/admin/accounts/show.html.haml'
|
||||||
|
- 'app/views/admin/announcements/edit.html.haml'
|
||||||
|
- 'app/views/admin/announcements/new.html.haml'
|
||||||
|
- 'app/views/admin/disputes/appeals/_appeal.html.haml'
|
||||||
|
- 'app/views/admin/domain_blocks/edit.html.haml'
|
||||||
|
- 'app/views/admin/domain_blocks/new.html.haml'
|
||||||
|
- 'app/views/admin/ip_blocks/new.html.haml'
|
||||||
|
- 'app/views/admin/reports/actions/preview.html.haml'
|
||||||
|
- 'app/views/admin/reports/index.html.haml'
|
||||||
|
- 'app/views/admin/reports/show.html.haml'
|
||||||
|
- 'app/views/admin/roles/_form.html.haml'
|
||||||
|
- 'app/views/admin/settings/about/show.html.haml'
|
||||||
|
- 'app/views/admin/settings/appearance/show.html.haml'
|
||||||
|
- 'app/views/admin/settings/registrations/show.html.haml'
|
||||||
|
- 'app/views/admin/statuses/show.html.haml'
|
||||||
|
- 'app/views/auth/registrations/new.html.haml'
|
||||||
|
- 'app/views/disputes/strikes/show.html.haml'
|
||||||
|
- 'app/views/filters/_filter_fields.html.haml'
|
||||||
|
- 'app/views/invites/_form.html.haml'
|
||||||
|
- 'app/views/layouts/application.html.haml'
|
||||||
|
- 'app/views/layouts/error.html.haml'
|
||||||
|
- 'app/views/notification_mailer/_status.html.haml'
|
||||||
|
- 'app/views/settings/applications/_fields.html.haml'
|
||||||
|
- 'app/views/settings/imports/show.html.haml'
|
||||||
|
- 'app/views/settings/preferences/appearance/show.html.haml'
|
||||||
|
- 'app/views/settings/preferences/other/show.html.haml'
|
||||||
|
- 'app/views/statuses/_detailed_status.html.haml'
|
||||||
|
- 'app/views/statuses/_poll.html.haml'
|
||||||
|
- 'app/views/statuses/show.html.haml'
|
||||||
|
- 'app/views/statuses_cleanup/show.html.haml'
|
||||||
|
- 'app/views/user_mailer/warning.html.haml'
|
||||||
|
|
||||||
|
# Offense count: 913
|
||||||
|
LineLength:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Offense count: 22
|
||||||
|
UnnecessaryStringOutput:
|
||||||
|
exclude:
|
||||||
|
- 'app/views/accounts/show.html.haml'
|
||||||
|
- 'app/views/admin/custom_emojis/_custom_emoji.html.haml'
|
||||||
|
- 'app/views/admin/relays/_relay.html.haml'
|
||||||
|
- 'app/views/admin/rules/_rule.html.haml'
|
||||||
|
- 'app/views/admin/statuses/index.html.haml'
|
||||||
|
- 'app/views/auth/registrations/_sessions.html.haml'
|
||||||
|
- 'app/views/disputes/strikes/show.html.haml'
|
||||||
|
- 'app/views/notification_mailer/_status.html.haml'
|
||||||
|
- 'app/views/settings/two_factor_authentication_methods/index.html.haml'
|
||||||
|
- 'app/views/statuses/_detailed_status.html.haml'
|
||||||
|
- 'app/views/statuses/_poll.html.haml'
|
||||||
|
- 'app/views/statuses/_simple_status.html.haml'
|
||||||
|
- 'app/views/user_mailer/suspicious_sign_in.html.haml'
|
||||||
|
- 'app/views/user_mailer/webauthn_credential_added.html.haml'
|
||||||
|
- 'app/views/user_mailer/webauthn_credential_deleted.html.haml'
|
||||||
|
- 'app/views/user_mailer/welcome.html.haml'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
ViewLength:
|
||||||
|
exclude:
|
||||||
|
- 'app/views/admin/accounts/show.html.haml'
|
||||||
|
- 'app/views/admin/reports/show.html.haml'
|
||||||
|
- 'app/views/disputes/strikes/show.html.haml'
|
||||||
|
|
||||||
|
# Offense count: 41
|
||||||
|
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/_sessions.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'
|
||||||
|
- 'app/views/statuses/_status.html.haml'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
ConsecutiveSilentScripts:
|
||||||
|
exclude:
|
||||||
|
- 'app/views/admin/settings/shared/_links.html.haml'
|
||||||
|
- 'app/views/settings/login_activities/_login_activity.html.haml'
|
||||||
|
- 'app/views/statuses/_poll.html.haml'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
IdNames:
|
||||||
|
exclude:
|
||||||
|
- 'app/views/authorize_interactions/error.html.haml'
|
||||||
|
- 'app/views/oauth/authorizations/error.html.haml'
|
||||||
|
- 'app/views/shared/_error_messages.html.haml'
|
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
yarn lint-staged
|
|
@ -51,15 +51,8 @@
|
||||||
*~
|
*~
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
# Ignore npm debug log
|
# Ignore log files
|
||||||
npm-debug.log
|
*.log
|
||||||
|
|
||||||
# Ignore yarn log files
|
|
||||||
yarn-error.log
|
|
||||||
yarn-debug.log
|
|
||||||
|
|
||||||
# Ignore vagrant log files
|
|
||||||
*-cloudimg-console.log
|
|
||||||
|
|
||||||
# Ignore Docker option files
|
# Ignore Docker option files
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
|
@ -68,12 +61,31 @@ docker-compose.override.yml
|
||||||
/app/javascript/mastodon/features/emoji/emoji_map.json
|
/app/javascript/mastodon/features/emoji/emoji_map.json
|
||||||
|
|
||||||
# Ignore locale files
|
# Ignore locale files
|
||||||
/app/javascript/mastodon/locales
|
/app/javascript/mastodon/locales/*.json
|
||||||
/config/locales
|
/config/locales
|
||||||
|
|
||||||
|
# Ignore vendored CSS reset
|
||||||
|
app/javascript/styles/mastodon/reset.scss
|
||||||
|
|
||||||
|
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
|
||||||
|
*.js
|
||||||
|
*.jsx
|
||||||
|
|
||||||
|
# Ignore HTML till cleaned and included in CI
|
||||||
|
*.html
|
||||||
|
|
||||||
|
# Ignore the generated AUTHORS.md
|
||||||
|
AUTHORS.md
|
||||||
|
|
||||||
|
# Ignore glitch-soc emoji map file
|
||||||
|
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
|
||||||
|
|
||||||
# Ignore glitch-soc locale files
|
# Ignore glitch-soc locale files
|
||||||
/app/javascript/flavours/glitch/locales
|
/app/javascript/flavours/glitch/locales
|
||||||
/config/locales-glitch
|
/config/locales-glitch
|
||||||
|
|
||||||
# Ignore glitch-soc emoji map file
|
# Ignore glitch-soc vendored CSS reset
|
||||||
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
|
app/javascript/flavours/glitch/styles/reset.scss
|
||||||
|
|
||||||
|
# Ignore win95 theme
|
||||||
|
app/javascript/styles/win95.scss
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
singleQuote: true
|
singleQuote: true,
|
||||||
|
jsxSingleQuote: true
|
||||||
}
|
}
|
||||||
|
|
2
.profile
2
.profile
|
@ -1 +1 @@
|
||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/.apt/lib/x86_64-linux-gnu:/app/.apt/usr/lib/x86_64-linux-gnu/mesa:/app/.apt/usr/lib/x86_64-linux-gnu/pulseaudio
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/.apt/lib/x86_64-linux-gnu:/app/.apt/usr/lib/x86_64-linux-gnu/mesa:/app/.apt/usr/lib/x86_64-linux-gnu/pulseaudio:/app/.apt/usr/lib/x86_64-linux-gnu/openblas-pthread
|
||||||
|
|
538
.rubocop.yml
538
.rubocop.yml
|
@ -1,479 +1,211 @@
|
||||||
|
# Can be removed once all rules are addressed or moved to this file as documented overrides
|
||||||
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
|
# Used for merging with exclude lists with .rubocop_todo.yml
|
||||||
|
inherit_mode:
|
||||||
|
merge:
|
||||||
|
- Exclude
|
||||||
|
|
||||||
require:
|
require:
|
||||||
- rubocop-rails
|
- rubocop-rails
|
||||||
- rubocop-rspec
|
- rubocop-rspec
|
||||||
- rubocop-performance
|
- rubocop-performance
|
||||||
|
- rubocop-capybara
|
||||||
|
- ./lib/linter/rubocop_middle_dot
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: 2.7
|
TargetRubyVersion: 3.0 # Set to minimum supported version of CI
|
||||||
DisplayCopNames: true
|
DisplayCopNames: true
|
||||||
DisplayStyleGuide: true
|
DisplayStyleGuide: true
|
||||||
ExtraDetails: true
|
ExtraDetails: true
|
||||||
UseCache: true
|
UseCache: true
|
||||||
CacheRootDirectory: tmp
|
CacheRootDirectory: tmp
|
||||||
NewCops: enable
|
NewCops: enable # Opt-in to newly added rules
|
||||||
Exclude:
|
Exclude:
|
||||||
- db/schema.rb
|
- db/schema.rb
|
||||||
- 'app/views/**/*'
|
|
||||||
- 'config/**/*'
|
|
||||||
- 'bin/*'
|
- 'bin/*'
|
||||||
- 'Rakefile'
|
- 'Rakefile'
|
||||||
- 'node_modules/**/*'
|
- 'node_modules/**/*'
|
||||||
- 'Vagrantfile'
|
- 'Vagrantfile'
|
||||||
- 'vendor/**/*'
|
- 'vendor/**/*'
|
||||||
- 'lib/json_ld/*'
|
- 'lib/json_ld/*' # Generated files
|
||||||
- 'lib/templates/**/*'
|
- 'lib/templates/**/*'
|
||||||
|
|
||||||
Bundler/OrderedGems:
|
# Reason: Prefer Hashes without extreme indentation
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutfirsthashelementindentation
|
||||||
|
|
||||||
Layout/AccessModifierIndentation:
|
|
||||||
EnforcedStyle: indent
|
|
||||||
|
|
||||||
Layout/EmptyLineAfterMagicComment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/EmptyLineAfterGuardClause:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/EmptyLineBetweenDefs:
|
|
||||||
AllowAdjacentOneLineDefs: true
|
|
||||||
|
|
||||||
Layout/EmptyLinesAroundAttributeAccessor:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Layout/FirstHashElementIndentation:
|
Layout/FirstHashElementIndentation:
|
||||||
EnforcedStyle: consistent
|
EnforcedStyle: consistent
|
||||||
|
|
||||||
Layout/HashAlignment:
|
# Reason: Currently disabled in .rubocop_todo.yml
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutlinelength
|
||||||
|
|
||||||
Layout/SpaceAroundMethodCallOperator:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Layout/SpaceInsideHashLiteralBraces:
|
|
||||||
EnforcedStyle: space
|
|
||||||
|
|
||||||
Lint/DeprecatedOpenSSLConstant:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Lint/DuplicateElsifCondition:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Lint/MixedRegexpCaptureTypes:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Lint/RaiseException:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Lint/StructNewOverride:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Lint/UselessAccessModifier:
|
|
||||||
ContextCreatingMethods:
|
|
||||||
- class_methods
|
|
||||||
|
|
||||||
Metrics/AbcSize:
|
|
||||||
Max: 34 # RuboCop default 17
|
|
||||||
Exclude:
|
|
||||||
- 'lib/**/*cli*.rb'
|
|
||||||
- db/*migrate/**/*
|
|
||||||
- lib/paperclip/color_extractor.rb
|
|
||||||
- app/workers/scheduler/follow_recommendations_scheduler.rb
|
|
||||||
- app/services/activitypub/fetch*_service.rb
|
|
||||||
- lib/paperclip/**/*
|
|
||||||
CountRepeatedAttributes: false
|
|
||||||
AllowedMethods:
|
|
||||||
- update_media_attachments!
|
|
||||||
- account_link_to
|
|
||||||
- attempt_oembed
|
|
||||||
- build_crutches
|
|
||||||
- calculate_scores
|
|
||||||
- cc
|
|
||||||
- dump_actor!
|
|
||||||
- filter_from_home?
|
|
||||||
- hydrate
|
|
||||||
- import_bookmarks!
|
|
||||||
- import_relationships!
|
|
||||||
- initialize
|
|
||||||
- link_to_mention
|
|
||||||
- log_target
|
|
||||||
- matches_time_window?
|
|
||||||
- parse_metadata
|
|
||||||
- perform_statuses_search!
|
|
||||||
- privatize_media_attachments!
|
|
||||||
- process_update
|
|
||||||
- publish_media_attachments!
|
|
||||||
- remotable_attachment
|
|
||||||
- render_initial_state
|
|
||||||
- render_with_cache
|
|
||||||
- searchable_by
|
|
||||||
- self.cached_filters_for
|
|
||||||
- set_fetchable_attributes!
|
|
||||||
- signed_request_actor
|
|
||||||
- statuses_to_delete
|
|
||||||
- update_poll!
|
|
||||||
|
|
||||||
Metrics/BlockLength:
|
|
||||||
Max: 55
|
|
||||||
Exclude:
|
|
||||||
- 'lib/mastodon/*_cli.rb'
|
|
||||||
CountComments: false
|
|
||||||
CountAsOne: [array, heredoc]
|
|
||||||
AllowedMethods:
|
|
||||||
- task
|
|
||||||
- namespace
|
|
||||||
- class_methods
|
|
||||||
- included
|
|
||||||
|
|
||||||
Metrics/BlockNesting:
|
|
||||||
Max: 3
|
|
||||||
Exclude:
|
|
||||||
- 'lib/mastodon/*_cli.rb'
|
|
||||||
|
|
||||||
Metrics/ClassLength:
|
|
||||||
CountComments: false
|
|
||||||
Max: 500
|
|
||||||
CountAsOne: [array, heredoc]
|
|
||||||
Exclude:
|
|
||||||
- 'lib/mastodon/*_cli.rb'
|
|
||||||
|
|
||||||
Metrics/CyclomaticComplexity:
|
|
||||||
Max: 12
|
|
||||||
Exclude:
|
|
||||||
- lib/mastodon/*cli*.rb
|
|
||||||
- db/*migrate/**/*
|
|
||||||
AllowedMethods:
|
|
||||||
- attempt_oembed
|
|
||||||
- blocked?
|
|
||||||
- build_crutches
|
|
||||||
- calculate_scores
|
|
||||||
- cc
|
|
||||||
- discover_endpoint!
|
|
||||||
- filter_from_home?
|
|
||||||
- hydrate
|
|
||||||
- klass
|
|
||||||
- link_to_mention
|
|
||||||
- log_target
|
|
||||||
- matches_time_window?
|
|
||||||
- patch_for_forwarding!
|
|
||||||
- preprocess_attributes!
|
|
||||||
- process_update
|
|
||||||
- remotable_attachment
|
|
||||||
- scan_text!
|
|
||||||
- self.cached_filters_for
|
|
||||||
- set_fetchable_attributes!
|
|
||||||
- setup_redis_env_url
|
|
||||||
- update_media_attachments!
|
|
||||||
|
|
||||||
Layout/LineLength:
|
Layout/LineLength:
|
||||||
Max: 140 # RuboCop default 120
|
|
||||||
AllowHeredoc: true
|
|
||||||
AllowURI: true
|
|
||||||
IgnoreCopDirectives: true
|
|
||||||
AllowedPatterns:
|
AllowedPatterns:
|
||||||
# Allow comments to be long lines
|
# Allow comments to be long lines
|
||||||
- !ruby/regexp / \# .*$/
|
- !ruby/regexp / \# .*$/
|
||||||
- !ruby/regexp /^\# .*$/
|
- !ruby/regexp /^\# .*$/
|
||||||
Exclude:
|
Exclude:
|
||||||
- lib/**/*cli*.rb
|
- 'lib/mastodon/cli/*.rb'
|
||||||
- db/*migrate/**/*
|
- db/*migrate/**/*
|
||||||
- db/seeds/**/*
|
- db/seeds/**/*
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessaccessmodifier
|
||||||
|
Lint/UselessAccessModifier:
|
||||||
|
ContextCreatingMethods:
|
||||||
|
- class_methods
|
||||||
|
|
||||||
|
## Disable most Metrics/*Length cops
|
||||||
|
# Reason: those are often triggered and force significant refactors when this happend
|
||||||
|
# but the team feel they are not really improving the code quality.
|
||||||
|
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocklength
|
||||||
|
Metrics/BlockLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmethodlength
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
CountComments: false
|
Enabled: false
|
||||||
CountAsOne: [array, heredoc]
|
|
||||||
Max: 25 # RuboCop default 10
|
|
||||||
Exclude:
|
|
||||||
- 'lib/mastodon/*_cli.rb'
|
|
||||||
AllowedMethods:
|
|
||||||
- account_link_to
|
|
||||||
- attempt_oembed
|
|
||||||
- body_with_limit
|
|
||||||
- build_crutches
|
|
||||||
- cached_filters_for
|
|
||||||
- calculate_scores
|
|
||||||
- check_webfinger!
|
|
||||||
- clean_feeds!
|
|
||||||
- collection_items
|
|
||||||
- collection_presenter
|
|
||||||
- copy_account_notes!
|
|
||||||
- deduplicate_accounts!
|
|
||||||
- deduplicate_conversations!
|
|
||||||
- deduplicate_local_accounts!
|
|
||||||
- deduplicate_statuses!
|
|
||||||
- deduplicate_tags!
|
|
||||||
- deduplicate_users!
|
|
||||||
- discover_endpoint!
|
|
||||||
- extract_extra_uris_with_indices
|
|
||||||
- extract_hashtags_with_indices
|
|
||||||
- extract_mentions_or_lists_with_indices
|
|
||||||
- filter_from_home?
|
|
||||||
- from_elasticsearch
|
|
||||||
- handle_explicit_update!
|
|
||||||
- handle_mark_as_sensitive!
|
|
||||||
- hsl_to_rgb
|
|
||||||
- import_bookmarks!
|
|
||||||
- import_domain_blocks!
|
|
||||||
- import_relationships!
|
|
||||||
- ldap_options
|
|
||||||
- matches_time_window?
|
|
||||||
- outbox_presenter
|
|
||||||
- pam_get_user
|
|
||||||
- parallelize_with_progress
|
|
||||||
- parse_and_transform
|
|
||||||
- patch_for_forwarding!
|
|
||||||
- populate_home
|
|
||||||
- post_process_style
|
|
||||||
- preload_cache_collection_target_statuses
|
|
||||||
- privatize_media_attachments!
|
|
||||||
- provides_callback_for
|
|
||||||
- publish_media_attachments!
|
|
||||||
- relevant_account_timestamp
|
|
||||||
- remotable_attachment
|
|
||||||
- rgb_to_hsl
|
|
||||||
- rss_status_content_format
|
|
||||||
- set_fetchable_attributes!
|
|
||||||
- setup_redis_env_url
|
|
||||||
- signed_request_actor
|
|
||||||
- to_preview_card_attributes
|
|
||||||
- upgrade_storage_filesystem
|
|
||||||
- upgrade_storage_s3
|
|
||||||
- user_settings_params
|
|
||||||
- hydrate
|
|
||||||
- cc
|
|
||||||
- self_destruct
|
|
||||||
|
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmodulelength
|
||||||
Metrics/ModuleLength:
|
Metrics/ModuleLength:
|
||||||
CountComments: false
|
Enabled: false
|
||||||
Max: 200
|
|
||||||
CountAsOne: [array, heredoc]
|
|
||||||
|
|
||||||
|
## End Disable Metrics/*Length cops
|
||||||
|
|
||||||
|
# Reason: Currently disabled in .rubocop_todo.yml
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Exclude:
|
||||||
|
- '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:
|
||||||
|
Exclude:
|
||||||
|
- lib/mastodon/cli/*.rb
|
||||||
|
- db/*migrate/**/*
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsparameterlists
|
||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
Max: 5 # RuboCop default 5
|
CountKeywordArgs: false
|
||||||
CountKeywordArgs: true # RuboCop default true
|
|
||||||
MaxOptionalParameters: 3 # RuboCop default 3
|
|
||||||
Exclude:
|
|
||||||
- app/models/concerns/account_interactions.rb
|
|
||||||
- app/services/activitypub/fetch_remote_account_service.rb
|
|
||||||
- app/services/activitypub/fetch_remote_actor_service.rb
|
|
||||||
|
|
||||||
Metrics/PerceivedComplexity:
|
# Reason: Prevailing style is argument file paths
|
||||||
Max: 16 # RuboCop default 8
|
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsfilepath
|
||||||
AllowedMethods:
|
Rails/FilePath:
|
||||||
- attempt_oembed
|
EnforcedStyle: arguments
|
||||||
- build_crutches
|
|
||||||
- calculate_scores
|
|
||||||
- deduplicate_users!
|
|
||||||
- discover_endpoint!
|
|
||||||
- filter_from_home?
|
|
||||||
- hydrate
|
|
||||||
- patch_for_forwarding!
|
|
||||||
- process_update
|
|
||||||
- remove_orphans
|
|
||||||
- update_media_attachments!
|
|
||||||
|
|
||||||
Naming/MemoizedInstanceVariableName:
|
# Reason: Prevailing style uses numeric status codes, matches RSpec/Rails/HttpStatus
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshttpstatus
|
||||||
|
Rails/HttpStatus:
|
||||||
Naming/MethodParameterName:
|
EnforcedStyle: numeric
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Rails:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Rails/ApplicationController:
|
|
||||||
Enabled: false
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/well_known/**/*.rb'
|
|
||||||
|
|
||||||
Rails/BelongsTo:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/ContentTag:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/EnumHash:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
|
# Reason: Allowed in `tootctl` CLI code and in boot ENV checker
|
||||||
|
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
|
||||||
Rails/Exit:
|
Rails/Exit:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/mastodon/*'
|
- 'config/boot.rb'
|
||||||
- 'lib/cli.rb'
|
- 'lib/mastodon/cli/*.rb'
|
||||||
|
|
||||||
Rails/FilePath:
|
# Reason: Some single letter camel case files shouldn't be split
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath
|
||||||
|
RSpec/FilePath:
|
||||||
|
CustomTransform:
|
||||||
|
ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename
|
||||||
|
DeepL: deepl
|
||||||
|
FetchOEmbedService: fetch_oembed_service
|
||||||
|
JsonLdHelper: jsonld_helper
|
||||||
|
OEmbedController: oembed_controller
|
||||||
|
OStatus: ostatus
|
||||||
|
NodeInfoController: nodeinfo_controller # NodeInfo isn't snake_cased for any of the instances
|
||||||
|
Exclude:
|
||||||
|
- 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder
|
||||||
|
- 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder
|
||||||
|
- 'spec/controllers/concerns/account_controller_concern_spec.rb' # Concerns describe ApplicationController and don't fit naming
|
||||||
|
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
|
||||||
|
- 'spec/controllers/concerns/localized_spec.rb'
|
||||||
|
- 'spec/controllers/concerns/rate_limit_headers_spec.rb'
|
||||||
|
- 'spec/controllers/concerns/signature_verification_spec.rb'
|
||||||
|
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
|
||||||
|
|
||||||
Rails/HasAndBelongsToMany:
|
# Reason:
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject
|
||||||
|
RSpec/NamedSubject:
|
||||||
|
EnforcedStyle: named_only
|
||||||
|
|
||||||
Rails/HasManyOrHasOneDependent:
|
# Reason: Prevailing style choice
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnottonot
|
||||||
|
RSpec/NotToNot:
|
||||||
|
EnforcedStyle: to_not
|
||||||
|
|
||||||
Rails/HelperInstanceVariable:
|
# Reason: Prevailing style uses numeric status codes, matches Rails/HttpStatus
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop-rspec/cops_rspec_rails.html#rspecrailshttpstatus
|
||||||
|
RSpec/Rails/HttpStatus:
|
||||||
Rails/HttpStatus:
|
EnforcedStyle: numeric
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/IndexBy:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/InverseOf:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/LexicallyScopedActionFilter:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/OutputSafety:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Rails/RakeEnvironment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/RedundantForeignKey:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/SkipsModelValidations:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/UniqueValidationWithoutIndex:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/AccessorGrouping:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/AccessModifierDeclarations:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ArrayCoercion:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/BisectedAttrAccessor:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/CaseLikeIf:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_style.html#styleclassandmodulechildren
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/CollectionMethods:
|
# Reason: Classes mostly self-document with their names
|
||||||
Enabled: true
|
# https://docs.rubocop.org/rubocop/cops_style.html#styledocumentation
|
||||||
PreferredMethods:
|
|
||||||
find_all: 'select'
|
|
||||||
|
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/DoubleNegation:
|
# Reason: Enforce modern Ruby style
|
||||||
Enabled: true
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylehashsyntax
|
||||||
|
|
||||||
Style/ExpandPathArguments:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ExponentialNotation:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/FormatString:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/FormatStringToken:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/FrozenStringLiteralComment:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/GuardClause:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/HashAsLastArrayItem:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/HashEachMethods:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/HashLikeCase:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/HashTransformKeys:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/HashTransformValues:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
Enabled: true
|
|
||||||
EnforcedStyle: ruby19_no_mixed_keys
|
EnforcedStyle: ruby19_no_mixed_keys
|
||||||
|
|
||||||
Style/IfUnlessModifier:
|
# Reason:
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylenumericliterals
|
||||||
|
Style/NumericLiterals:
|
||||||
Style/InverseMethods:
|
AllowedPatterns:
|
||||||
Enabled: false
|
- \d{4}_\d{2}_\d{2}_\d{6} # For DB migration date version number readability
|
||||||
|
|
||||||
Style/Lambda:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/MutableConstant:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylepercentliteraldelimiters
|
||||||
Style/PercentLiteralDelimiters:
|
Style/PercentLiteralDelimiters:
|
||||||
PreferredDelimiters:
|
PreferredDelimiters:
|
||||||
'%i': '()'
|
'%i': '()'
|
||||||
'%w': '()'
|
'%w': '()'
|
||||||
|
|
||||||
Style/PerlBackrefs:
|
# Reason: Prefer less indentation in conditional assignments
|
||||||
AutoCorrect: false
|
# https://docs.rubocop.org/rubocop/cops_style.html#styleredundantbegin
|
||||||
|
|
||||||
Style/RedundantFetchBlock:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/RedundantFileExtensionInRequire:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/RedundantRegexpCharacterClass:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/RedundantRegexpEscape:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/RedundantReturn:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/RedundantBegin:
|
Style/RedundantBegin:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/RegexpLiteral:
|
# Reason: Overridden to reduce implicit StandardError rescues
|
||||||
Enabled: false
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylerescuestandarderror
|
||||||
|
|
||||||
Style/RescueStandardError:
|
Style/RescueStandardError:
|
||||||
Enabled: true
|
EnforcedStyle: implicit
|
||||||
|
|
||||||
Style/SignalException:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SlicingWithRange:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
|
# Reason: Originally disabled for CodeClimate, and no config consensus has been found
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
|
||||||
Style/SymbolArray:
|
Style/SymbolArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainarrayliteral
|
||||||
Style/TrailingCommaInArrayLiteral:
|
Style/TrailingCommaInArrayLiteral:
|
||||||
EnforcedStyleForMultiline: 'comma'
|
EnforcedStyleForMultiline: 'comma'
|
||||||
|
|
||||||
|
# Reason:
|
||||||
|
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainhashliteral
|
||||||
Style/TrailingCommaInHashLiteral:
|
Style/TrailingCommaInHashLiteral:
|
||||||
EnforcedStyleForMultiline: 'comma'
|
EnforcedStyleForMultiline: 'comma'
|
||||||
|
|
||||||
Style/UnpackFirst:
|
Style/MiddleDot:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
RSpec/ScatteredSetup:
|
|
||||||
Enabled: false
|
|
||||||
RSpec/ImplicitExpect:
|
|
||||||
Enabled: false
|
|
||||||
RSpec/NamedSubject:
|
|
||||||
Enabled: false
|
|
||||||
RSpec/DescribeClass:
|
|
||||||
Enabled: false
|
|
||||||
RSpec/LetSetup:
|
|
||||||
Enabled: false
|
|
||||||
|
|
1452
.rubocop_todo.yml
Normal file
1452
.rubocop_todo.yml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1 +1 @@
|
||||||
3.0.4
|
3.2.2
|
||||||
|
|
|
@ -44,3 +44,6 @@ Gruntfile.js
|
||||||
# for specific ignore
|
# for specific ignore
|
||||||
!.svgo.yml
|
!.svgo.yml
|
||||||
!sass-lint/**/*.yml
|
!sass-lint/**/*.yml
|
||||||
|
|
||||||
|
# breaks lint-staged or generally anything using https://github.com/eemeli/yaml/issues/384
|
||||||
|
!**/yaml/dist/**/doc
|
||||||
|
|
1
Aptfile
1
Aptfile
|
@ -1,4 +1,5 @@
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
libopenblas0-pthread
|
||||||
libpq-dev
|
libpq-dev
|
||||||
libxdamage1
|
libxdamage1
|
||||||
libxfixes3
|
libxfixes3
|
||||||
|
|
169
CHANGELOG.md
169
CHANGELOG.md
|
@ -1,8 +1,120 @@
|
||||||
Changelog
|
# Changelog
|
||||||
=========
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [4.1.3] - 2023-07-06
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add fallback redirection when getting a webfinger query `LOCAL_DOMAIN@LOCAL_DOMAIN` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23600))
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Change OpenGraph-based embeds to allow fullscreen ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25058))
|
||||||
|
- Change AccessTokensVacuum to also delete expired tokens ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24868))
|
||||||
|
- Change profile updates to be sent to recently-mentioned servers ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24852))
|
||||||
|
- Change automatic post deletion thresholds and load detection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24614))
|
||||||
|
- Change `/api/v1/statuses/:id/history` to always return at least one item ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25510))
|
||||||
|
- Change auto-linking to allow carets in URL query params ([renchap](https://github.com/mastodon/mastodon/pull/25216))
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Remove invalid `X-Frame-Options: ALLOWALL` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25070))
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix wrong view being displayed when a webhook fails validation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25464))
|
||||||
|
- Fix soft-deleted post cleanup scheduler overwhelming the streaming server ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25519))
|
||||||
|
- Fix incorrect pagination headers in `/api/v2/admin/accounts` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/25477))
|
||||||
|
- Fix multiple inefficiencies in automatic post cleanup worker ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24607), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24785), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24840))
|
||||||
|
- Fix performance of streaming by parsing message JSON once ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25278), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25361))
|
||||||
|
- Fix CSP headers when `S3_ALIAS_HOST` includes a path component ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25273))
|
||||||
|
- Fix `tootctl accounts approve --number N` not aproving N earliest registrations ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24605))
|
||||||
|
- Fix reports not being closed when performing batch suspensions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24988))
|
||||||
|
- Fix being able to vote on your own polls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25015))
|
||||||
|
- Fix race condition when reblogging a status ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25016))
|
||||||
|
- Fix “Authorized applications” inefficiently and incorrectly getting last use date ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25060))
|
||||||
|
- Fix “Authorized applications” crashing when listing apps with certain admin API scopes ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25713))
|
||||||
|
- Fix multiple N+1s in ConversationsController ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25134), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25399), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25499))
|
||||||
|
- Fix user archive takeouts when using OpenStack Swift ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24431))
|
||||||
|
- Fix searching for remote content by URL not working under certain conditions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25637))
|
||||||
|
- Fix inefficiencies in indexing content for search ([VyrCossont](https://github.com/mastodon/mastodon/pull/24285), [VyrCossont](https://github.com/mastodon/mastodon/pull/24342))
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Add finer permission requirements for managing webhooks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25463))
|
||||||
|
- Update dependencies
|
||||||
|
- Add hardening headers for user-uploaded files ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25756))
|
||||||
|
- Fix verified links possibly hiding important parts of the URL (CVE-2023-36462)
|
||||||
|
- Fix timeout handling of outbound HTTP requests (CVE-2023-36461)
|
||||||
|
- Fix arbitrary file creation through media processing (CVE-2023-36460)
|
||||||
|
- Fix possible XSS in preview cards (CVE-2023-36459)
|
||||||
|
|
||||||
|
## [4.1.2] - 2023-04-04
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix crash in `tootctl` commands making use of parallelization when Elasticsearch is enabled ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24182), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24377))
|
||||||
|
- Fix crash in `db:setup` when Elasticsearch is enabled ([rrgeorge](https://github.com/mastodon/mastodon/pull/24302))
|
||||||
|
- Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24200))
|
||||||
|
- Fix invalid/expired invites being processed on sign-up ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24337))
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Update Ruby to 3.0.6 due to ReDoS vulnerabilities ([saizai](https://github.com/mastodon/mastodon/pull/24334))
|
||||||
|
- Fix unescaped user input in LDAP query ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24379))
|
||||||
|
|
||||||
|
## [4.1.1] - 2023-03-16
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add redirection from paths with url-encoded `@` to their decoded form ([thijskh](https://github.com/mastodon/mastodon/pull/23593))
|
||||||
|
- Add `lang` attribute to native language names in language picker in Web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23749))
|
||||||
|
- Add headers to outgoing mails to avoid auto-replies ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23597))
|
||||||
|
- Add support for refreshing many accounts at once with `tootctl accounts refresh` ([9p4](https://github.com/mastodon/mastodon/pull/23304))
|
||||||
|
- Add confirmation modal when clicking to edit a post with a non-empty compose form ([PauloVilarinho](https://github.com/mastodon/mastodon/pull/23936))
|
||||||
|
- Add support for the HAproxy PROXY protocol through the `PROXY_PROTO_V1` environment variable ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24064))
|
||||||
|
- Add `SENDFILE_HEADER` environment variable ([Gargron](https://github.com/mastodon/mastodon/pull/24123))
|
||||||
|
- Add cache headers to static files served through Rails ([Gargron](https://github.com/mastodon/mastodon/pull/24120))
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Increase contrast of upload progress bar background ([toolmantim](https://github.com/mastodon/mastodon/pull/23836))
|
||||||
|
- Change post auto-deletion throttling constants to better scale with server size ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23320))
|
||||||
|
- Change order of bookmark and favourite sidebar entries in single-column UI for consistency ([TerryGarcia](https://github.com/mastodon/mastodon/pull/23701))
|
||||||
|
- Change `ActivityPub::DeliveryWorker` retries to be spread out more ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21956))
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix “Remove all followers from the selected domains” also removing follows and notifications ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23805))
|
||||||
|
- Fix streaming metrics format ([emilweth](https://github.com/mastodon/mastodon/pull/23519), [emilweth](https://github.com/mastodon/mastodon/pull/23520))
|
||||||
|
- Fix case-sensitive check for previously used hashtags in hashtag autocompletion ([deanveloper](https://github.com/mastodon/mastodon/pull/23526))
|
||||||
|
- Fix focus point of already-attached media not saving after edit ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23566))
|
||||||
|
- Fix sidebar behavior in settings/admin UI on mobile ([wxt2005](https://github.com/mastodon/mastodon/pull/23764))
|
||||||
|
- Fix inefficiency when searching accounts per username in admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23801))
|
||||||
|
- Fix duplicate “Publish” button on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23804))
|
||||||
|
- Fix server error when failing to follow back followers from `/relationships` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23787))
|
||||||
|
- Fix server error when attempting to display the edit history of a trendable post in the admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23574))
|
||||||
|
- Fix `tootctl accounts migrate` crashing because of a typo ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23567))
|
||||||
|
- Fix original account being unfollowed on migration before the follow request to the new account could be sent ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21957))
|
||||||
|
- Fix the “Back” button in column headers sometimes leaving Mastodon ([c960657](https://github.com/mastodon/mastodon/pull/23953))
|
||||||
|
- Fix pgBouncer resetting application name on every transaction ([Gargron](https://github.com/mastodon/mastodon/pull/23958))
|
||||||
|
- Fix unconfirmed accounts being counted as active users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23803))
|
||||||
|
- Fix `/api/v1/streaming` sub-paths not being redirected ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23988))
|
||||||
|
- Fix drag'n'drop upload area text that spans multiple lines not being centered ([vintprox](https://github.com/mastodon/mastodon/pull/24029))
|
||||||
|
- Fix sidekiq jobs not triggering Elasticsearch index updates ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24046))
|
||||||
|
- Fix tags being unnecessarily stripped from plain-text short site description ([c960657](https://github.com/mastodon/mastodon/pull/23975))
|
||||||
|
- Fix HTML entities not being un-escaped in extracted plain-text from remote posts ([c960657](https://github.com/mastodon/mastodon/pull/24019))
|
||||||
|
- Fix dashboard crash on ElasticSearch server error ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23751))
|
||||||
|
- Fix incorrect post links in strikes when the account is remote ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23611))
|
||||||
|
- Fix misleading error code when receiving invalid WebAuthn credentials ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23568))
|
||||||
|
- Fix duplicate mails being sent when the SMTP server is too slow to close the connection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23750))
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Change user backups to use expiring URLs for download when possible ([Gargron](https://github.com/mastodon/mastodon/pull/24136))
|
||||||
|
- Add warning for object storage misconfiguration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24137))
|
||||||
|
|
||||||
## [4.1.0] - 2023-02-10
|
## [4.1.0] - 2023-02-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -219,6 +331,7 @@ All notable changes to this project will be documented in this file.
|
||||||
- Fix unbounded recursion in post discovery ([ClearlyClaire,nametoolong](https://github.com/mastodon/mastodon/pull/23506))
|
- Fix unbounded recursion in post discovery ([ClearlyClaire,nametoolong](https://github.com/mastodon/mastodon/pull/23506))
|
||||||
|
|
||||||
## [4.0.2] - 2022-11-15
|
## [4.0.2] - 2022-11-15
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
|
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
|
||||||
|
@ -226,6 +339,7 @@ All notable changes to this project will be documented in this file.
|
||||||
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
|
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
|
||||||
|
|
||||||
## [4.0.1] - 2022-11-14
|
## [4.0.1] - 2022-11-14
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix nodes order being sometimes mangled when rewriting emoji ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20677))
|
- Fix nodes order being sometimes mangled when rewriting emoji ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20677))
|
||||||
|
@ -429,6 +543,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix out-of-bound reads in blurhash transcoder ([delroth](https://github.com/mastodon/mastodon/pull/20388))
|
- Fix out-of-bound reads in blurhash transcoder ([delroth](https://github.com/mastodon/mastodon/pull/20388))
|
||||||
|
|
||||||
## [3.5.3] - 2022-05-26
|
## [3.5.3] - 2022-05-26
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **Add language dropdown to compose form in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/18420), [ykzts](https://github.com/mastodon/mastodon/pull/18460))
|
- **Add language dropdown to compose form in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/18420), [ykzts](https://github.com/mastodon/mastodon/pull/18460))
|
||||||
|
@ -476,6 +591,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix confirmation redirect to app without `Location` header ([Gargron](https://github.com/mastodon/mastodon/pull/18523))
|
- Fix confirmation redirect to app without `Location` header ([Gargron](https://github.com/mastodon/mastodon/pull/18523))
|
||||||
|
|
||||||
## [3.5.2] - 2022-05-04
|
## [3.5.2] - 2022-05-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add warning on direct messages screen in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/18289))
|
- Add warning on direct messages screen in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/18289))
|
||||||
|
@ -528,6 +644,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix error in alias settings page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18004))
|
- Fix error in alias settings page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18004))
|
||||||
|
|
||||||
## [3.5.1] - 2022-04-08
|
## [3.5.1] - 2022-04-08
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add pagination for trending statuses in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/17976))
|
- Add pagination for trending statuses in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/17976))
|
||||||
|
@ -571,6 +688,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix error when indexing statuses into Elasticsearch ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17912))
|
- Fix error when indexing statuses into Elasticsearch ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17912))
|
||||||
|
|
||||||
## [3.5.0] - 2022-03-30
|
## [3.5.0] - 2022-03-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **Add support for incoming edited posts** ([Gargron](https://github.com/mastodon/mastodon/pull/16697), [Gargron](https://github.com/mastodon/mastodon/pull/17727), [Gargron](https://github.com/mastodon/mastodon/pull/17728), [Gargron](https://github.com/mastodon/mastodon/pull/17320), [Gargron](https://github.com/mastodon/mastodon/pull/17404), [Gargron](https://github.com/mastodon/mastodon/pull/17390), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17335), [Gargron](https://github.com/mastodon/mastodon/pull/17696), [Gargron](https://github.com/mastodon/mastodon/pull/17745), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17740), [Gargron](https://github.com/mastodon/mastodon/pull/17697), [Gargron](https://github.com/mastodon/mastodon/pull/17648), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17531), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17499), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17498), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17380), [Gargron](https://github.com/mastodon/mastodon/pull/17373), [Gargron](https://github.com/mastodon/mastodon/pull/17334), [Gargron](https://github.com/mastodon/mastodon/pull/17333), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17699), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17748))
|
- **Add support for incoming edited posts** ([Gargron](https://github.com/mastodon/mastodon/pull/16697), [Gargron](https://github.com/mastodon/mastodon/pull/17727), [Gargron](https://github.com/mastodon/mastodon/pull/17728), [Gargron](https://github.com/mastodon/mastodon/pull/17320), [Gargron](https://github.com/mastodon/mastodon/pull/17404), [Gargron](https://github.com/mastodon/mastodon/pull/17390), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17335), [Gargron](https://github.com/mastodon/mastodon/pull/17696), [Gargron](https://github.com/mastodon/mastodon/pull/17745), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17740), [Gargron](https://github.com/mastodon/mastodon/pull/17697), [Gargron](https://github.com/mastodon/mastodon/pull/17648), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17531), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17499), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17498), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17380), [Gargron](https://github.com/mastodon/mastodon/pull/17373), [Gargron](https://github.com/mastodon/mastodon/pull/17334), [Gargron](https://github.com/mastodon/mastodon/pull/17333), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17699), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17748))
|
||||||
|
@ -770,6 +888,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix being able to bypass e-mail restrictions ([Gargron](https://github.com/mastodon/mastodon/pull/17909))
|
- Fix being able to bypass e-mail restrictions ([Gargron](https://github.com/mastodon/mastodon/pull/17909))
|
||||||
|
|
||||||
## [3.4.6] - 2022-02-03
|
## [3.4.6] - 2022-02-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix `mastodon:webpush:generate_vapid_key` task requiring a functional environment ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17338))
|
- Fix `mastodon:webpush:generate_vapid_key` task requiring a functional environment ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17338))
|
||||||
|
@ -784,6 +903,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Disable legacy XSS filtering ([Wonderfall](https://github.com/mastodon/mastodon/pull/17289))
|
- Disable legacy XSS filtering ([Wonderfall](https://github.com/mastodon/mastodon/pull/17289))
|
||||||
|
|
||||||
## [3.4.5] - 2022-01-31
|
## [3.4.5] - 2022-01-31
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add more advanced migration tests ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17393))
|
- Add more advanced migration tests ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17393))
|
||||||
|
@ -798,6 +918,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix followers synchronization mechanism ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16510))
|
- Fix followers synchronization mechanism ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16510))
|
||||||
|
|
||||||
## [3.4.4] - 2021-11-26
|
## [3.4.4] - 2021-11-26
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix error when suspending user with an already blocked canonical email ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17036))
|
- Fix error when suspending user with an already blocked canonical email ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17036))
|
||||||
|
@ -815,11 +936,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix handling of recursive toots in WebUI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17041))
|
- Fix handling of recursive toots in WebUI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17041))
|
||||||
|
|
||||||
## [3.4.3] - 2021-11-06
|
## [3.4.3] - 2021-11-06
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix login being broken due to inaccurately applied backport fix in 3.4.2 ([Gargron](https://github.com/mastodon/mastodon/commit/5c47a18c8df3231aa25c6d1f140a71a7fac9cbf9))
|
- Fix login being broken due to inaccurately applied backport fix in 3.4.2 ([Gargron](https://github.com/mastodon/mastodon/commit/5c47a18c8df3231aa25c6d1f140a71a7fac9cbf9))
|
||||||
|
|
||||||
## [3.4.2] - 2021-11-06
|
## [3.4.2] - 2021-11-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `configuration` attribute to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/16485))
|
- Add `configuration` attribute to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/16485))
|
||||||
|
@ -863,6 +986,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix revoking a specific session not working ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16943))
|
- Fix revoking a specific session not working ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16943))
|
||||||
|
|
||||||
## [3.4.1] - 2021-06-03
|
## [3.4.1] - 2021-06-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add new emoji assets from Twemoji 13.1.0 ([Gargron](https://github.com/mastodon/mastodon/pull/16345))
|
- Add new emoji assets from Twemoji 13.1.0 ([Gargron](https://github.com/mastodon/mastodon/pull/16345))
|
||||||
|
@ -882,6 +1006,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix mailer jobs for deleted notifications erroring out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16294))
|
- Fix mailer jobs for deleted notifications erroring out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16294))
|
||||||
|
|
||||||
## [3.4.0] - 2021-05-16
|
## [3.4.0] - 2021-05-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **Add follow recommendations for onboarding** ([Gargron](https://github.com/mastodon/mastodon/pull/15945), [Gargron](https://github.com/mastodon/mastodon/pull/16161), [Gargron](https://github.com/mastodon/mastodon/pull/16060), [Gargron](https://github.com/mastodon/mastodon/pull/16077), [Gargron](https://github.com/mastodon/mastodon/pull/16078), [Gargron](https://github.com/mastodon/mastodon/pull/16160), [Gargron](https://github.com/mastodon/mastodon/pull/16079), [noellabo](https://github.com/mastodon/mastodon/pull/16044), [noellabo](https://github.com/mastodon/mastodon/pull/16045), [Gargron](https://github.com/mastodon/mastodon/pull/16152), [Gargron](https://github.com/mastodon/mastodon/pull/16153), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16082), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16173), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16159), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16189))
|
- **Add follow recommendations for onboarding** ([Gargron](https://github.com/mastodon/mastodon/pull/15945), [Gargron](https://github.com/mastodon/mastodon/pull/16161), [Gargron](https://github.com/mastodon/mastodon/pull/16060), [Gargron](https://github.com/mastodon/mastodon/pull/16077), [Gargron](https://github.com/mastodon/mastodon/pull/16078), [Gargron](https://github.com/mastodon/mastodon/pull/16160), [Gargron](https://github.com/mastodon/mastodon/pull/16079), [noellabo](https://github.com/mastodon/mastodon/pull/16044), [noellabo](https://github.com/mastodon/mastodon/pull/16045), [Gargron](https://github.com/mastodon/mastodon/pull/16152), [Gargron](https://github.com/mastodon/mastodon/pull/16153), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16082), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16173), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16159), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16189))
|
||||||
|
@ -917,7 +1042,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- This method allows an app through which a user signed-up to request a new confirmation e-mail to be sent, or to change the e-mail of the account before it is confirmed
|
- This method allows an app through which a user signed-up to request a new confirmation e-mail to be sent, or to change the e-mail of the account before it is confirmed
|
||||||
- Add `GET /api/v1/accounts/lookup` to REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15740), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/15750))
|
- Add `GET /api/v1/accounts/lookup` to REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15740), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/15750))
|
||||||
- This method allows to quickly convert a username of a known account to an ID that can be used with the REST API, or to check if a username is available
|
- This method allows to quickly convert a username of a known account to an ID that can be used with the REST API, or to check if a username is available
|
||||||
for sign-up
|
for sign-up
|
||||||
- Add `policy` param to `POST /api/v1/push/subscriptions` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/16040))
|
- Add `policy` param to `POST /api/v1/push/subscriptions` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/16040))
|
||||||
- This param allows an app to control from whom notifications should be delivered as push notifications to the app
|
- This param allows an app to control from whom notifications should be delivered as push notifications to the app
|
||||||
- Add `details` to error response for `POST /api/v1/accounts` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15803))
|
- Add `details` to error response for `POST /api/v1/accounts` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15803))
|
||||||
|
@ -1027,6 +1152,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix app name, website and redirect URIs not having a maximum length ([Gargron](https://github.com/mastodon/mastodon/pull/16042))
|
- Fix app name, website and redirect URIs not having a maximum length ([Gargron](https://github.com/mastodon/mastodon/pull/16042))
|
||||||
|
|
||||||
## [3.3.0] - 2020-12-27
|
## [3.3.0] - 2020-12-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **Add hotkeys for audio/video control in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/15158), [Gargron](https://github.com/mastodon/mastodon/pull/15198))
|
- **Add hotkeys for audio/video control in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/15158), [Gargron](https://github.com/mastodon/mastodon/pull/15198))
|
||||||
|
@ -1203,6 +1329,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
|
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
|
||||||
|
|
||||||
## [3.2.2] - 2020-12-19
|
## [3.2.2] - 2020-12-19
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `tootctl maintenance fix-duplicates` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14860), [Gargron](https://github.com/mastodon/mastodon/pull/15223))
|
- Add `tootctl maintenance fix-duplicates` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14860), [Gargron](https://github.com/mastodon/mastodon/pull/15223))
|
||||||
|
@ -1229,6 +1356,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
|
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
|
||||||
|
|
||||||
## [3.2.1] - 2020-10-19
|
## [3.2.1] - 2020-10-19
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add support for latest HTTP Signatures spec draft ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14556))
|
- Add support for latest HTTP Signatures spec draft ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14556))
|
||||||
|
@ -1258,6 +1386,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix files served as `application/octet-stream` being rejected without attempting mime type detection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14452))
|
- Fix files served as `application/octet-stream` being rejected without attempting mime type detection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14452))
|
||||||
|
|
||||||
## [3.2.0] - 2020-07-27
|
## [3.2.0] - 2020-07-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `SMTP_SSL` environment variable ([OmmyZhang](https://github.com/mastodon/mastodon/pull/14309))
|
- Add `SMTP_SSL` environment variable ([OmmyZhang](https://github.com/mastodon/mastodon/pull/14309))
|
||||||
|
@ -1393,7 +1522,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix unique username constraint for local users not being enforced in database ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14099))
|
- Fix unique username constraint for local users not being enforced in database ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14099))
|
||||||
- Fix unnecessary gap under video modal in web UI ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14098))
|
- Fix unnecessary gap under video modal in web UI ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14098))
|
||||||
- Fix 2FA and sign in token pages not respecting user locale ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14087))
|
- Fix 2FA and sign in token pages not respecting user locale ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14087))
|
||||||
- Fix unapproved users being able to view profiles when in limited-federation mode *and* requiring approval for sign-ups ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14093))
|
- Fix unapproved users being able to view profiles when in limited-federation mode _and_ requiring approval for sign-ups ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14093))
|
||||||
- Fix initial audio volume not corresponding to what's displayed in audio player in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14057))
|
- Fix initial audio volume not corresponding to what's displayed in audio player in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14057))
|
||||||
- Fix timelines sometimes jumping when closing modals in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14019))
|
- Fix timelines sometimes jumping when closing modals in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14019))
|
||||||
- Fix memory usage of downloading remote files ([Gargron](https://github.com/mastodon/mastodon/pull/14184), [Gargron](https://github.com/mastodon/mastodon/pull/14181), [noellabo](https://github.com/mastodon/mastodon/pull/14356))
|
- Fix memory usage of downloading remote files ([Gargron](https://github.com/mastodon/mastodon/pull/14184), [Gargron](https://github.com/mastodon/mastodon/pull/14181), [noellabo](https://github.com/mastodon/mastodon/pull/14356))
|
||||||
|
@ -1411,6 +1540,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Clear out media attachments in a separate worker (slow)
|
- Clear out media attachments in a separate worker (slow)
|
||||||
|
|
||||||
## [3.1.5] - 2020-07-07
|
## [3.1.5] - 2020-07-07
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
- Fix media attachment enumeration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14254))
|
- Fix media attachment enumeration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14254))
|
||||||
|
@ -1418,6 +1548,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix other sessions not being logged out on password change ([Gargron](https://github.com/mastodon/mastodon/pull/14252))
|
- Fix other sessions not being logged out on password change ([Gargron](https://github.com/mastodon/mastodon/pull/14252))
|
||||||
|
|
||||||
## [3.1.4] - 2020-05-14
|
## [3.1.4] - 2020-05-14
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `vi` to available locales ([taicv](https://github.com/mastodon/mastodon/pull/13542))
|
- Add `vi` to available locales ([taicv](https://github.com/mastodon/mastodon/pull/13542))
|
||||||
|
@ -1456,7 +1587,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix regression in `tootctl media remove-orphans` ([Gargron](https://github.com/mastodon/mastodon/pull/13405))
|
- Fix regression in `tootctl media remove-orphans` ([Gargron](https://github.com/mastodon/mastodon/pull/13405))
|
||||||
- Fix old unique jobs digests not having been cleaned up ([Gargron](https://github.com/mastodon/mastodon/pull/13683))
|
- Fix old unique jobs digests not having been cleaned up ([Gargron](https://github.com/mastodon/mastodon/pull/13683))
|
||||||
- Fix own following/followers not showing muted users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13614))
|
- Fix own following/followers not showing muted users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13614))
|
||||||
- Fix list of followed people ignoring sorting on Follows & Followers page ([taras2358](https://github.com/mastodon/mastodon/pull/13676))
|
- Fix list of followed people ignoring sorting on Follows & Followers page ([taras2358](https://github.com/mastodon/mastodon/pull/13676))
|
||||||
- Fix wrong pgHero Content-Security-Policy when `CDN_HOST` is set ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13595))
|
- Fix wrong pgHero Content-Security-Policy when `CDN_HOST` is set ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13595))
|
||||||
- Fix needlessly deduplicating usernames on collisions with remote accounts when signing-up through SAML/CAS ([kaiyou](https://github.com/mastodon/mastodon/pull/13581))
|
- Fix needlessly deduplicating usernames on collisions with remote accounts when signing-up through SAML/CAS ([kaiyou](https://github.com/mastodon/mastodon/pull/13581))
|
||||||
- Fix page incorrectly scrolling when bringing up dropdown menus in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13574))
|
- Fix page incorrectly scrolling when bringing up dropdown menus in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13574))
|
||||||
|
@ -1485,6 +1616,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- The issue only affects developers of apps who are shared between multiple users, such as server-side apps like cross-posters
|
- The issue only affects developers of apps who are shared between multiple users, such as server-side apps like cross-posters
|
||||||
|
|
||||||
## [3.1.3] - 2020-04-05
|
## [3.1.3] - 2020-04-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add ability to filter audit log in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/13381))
|
- Add ability to filter audit log in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/13381))
|
||||||
|
@ -1558,6 +1690,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix re-sending of e-mail confirmation not being rate limited ([Gargron](https://github.com/mastodon/mastodon/pull/13360))
|
- Fix re-sending of e-mail confirmation not being rate limited ([Gargron](https://github.com/mastodon/mastodon/pull/13360))
|
||||||
|
|
||||||
## [v3.1.2] - 2020-02-27
|
## [v3.1.2] - 2020-02-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `--reset-password` option to `tootctl accounts modify` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13126))
|
- Add `--reset-password` option to `tootctl accounts modify` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13126))
|
||||||
|
@ -1584,11 +1717,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix leak of arbitrary statuses through unfavourite action in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/13161))
|
- Fix leak of arbitrary statuses through unfavourite action in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/13161))
|
||||||
|
|
||||||
## [3.1.1] - 2020-02-10
|
## [3.1.1] - 2020-02-10
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix yanked dependency preventing installation ([mayaeh](https://github.com/mastodon/mastodon/pull/13059))
|
- Fix yanked dependency preventing installation ([mayaeh](https://github.com/mastodon/mastodon/pull/13059))
|
||||||
|
|
||||||
## [3.1.0] - 2020-02-09
|
## [3.1.0] - 2020-02-09
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add bookmarks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/7107), [Gargron](https://github.com/mastodon/mastodon/pull/12494), [Gomasy](https://github.com/mastodon/mastodon/pull/12381))
|
- Add bookmarks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/7107), [Gargron](https://github.com/mastodon/mastodon/pull/12494), [Gomasy](https://github.com/mastodon/mastodon/pull/12381))
|
||||||
|
@ -1753,6 +1888,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix settings pages being cacheable by the browser ([Gargron](https://github.com/mastodon/mastodon/pull/12714))
|
- Fix settings pages being cacheable by the browser ([Gargron](https://github.com/mastodon/mastodon/pull/12714))
|
||||||
|
|
||||||
## [3.0.1] - 2019-10-10
|
## [3.0.1] - 2019-10-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `tootctl media usage` command ([Gargron](https://github.com/mastodon/mastodon/pull/12115))
|
- Add `tootctl media usage` command ([Gargron](https://github.com/mastodon/mastodon/pull/12115))
|
||||||
|
@ -1786,6 +1922,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix `tootctl accounts cull` advertising unused option flag ([Kjwon15](https://github.com/mastodon/mastodon/pull/12074))
|
- Fix `tootctl accounts cull` advertising unused option flag ([Kjwon15](https://github.com/mastodon/mastodon/pull/12074))
|
||||||
|
|
||||||
## [3.0.0] - 2019-10-03
|
## [3.0.0] - 2019-10-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add "not available" label to unloaded media attachments in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/11715), [Gargron](https://github.com/mastodon/mastodon/pull/11745))
|
- Add "not available" label to unloaded media attachments in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/11715), [Gargron](https://github.com/mastodon/mastodon/pull/11745))
|
||||||
|
@ -1982,6 +2119,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix performance of GIF re-encoding and always strip EXIF data from videos ([Gargron](https://github.com/mastodon/mastodon/pull/12057))
|
- Fix performance of GIF re-encoding and always strip EXIF data from videos ([Gargron](https://github.com/mastodon/mastodon/pull/12057))
|
||||||
|
|
||||||
## [2.9.3] - 2019-08-10
|
## [2.9.3] - 2019-08-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add GIF and WebP support for custom emojis ([Gargron](https://github.com/mastodon/mastodon/pull/11519))
|
- Add GIF and WebP support for custom emojis ([Gargron](https://github.com/mastodon/mastodon/pull/11519))
|
||||||
|
@ -2041,6 +2179,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix blocked domains still being able to fill database with account records ([Gargron](https://github.com/mastodon/mastodon/pull/11219))
|
- Fix blocked domains still being able to fill database with account records ([Gargron](https://github.com/mastodon/mastodon/pull/11219))
|
||||||
|
|
||||||
## [2.9.2] - 2019-06-22
|
## [2.9.2] - 2019-06-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `short_description` and `approval_required` to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/11146))
|
- Add `short_description` and `approval_required` to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/11146))
|
||||||
|
@ -2055,6 +2194,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix audio not being downloaded from remote servers ([Gargron](https://github.com/mastodon/mastodon/pull/11145))
|
- Fix audio not being downloaded from remote servers ([Gargron](https://github.com/mastodon/mastodon/pull/11145))
|
||||||
|
|
||||||
## [2.9.1] - 2019-06-22
|
## [2.9.1] - 2019-06-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add moderation API ([Gargron](https://github.com/mastodon/mastodon/pull/9387))
|
- Add moderation API ([Gargron](https://github.com/mastodon/mastodon/pull/9387))
|
||||||
|
@ -2080,6 +2220,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix scrolling behaviour in compose form ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/11093))
|
- Fix scrolling behaviour in compose form ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/11093))
|
||||||
|
|
||||||
## [2.9.0] - 2019-06-13
|
## [2.9.0] - 2019-06-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **Add single-column mode in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/10807), [Gargron](https://github.com/mastodon/mastodon/pull/10848), [Gargron](https://github.com/mastodon/mastodon/pull/11003), [Gargron](https://github.com/mastodon/mastodon/pull/10961), [Hanage999](https://github.com/mastodon/mastodon/pull/10915), [noellabo](https://github.com/mastodon/mastodon/pull/10917), [abcang](https://github.com/mastodon/mastodon/pull/10859), [Gargron](https://github.com/mastodon/mastodon/pull/10820), [Gargron](https://github.com/mastodon/mastodon/pull/10835), [Gargron](https://github.com/mastodon/mastodon/pull/10809), [Gargron](https://github.com/mastodon/mastodon/pull/10963), [noellabo](https://github.com/mastodon/mastodon/pull/10883), [Hanage999](https://github.com/mastodon/mastodon/pull/10839))
|
- **Add single-column mode in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/10807), [Gargron](https://github.com/mastodon/mastodon/pull/10848), [Gargron](https://github.com/mastodon/mastodon/pull/11003), [Gargron](https://github.com/mastodon/mastodon/pull/10961), [Hanage999](https://github.com/mastodon/mastodon/pull/10915), [noellabo](https://github.com/mastodon/mastodon/pull/10917), [abcang](https://github.com/mastodon/mastodon/pull/10859), [Gargron](https://github.com/mastodon/mastodon/pull/10820), [Gargron](https://github.com/mastodon/mastodon/pull/10835), [Gargron](https://github.com/mastodon/mastodon/pull/10809), [Gargron](https://github.com/mastodon/mastodon/pull/10963), [noellabo](https://github.com/mastodon/mastodon/pull/10883), [Hanage999](https://github.com/mastodon/mastodon/pull/10839))
|
||||||
|
@ -2134,6 +2275,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix login sometimes redirecting to paths that are not pages ([Gargron](https://github.com/mastodon/mastodon/pull/11019))
|
- Fix login sometimes redirecting to paths that are not pages ([Gargron](https://github.com/mastodon/mastodon/pull/11019))
|
||||||
|
|
||||||
## [2.8.4] - 2019-05-24
|
## [2.8.4] - 2019-05-24
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix delivery not retrying on some inbox errors that should be retriable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10812))
|
- Fix delivery not retrying on some inbox errors that should be retriable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10812))
|
||||||
|
@ -2145,6 +2287,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Require specific OAuth scopes for specific endpoints of the streaming API, instead of merely requiring a token for all endpoints, and allow using WebSockets protocol negotiation to specify the access token instead of using a query string ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10818))
|
- Require specific OAuth scopes for specific endpoints of the streaming API, instead of merely requiring a token for all endpoints, and allow using WebSockets protocol negotiation to specify the access token instead of using a query string ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10818))
|
||||||
|
|
||||||
## [2.8.3] - 2019-05-19
|
## [2.8.3] - 2019-05-19
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `og:image:alt` OpenGraph tag ([BenLubar](https://github.com/mastodon/mastodon/pull/10779))
|
- Add `og:image:alt` OpenGraph tag ([BenLubar](https://github.com/mastodon/mastodon/pull/10779))
|
||||||
|
@ -2167,6 +2310,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix "invited by" not showing up in admin UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10791))
|
- Fix "invited by" not showing up in admin UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10791))
|
||||||
|
|
||||||
## [2.8.2] - 2019-05-05
|
## [2.8.2] - 2019-05-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add `SOURCE_TAG` environment variable ([ushitora-anqou](https://github.com/mastodon/mastodon/pull/10698))
|
- Add `SOURCE_TAG` environment variable ([ushitora-anqou](https://github.com/mastodon/mastodon/pull/10698))
|
||||||
|
@ -2179,6 +2323,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix closing video modal scrolling timelines to top ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10695))
|
- Fix closing video modal scrolling timelines to top ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10695))
|
||||||
|
|
||||||
## [2.8.1] - 2019-05-04
|
## [2.8.1] - 2019-05-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add link to existing domain block when trying to block an already-blocked domain ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10663))
|
- Add link to existing domain block when trying to block an already-blocked domain ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10663))
|
||||||
|
@ -2218,6 +2363,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix confirmation modals being too narrow for a secondary action button ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10586))
|
- Fix confirmation modals being too narrow for a secondary action button ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10586))
|
||||||
|
|
||||||
## [2.8.0] - 2019-04-10
|
## [2.8.0] - 2019-04-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add polls ([Gargron](https://github.com/mastodon/mastodon/pull/10111), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10155), [Gargron](https://github.com/mastodon/mastodon/pull/10184), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10196), [Gargron](https://github.com/mastodon/mastodon/pull/10248), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10255), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10322), [Gargron](https://github.com/mastodon/mastodon/pull/10138), [Gargron](https://github.com/mastodon/mastodon/pull/10139), [Gargron](https://github.com/mastodon/mastodon/pull/10144), [Gargron](https://github.com/mastodon/mastodon/pull/10145),[Gargron](https://github.com/mastodon/mastodon/pull/10146), [Gargron](https://github.com/mastodon/mastodon/pull/10148), [Gargron](https://github.com/mastodon/mastodon/pull/10151), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10150), [Gargron](https://github.com/mastodon/mastodon/pull/10168), [Gargron](https://github.com/mastodon/mastodon/pull/10165), [Gargron](https://github.com/mastodon/mastodon/pull/10172), [Gargron](https://github.com/mastodon/mastodon/pull/10170), [Gargron](https://github.com/mastodon/mastodon/pull/10171), [Gargron](https://github.com/mastodon/mastodon/pull/10186), [Gargron](https://github.com/mastodon/mastodon/pull/10189), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10200), [rinsuki](https://github.com/mastodon/mastodon/pull/10203), [Gargron](https://github.com/mastodon/mastodon/pull/10213), [Gargron](https://github.com/mastodon/mastodon/pull/10246), [Gargron](https://github.com/mastodon/mastodon/pull/10265), [Gargron](https://github.com/mastodon/mastodon/pull/10261), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10333), [Gargron](https://github.com/mastodon/mastodon/pull/10352), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10140), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10142), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10141), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10162), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10161), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10158), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10156), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10160), [Gargron](https://github.com/mastodon/mastodon/pull/10185), [Gargron](https://github.com/mastodon/mastodon/pull/10188), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10195), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10208), [Gargron](https://github.com/mastodon/mastodon/pull/10187), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10214), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10209))
|
- Add polls ([Gargron](https://github.com/mastodon/mastodon/pull/10111), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10155), [Gargron](https://github.com/mastodon/mastodon/pull/10184), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10196), [Gargron](https://github.com/mastodon/mastodon/pull/10248), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10255), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10322), [Gargron](https://github.com/mastodon/mastodon/pull/10138), [Gargron](https://github.com/mastodon/mastodon/pull/10139), [Gargron](https://github.com/mastodon/mastodon/pull/10144), [Gargron](https://github.com/mastodon/mastodon/pull/10145),[Gargron](https://github.com/mastodon/mastodon/pull/10146), [Gargron](https://github.com/mastodon/mastodon/pull/10148), [Gargron](https://github.com/mastodon/mastodon/pull/10151), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10150), [Gargron](https://github.com/mastodon/mastodon/pull/10168), [Gargron](https://github.com/mastodon/mastodon/pull/10165), [Gargron](https://github.com/mastodon/mastodon/pull/10172), [Gargron](https://github.com/mastodon/mastodon/pull/10170), [Gargron](https://github.com/mastodon/mastodon/pull/10171), [Gargron](https://github.com/mastodon/mastodon/pull/10186), [Gargron](https://github.com/mastodon/mastodon/pull/10189), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10200), [rinsuki](https://github.com/mastodon/mastodon/pull/10203), [Gargron](https://github.com/mastodon/mastodon/pull/10213), [Gargron](https://github.com/mastodon/mastodon/pull/10246), [Gargron](https://github.com/mastodon/mastodon/pull/10265), [Gargron](https://github.com/mastodon/mastodon/pull/10261), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10333), [Gargron](https://github.com/mastodon/mastodon/pull/10352), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10140), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10142), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10141), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10162), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10161), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10158), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10156), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10160), [Gargron](https://github.com/mastodon/mastodon/pull/10185), [Gargron](https://github.com/mastodon/mastodon/pull/10188), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10195), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10208), [Gargron](https://github.com/mastodon/mastodon/pull/10187), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10214), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10209))
|
||||||
|
@ -2301,6 +2447,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix `tootctl accounts cull` sometimes removing accounts that are temporarily unreachable ([BenLubar](https://github.com/mastodon/mastodon/pull/10460))
|
- Fix `tootctl accounts cull` sometimes removing accounts that are temporarily unreachable ([BenLubar](https://github.com/mastodon/mastodon/pull/10460))
|
||||||
|
|
||||||
## [2.7.4] - 2019-03-05
|
## [2.7.4] - 2019-03-05
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix web UI not cleaning up notifications after block ([Gargron](https://github.com/mastodon/mastodon/pull/10108))
|
- Fix web UI not cleaning up notifications after block ([Gargron](https://github.com/mastodon/mastodon/pull/10108))
|
||||||
|
@ -2315,6 +2462,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix edit profile page crash for suspended-then-unsuspended users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10178))
|
- Fix edit profile page crash for suspended-then-unsuspended users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10178))
|
||||||
|
|
||||||
## [2.7.3] - 2019-02-23
|
## [2.7.3] - 2019-02-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add domain filter to the admin federation page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10071))
|
- Add domain filter to the admin federation page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10071))
|
||||||
|
@ -2332,6 +2480,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Change custom emojis to randomize stored file name ([hinaloe](https://github.com/mastodon/mastodon/pull/10090))
|
- Change custom emojis to randomize stored file name ([hinaloe](https://github.com/mastodon/mastodon/pull/10090))
|
||||||
|
|
||||||
## [2.7.2] - 2019-02-17
|
## [2.7.2] - 2019-02-17
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add support for IPv6 in e-mail validation ([zoc](https://github.com/mastodon/mastodon/pull/10009))
|
- Add support for IPv6 in e-mail validation ([zoc](https://github.com/mastodon/mastodon/pull/10009))
|
||||||
|
@ -2373,6 +2522,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Change error graphic to hover-to-play ([Gargron](https://github.com/mastodon/mastodon/pull/10055))
|
- Change error graphic to hover-to-play ([Gargron](https://github.com/mastodon/mastodon/pull/10055))
|
||||||
|
|
||||||
## [2.7.1] - 2019-01-28
|
## [2.7.1] - 2019-01-28
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix SSO authentication not working due to missing agreement boolean ([Gargron](https://github.com/mastodon/mastodon/pull/9915))
|
- Fix SSO authentication not working due to missing agreement boolean ([Gargron](https://github.com/mastodon/mastodon/pull/9915))
|
||||||
|
@ -2387,6 +2537,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix missing strong style for landing page description ([Kjwon15](https://github.com/mastodon/mastodon/pull/9892))
|
- Fix missing strong style for landing page description ([Kjwon15](https://github.com/mastodon/mastodon/pull/9892))
|
||||||
|
|
||||||
## [2.7.0] - 2019-01-20
|
## [2.7.0] - 2019-01-20
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add link for adding a user to a list from their profile ([namelessGonbai](https://github.com/mastodon/mastodon/pull/9062))
|
- Add link for adding a user to a list from their profile ([namelessGonbai](https://github.com/mastodon/mastodon/pull/9062))
|
||||||
|
@ -2516,6 +2667,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Add tombstones for remote statuses to prevent replay attacks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9830))
|
- Add tombstones for remote statuses to prevent replay attacks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9830))
|
||||||
|
|
||||||
## [2.6.5] - 2018-12-01
|
## [2.6.5] - 2018-12-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Change lists to display replies to others on the list and list owner ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9324))
|
- Change lists to display replies to others on the list and list owner ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9324))
|
||||||
|
@ -2525,11 +2677,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix failures caused by commonly-used JSON-LD contexts being unavailable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9412))
|
- Fix failures caused by commonly-used JSON-LD contexts being unavailable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9412))
|
||||||
|
|
||||||
## [2.6.4] - 2018-11-30
|
## [2.6.4] - 2018-11-30
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix yarn dependencies not installing due to yanked event-stream package ([Gargron](https://github.com/mastodon/mastodon/pull/9401))
|
- Fix yarn dependencies not installing due to yanked event-stream package ([Gargron](https://github.com/mastodon/mastodon/pull/9401))
|
||||||
|
|
||||||
## [2.6.3] - 2018-11-30
|
## [2.6.3] - 2018-11-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add hyphen to characters allowed in remote usernames ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9345))
|
- Add hyphen to characters allowed in remote usernames ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9345))
|
||||||
|
@ -2549,6 +2703,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix TLS handshake timeout not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9381))
|
- Fix TLS handshake timeout not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9381))
|
||||||
|
|
||||||
## [2.6.2] - 2018-11-23
|
## [2.6.2] - 2018-11-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add Page to whitelisted ActivityPub types ([mbajur](https://github.com/mastodon/mastodon/pull/9188))
|
- Add Page to whitelisted ActivityPub types ([mbajur](https://github.com/mastodon/mastodon/pull/9188))
|
||||||
|
@ -2583,12 +2738,14 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix HTTP connection timeout of 10s not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9329))
|
- Fix HTTP connection timeout of 10s not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9329))
|
||||||
|
|
||||||
## [2.6.1] - 2018-10-30
|
## [2.6.1] - 2018-10-30
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix resolving resources by URL not working due to a regression in [valerauko](https://github.com/mastodon/mastodon/pull/9132) ([Gargron](https://github.com/mastodon/mastodon/pull/9171))
|
- Fix resolving resources by URL not working due to a regression in [valerauko](https://github.com/mastodon/mastodon/pull/9132) ([Gargron](https://github.com/mastodon/mastodon/pull/9171))
|
||||||
- Fix reducer error in web UI when a conversation has no last status ([Gargron](https://github.com/mastodon/mastodon/pull/9173))
|
- Fix reducer error in web UI when a conversation has no last status ([Gargron](https://github.com/mastodon/mastodon/pull/9173))
|
||||||
|
|
||||||
## [2.6.0] - 2018-10-30
|
## [2.6.0] - 2018-10-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add link ownership verification ([Gargron](https://github.com/mastodon/mastodon/pull/8703))
|
- Add link ownership verification ([Gargron](https://github.com/mastodon/mastodon/pull/8703))
|
||||||
|
@ -2693,11 +2850,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
|
||||||
- Fix handling of content types with profile ([valerauko](https://github.com/mastodon/mastodon/pull/9132))
|
- Fix handling of content types with profile ([valerauko](https://github.com/mastodon/mastodon/pull/9132))
|
||||||
|
|
||||||
## [2.5.2] - 2018-10-12
|
## [2.5.2] - 2018-10-12
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
- Fix XSS vulnerability ([Gargron](https://github.com/mastodon/mastodon/pull/8959))
|
- Fix XSS vulnerability ([Gargron](https://github.com/mastodon/mastodon/pull/8959))
|
||||||
|
|
||||||
## [2.5.1] - 2018-10-07
|
## [2.5.1] - 2018-10-07
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix database migrations for PostgreSQL below 9.5 ([Gargron](https://github.com/mastodon/mastodon/pull/8903))
|
- Fix database migrations for PostgreSQL below 9.5 ([Gargron](https://github.com/mastodon/mastodon/pull/8903))
|
||||||
|
|
|
@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
- Using welcoming and inclusive language
|
||||||
* Being respectful of differing viewpoints and experiences
|
- Being respectful of differing viewpoints and experiences
|
||||||
* Gracefully accepting constructive criticism
|
- Gracefully accepting constructive criticism
|
||||||
* Focusing on what is best for the community
|
- Focusing on what is best for the community
|
||||||
* Showing empathy towards other community members
|
- Showing empathy towards other community members
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
* Public or private harassment
|
- Public or private harassment
|
||||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Our Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Contributing to Mastodon Glitch Edition #
|
# Contributing to Mastodon Glitch Edition
|
||||||
|
|
||||||
Thank you for your interest in contributing to the `glitch-soc` project!
|
Thank you for your interest in contributing to the `glitch-soc` project!
|
||||||
Here are some guidelines, and ways you can help.
|
Here are some guidelines, and ways you can help.
|
||||||
|
|
||||||
> (This document is a bit of a work-in-progress, so please bear with us.
|
> (This document is a bit of a work-in-progress, so please bear with us.
|
||||||
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
|
|
||||||
|
@ -12,34 +12,32 @@ You can submit glitch-soc-specific translations via [Crowdin](https://crowdin.co
|
||||||
|
|
||||||
[![Crowdin](https://badges.crowdin.net/glitch-soc/localized.svg)](https://crowdin.com/project/glitch-soc)
|
[![Crowdin](https://badges.crowdin.net/glitch-soc/localized.svg)](https://crowdin.com/project/glitch-soc)
|
||||||
|
|
||||||
## Planning ##
|
## Planning
|
||||||
|
|
||||||
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
||||||
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
||||||
|
|
||||||
## Documentation ##
|
## Documentation
|
||||||
|
|
||||||
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
||||||
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
|
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
|
||||||
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
|
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
|
||||||
|
|
||||||
## Frontend Development ##
|
## Frontend Development
|
||||||
|
|
||||||
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
||||||
|
|
||||||
## Backend Development ##
|
## Backend Development
|
||||||
|
|
||||||
See the guidelines below.
|
See the guidelines below.
|
||||||
|
|
||||||
- - -
|
---
|
||||||
|
|
||||||
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
|
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
CONTRIBUTING
|
# Contributing
|
||||||
=======
|
|
||||||
Contributing
|
|
||||||
|
|
||||||
Thank you for considering contributing to Mastodon 🐘
|
Thank you for considering contributing to Mastodon 🐘
|
||||||
|
|
||||||
|
@ -68,9 +66,9 @@ You can submit translations via [Crowdin](https://crowdin.com/project/mastodon).
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|Not ideal|Better|
|
| Not ideal | Better |
|
||||||
|---|----|
|
| ------------------------------------ | ------------------------------------------------------------- |
|
||||||
|Fixed NoMethodError in RemovalWorker|Fix nil error when removing statuses caused by race condition|
|
| Fixed NoMethodError in RemovalWorker | Fix nil error when removing statuses caused by race condition |
|
||||||
|
|
||||||
It is not always possible to phrase every change in such a manner, but it is desired.
|
It is not always possible to phrase every change in such a manner, but it is desired.
|
||||||
|
|
||||||
|
@ -82,8 +80,6 @@ It is not always possible to phrase every change in such a manner, but it is des
|
||||||
- Code style rules (rubocop, eslint)
|
- Code style rules (rubocop, eslint)
|
||||||
- Normalization of locale files (i18n-tasks)
|
- Normalization of locale files (i18n-tasks)
|
||||||
|
|
||||||
**Note**: You may need to log in and authorise the GitHub account your fork of this repository belongs to with CircleCI to enable some of the automated checks to run.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).
|
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).
|
||||||
|
|
1
Capfile
1
Capfile
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'capistrano/setup'
|
require 'capistrano/setup'
|
||||||
require 'capistrano/deploy'
|
require 'capistrano/deploy'
|
||||||
require 'capistrano/scm/git'
|
require 'capistrano/scm/git'
|
||||||
|
|
21
Dockerfile
21
Dockerfile
|
@ -1,8 +1,8 @@
|
||||||
# syntax=docker/dockerfile:1.4
|
# syntax=docker/dockerfile:1.4
|
||||||
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
|
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
|
||||||
ARG NODE_VERSION="16.18.1-bullseye-slim"
|
ARG NODE_VERSION="16.20-bullseye-slim"
|
||||||
|
|
||||||
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.0.4-slim as ruby
|
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby
|
||||||
FROM node:${NODE_VERSION} as build
|
FROM node:${NODE_VERSION} as build
|
||||||
|
|
||||||
COPY --link --from=ruby /opt/ruby /opt/ruby
|
COPY --link --from=ruby /opt/ruby /opt/ruby
|
||||||
|
@ -18,7 +18,6 @@ COPY Gemfile* package.json yarn.lock /opt/mastodon/
|
||||||
# hadolint ignore=DL3008
|
# hadolint ignore=DL3008
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends build-essential \
|
apt-get install -y --no-install-recommends build-essential \
|
||||||
ca-certificates \
|
|
||||||
git \
|
git \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libidn11-dev \
|
libidn11-dev \
|
||||||
|
@ -37,10 +36,15 @@ RUN apt-get update && \
|
||||||
bundle config set --local without 'development test' && \
|
bundle config set --local without 'development test' && \
|
||||||
bundle config set silence_root_warning true && \
|
bundle config set silence_root_warning true && \
|
||||||
bundle install -j"$(nproc)" && \
|
bundle install -j"$(nproc)" && \
|
||||||
yarn install --pure-lockfile --network-timeout 600000
|
yarn install --pure-lockfile --production --network-timeout 600000 && \
|
||||||
|
yarn cache clean
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}
|
FROM node:${NODE_VERSION}
|
||||||
|
|
||||||
|
# Use those args to specify your own version flags & suffixes
|
||||||
|
ARG MASTODON_VERSION_FLAGS=""
|
||||||
|
ARG MASTODON_VERSION_SUFFIX=""
|
||||||
|
|
||||||
ARG UID="991"
|
ARG UID="991"
|
||||||
ARG GID="991"
|
ARG GID="991"
|
||||||
|
|
||||||
|
@ -51,7 +55,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||||
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
|
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
|
||||||
|
|
||||||
# Ignoreing these here since we don't want to pin any versions and the Debian image removes apt-get content after use
|
# Ignoring these here since we don't want to pin any versions and the Debian image removes apt-get content after use
|
||||||
# hadolint ignore=DL3008,DL3009
|
# hadolint ignore=DL3008,DL3009
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
echo "Etc/UTC" > /etc/localtime && \
|
echo "Etc/UTC" > /etc/localtime && \
|
||||||
|
@ -84,15 +88,16 @@ COPY --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon
|
||||||
ENV RAILS_ENV="production" \
|
ENV RAILS_ENV="production" \
|
||||||
NODE_ENV="production" \
|
NODE_ENV="production" \
|
||||||
RAILS_SERVE_STATIC_FILES="true" \
|
RAILS_SERVE_STATIC_FILES="true" \
|
||||||
BIND="0.0.0.0"
|
BIND="0.0.0.0" \
|
||||||
|
MASTODON_VERSION_FLAGS="${MASTODON_VERSION_FLAGS}" \
|
||||||
|
MASTODON_VERSION_SUFFIX="${MASTODON_VERSION_SUFFIX}"
|
||||||
|
|
||||||
# Set the run user
|
# Set the run user
|
||||||
USER mastodon
|
USER mastodon
|
||||||
WORKDIR /opt/mastodon
|
WORKDIR /opt/mastodon
|
||||||
|
|
||||||
# Precompile assets
|
# Precompile assets
|
||||||
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
|
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile
|
||||||
yarn cache clean
|
|
||||||
|
|
||||||
# Set the work dir and the container entry point
|
# Set the work dir and the container entry point
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
|
|
141
Gemfile
141
Gemfile
|
@ -1,27 +1,24 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
ruby '>= 2.7.0', '< 3.1.0'
|
ruby '>= 3.0.0'
|
||||||
|
|
||||||
gem 'pkg-config', '~> 1.5'
|
gem 'puma', '~> 6.3'
|
||||||
gem 'rexml', '~> 3.2'
|
|
||||||
|
|
||||||
gem 'puma', '~> 5.6'
|
|
||||||
gem 'rails', '~> 6.1.7'
|
gem 'rails', '~> 6.1.7'
|
||||||
gem 'sprockets', '~> 3.7.2'
|
gem 'sprockets', '~> 3.7.2'
|
||||||
gem 'thor', '~> 1.2'
|
gem 'thor', '~> 1.2'
|
||||||
gem 'rack', '~> 2.2.6'
|
gem 'rack', '~> 2.2.7'
|
||||||
|
|
||||||
gem 'hamlit-rails', '~> 0.2'
|
gem 'haml-rails', '~>2.0'
|
||||||
gem 'pg', '~> 1.4'
|
gem 'pg', '~> 1.5'
|
||||||
gem 'makara', '~> 0.5'
|
gem 'makara', '~> 0.5'
|
||||||
gem 'pghero'
|
gem 'pghero'
|
||||||
gem 'dotenv-rails', '~> 2.8'
|
gem 'dotenv-rails', '~> 2.8'
|
||||||
|
|
||||||
gem 'aws-sdk-s3', '~> 1.119', require: false
|
gem 'aws-sdk-s3', '~> 1.123', require: false
|
||||||
gem 'fog-core', '<= 2.4.0'
|
gem 'fog-core', '<= 2.4.0'
|
||||||
gem 'fog-openstack', '~> 0.3', require: false
|
gem 'fog-openstack', '~> 0.3', require: false
|
||||||
gem 'kt-paperclip', '~> 7.1'
|
gem 'kt-paperclip', '~> 7.2'
|
||||||
gem 'blurhash', '~> 0.1'
|
gem 'blurhash', '~> 0.1'
|
||||||
|
|
||||||
gem 'active_model_serializers', '~> 0.10'
|
gem 'active_model_serializers', '~> 0.10'
|
||||||
|
@ -29,18 +26,18 @@ gem 'addressable', '~> 2.8'
|
||||||
gem 'bootsnap', '~> 1.16.0', require: false
|
gem 'bootsnap', '~> 1.16.0', require: false
|
||||||
gem 'browser'
|
gem 'browser'
|
||||||
gem 'charlock_holmes', '~> 0.7.7'
|
gem 'charlock_holmes', '~> 0.7.7'
|
||||||
gem 'chewy', '~> 7.2'
|
gem 'chewy', '~> 7.3'
|
||||||
gem 'devise', '~> 4.8'
|
gem 'devise', '~> 4.9'
|
||||||
gem 'devise-two-factor', '~> 4.0'
|
gem 'devise-two-factor', '~> 4.1'
|
||||||
|
|
||||||
group :pam_authentication, optional: true do
|
group :pam_authentication, optional: true do
|
||||||
gem 'devise_pam_authenticatable2', '~> 9.2'
|
gem 'devise_pam_authenticatable2', '~> 9.2'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'net-ldap', '~> 0.17'
|
gem 'net-ldap', '~> 0.18'
|
||||||
gem 'omniauth-cas', '~> 2.0'
|
gem 'omniauth-cas', '~> 2.0'
|
||||||
gem 'omniauth-saml', '~> 1.10'
|
gem 'omniauth-saml', '~> 1.10'
|
||||||
gem 'gitlab-omniauth-openid-connect', '~>0.10.1', require: 'omniauth_openid_connect'
|
gem 'omniauth_openid_connect', '~> 0.6.1'
|
||||||
gem 'omniauth', '~> 1.9'
|
gem 'omniauth', '~> 1.9'
|
||||||
gem 'omniauth-rails_csrf_protection', '~> 0.1'
|
gem 'omniauth-rails_csrf_protection', '~> 0.1'
|
||||||
|
|
||||||
|
@ -60,9 +57,8 @@ gem 'idn-ruby', require: 'idn'
|
||||||
gem 'kaminari', '~> 1.2'
|
gem 'kaminari', '~> 1.2'
|
||||||
gem 'link_header', '~> 0.0'
|
gem 'link_header', '~> 0.0'
|
||||||
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
|
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
|
||||||
gem 'nokogiri', '~> 1.14'
|
gem 'nokogiri', '~> 1.15'
|
||||||
gem 'nsa', '~> 0.2'
|
gem 'oj', '~> 3.14'
|
||||||
gem 'oj', '~> 3.13'
|
|
||||||
gem 'ox', '~> 2.14'
|
gem 'ox', '~> 2.14'
|
||||||
gem 'parslet'
|
gem 'parslet'
|
||||||
gem 'posix-spawn'
|
gem 'posix-spawn'
|
||||||
|
@ -70,84 +66,117 @@ gem 'public_suffix', '~> 5.0'
|
||||||
gem 'pundit', '~> 2.3'
|
gem 'pundit', '~> 2.3'
|
||||||
gem 'premailer-rails'
|
gem 'premailer-rails'
|
||||||
gem 'rack-attack', '~> 6.6'
|
gem 'rack-attack', '~> 6.6'
|
||||||
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
|
gem 'rack-cors', '~> 2.0', require: 'rack/cors'
|
||||||
gem 'rails-i18n', '~> 6.0'
|
gem 'rails-i18n', '~> 6.0'
|
||||||
gem 'rails-settings-cached', '~> 0.6'
|
gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-settings-cached.git', branch: 'v0.6.6-aliases-true'
|
||||||
gem 'redcarpet', '~> 3.6'
|
gem 'redcarpet', '~> 3.6'
|
||||||
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
||||||
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
||||||
gem 'rqrcode', '~> 2.1'
|
gem 'rqrcode', '~> 2.2'
|
||||||
gem 'ruby-progressbar', '~> 1.11'
|
gem 'ruby-progressbar', '~> 1.13'
|
||||||
gem 'sanitize', '~> 6.0'
|
gem 'sanitize', '~> 6.0'
|
||||||
gem 'scenic', '~> 1.7'
|
gem 'scenic', '~> 1.7'
|
||||||
gem 'sidekiq', '~> 6.5'
|
gem 'sidekiq', '~> 6.5'
|
||||||
gem 'sidekiq-scheduler', '~> 4.0'
|
gem 'sidekiq-scheduler', '~> 5.0'
|
||||||
gem 'sidekiq-unique-jobs', '~> 7.1'
|
gem 'sidekiq-unique-jobs', '~> 7.1'
|
||||||
gem 'sidekiq-bulk', '~> 0.2.0'
|
gem 'sidekiq-bulk', '~> 0.2.0'
|
||||||
gem 'simple-navigation', '~> 4.4'
|
gem 'simple-navigation', '~> 4.4'
|
||||||
gem 'simple_form', '~> 5.2'
|
gem 'simple_form', '~> 5.2'
|
||||||
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
||||||
gem 'stoplight', '~> 3.0.1'
|
gem 'stoplight', '~> 3.0.1'
|
||||||
gem 'strong_migrations', '~> 0.7'
|
gem 'strong_migrations', '~> 0.8'
|
||||||
gem 'tty-prompt', '~> 0.23', require: false
|
gem 'tty-prompt', '~> 0.23', require: false
|
||||||
gem 'twitter-text', '~> 3.1.0'
|
gem 'twitter-text', '~> 3.1.0'
|
||||||
gem 'tzinfo-data', '~> 1.2022'
|
gem 'tzinfo-data', '~> 1.2023'
|
||||||
gem 'webpacker', '~> 5.4'
|
gem 'webpacker', '~> 5.4'
|
||||||
gem 'webpush', github: 'ClearlyClaire/webpush', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
|
gem 'webpush', github: 'ClearlyClaire/webpush', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
|
||||||
gem 'webauthn', '~> 2.5'
|
gem 'webauthn', '~> 3.0'
|
||||||
|
|
||||||
gem 'json-ld'
|
gem 'json-ld'
|
||||||
gem 'json-ld-preloaded', '~> 3.2'
|
gem 'json-ld-preloaded', '~> 3.2'
|
||||||
gem 'rdf-normalize', '~> 0.5'
|
gem 'rdf-normalize', '~> 0.5'
|
||||||
|
|
||||||
group :development, :test do
|
gem 'private_address_check', '~> 0.5'
|
||||||
gem 'fabrication', '~> 2.30'
|
|
||||||
gem 'fuubar', '~> 2.5'
|
|
||||||
gem 'i18n-tasks', '~> 1.0', require: false
|
|
||||||
gem 'pry-byebug', '~> 3.10'
|
|
||||||
gem 'pry-rails', '~> 0.3'
|
|
||||||
gem 'rspec-rails', '~> 5.1'
|
|
||||||
gem 'rubocop-performance', require: false
|
|
||||||
gem 'rubocop-rails', require: false
|
|
||||||
gem 'rubocop-rspec', require: false
|
|
||||||
gem 'rubocop', require: false
|
|
||||||
end
|
|
||||||
|
|
||||||
group :production, :test do
|
|
||||||
gem 'private_address_check', '~> 0.5'
|
|
||||||
end
|
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'capybara', '~> 3.38'
|
# RSpec runner for rails
|
||||||
gem 'climate_control', '~> 0.2'
|
gem 'rspec-rails', '~> 6.0'
|
||||||
gem 'faker', '~> 3.1'
|
|
||||||
gem 'json-schema', '~> 3.0'
|
# Used to split testing into chunks in CI
|
||||||
gem 'rack-test', '~> 2.0'
|
gem 'rspec_chunked', '~> 0.6'
|
||||||
gem 'rails-controller-testing', '~> 1.0'
|
|
||||||
gem 'rspec_junit_formatter', '~> 0.6'
|
# RSpec progress bar formatter
|
||||||
|
gem 'fuubar', '~> 2.5'
|
||||||
|
|
||||||
|
# Extra RSpec extenion methods and helpers for sidekiq
|
||||||
gem 'rspec-sidekiq', '~> 3.1'
|
gem 'rspec-sidekiq', '~> 3.1'
|
||||||
|
|
||||||
|
# Browser integration testing
|
||||||
|
gem 'capybara', '~> 3.39'
|
||||||
|
|
||||||
|
# Used to mock environment variables
|
||||||
|
gem 'climate_control', '~> 0.2'
|
||||||
|
|
||||||
|
# Generating fake data for specs
|
||||||
|
gem 'faker', '~> 3.2'
|
||||||
|
|
||||||
|
# Generate test objects for specs
|
||||||
|
gem 'fabrication', '~> 2.30'
|
||||||
|
|
||||||
|
# Add back helpers functions removed in Rails 5.1
|
||||||
|
gem 'rails-controller-testing', '~> 1.0'
|
||||||
|
|
||||||
|
# Validate schemas in specs
|
||||||
|
gem 'json-schema', '~> 4.0'
|
||||||
|
|
||||||
|
# Test harness fo rack components
|
||||||
|
gem 'rack-test', '~> 2.1'
|
||||||
|
|
||||||
|
# Coverage formatter for RSpec test if DISABLE_SIMPLECOV is false
|
||||||
gem 'simplecov', '~> 0.22', require: false
|
gem 'simplecov', '~> 0.22', require: false
|
||||||
|
|
||||||
|
# Stub web requests for specs
|
||||||
gem 'webmock', '~> 3.18'
|
gem 'webmock', '~> 3.18'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'active_record_query_trace', '~> 1.8'
|
# Code linting CLI and plugins
|
||||||
|
gem 'rubocop', require: false
|
||||||
|
gem 'rubocop-capybara', require: false
|
||||||
|
gem 'rubocop-performance', require: false
|
||||||
|
gem 'rubocop-rails', require: false
|
||||||
|
gem 'rubocop-rspec', require: false
|
||||||
|
|
||||||
|
# Annotates modules with schema
|
||||||
gem 'annotate', '~> 3.2'
|
gem 'annotate', '~> 3.2'
|
||||||
|
|
||||||
|
# Enhanced error message pages for development
|
||||||
gem 'better_errors', '~> 2.9'
|
gem 'better_errors', '~> 2.9'
|
||||||
gem 'binding_of_caller', '~> 1.0'
|
gem 'binding_of_caller', '~> 1.0'
|
||||||
gem 'bullet', '~> 7.0'
|
|
||||||
|
# Preview mail in the browser
|
||||||
gem 'letter_opener', '~> 1.8'
|
gem 'letter_opener', '~> 1.8'
|
||||||
gem 'letter_opener_web', '~> 2.0'
|
gem 'letter_opener_web', '~> 2.0'
|
||||||
gem 'memory_profiler'
|
|
||||||
|
# Security analysis CLI tools
|
||||||
gem 'brakeman', '~> 5.4', require: false
|
gem 'brakeman', '~> 5.4', require: false
|
||||||
gem 'bundler-audit', '~> 0.9', require: false
|
gem 'bundler-audit', '~> 0.9', require: false
|
||||||
|
|
||||||
|
# Linter CLI for HAML files
|
||||||
|
gem 'haml_lint', require: false
|
||||||
|
|
||||||
|
# Deployment automation
|
||||||
gem 'capistrano', '~> 3.17'
|
gem 'capistrano', '~> 3.17'
|
||||||
gem 'capistrano-rails', '~> 1.6'
|
gem 'capistrano-rails', '~> 1.6'
|
||||||
gem 'capistrano-rbenv', '~> 2.2'
|
gem 'capistrano-rbenv', '~> 2.2'
|
||||||
gem 'capistrano-yarn', '~> 2.0'
|
gem 'capistrano-yarn', '~> 2.0'
|
||||||
|
|
||||||
gem 'stackprof'
|
# Validate missing i18n keys
|
||||||
|
gem 'i18n-tasks', '~> 1.0', require: false
|
||||||
|
|
||||||
|
# Profiling tools
|
||||||
|
gem 'memory_profiler', require: false
|
||||||
|
gem 'stackprof', require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
|
@ -158,5 +187,9 @@ gem 'concurrent-ruby', require: false
|
||||||
gem 'connection_pool', require: false
|
gem 'connection_pool', require: false
|
||||||
gem 'xorcist', '~> 1.1'
|
gem 'xorcist', '~> 1.1'
|
||||||
|
|
||||||
gem 'hcaptcha', '~> 7.1'
|
|
||||||
gem 'cocoon', '~> 1.2'
|
gem 'cocoon', '~> 1.2'
|
||||||
|
|
||||||
|
gem 'net-http', '~> 0.3.2'
|
||||||
|
gem 'rubyzip', '~> 2.3'
|
||||||
|
|
||||||
|
gem 'hcaptcha', '~> 7.1'
|
||||||
|
|
520
Gemfile.lock
520
Gemfile.lock
|
@ -7,43 +7,51 @@ GIT
|
||||||
hkdf (~> 0.2)
|
hkdf (~> 0.2)
|
||||||
jwt (~> 2.0)
|
jwt (~> 2.0)
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: https://github.com/mastodon/rails-settings-cached.git
|
||||||
|
revision: 86328ef0bd04ce21cc0504ff5e334591e8c2ccab
|
||||||
|
branch: v0.6.6-aliases-true
|
||||||
|
specs:
|
||||||
|
rails-settings-cached (0.6.6)
|
||||||
|
rails (>= 4.2.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.1.7.2)
|
actioncable (6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.1.7.2)
|
actionmailbox (6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
activejob (= 6.1.7.2)
|
activejob (= 6.1.7.4)
|
||||||
activerecord (= 6.1.7.2)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 6.1.7.2)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (6.1.7.2)
|
actionmailer (6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
actionview (= 6.1.7.2)
|
actionview (= 6.1.7.4)
|
||||||
activejob (= 6.1.7.2)
|
activejob (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.1.7.2)
|
actionpack (6.1.7.4)
|
||||||
actionview (= 6.1.7.2)
|
actionview (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
rack (~> 2.0, >= 2.0.9)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (6.1.7.2)
|
actiontext (6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
activerecord (= 6.1.7.2)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 6.1.7.2)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.1.7.2)
|
actionview (6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
|
@ -53,29 +61,28 @@ GEM
|
||||||
activemodel (>= 4.1, < 7.1)
|
activemodel (>= 4.1, < 7.1)
|
||||||
case_transform (>= 0.2)
|
case_transform (>= 0.2)
|
||||||
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
||||||
active_record_query_trace (1.8)
|
activejob (6.1.7.4)
|
||||||
activejob (6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.1.7.2)
|
activemodel (6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
activerecord (6.1.7.2)
|
activerecord (6.1.7.4)
|
||||||
activemodel (= 6.1.7.2)
|
activemodel (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
activestorage (6.1.7.2)
|
activestorage (6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
activejob (= 6.1.7.2)
|
activejob (= 6.1.7.4)
|
||||||
activerecord (= 6.1.7.2)
|
activerecord (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (6.1.7.2)
|
activesupport (6.1.7.4)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
zeitwerk (~> 2.3)
|
||||||
addressable (2.8.1)
|
addressable (2.8.4)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
aes_key_wrap (1.1.0)
|
aes_key_wrap (1.1.0)
|
||||||
airbrussh (1.4.1)
|
airbrussh (1.4.1)
|
||||||
|
@ -85,31 +92,31 @@ GEM
|
||||||
activerecord (>= 3.2, < 8.0)
|
activerecord (>= 3.2, < 8.0)
|
||||||
rake (>= 10.4, < 14.0)
|
rake (>= 10.4, < 14.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
attr_encrypted (3.1.0)
|
attr_encrypted (4.0.0)
|
||||||
encryptor (~> 3.0.0)
|
encryptor (~> 3.0.0)
|
||||||
attr_required (1.0.1)
|
attr_required (1.0.1)
|
||||||
awrence (1.2.1)
|
awrence (1.2.1)
|
||||||
aws-eventstream (1.2.0)
|
aws-eventstream (1.2.0)
|
||||||
aws-partitions (1.701.0)
|
aws-partitions (1.780.0)
|
||||||
aws-sdk-core (3.170.0)
|
aws-sdk-core (3.175.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
aws-partitions (~> 1, >= 1.651.0)
|
aws-partitions (~> 1, >= 1.651.0)
|
||||||
aws-sigv4 (~> 1.5)
|
aws-sigv4 (~> 1.5)
|
||||||
jmespath (~> 1, >= 1.6.1)
|
jmespath (~> 1, >= 1.6.1)
|
||||||
aws-sdk-kms (1.62.0)
|
aws-sdk-kms (1.67.0)
|
||||||
aws-sdk-core (~> 3, >= 3.165.0)
|
aws-sdk-core (~> 3, >= 3.174.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.119.0)
|
aws-sdk-s3 (1.126.0)
|
||||||
aws-sdk-core (~> 3, >= 3.165.0)
|
aws-sdk-core (~> 3, >= 3.174.0)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.4)
|
aws-sigv4 (~> 1.4)
|
||||||
aws-sigv4 (1.5.2)
|
aws-sigv4 (1.5.2)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
bcrypt (3.1.17)
|
bcrypt (3.1.18)
|
||||||
better_errors (2.9.1)
|
better_errors (2.10.1)
|
||||||
coderay (>= 1.0.0)
|
|
||||||
erubi (>= 1.0.0)
|
erubi (>= 1.0.0)
|
||||||
rack (>= 0.9.0)
|
rack (>= 0.9.0)
|
||||||
|
rouge (>= 1.0.0)
|
||||||
better_html (2.0.1)
|
better_html (2.0.1)
|
||||||
actionview (>= 6.0)
|
actionview (>= 6.0)
|
||||||
activesupport (>= 6.0)
|
activesupport (>= 6.0)
|
||||||
|
@ -117,32 +124,27 @@ GEM
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
parser (>= 2.4)
|
parser (>= 2.4)
|
||||||
smart_properties
|
smart_properties
|
||||||
bindata (2.4.14)
|
bindata (2.4.15)
|
||||||
binding_of_caller (1.0.0)
|
binding_of_caller (1.0.0)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
blurhash (0.1.6)
|
blurhash (0.1.7)
|
||||||
ffi (~> 1.14)
|
|
||||||
bootsnap (1.16.0)
|
bootsnap (1.16.0)
|
||||||
msgpack (~> 1.2)
|
msgpack (~> 1.2)
|
||||||
brakeman (5.4.0)
|
brakeman (5.4.1)
|
||||||
browser (4.2.0)
|
browser (5.3.1)
|
||||||
brpoplpush-redis_script (0.1.3)
|
brpoplpush-redis_script (0.1.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||||
redis (>= 1.0, < 6)
|
redis (>= 1.0, < 6)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
bullet (7.0.7)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
uniform_notifier (~> 1.11)
|
|
||||||
bundler-audit (0.9.1)
|
bundler-audit (0.9.1)
|
||||||
bundler (>= 1.2.0, < 3)
|
bundler (>= 1.2.0, < 3)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
byebug (11.1.3)
|
capistrano (3.17.3)
|
||||||
capistrano (3.17.1)
|
|
||||||
airbrussh (>= 1.0.0)
|
airbrussh (>= 1.0.0)
|
||||||
i18n
|
i18n
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
sshkit (>= 1.9.0)
|
sshkit (>= 1.9.0)
|
||||||
capistrano-bundler (2.0.1)
|
capistrano-bundler (2.1.0)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
capistrano-rails (1.6.2)
|
capistrano-rails (1.6.2)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
|
@ -152,7 +154,7 @@ GEM
|
||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
capistrano-yarn (2.0.2)
|
capistrano-yarn (2.0.2)
|
||||||
capistrano (~> 3.0)
|
capistrano (~> 3.0)
|
||||||
capybara (3.38.0)
|
capybara (3.39.2)
|
||||||
addressable
|
addressable
|
||||||
matrix
|
matrix
|
||||||
mini_mime (>= 0.1.3)
|
mini_mime (>= 0.1.3)
|
||||||
|
@ -165,36 +167,35 @@ GEM
|
||||||
activesupport
|
activesupport
|
||||||
cbor (0.5.9.6)
|
cbor (0.5.9.6)
|
||||||
charlock_holmes (0.7.7)
|
charlock_holmes (0.7.7)
|
||||||
chewy (7.2.4)
|
chewy (7.3.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
elasticsearch (>= 7.12.0, < 7.14.0)
|
elasticsearch (>= 7.12.0, < 7.14.0)
|
||||||
elasticsearch-dsl
|
elasticsearch-dsl
|
||||||
chunky_png (1.4.0)
|
chunky_png (1.4.0)
|
||||||
climate_control (0.2.0)
|
climate_control (0.2.0)
|
||||||
cocoon (1.2.15)
|
cocoon (1.2.15)
|
||||||
coderay (1.1.3)
|
|
||||||
color_diff (0.1)
|
color_diff (0.1)
|
||||||
concurrent-ruby (1.2.0)
|
concurrent-ruby (1.2.2)
|
||||||
connection_pool (2.3.0)
|
connection_pool (2.4.1)
|
||||||
cose (1.2.1)
|
cose (1.3.0)
|
||||||
cbor (~> 0.5.9)
|
cbor (~> 0.5.9)
|
||||||
openssl-signature_algorithm (~> 1.0)
|
openssl-signature_algorithm (~> 1.0)
|
||||||
crack (0.4.5)
|
crack (0.4.5)
|
||||||
rexml
|
rexml
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
css_parser (1.12.0)
|
css_parser (1.14.0)
|
||||||
addressable
|
addressable
|
||||||
date (3.3.3)
|
date (3.3.3)
|
||||||
debug_inspector (1.0.0)
|
debug_inspector (1.1.0)
|
||||||
devise (4.8.1)
|
devise (4.9.2)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 4.1.0)
|
railties (>= 4.1.0)
|
||||||
responders
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
devise-two-factor (4.0.2)
|
devise-two-factor (4.1.0)
|
||||||
activesupport (< 7.1)
|
activesupport (< 7.1)
|
||||||
attr_encrypted (>= 1.3, < 4, != 2)
|
attr_encrypted (>= 1.3, < 5, != 2)
|
||||||
devise (~> 4.0)
|
devise (~> 4.0)
|
||||||
railties (< 7.1)
|
railties (< 7.1)
|
||||||
rotp (~> 6.0)
|
rotp (~> 6.0)
|
||||||
|
@ -207,7 +208,7 @@ GEM
|
||||||
docile (1.4.0)
|
docile (1.4.0)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
doorkeeper (5.6.4)
|
doorkeeper (5.6.6)
|
||||||
railties (>= 5)
|
railties (>= 5)
|
||||||
dotenv (2.8.1)
|
dotenv (2.8.1)
|
||||||
dotenv-rails (2.8.1)
|
dotenv-rails (2.8.1)
|
||||||
|
@ -227,11 +228,11 @@ GEM
|
||||||
erubi (1.12.0)
|
erubi (1.12.0)
|
||||||
et-orbi (1.2.7)
|
et-orbi (1.2.7)
|
||||||
tzinfo
|
tzinfo
|
||||||
excon (0.95.0)
|
excon (0.100.0)
|
||||||
fabrication (2.30.0)
|
fabrication (2.30.0)
|
||||||
faker (3.1.1)
|
faker (3.2.0)
|
||||||
i18n (>= 1.8.11, < 2)
|
i18n (>= 1.8.11, < 2)
|
||||||
faraday (1.9.3)
|
faraday (1.10.3)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-em_synchrony (~> 1.0)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday-excon (~> 1.1)
|
faraday-excon (~> 1.1)
|
||||||
|
@ -247,15 +248,15 @@ GEM
|
||||||
faraday-em_synchrony (1.0.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
faraday-excon (1.1.0)
|
faraday-excon (1.1.0)
|
||||||
faraday-httpclient (1.0.1)
|
faraday-httpclient (1.0.1)
|
||||||
faraday-multipart (1.0.3)
|
faraday-multipart (1.0.4)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (~> 2)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.1)
|
||||||
faraday-net_http_persistent (1.2.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday-patron (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
faraday-rack (1.0.0)
|
faraday-rack (1.0.0)
|
||||||
faraday-retry (1.0.3)
|
faraday-retry (1.0.3)
|
||||||
fast_blank (1.0.1)
|
fast_blank (1.0.1)
|
||||||
fastimage (2.2.6)
|
fastimage (2.2.7)
|
||||||
ffi (1.15.5)
|
ffi (1.15.5)
|
||||||
ffi-compiler (1.0.1)
|
ffi-compiler (1.0.1)
|
||||||
ffi (>= 1.0.0)
|
ffi (>= 1.0.0)
|
||||||
|
@ -273,32 +274,34 @@ GEM
|
||||||
fog-json (>= 1.0)
|
fog-json (>= 1.0)
|
||||||
ipaddress (>= 0.8)
|
ipaddress (>= 0.8)
|
||||||
formatador (0.3.0)
|
formatador (0.3.0)
|
||||||
fugit (1.7.1)
|
fugit (1.8.1)
|
||||||
et-orbi (~> 1, >= 1.2.7)
|
et-orbi (~> 1, >= 1.2.7)
|
||||||
raabro (~> 1.4)
|
raabro (~> 1.4)
|
||||||
fuubar (2.5.1)
|
fuubar (2.5.1)
|
||||||
rspec-core (~> 3.0)
|
rspec-core (~> 3.0)
|
||||||
ruby-progressbar (~> 1.4)
|
ruby-progressbar (~> 1.4)
|
||||||
gitlab-omniauth-openid-connect (0.10.1)
|
|
||||||
addressable (~> 2.7)
|
|
||||||
omniauth (>= 1.9, < 3)
|
|
||||||
openid_connect (~> 1.2)
|
|
||||||
globalid (1.1.0)
|
globalid (1.1.0)
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
hamlit (2.13.0)
|
haml (6.1.1)
|
||||||
temple (>= 0.8.2)
|
temple (>= 0.8.2)
|
||||||
thor
|
thor
|
||||||
tilt
|
tilt
|
||||||
hamlit-rails (0.2.3)
|
haml-rails (2.1.0)
|
||||||
actionpack (>= 4.0.1)
|
actionpack (>= 5.1)
|
||||||
activesupport (>= 4.0.1)
|
activesupport (>= 5.1)
|
||||||
hamlit (>= 1.2.0)
|
haml (>= 4.0.6)
|
||||||
railties (>= 4.0.1)
|
railties (>= 5.1)
|
||||||
|
haml_lint (0.45.0)
|
||||||
|
haml (>= 4.0, < 6.2)
|
||||||
|
parallel (~> 1.10)
|
||||||
|
rainbow
|
||||||
|
rubocop (>= 0.50.0)
|
||||||
|
sysexits (~> 1.1)
|
||||||
hashdiff (1.0.1)
|
hashdiff (1.0.1)
|
||||||
hashie (5.0.0)
|
hashie (5.0.0)
|
||||||
hcaptcha (7.1.0)
|
hcaptcha (7.1.0)
|
||||||
json
|
json
|
||||||
highline (2.0.3)
|
highline (2.1.0)
|
||||||
hiredis (0.6.3)
|
hiredis (0.6.3)
|
||||||
hkdf (0.3.0)
|
hkdf (0.3.0)
|
||||||
htmlentities (4.3.4)
|
htmlentities (4.3.4)
|
||||||
|
@ -315,7 +318,7 @@ GEM
|
||||||
httplog (1.6.2)
|
httplog (1.6.2)
|
||||||
rack (>= 2.0)
|
rack (>= 2.0)
|
||||||
rainbow (>= 2.0.0)
|
rainbow (>= 2.0.0)
|
||||||
i18n (1.12.0)
|
i18n (1.14.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
i18n-tasks (1.0.12)
|
i18n-tasks (1.0.12)
|
||||||
activesupport (>= 4.0.2)
|
activesupport (>= 4.0.2)
|
||||||
|
@ -332,26 +335,26 @@ GEM
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
jmespath (1.6.2)
|
jmespath (1.6.2)
|
||||||
json (2.6.3)
|
json (2.6.3)
|
||||||
json-canonicalization (0.3.0)
|
json-canonicalization (0.3.2)
|
||||||
json-jwt (1.15.3)
|
json-jwt (1.15.3)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
aes_key_wrap
|
aes_key_wrap
|
||||||
bindata
|
bindata
|
||||||
httpclient
|
httpclient
|
||||||
json-ld (3.2.3)
|
json-ld (3.2.5)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
json-canonicalization (~> 0.3)
|
json-canonicalization (~> 0.3, >= 0.3.2)
|
||||||
link_header (~> 0.0, >= 0.0.8)
|
link_header (~> 0.0, >= 0.0.8)
|
||||||
multi_json (~> 1.15)
|
multi_json (~> 1.15)
|
||||||
rack (~> 2.2)
|
rack (>= 2.2, < 4)
|
||||||
rdf (~> 3.2, >= 3.2.9)
|
rdf (~> 3.2, >= 3.2.10)
|
||||||
json-ld-preloaded (3.2.2)
|
json-ld-preloaded (3.2.2)
|
||||||
json-ld (~> 3.2)
|
json-ld (~> 3.2)
|
||||||
rdf (~> 3.2)
|
rdf (~> 3.2)
|
||||||
json-schema (3.0.0)
|
json-schema (4.0.0)
|
||||||
addressable (>= 2.8)
|
addressable (>= 2.8)
|
||||||
jsonapi-renderer (0.2.2)
|
jsonapi-renderer (0.2.2)
|
||||||
jwt (2.5.0)
|
jwt (2.7.1)
|
||||||
kaminari (1.2.2)
|
kaminari (1.2.2)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.2)
|
kaminari-actionview (= 1.2.2)
|
||||||
|
@ -364,14 +367,14 @@ GEM
|
||||||
activerecord
|
activerecord
|
||||||
kaminari-core (= 1.2.2)
|
kaminari-core (= 1.2.2)
|
||||||
kaminari-core (1.2.2)
|
kaminari-core (1.2.2)
|
||||||
kt-paperclip (7.1.1)
|
kt-paperclip (7.2.0)
|
||||||
activemodel (>= 4.2.0)
|
activemodel (>= 4.2.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
marcel (~> 1.0.1)
|
marcel (~> 1.0.1)
|
||||||
mime-types
|
mime-types
|
||||||
terrapin (~> 0.6.0)
|
terrapin (~> 0.6.0)
|
||||||
launchy (2.5.0)
|
launchy (2.5.2)
|
||||||
addressable (~> 2.7)
|
addressable (~> 2.8)
|
||||||
letter_opener (1.8.1)
|
letter_opener (1.8.1)
|
||||||
launchy (>= 2.2, < 3)
|
launchy (>= 2.2, < 3)
|
||||||
letter_opener_web (2.0.0)
|
letter_opener_web (2.0.0)
|
||||||
|
@ -388,10 +391,10 @@ GEM
|
||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
railties (>= 4)
|
railties (>= 4)
|
||||||
request_store (~> 1.0)
|
request_store (~> 1.0)
|
||||||
loofah (2.19.1)
|
loofah (2.21.3)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.12.0)
|
||||||
mail (2.8.0.1)
|
mail (2.8.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
|
@ -406,36 +409,33 @@ GEM
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mime-types (3.4.1)
|
mime-types (3.4.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2022.0105)
|
mime-types-data (3.2023.0218.1)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
mini_portile2 (2.8.1)
|
mini_portile2 (2.8.2)
|
||||||
minitest (5.17.0)
|
minitest (5.18.1)
|
||||||
msgpack (1.6.0)
|
msgpack (1.7.1)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.3.0)
|
||||||
net-imap (0.3.4)
|
net-http (0.3.2)
|
||||||
|
uri
|
||||||
|
net-imap (0.3.6)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
net-ldap (0.17.1)
|
net-ldap (0.18.0)
|
||||||
net-pop (0.1.2)
|
net-pop (0.1.2)
|
||||||
net-protocol
|
net-protocol
|
||||||
net-protocol (0.2.1)
|
net-protocol (0.2.1)
|
||||||
timeout
|
timeout
|
||||||
net-scp (4.0.0.rc1)
|
net-scp (4.0.0)
|
||||||
net-ssh (>= 2.6.5, < 8.0.0)
|
net-ssh (>= 2.6.5, < 8.0.0)
|
||||||
net-smtp (0.3.3)
|
net-smtp (0.3.3)
|
||||||
net-protocol
|
net-protocol
|
||||||
net-ssh (7.0.1)
|
net-ssh (7.1.0)
|
||||||
nio4r (2.5.8)
|
nio4r (2.5.9)
|
||||||
nokogiri (1.14.1)
|
nokogiri (1.15.2)
|
||||||
mini_portile2 (~> 2.8.0)
|
mini_portile2 (~> 2.8.2)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nsa (0.2.8)
|
oj (3.15.0)
|
||||||
activesupport (>= 4.2, < 7)
|
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
||||||
sidekiq (>= 3.5)
|
|
||||||
statsd-ruby (~> 1.4, >= 1.4.0)
|
|
||||||
oj (3.13.23)
|
|
||||||
omniauth (1.9.2)
|
omniauth (1.9.2)
|
||||||
hashie (>= 3.4.6)
|
hashie (>= 3.4.6)
|
||||||
rack (>= 1.6.2, < 3)
|
rack (>= 1.6.2, < 3)
|
||||||
|
@ -449,6 +449,9 @@ GEM
|
||||||
omniauth-saml (1.10.3)
|
omniauth-saml (1.10.3)
|
||||||
omniauth (~> 1.3, >= 1.3.2)
|
omniauth (~> 1.3, >= 1.3.2)
|
||||||
ruby-saml (~> 1.9)
|
ruby-saml (~> 1.9)
|
||||||
|
omniauth_openid_connect (0.6.1)
|
||||||
|
omniauth (>= 1.9, < 3)
|
||||||
|
openid_connect (~> 1.1)
|
||||||
openid_connect (1.4.2)
|
openid_connect (1.4.2)
|
||||||
activemodel
|
activemodel
|
||||||
attr_required (>= 1.0.0)
|
attr_required (>= 1.0.0)
|
||||||
|
@ -460,23 +463,23 @@ GEM
|
||||||
validate_email
|
validate_email
|
||||||
validate_url
|
validate_url
|
||||||
webfinger (~> 1.2)
|
webfinger (~> 1.2)
|
||||||
openssl (3.0.0)
|
openssl (3.1.0)
|
||||||
openssl-signature_algorithm (1.2.1)
|
openssl-signature_algorithm (1.3.0)
|
||||||
openssl (> 2.0, < 3.1)
|
openssl (> 2.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
ox (2.14.14)
|
ox (2.14.16)
|
||||||
parallel (1.22.1)
|
parallel (1.23.0)
|
||||||
parser (3.2.0.0)
|
parser (3.2.2.3)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
|
racc
|
||||||
parslet (2.0.0)
|
parslet (2.0.0)
|
||||||
pastel (0.8.0)
|
pastel (0.8.0)
|
||||||
tty-color (~> 0.5)
|
tty-color (~> 0.5)
|
||||||
pg (1.4.5)
|
pg (1.5.3)
|
||||||
pghero (3.1.0)
|
pghero (3.3.3)
|
||||||
activerecord (>= 6)
|
activerecord (>= 6)
|
||||||
pkg-config (1.5.1)
|
|
||||||
posix-spawn (0.3.15)
|
posix-spawn (0.3.15)
|
||||||
premailer (1.18.0)
|
premailer (1.21.0)
|
||||||
addressable
|
addressable
|
||||||
css_parser (>= 1.12.0)
|
css_parser (>= 1.12.0)
|
||||||
htmlentities (>= 4.0.0)
|
htmlentities (>= 4.0.0)
|
||||||
|
@ -485,25 +488,17 @@ GEM
|
||||||
net-smtp
|
net-smtp
|
||||||
premailer (~> 1.7, >= 1.7.9)
|
premailer (~> 1.7, >= 1.7.9)
|
||||||
private_address_check (0.5.0)
|
private_address_check (0.5.0)
|
||||||
pry (0.14.1)
|
|
||||||
coderay (~> 1.1)
|
|
||||||
method_source (~> 1.0)
|
|
||||||
pry-byebug (3.10.1)
|
|
||||||
byebug (~> 11.0)
|
|
||||||
pry (>= 0.13, < 0.15)
|
|
||||||
pry-rails (0.3.9)
|
|
||||||
pry (>= 0.10.4)
|
|
||||||
public_suffix (5.0.1)
|
public_suffix (5.0.1)
|
||||||
puma (5.6.5)
|
puma (6.3.0)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
pundit (2.3.0)
|
pundit (2.3.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
raabro (1.4.0)
|
raabro (1.4.0)
|
||||||
racc (1.6.2)
|
racc (1.7.1)
|
||||||
rack (2.2.6.2)
|
rack (2.2.7)
|
||||||
rack-attack (6.6.1)
|
rack-attack (6.6.1)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rack-cors (1.1.1)
|
rack-cors (2.0.1)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-oauth2 (1.21.3)
|
rack-oauth2 (1.21.3)
|
||||||
activesupport
|
activesupport
|
||||||
|
@ -513,22 +508,22 @@ GEM
|
||||||
rack (>= 2.1.0)
|
rack (>= 2.1.0)
|
||||||
rack-proxy (0.7.6)
|
rack-proxy (0.7.6)
|
||||||
rack
|
rack
|
||||||
rack-test (2.0.2)
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (6.1.7.2)
|
rails (6.1.7.4)
|
||||||
actioncable (= 6.1.7.2)
|
actioncable (= 6.1.7.4)
|
||||||
actionmailbox (= 6.1.7.2)
|
actionmailbox (= 6.1.7.4)
|
||||||
actionmailer (= 6.1.7.2)
|
actionmailer (= 6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
actionpack (= 6.1.7.4)
|
||||||
actiontext (= 6.1.7.2)
|
actiontext (= 6.1.7.4)
|
||||||
actionview (= 6.1.7.2)
|
actionview (= 6.1.7.4)
|
||||||
activejob (= 6.1.7.2)
|
activejob (= 6.1.7.4)
|
||||||
activemodel (= 6.1.7.2)
|
activemodel (= 6.1.7.4)
|
||||||
activerecord (= 6.1.7.2)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 6.1.7.2)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 6.1.7.2)
|
railties (= 6.1.7.4)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.5)
|
rails-controller-testing (1.0.5)
|
||||||
actionpack (>= 5.0.1.rc1)
|
actionpack (>= 5.0.1.rc1)
|
||||||
|
@ -537,96 +532,99 @@ GEM
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.5.0)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.19, >= 2.19.1)
|
loofah (~> 2.21)
|
||||||
|
nokogiri (~> 1.14)
|
||||||
rails-i18n (6.0.0)
|
rails-i18n (6.0.0)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
railties (>= 6.0.0, < 7)
|
railties (>= 6.0.0, < 7)
|
||||||
rails-settings-cached (0.6.6)
|
railties (6.1.7.4)
|
||||||
rails (>= 4.2.0)
|
actionpack (= 6.1.7.4)
|
||||||
railties (6.1.7.2)
|
activesupport (= 6.1.7.4)
|
||||||
actionpack (= 6.1.7.2)
|
|
||||||
activesupport (= 6.1.7.2)
|
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rdf (3.2.9)
|
rdf (3.2.11)
|
||||||
link_header (~> 0.0, >= 0.0.8)
|
link_header (~> 0.0, >= 0.0.8)
|
||||||
rdf-normalize (0.5.1)
|
rdf-normalize (0.6.0)
|
||||||
rdf (~> 3.2)
|
rdf (~> 3.2)
|
||||||
redcarpet (3.6.0)
|
redcarpet (3.6.0)
|
||||||
redis (4.5.1)
|
redis (4.8.1)
|
||||||
redis-namespace (1.10.0)
|
redis-namespace (1.11.0)
|
||||||
redis (>= 4)
|
redis (>= 4)
|
||||||
redlock (1.3.2)
|
redlock (1.3.2)
|
||||||
redis (>= 3.0.0, < 6.0)
|
redis (>= 3.0.0, < 6.0)
|
||||||
regexp_parser (2.6.2)
|
regexp_parser (2.8.1)
|
||||||
request_store (1.5.1)
|
request_store (1.5.1)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
responders (3.0.1)
|
responders (3.1.0)
|
||||||
actionpack (>= 5.0)
|
actionpack (>= 5.2)
|
||||||
railties (>= 5.0)
|
railties (>= 5.2)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rotp (6.2.0)
|
rotp (6.2.2)
|
||||||
|
rouge (4.1.2)
|
||||||
rpam2 (4.0.2)
|
rpam2 (4.0.2)
|
||||||
rqrcode (2.1.2)
|
rqrcode (2.2.0)
|
||||||
chunky_png (~> 1.0)
|
chunky_png (~> 1.0)
|
||||||
rqrcode_core (~> 1.0)
|
rqrcode_core (~> 1.0)
|
||||||
rqrcode_core (1.2.0)
|
rqrcode_core (1.2.0)
|
||||||
rspec-core (3.11.0)
|
rspec-core (3.12.2)
|
||||||
rspec-support (~> 3.11.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-expectations (3.11.0)
|
rspec-expectations (3.12.3)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.11.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-mocks (3.11.1)
|
rspec-mocks (3.12.5)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.11.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-rails (5.1.2)
|
rspec-rails (6.0.3)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 6.1)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 6.1)
|
||||||
railties (>= 5.2)
|
railties (>= 6.1)
|
||||||
rspec-core (~> 3.10)
|
rspec-core (~> 3.12)
|
||||||
rspec-expectations (~> 3.10)
|
rspec-expectations (~> 3.12)
|
||||||
rspec-mocks (~> 3.10)
|
rspec-mocks (~> 3.12)
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.12)
|
||||||
rspec-sidekiq (3.1.0)
|
rspec-sidekiq (3.1.0)
|
||||||
rspec-core (~> 3.0, >= 3.0.0)
|
rspec-core (~> 3.0, >= 3.0.0)
|
||||||
sidekiq (>= 2.4.0)
|
sidekiq (>= 2.4.0)
|
||||||
rspec-support (3.11.1)
|
rspec-support (3.12.0)
|
||||||
rspec_junit_formatter (0.6.0)
|
rspec_chunked (0.6)
|
||||||
rspec-core (>= 2, < 4, != 2.12.0)
|
rubocop (1.52.1)
|
||||||
rubocop (1.44.1)
|
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.2.0.0)
|
parser (>= 3.2.2.3)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.24.1, < 2.0)
|
rubocop-ast (>= 1.28.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.24.1)
|
rubocop-ast (1.29.0)
|
||||||
parser (>= 3.1.1.0)
|
parser (>= 3.2.1.0)
|
||||||
rubocop-capybara (2.17.0)
|
rubocop-capybara (2.18.0)
|
||||||
rubocop (~> 1.41)
|
rubocop (~> 1.41)
|
||||||
rubocop-performance (1.16.0)
|
rubocop-factory_bot (2.23.1)
|
||||||
|
rubocop (~> 1.33)
|
||||||
|
rubocop-performance (1.18.0)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-ast (>= 0.4.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
rubocop-rails (2.17.4)
|
rubocop-rails (2.19.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
rubocop-rspec (2.18.1)
|
rubocop-rspec (2.22.0)
|
||||||
rubocop (~> 1.33)
|
rubocop (~> 1.33)
|
||||||
rubocop-capybara (~> 2.17)
|
rubocop-capybara (~> 2.17)
|
||||||
ruby-progressbar (1.11.0)
|
rubocop-factory_bot (~> 2.22)
|
||||||
ruby-saml (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
nokogiri (>= 1.10.5)
|
ruby-saml (1.15.0)
|
||||||
|
nokogiri (>= 1.13.10)
|
||||||
rexml
|
rexml
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
rufus-scheduler (3.8.2)
|
rubyzip (2.3.2)
|
||||||
|
rufus-scheduler (3.9.1)
|
||||||
fugit (~> 1.1, >= 1.1.6)
|
fugit (~> 1.1, >= 1.1.6)
|
||||||
safety_net_attestation (0.4.0)
|
safety_net_attestation (0.4.0)
|
||||||
jwt (~> 2.0)
|
jwt (~> 2.0)
|
||||||
|
@ -637,16 +635,15 @@ GEM
|
||||||
activerecord (>= 4.0.0)
|
activerecord (>= 4.0.0)
|
||||||
railties (>= 4.0.0)
|
railties (>= 4.0.0)
|
||||||
semantic_range (3.0.0)
|
semantic_range (3.0.0)
|
||||||
sidekiq (6.5.8)
|
sidekiq (6.5.9)
|
||||||
connection_pool (>= 2.2.5, < 3)
|
connection_pool (>= 2.2.5, < 3)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
redis (>= 4.5.0, < 5)
|
redis (>= 4.5.0, < 5)
|
||||||
sidekiq-bulk (0.2.0)
|
sidekiq-bulk (0.2.0)
|
||||||
sidekiq
|
sidekiq
|
||||||
sidekiq-scheduler (4.0.3)
|
sidekiq-scheduler (5.0.3)
|
||||||
redis (>= 4.2.0)
|
|
||||||
rufus-scheduler (~> 3.2)
|
rufus-scheduler (~> 3.2)
|
||||||
sidekiq (>= 4, < 7)
|
sidekiq (>= 6, < 8)
|
||||||
tilt (>= 1.4.0)
|
tilt (>= 1.4.0)
|
||||||
sidekiq-unique-jobs (7.1.29)
|
sidekiq-unique-jobs (7.1.29)
|
||||||
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
||||||
|
@ -673,30 +670,30 @@ GEM
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sshkit (1.21.2)
|
sshkit (1.21.4)
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
stackprof (0.2.23)
|
stackprof (0.2.25)
|
||||||
statsd-ruby (1.5.0)
|
|
||||||
stoplight (3.0.1)
|
stoplight (3.0.1)
|
||||||
redlock (~> 1.0)
|
redlock (~> 1.0)
|
||||||
strong_migrations (0.7.9)
|
strong_migrations (0.8.0)
|
||||||
activerecord (>= 5)
|
activerecord (>= 5.2)
|
||||||
swd (1.3.0)
|
swd (1.3.0)
|
||||||
activesupport (>= 3)
|
activesupport (>= 3)
|
||||||
attr_required (>= 0.0.5)
|
attr_required (>= 0.0.5)
|
||||||
httpclient (>= 2.4)
|
httpclient (>= 2.4)
|
||||||
temple (0.8.2)
|
sysexits (1.2.0)
|
||||||
|
temple (0.10.2)
|
||||||
terminal-table (3.0.2)
|
terminal-table (3.0.2)
|
||||||
unicode-display_width (>= 1.1.1, < 3)
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
terrapin (0.6.0)
|
terrapin (0.6.0)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
thor (1.2.1)
|
thor (1.2.2)
|
||||||
tilt (2.0.11)
|
tilt (2.2.0)
|
||||||
timeout (0.3.1)
|
timeout (0.3.2)
|
||||||
tpm-key_attestation (0.11.0)
|
tpm-key_attestation (0.12.0)
|
||||||
bindata (~> 2.4)
|
bindata (~> 2.4)
|
||||||
openssl (> 2.0, < 3.1)
|
openssl (> 2.0)
|
||||||
openssl-signature_algorithm (~> 1.0)
|
openssl-signature_algorithm (~> 1.0)
|
||||||
tty-color (0.6.0)
|
tty-color (0.6.0)
|
||||||
tty-cursor (0.7.1)
|
tty-cursor (0.7.1)
|
||||||
|
@ -713,13 +710,13 @@ GEM
|
||||||
unf (~> 0.1.0)
|
unf (~> 0.1.0)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
tzinfo-data (1.2022.7)
|
tzinfo-data (1.2023.3)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.8.2)
|
unf_ext (0.0.8.2)
|
||||||
unicode-display_width (2.4.2)
|
unicode-display_width (2.4.2)
|
||||||
uniform_notifier (1.16.0)
|
uri (0.12.2)
|
||||||
validate_email (0.1.6)
|
validate_email (0.1.6)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
mail (>= 2.2.5)
|
mail (>= 2.2.5)
|
||||||
|
@ -728,15 +725,15 @@ GEM
|
||||||
public_suffix
|
public_suffix
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
webauthn (2.5.2)
|
webauthn (3.0.0)
|
||||||
android_key_attestation (~> 0.3.0)
|
android_key_attestation (~> 0.3.0)
|
||||||
awrence (~> 1.1)
|
awrence (~> 1.1)
|
||||||
bindata (~> 2.4)
|
bindata (~> 2.4)
|
||||||
cbor (~> 0.5.9)
|
cbor (~> 0.5.9)
|
||||||
cose (~> 1.1)
|
cose (~> 1.1)
|
||||||
openssl (>= 2.2, < 3.1)
|
openssl (>= 2.2)
|
||||||
safety_net_attestation (~> 0.4.0)
|
safety_net_attestation (~> 0.4.0)
|
||||||
tpm-key_attestation (~> 0.11.0)
|
tpm-key_attestation (~> 0.12.0)
|
||||||
webfinger (1.2.0)
|
webfinger (1.2.0)
|
||||||
activesupport
|
activesupport
|
||||||
httpclient (>= 2.4)
|
httpclient (>= 2.4)
|
||||||
|
@ -756,53 +753,51 @@ GEM
|
||||||
xorcist (1.1.3)
|
xorcist (1.1.3)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
zeitwerk (2.6.6)
|
zeitwerk (2.6.8)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
active_model_serializers (~> 0.10)
|
active_model_serializers (~> 0.10)
|
||||||
active_record_query_trace (~> 1.8)
|
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
annotate (~> 3.2)
|
annotate (~> 3.2)
|
||||||
aws-sdk-s3 (~> 1.119)
|
aws-sdk-s3 (~> 1.123)
|
||||||
better_errors (~> 2.9)
|
better_errors (~> 2.9)
|
||||||
binding_of_caller (~> 1.0)
|
binding_of_caller (~> 1.0)
|
||||||
blurhash (~> 0.1)
|
blurhash (~> 0.1)
|
||||||
bootsnap (~> 1.16.0)
|
bootsnap (~> 1.16.0)
|
||||||
brakeman (~> 5.4)
|
brakeman (~> 5.4)
|
||||||
browser
|
browser
|
||||||
bullet (~> 7.0)
|
|
||||||
bundler-audit (~> 0.9)
|
bundler-audit (~> 0.9)
|
||||||
capistrano (~> 3.17)
|
capistrano (~> 3.17)
|
||||||
capistrano-rails (~> 1.6)
|
capistrano-rails (~> 1.6)
|
||||||
capistrano-rbenv (~> 2.2)
|
capistrano-rbenv (~> 2.2)
|
||||||
capistrano-yarn (~> 2.0)
|
capistrano-yarn (~> 2.0)
|
||||||
capybara (~> 3.38)
|
capybara (~> 3.39)
|
||||||
charlock_holmes (~> 0.7.7)
|
charlock_holmes (~> 0.7.7)
|
||||||
chewy (~> 7.2)
|
chewy (~> 7.3)
|
||||||
climate_control (~> 0.2)
|
climate_control (~> 0.2)
|
||||||
cocoon (~> 1.2)
|
cocoon (~> 1.2)
|
||||||
color_diff (~> 0.1)
|
color_diff (~> 0.1)
|
||||||
concurrent-ruby
|
concurrent-ruby
|
||||||
connection_pool
|
connection_pool
|
||||||
devise (~> 4.8)
|
devise (~> 4.9)
|
||||||
devise-two-factor (~> 4.0)
|
devise-two-factor (~> 4.1)
|
||||||
devise_pam_authenticatable2 (~> 9.2)
|
devise_pam_authenticatable2 (~> 9.2)
|
||||||
discard (~> 1.2)
|
discard (~> 1.2)
|
||||||
doorkeeper (~> 5.6)
|
doorkeeper (~> 5.6)
|
||||||
dotenv-rails (~> 2.8)
|
dotenv-rails (~> 2.8)
|
||||||
ed25519 (~> 1.3)
|
ed25519 (~> 1.3)
|
||||||
fabrication (~> 2.30)
|
fabrication (~> 2.30)
|
||||||
faker (~> 3.1)
|
faker (~> 3.2)
|
||||||
fast_blank (~> 1.0)
|
fast_blank (~> 1.0)
|
||||||
fastimage
|
fastimage
|
||||||
fog-core (<= 2.4.0)
|
fog-core (<= 2.4.0)
|
||||||
fog-openstack (~> 0.3)
|
fog-openstack (~> 0.3)
|
||||||
fuubar (~> 2.5)
|
fuubar (~> 2.5)
|
||||||
gitlab-omniauth-openid-connect (~> 0.10.1)
|
haml-rails (~> 2.0)
|
||||||
hamlit-rails (~> 0.2)
|
haml_lint
|
||||||
hcaptcha (~> 7.1)
|
hcaptcha (~> 7.1)
|
||||||
hiredis (~> 0.6)
|
hiredis (~> 0.6)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
|
@ -813,9 +808,9 @@ DEPENDENCIES
|
||||||
idn-ruby
|
idn-ruby
|
||||||
json-ld
|
json-ld
|
||||||
json-ld-preloaded (~> 3.2)
|
json-ld-preloaded (~> 3.2)
|
||||||
json-schema (~> 3.0)
|
json-schema (~> 4.0)
|
||||||
kaminari (~> 1.2)
|
kaminari (~> 1.2)
|
||||||
kt-paperclip (~> 7.1)
|
kt-paperclip (~> 7.2)
|
||||||
letter_opener (~> 1.8)
|
letter_opener (~> 1.8)
|
||||||
letter_opener_web (~> 2.0)
|
letter_opener_web (~> 2.0)
|
||||||
link_header (~> 0.0)
|
link_header (~> 0.0)
|
||||||
|
@ -824,54 +819,53 @@ DEPENDENCIES
|
||||||
mario-redis-lock (~> 1.2)
|
mario-redis-lock (~> 1.2)
|
||||||
memory_profiler
|
memory_profiler
|
||||||
mime-types (~> 3.4.1)
|
mime-types (~> 3.4.1)
|
||||||
net-ldap (~> 0.17)
|
net-http (~> 0.3.2)
|
||||||
nokogiri (~> 1.14)
|
net-ldap (~> 0.18)
|
||||||
nsa (~> 0.2)
|
nokogiri (~> 1.15)
|
||||||
oj (~> 3.13)
|
oj (~> 3.14)
|
||||||
omniauth (~> 1.9)
|
omniauth (~> 1.9)
|
||||||
omniauth-cas (~> 2.0)
|
omniauth-cas (~> 2.0)
|
||||||
omniauth-rails_csrf_protection (~> 0.1)
|
omniauth-rails_csrf_protection (~> 0.1)
|
||||||
omniauth-saml (~> 1.10)
|
omniauth-saml (~> 1.10)
|
||||||
|
omniauth_openid_connect (~> 0.6.1)
|
||||||
ox (~> 2.14)
|
ox (~> 2.14)
|
||||||
parslet
|
parslet
|
||||||
pg (~> 1.4)
|
pg (~> 1.5)
|
||||||
pghero
|
pghero
|
||||||
pkg-config (~> 1.5)
|
|
||||||
posix-spawn
|
posix-spawn
|
||||||
premailer-rails
|
premailer-rails
|
||||||
private_address_check (~> 0.5)
|
private_address_check (~> 0.5)
|
||||||
pry-byebug (~> 3.10)
|
|
||||||
pry-rails (~> 0.3)
|
|
||||||
public_suffix (~> 5.0)
|
public_suffix (~> 5.0)
|
||||||
puma (~> 5.6)
|
puma (~> 6.3)
|
||||||
pundit (~> 2.3)
|
pundit (~> 2.3)
|
||||||
rack (~> 2.2.6)
|
rack (~> 2.2.7)
|
||||||
rack-attack (~> 6.6)
|
rack-attack (~> 6.6)
|
||||||
rack-cors (~> 1.1)
|
rack-cors (~> 2.0)
|
||||||
rack-test (~> 2.0)
|
rack-test (~> 2.1)
|
||||||
rails (~> 6.1.7)
|
rails (~> 6.1.7)
|
||||||
rails-controller-testing (~> 1.0)
|
rails-controller-testing (~> 1.0)
|
||||||
rails-i18n (~> 6.0)
|
rails-i18n (~> 6.0)
|
||||||
rails-settings-cached (~> 0.6)
|
rails-settings-cached (~> 0.6)!
|
||||||
rdf-normalize (~> 0.5)
|
rdf-normalize (~> 0.5)
|
||||||
redcarpet (~> 3.6)
|
redcarpet (~> 3.6)
|
||||||
redis (~> 4.5)
|
redis (~> 4.5)
|
||||||
redis-namespace (~> 1.10)
|
redis-namespace (~> 1.10)
|
||||||
rexml (~> 3.2)
|
rqrcode (~> 2.2)
|
||||||
rqrcode (~> 2.1)
|
rspec-rails (~> 6.0)
|
||||||
rspec-rails (~> 5.1)
|
|
||||||
rspec-sidekiq (~> 3.1)
|
rspec-sidekiq (~> 3.1)
|
||||||
rspec_junit_formatter (~> 0.6)
|
rspec_chunked (~> 0.6)
|
||||||
rubocop
|
rubocop
|
||||||
|
rubocop-capybara
|
||||||
rubocop-performance
|
rubocop-performance
|
||||||
rubocop-rails
|
rubocop-rails
|
||||||
rubocop-rspec
|
rubocop-rspec
|
||||||
ruby-progressbar (~> 1.11)
|
ruby-progressbar (~> 1.13)
|
||||||
|
rubyzip (~> 2.3)
|
||||||
sanitize (~> 6.0)
|
sanitize (~> 6.0)
|
||||||
scenic (~> 1.7)
|
scenic (~> 1.7)
|
||||||
sidekiq (~> 6.5)
|
sidekiq (~> 6.5)
|
||||||
sidekiq-bulk (~> 0.2.0)
|
sidekiq-bulk (~> 0.2.0)
|
||||||
sidekiq-scheduler (~> 4.0)
|
sidekiq-scheduler (~> 5.0)
|
||||||
sidekiq-unique-jobs (~> 7.1)
|
sidekiq-unique-jobs (~> 7.1)
|
||||||
simple-navigation (~> 4.4)
|
simple-navigation (~> 4.4)
|
||||||
simple_form (~> 5.2)
|
simple_form (~> 5.2)
|
||||||
|
@ -880,13 +874,19 @@ DEPENDENCIES
|
||||||
sprockets-rails (~> 3.4)
|
sprockets-rails (~> 3.4)
|
||||||
stackprof
|
stackprof
|
||||||
stoplight (~> 3.0.1)
|
stoplight (~> 3.0.1)
|
||||||
strong_migrations (~> 0.7)
|
strong_migrations (~> 0.8)
|
||||||
thor (~> 1.2)
|
thor (~> 1.2)
|
||||||
tty-prompt (~> 0.23)
|
tty-prompt (~> 0.23)
|
||||||
twitter-text (~> 3.1.0)
|
twitter-text (~> 3.1.0)
|
||||||
tzinfo-data (~> 1.2022)
|
tzinfo-data (~> 1.2023)
|
||||||
webauthn (~> 2.5)
|
webauthn (~> 3.0)
|
||||||
webmock (~> 3.18)
|
webmock (~> 3.18)
|
||||||
webpacker (~> 5.4)
|
webpacker (~> 5.4)
|
||||||
webpush!
|
webpush!
|
||||||
xorcist (~> 1.1)
|
xorcist (~> 1.1)
|
||||||
|
|
||||||
|
RUBY VERSION
|
||||||
|
ruby 3.2.2p53
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.4.13
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Mastodon Glitch Edition #
|
# Mastodon Glitch Edition
|
||||||
|
|
||||||
> Now with automated deploys!
|
> Now with automated deploys!
|
||||||
|
|
||||||
[![Build Status](https://img.shields.io/circleci/project/github/glitch-soc/mastodon.svg)][circleci]
|
[![Build Status](https://img.shields.io/circleci/project/github/glitch-soc/mastodon.svg)][circleci]
|
||||||
[![Code Climate](https://img.shields.io/codeclimate/maintainability/glitch-soc/mastodon.svg)][code_climate]
|
[![Code Climate](https://img.shields.io/codeclimate/maintainability/glitch-soc/mastodon.svg)][code_climate]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can reach us at <security@joinmastodon.org>.
|
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can reach us at <security@joinmastodon.org>.
|
||||||
|
|
||||||
You should *not* report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
|
You should _not_ report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@ A "vulnerability in Mastodon" is a vulnerability in the code distributed through
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ----------|
|
| ------- | --------- |
|
||||||
|
| 4.1.x | Yes |
|
||||||
| 4.0.x | Yes |
|
| 4.0.x | Yes |
|
||||||
| 3.5.x | Yes |
|
| 3.5.x | Yes |
|
||||||
| < 3.5 | No |
|
| < 3.5 | No |
|
||||||
|
|
|
@ -2,8 +2,37 @@
|
||||||
|
|
||||||
class AccountsIndex < Chewy::Index
|
class AccountsIndex < Chewy::Index
|
||||||
settings index: { refresh_interval: '30s' }, analysis: {
|
settings index: { refresh_interval: '30s' }, analysis: {
|
||||||
|
filter: {
|
||||||
|
english_stop: {
|
||||||
|
type: 'stop',
|
||||||
|
stopwords: '_english_',
|
||||||
|
},
|
||||||
|
|
||||||
|
english_stemmer: {
|
||||||
|
type: 'stemmer',
|
||||||
|
language: 'english',
|
||||||
|
},
|
||||||
|
|
||||||
|
english_possessive_stemmer: {
|
||||||
|
type: 'stemmer',
|
||||||
|
language: 'possessive_english',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
analyzer: {
|
analyzer: {
|
||||||
content: {
|
natural: {
|
||||||
|
tokenizer: 'uax_url_email',
|
||||||
|
filter: %w(
|
||||||
|
english_possessive_stemmer
|
||||||
|
lowercase
|
||||||
|
asciifolding
|
||||||
|
cjk_width
|
||||||
|
english_stop
|
||||||
|
english_stemmer
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
|
verbatim: {
|
||||||
tokenizer: 'whitespace',
|
tokenizer: 'whitespace',
|
||||||
filter: %w(lowercase asciifolding cjk_width),
|
filter: %w(lowercase asciifolding cjk_width),
|
||||||
},
|
},
|
||||||
|
@ -26,18 +55,13 @@ class AccountsIndex < Chewy::Index
|
||||||
index_scope ::Account.searchable.includes(:account_stat)
|
index_scope ::Account.searchable.includes(:account_stat)
|
||||||
|
|
||||||
root date_detection: false do
|
root date_detection: false do
|
||||||
field :id, type: 'long'
|
field(:id, type: 'long')
|
||||||
|
field(:following_count, type: 'long')
|
||||||
field :display_name, type: 'text', analyzer: 'content' do
|
field(:followers_count, type: 'long')
|
||||||
field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'content'
|
field(:properties, type: 'keyword', value: ->(account) { account.searchable_properties })
|
||||||
end
|
field(:last_status_at, type: 'date', value: ->(account) { account.last_status_at || account.created_at })
|
||||||
|
field(:display_name, type: 'text', analyzer: 'verbatim') { field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'verbatim' }
|
||||||
field :acct, type: 'text', analyzer: 'content', value: ->(account) { [account.username, account.domain].compact.join('@') } do
|
field(:username, type: 'text', analyzer: 'verbatim', value: ->(account) { [account.username, account.domain].compact.join('@') }) { field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'verbatim' }
|
||||||
field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'content'
|
field(:text, type: 'text', value: ->(account) { account.searchable_text }) { field :stemmed, type: 'text', analyzer: 'natural' }
|
||||||
end
|
|
||||||
|
|
||||||
field :following_count, type: 'long', value: ->(account) { account.following_count }
|
|
||||||
field :followers_count, type: 'long', value: ->(account) { account.followers_count }
|
|
||||||
field :last_status_at, type: 'date', value: ->(account) { account.last_status_at || account.created_at }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ class AboutController < ApplicationController
|
||||||
before_action :set_instance_presenter
|
before_action :set_instance_presenter
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 0, public: true unless user_signed_in?
|
expires_in(15.seconds, public: true, stale_while_revalidate: 30.seconds, stale_if_error: 1.day) unless user_signed_in?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -7,8 +7,9 @@ class AccountsController < ApplicationController
|
||||||
include AccountControllerConcern
|
include AccountControllerConcern
|
||||||
include SignatureAuthentication
|
include SignatureAuthentication
|
||||||
|
|
||||||
|
vary_by -> { public_fetch_mode? ? 'Accept, Accept-Language, Cookie' : 'Accept, Accept-Language, Cookie, Signature' }
|
||||||
|
|
||||||
before_action :require_account_signature!, if: -> { request.format == :json && authorized_fetch_mode? }
|
before_action :require_account_signature!, if: -> { request.format == :json && authorized_fetch_mode? }
|
||||||
before_action :set_cache_headers
|
|
||||||
|
|
||||||
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) }
|
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) }
|
||||||
skip_before_action :require_functional!, unless: :whitelist_mode?
|
skip_before_action :require_functional!, unless: :whitelist_mode?
|
||||||
|
@ -16,7 +17,7 @@ class AccountsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
expires_in 0, public: true unless user_signed_in?
|
expires_in(15.seconds, public: true, stale_while_revalidate: 30.seconds, stale_if_error: 1.hour) unless user_signed_in?
|
||||||
|
|
||||||
@rss_url = rss_url
|
@rss_url = rss_url
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,10 +7,6 @@ class ActivityPub::BaseController < Api::BaseController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_cache_headers
|
|
||||||
response.headers['Vary'] = 'Signature' if authorized_fetch_mode?
|
|
||||||
end
|
|
||||||
|
|
||||||
def skip_temporary_suspension_response?
|
def skip_temporary_suspension_response?
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,11 +4,12 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController
|
||||||
include SignatureVerification
|
include SignatureVerification
|
||||||
include AccountOwnedConcern
|
include AccountOwnedConcern
|
||||||
|
|
||||||
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
||||||
|
|
||||||
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
||||||
before_action :set_items
|
before_action :set_items
|
||||||
before_action :set_size
|
before_action :set_size
|
||||||
before_action :set_type
|
before_action :set_type
|
||||||
before_action :set_cache_headers
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 3.minutes, public: public_fetch_mode?
|
expires_in 3.minutes, public: public_fetch_mode?
|
||||||
|
|
|
@ -4,9 +4,10 @@ class ActivityPub::FollowersSynchronizationsController < ActivityPub::BaseContro
|
||||||
include SignatureVerification
|
include SignatureVerification
|
||||||
include AccountOwnedConcern
|
include AccountOwnedConcern
|
||||||
|
|
||||||
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
||||||
|
|
||||||
before_action :require_account_signature!
|
before_action :require_account_signature!
|
||||||
before_action :set_items
|
before_action :set_items
|
||||||
before_action :set_cache_headers
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 0, public: false
|
expires_in 0, public: false
|
||||||
|
|
|
@ -6,9 +6,10 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController
|
||||||
include SignatureVerification
|
include SignatureVerification
|
||||||
include AccountOwnedConcern
|
include AccountOwnedConcern
|
||||||
|
|
||||||
|
vary_by -> { 'Signature' if authorized_fetch_mode? || page_requested? }
|
||||||
|
|
||||||
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
||||||
before_action :set_statuses
|
before_action :set_statuses
|
||||||
before_action :set_cache_headers
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if page_requested?
|
if page_requested?
|
||||||
|
@ -16,6 +17,7 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController
|
||||||
else
|
else
|
||||||
expires_in(3.minutes, public: public_fetch_mode?)
|
expires_in(3.minutes, public: public_fetch_mode?)
|
||||||
end
|
end
|
||||||
|
|
||||||
render json: outbox_presenter, serializer: ActivityPub::OutboxSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
|
render json: outbox_presenter, serializer: ActivityPub::OutboxSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,8 +82,4 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController
|
||||||
def set_account
|
def set_account
|
||||||
@account = params[:account_username].present? ? Account.find_local!(username_param) : Account.representative
|
@account = params[:account_username].present? ? Account.find_local!(username_param) : Account.representative
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
|
||||||
response.headers['Vary'] = 'Signature' if authorized_fetch_mode? || page_requested?
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,9 +7,10 @@ class ActivityPub::RepliesController < ActivityPub::BaseController
|
||||||
|
|
||||||
DESCENDANTS_LIMIT = 60
|
DESCENDANTS_LIMIT = 60
|
||||||
|
|
||||||
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
||||||
|
|
||||||
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
before_action :require_account_signature!, if: :authorized_fetch_mode?
|
||||||
before_action :set_status
|
before_action :set_status
|
||||||
before_action :set_cache_headers
|
|
||||||
before_action :set_replies
|
before_action :set_replies
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -14,6 +14,10 @@ class Admin::AnnouncementsController < Admin::BaseController
|
||||||
@announcement = Announcement.new
|
@announcement = Announcement.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
authorize :announcement, :update?
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :announcement, :create?
|
authorize :announcement, :create?
|
||||||
|
|
||||||
|
@ -28,10 +32,6 @@ class Admin::AnnouncementsController < Admin::BaseController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
|
||||||
authorize :announcement, :update?
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize :announcement, :update?
|
authorize :announcement, :update?
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ module Admin
|
||||||
|
|
||||||
before_action :set_pack
|
before_action :set_pack
|
||||||
before_action :set_body_classes
|
before_action :set_body_classes
|
||||||
|
before_action :set_cache_headers
|
||||||
|
|
||||||
after_action :verify_authorized
|
after_action :verify_authorized
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -21,6 +23,10 @@ module Admin
|
||||||
use_pack 'admin'
|
use_pack 'admin'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_cache_headers
|
||||||
|
response.cache_control.replace(private: true, no_store: true)
|
||||||
|
end
|
||||||
|
|
||||||
def set_user
|
def set_user
|
||||||
@user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
|
@user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,17 +14,5 @@ module Admin
|
||||||
@pending_tags_count = Tag.pending_review.count
|
@pending_tags_count = Tag.pending_review.count
|
||||||
@pending_appeals_count = Appeal.pending.count
|
@pending_appeals_count = Appeal.pending.count
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def redis_info
|
|
||||||
@redis_info ||= begin
|
|
||||||
if redis.is_a?(Redis::Namespace)
|
|
||||||
redis.redis.info
|
|
||||||
else
|
|
||||||
redis.info
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module Admin
|
module Admin
|
||||||
class DomainBlocksController < BaseController
|
class DomainBlocksController < BaseController
|
||||||
before_action :set_domain_block, only: [:show, :destroy, :edit, :update]
|
before_action :set_domain_block, only: [:destroy, :edit, :update]
|
||||||
|
|
||||||
def batch
|
def batch
|
||||||
authorize :domain_block, :create?
|
authorize :domain_block, :create?
|
||||||
|
@ -31,31 +31,41 @@ module Admin
|
||||||
@domain_block = DomainBlock.new(resource_params)
|
@domain_block = DomainBlock.new(resource_params)
|
||||||
existing_domain_block = resource_params[:domain].present? ? DomainBlock.rule_for(resource_params[:domain]) : nil
|
existing_domain_block = resource_params[:domain].present? ? DomainBlock.rule_for(resource_params[:domain]) : nil
|
||||||
|
|
||||||
|
# Disallow accidentally downgrading a domain block
|
||||||
if existing_domain_block.present? && !@domain_block.stricter_than?(existing_domain_block)
|
if existing_domain_block.present? && !@domain_block.stricter_than?(existing_domain_block)
|
||||||
@domain_block.save
|
@domain_block.save
|
||||||
flash.now[:alert] = I18n.t('admin.domain_blocks.existing_domain_block_html', name: existing_domain_block.domain, unblock_url: admin_domain_block_path(existing_domain_block)).html_safe # rubocop:disable Rails/OutputSafety
|
flash.now[:alert] = I18n.t('admin.domain_blocks.existing_domain_block_html', name: existing_domain_block.domain, unblock_url: admin_domain_block_path(existing_domain_block)).html_safe
|
||||||
@domain_block.errors.delete(:domain)
|
@domain_block.errors.delete(:domain)
|
||||||
render :new
|
return render :new
|
||||||
else
|
end
|
||||||
if existing_domain_block.present?
|
|
||||||
@domain_block = existing_domain_block
|
|
||||||
@domain_block.update(resource_params)
|
|
||||||
end
|
|
||||||
|
|
||||||
if @domain_block.save
|
# Allow transparently upgrading a domain block
|
||||||
DomainBlockWorker.perform_async(@domain_block.id)
|
if existing_domain_block.present?
|
||||||
log_action :create, @domain_block
|
@domain_block = existing_domain_block
|
||||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
@domain_block.assign_attributes(resource_params)
|
||||||
else
|
end
|
||||||
render :new
|
|
||||||
end
|
# Require explicit confirmation when suspending
|
||||||
|
return render :confirm_suspension if requires_confirmation?
|
||||||
|
|
||||||
|
if @domain_block.save
|
||||||
|
DomainBlockWorker.perform_async(@domain_block.id)
|
||||||
|
log_action :create, @domain_block
|
||||||
|
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||||
|
else
|
||||||
|
render :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize :domain_block, :update?
|
authorize :domain_block, :update?
|
||||||
|
|
||||||
if @domain_block.update(update_params)
|
@domain_block.assign_attributes(update_params)
|
||||||
|
|
||||||
|
# Require explicit confirmation when suspending
|
||||||
|
return render :confirm_suspension if requires_confirmation?
|
||||||
|
|
||||||
|
if @domain_block.save
|
||||||
DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
|
DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
|
||||||
log_action :update, @domain_block
|
log_action :update, @domain_block
|
||||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||||
|
@ -90,9 +100,11 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def action_from_button
|
def action_from_button
|
||||||
if params[:save]
|
'save' if params[:save]
|
||||||
'save'
|
end
|
||||||
end
|
|
||||||
|
def requires_confirmation?
|
||||||
|
@domain_block.valid? && (@domain_block.new_record? || @domain_block.severity_changed?) && @domain_block.severity.to_s == 'suspend' && !params[:confirm]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
module Admin
|
module Admin
|
||||||
class EmailDomainBlocksController < BaseController
|
class EmailDomainBlocksController < BaseController
|
||||||
before_action :set_email_domain_block, only: [:show, :destroy]
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize :email_domain_block, :index?
|
authorize :email_domain_block, :index?
|
||||||
|
|
||||||
|
@ -59,10 +57,6 @@ module Admin
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_email_domain_block
|
|
||||||
@email_domain_block = EmailDomainBlock.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_resolved_records
|
def set_resolved_records
|
||||||
Resolv::DNS.open do |dns|
|
Resolv::DNS.open do |dns|
|
||||||
dns.timeouts = 5
|
dns.timeouts = 5
|
||||||
|
|
|
@ -16,6 +16,10 @@ module Admin
|
||||||
@role = UserRole.new
|
@role = UserRole.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
authorize @role, :update?
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :user_role, :create?
|
authorize :user_role, :create?
|
||||||
|
|
||||||
|
@ -30,10 +34,6 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
|
||||||
authorize @role, :update?
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @role, :update?
|
authorize @role, :update?
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ module Admin
|
||||||
@rule = Rule.new
|
@rule = Rule.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
authorize @rule, :update?
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :rule, :create?
|
authorize :rule, :create?
|
||||||
|
|
||||||
|
@ -24,10 +28,6 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
|
||||||
authorize @rule, :update?
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @rule, :update?
|
authorize @rule, :update?
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ module Admin
|
||||||
@warning_preset = AccountWarningPreset.new
|
@warning_preset = AccountWarningPreset.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
authorize @warning_preset, :update?
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :account_warning_preset, :create?
|
authorize :account_warning_preset, :create?
|
||||||
|
|
||||||
|
@ -24,10 +28,6 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
|
||||||
authorize @warning_preset, :update?
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @warning_preset, :update?
|
authorize @warning_preset, :update?
|
||||||
|
|
||||||
|
|
|
@ -10,16 +10,25 @@ module Admin
|
||||||
@webhooks = Webhook.page(params[:page])
|
@webhooks = Webhook.page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
authorize @webhook, :show?
|
||||||
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
authorize :webhook, :create?
|
authorize :webhook, :create?
|
||||||
|
|
||||||
@webhook = Webhook.new
|
@webhook = Webhook.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
authorize @webhook, :update?
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :webhook, :create?
|
authorize :webhook, :create?
|
||||||
|
|
||||||
@webhook = Webhook.new(resource_params)
|
@webhook = Webhook.new(resource_params)
|
||||||
|
@webhook.current_account = current_account
|
||||||
|
|
||||||
if @webhook.save
|
if @webhook.save
|
||||||
redirect_to admin_webhook_path(@webhook)
|
redirect_to admin_webhook_path(@webhook)
|
||||||
|
@ -28,21 +37,15 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
|
||||||
authorize @webhook, :show?
|
|
||||||
end
|
|
||||||
|
|
||||||
def edit
|
|
||||||
authorize @webhook, :update?
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @webhook, :update?
|
authorize @webhook, :update?
|
||||||
|
|
||||||
|
@webhook.current_account = current_account
|
||||||
|
|
||||||
if @webhook.update(resource_params)
|
if @webhook.update(resource_params)
|
||||||
redirect_to admin_webhook_path(@webhook)
|
redirect_to admin_webhook_path(@webhook)
|
||||||
else
|
else
|
||||||
render :show
|
render :edit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -71,7 +74,7 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource_params
|
def resource_params
|
||||||
params.require(:webhook).permit(:url, events: [])
|
params.require(:webhook).permit(:url, :template, events: [])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,13 +6,14 @@ class Api::BaseController < ApplicationController
|
||||||
|
|
||||||
include RateLimitHeaders
|
include RateLimitHeaders
|
||||||
include AccessTokenTrackingConcern
|
include AccessTokenTrackingConcern
|
||||||
|
include ApiCachingConcern
|
||||||
|
|
||||||
skip_before_action :store_current_location
|
|
||||||
skip_before_action :require_functional!, unless: :whitelist_mode?
|
skip_before_action :require_functional!, unless: :whitelist_mode?
|
||||||
|
|
||||||
before_action :require_authenticated_user!, if: :disallow_unauthenticated_api_access?
|
before_action :require_authenticated_user!, if: :disallow_unauthenticated_api_access?
|
||||||
before_action :require_not_suspended!
|
before_action :require_not_suspended!
|
||||||
before_action :set_cache_headers
|
|
||||||
|
vary_by 'Authorization'
|
||||||
|
|
||||||
protect_from_forgery with: :null_session
|
protect_from_forgery with: :null_session
|
||||||
|
|
||||||
|
@ -148,10 +149,6 @@ class Api::BaseController < ApplicationController
|
||||||
doorkeeper_authorize!(*scopes) if doorkeeper_token
|
doorkeeper_authorize!(*scopes) if doorkeeper_token
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
|
||||||
response.headers['Cache-Control'] = 'private, no-store'
|
|
||||||
end
|
|
||||||
|
|
||||||
def disallow_unauthenticated_api_access?
|
def disallow_unauthenticated_api_access?
|
||||||
ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode
|
ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
|
||||||
def update
|
def update
|
||||||
@account = current_account
|
@account = current_account
|
||||||
UpdateAccountService.new.call(@account, account_params, raise_error: true)
|
UpdateAccountService.new.call(@account, account_params, raise_error: true)
|
||||||
UserSettingsDecorator.new(current_user).update(user_settings_params) if user_settings_params
|
current_user.update(user_params) if user_params
|
||||||
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
|
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
|
||||||
render json: @account, serializer: REST::CredentialAccountSerializer
|
render json: @account, serializer: REST::CredentialAccountSerializer
|
||||||
end
|
end
|
||||||
|
@ -34,15 +34,17 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_settings_params
|
def user_params
|
||||||
return nil if params[:source].blank?
|
return nil if params[:source].blank?
|
||||||
|
|
||||||
source_params = params.require(:source)
|
source_params = params.require(:source)
|
||||||
|
|
||||||
{
|
{
|
||||||
'setting_default_privacy' => source_params.fetch(:privacy, @account.user.setting_default_privacy),
|
settings_attributes: {
|
||||||
'setting_default_sensitive' => source_params.fetch(:sensitive, @account.user.setting_default_sensitive),
|
default_privacy: source_params.fetch(:privacy, @account.user.setting_default_privacy),
|
||||||
'setting_default_language' => source_params.fetch(:language, @account.user.setting_default_language),
|
default_sensitive: source_params.fetch(:sensitive, @account.user.setting_default_sensitive),
|
||||||
|
default_language: source_params.fetch(:language, @account.user.setting_default_language),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,7 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
|
||||||
after_action :insert_pagination_headers
|
after_action :insert_pagination_headers
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
cache_if_unauthenticated!
|
||||||
@accounts = load_accounts
|
@accounts = load_accounts
|
||||||
render json: @accounts, each_serializer: REST::AccountSerializer
|
render json: @accounts, each_serializer: REST::AccountSerializer
|
||||||
end
|
end
|
||||||
|
@ -45,15 +46,11 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_account_followers_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_account_followers_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @accounts.empty?
|
api_v1_account_followers_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
|
||||||
api_v1_account_followers_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -6,6 +6,7 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
|
||||||
after_action :insert_pagination_headers
|
after_action :insert_pagination_headers
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
cache_if_unauthenticated!
|
||||||
@accounts = load_accounts
|
@accounts = load_accounts
|
||||||
render json: @accounts, each_serializer: REST::AccountSerializer
|
render json: @accounts, each_serializer: REST::AccountSerializer
|
||||||
end
|
end
|
||||||
|
@ -45,15 +46,11 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_account_following_index_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_account_following_index_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @accounts.empty?
|
api_v1_account_following_index_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
|
||||||
api_v1_account_following_index_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -5,6 +5,7 @@ class Api::V1::Accounts::LookupController < Api::BaseController
|
||||||
before_action :set_account
|
before_action :set_account
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
cache_if_unauthenticated!
|
||||||
render json: @account, serializer: REST::AccountSerializer
|
render json: @account, serializer: REST::AccountSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||||
after_action :insert_pagination_headers, unless: -> { truthy_param?(:pinned) }
|
after_action :insert_pagination_headers, unless: -> { truthy_param?(:pinned) }
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
cache_if_unauthenticated!
|
||||||
@statuses = load_statuses
|
@statuses = load_statuses
|
||||||
render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id)
|
render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id)
|
||||||
end
|
end
|
||||||
|
@ -39,15 +40,11 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_account_statuses_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_account_statuses_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @statuses.empty?
|
api_v1_account_statuses_url pagination_params(min_id: pagination_since_id) unless @statuses.empty?
|
||||||
api_v1_account_statuses_url pagination_params(min_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def records_continue?
|
def records_continue?
|
||||||
|
|
|
@ -18,6 +18,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||||
override_rate_limit_headers :follow, family: :follows
|
override_rate_limit_headers :follow, family: :follows
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
cache_if_unauthenticated!
|
||||||
render json: @account, serializer: REST::AccountSerializer
|
render json: @account, serializer: REST::AccountSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||||
self.response_body = Oj.dump(response.body)
|
self.response_body = Oj.dump(response.body)
|
||||||
self.status = response.status
|
self.status = response.status
|
||||||
rescue ActiveRecord::RecordInvalid => e
|
rescue ActiveRecord::RecordInvalid => e
|
||||||
render json: ValidationErrorFormatter.new(e, 'account.username': :username, 'invite_request.text': :reason).as_json, status: :unprocessable_entity
|
render json: ValidationErrorFormatter.new(e, 'account.username': :username, 'invite_request.text': :reason).as_json, status: 422
|
||||||
end
|
end
|
||||||
|
|
||||||
def follow
|
def follow
|
||||||
|
@ -89,7 +90,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_params
|
def account_params
|
||||||
params.permit(:username, :email, :password, :agreement, :locale, :reason)
|
params.permit(:username, :email, :password, :agreement, :locale, :reason, :time_zone)
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_enabled_registrations
|
def check_enabled_registrations
|
||||||
|
|
|
@ -120,9 +120,7 @@ class Api::V1::Admin::AccountsController < Api::BaseController
|
||||||
translated_params[:status] = status.to_s if params[status].present?
|
translated_params[:status] = status.to_s if params[status].present?
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:staff].present?
|
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id) if params[:staff].present?
|
||||||
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id)
|
|
||||||
end
|
|
||||||
|
|
||||||
translated_params
|
translated_params
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Api::V1::Admin::CanonicalEmailBlocksController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_canonical_email_blocks_from_test
|
def set_canonical_email_blocks_from_test
|
||||||
@canonical_email_blocks = CanonicalEmailBlock.matching_email(params[:email])
|
@canonical_email_blocks = CanonicalEmailBlock.matching_email(params.require(:email))
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_canonical_email_block
|
def set_canonical_email_block
|
||||||
|
|
|
@ -16,19 +16,6 @@ class Api::V1::Admin::DomainAllowsController < Api::BaseController
|
||||||
|
|
||||||
PAGINATION_PARAMS = %i(limit).freeze
|
PAGINATION_PARAMS = %i(limit).freeze
|
||||||
|
|
||||||
def create
|
|
||||||
authorize :domain_allow, :create?
|
|
||||||
|
|
||||||
@domain_allow = DomainAllow.find_by(resource_params)
|
|
||||||
|
|
||||||
if @domain_allow.nil?
|
|
||||||
@domain_allow = DomainAllow.create!(resource_params)
|
|
||||||
log_action :create, @domain_allow
|
|
||||||
end
|
|
||||||
|
|
||||||
render json: @domain_allow, serializer: REST::Admin::DomainAllowSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize :domain_allow, :index?
|
authorize :domain_allow, :index?
|
||||||
render json: @domain_allows, each_serializer: REST::Admin::DomainAllowSerializer
|
render json: @domain_allows, each_serializer: REST::Admin::DomainAllowSerializer
|
||||||
|
@ -39,6 +26,19 @@ class Api::V1::Admin::DomainAllowsController < Api::BaseController
|
||||||
render json: @domain_allow, serializer: REST::Admin::DomainAllowSerializer
|
render json: @domain_allow, serializer: REST::Admin::DomainAllowSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
authorize :domain_allow, :create?
|
||||||
|
|
||||||
|
@domain_allow = DomainAllow.find_by(domain: resource_params[:domain])
|
||||||
|
|
||||||
|
if @domain_allow.nil?
|
||||||
|
@domain_allow = DomainAllow.create!(resource_params)
|
||||||
|
log_action :create, @domain_allow
|
||||||
|
end
|
||||||
|
|
||||||
|
render json: @domain_allow, serializer: REST::Admin::DomainAllowSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
authorize @domain_allow, :destroy?
|
authorize @domain_allow, :destroy?
|
||||||
UnallowDomainService.new.call(@domain_allow)
|
UnallowDomainService.new.call(@domain_allow)
|
||||||
|
|
|
@ -16,6 +16,16 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
||||||
|
|
||||||
PAGINATION_PARAMS = %i(limit).freeze
|
PAGINATION_PARAMS = %i(limit).freeze
|
||||||
|
|
||||||
|
def index
|
||||||
|
authorize :domain_block, :index?
|
||||||
|
render json: @domain_blocks, each_serializer: REST::Admin::DomainBlockSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
authorize @domain_block, :show?
|
||||||
|
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize :domain_block, :create?
|
authorize :domain_block, :create?
|
||||||
|
|
||||||
|
@ -28,16 +38,6 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
||||||
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
|
||||||
authorize :domain_block, :index?
|
|
||||||
render json: @domain_blocks, each_serializer: REST::Admin::DomainBlockSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
authorize @domain_block, :show?
|
|
||||||
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @domain_block, :update?
|
authorize @domain_block, :update?
|
||||||
@domain_block.update!(domain_block_params)
|
@domain_block.update!(domain_block_params)
|
||||||
|
|
|
@ -18,15 +18,6 @@ class Api::V1::Admin::EmailDomainBlocksController < Api::BaseController
|
||||||
limit
|
limit
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
def create
|
|
||||||
authorize :email_domain_block, :create?
|
|
||||||
|
|
||||||
@email_domain_block = EmailDomainBlock.create!(resource_params)
|
|
||||||
log_action :create, @email_domain_block
|
|
||||||
|
|
||||||
render json: @email_domain_block, serializer: REST::Admin::EmailDomainBlockSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize :email_domain_block, :index?
|
authorize :email_domain_block, :index?
|
||||||
render json: @email_domain_blocks, each_serializer: REST::Admin::EmailDomainBlockSerializer
|
render json: @email_domain_blocks, each_serializer: REST::Admin::EmailDomainBlockSerializer
|
||||||
|
@ -37,6 +28,15 @@ class Api::V1::Admin::EmailDomainBlocksController < Api::BaseController
|
||||||
render json: @email_domain_block, serializer: REST::Admin::EmailDomainBlockSerializer
|
render json: @email_domain_block, serializer: REST::Admin::EmailDomainBlockSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
authorize :email_domain_block, :create?
|
||||||
|
|
||||||
|
@email_domain_block = EmailDomainBlock.create!(resource_params)
|
||||||
|
log_action :create, @email_domain_block
|
||||||
|
|
||||||
|
render json: @email_domain_block, serializer: REST::Admin::EmailDomainBlockSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
authorize @email_domain_block, :destroy?
|
authorize @email_domain_block, :destroy?
|
||||||
@email_domain_block.destroy!
|
@email_domain_block.destroy!
|
||||||
|
|
|
@ -18,13 +18,6 @@ class Api::V1::Admin::IpBlocksController < Api::BaseController
|
||||||
limit
|
limit
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
def create
|
|
||||||
authorize :ip_block, :create?
|
|
||||||
@ip_block = IpBlock.create!(resource_params)
|
|
||||||
log_action :create, @ip_block
|
|
||||||
render json: @ip_block, serializer: REST::Admin::IpBlockSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize :ip_block, :index?
|
authorize :ip_block, :index?
|
||||||
render json: @ip_blocks, each_serializer: REST::Admin::IpBlockSerializer
|
render json: @ip_blocks, each_serializer: REST::Admin::IpBlockSerializer
|
||||||
|
@ -35,6 +28,13 @@ class Api::V1::Admin::IpBlocksController < Api::BaseController
|
||||||
render json: @ip_block, serializer: REST::Admin::IpBlockSerializer
|
render json: @ip_block, serializer: REST::Admin::IpBlockSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
authorize :ip_block, :create?
|
||||||
|
@ip_block = IpBlock.create!(resource_params)
|
||||||
|
log_action :create, @ip_block
|
||||||
|
render json: @ip_block, serializer: REST::Admin::IpBlockSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @ip_block, :update?
|
authorize @ip_block, :update?
|
||||||
@ip_block.update(resource_params)
|
@ip_block.update(resource_params)
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class Api::V1::Admin::Trends::Links::PreviewCardProvidersController < Api::BaseController
|
||||||
|
include Authorization
|
||||||
|
|
||||||
|
LIMIT = 100
|
||||||
|
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:read' }, only: :index
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:write' }, except: :index
|
||||||
|
before_action :set_providers, only: :index
|
||||||
|
|
||||||
|
after_action :verify_authorized
|
||||||
|
after_action :insert_pagination_headers, only: :index
|
||||||
|
|
||||||
|
PAGINATION_PARAMS = %i(limit).freeze
|
||||||
|
|
||||||
|
def index
|
||||||
|
authorize :preview_card_provider, :index?
|
||||||
|
|
||||||
|
render json: @providers, each_serializer: REST::Admin::Trends::Links::PreviewCardProviderSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def approve
|
||||||
|
authorize :preview_card_provider, :review?
|
||||||
|
|
||||||
|
provider = PreviewCardProvider.find(params[:id])
|
||||||
|
provider.update(trendable: true, reviewed_at: Time.now.utc)
|
||||||
|
render json: provider, serializer: REST::Admin::Trends::Links::PreviewCardProviderSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def reject
|
||||||
|
authorize :preview_card_provider, :review?
|
||||||
|
|
||||||
|
provider = PreviewCardProvider.find(params[:id])
|
||||||
|
provider.update(trendable: false, reviewed_at: Time.now.utc)
|
||||||
|
render json: provider, serializer: REST::Admin::Trends::Links::PreviewCardProviderSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def set_providers
|
||||||
|
@providers = PreviewCardProvider.all.to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id))
|
||||||
|
end
|
||||||
|
|
||||||
|
def insert_pagination_headers
|
||||||
|
set_pagination_headers(next_path, prev_path)
|
||||||
|
end
|
||||||
|
|
||||||
|
def next_path
|
||||||
|
api_v1_admin_trends_links_preview_card_providers_url(pagination_params(max_id: pagination_max_id)) if records_continue?
|
||||||
|
end
|
||||||
|
|
||||||
|
def prev_path
|
||||||
|
api_v1_admin_trends_links_preview_card_providers_url(pagination_params(min_id: pagination_since_id)) unless @providers.empty?
|
||||||
|
end
|
||||||
|
|
||||||
|
def pagination_max_id
|
||||||
|
@providers.last.id
|
||||||
|
end
|
||||||
|
|
||||||
|
def pagination_since_id
|
||||||
|
@providers.first.id
|
||||||
|
end
|
||||||
|
|
||||||
|
def records_continue?
|
||||||
|
@providers.size == limit_param(LIMIT)
|
||||||
|
end
|
||||||
|
|
||||||
|
def pagination_params(core_params)
|
||||||
|
params.slice(*PAGINATION_PARAMS).permit(*PAGINATION_PARAMS).merge(core_params)
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,7 +1,36 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::V1::Admin::Trends::LinksController < Api::V1::Trends::LinksController
|
class Api::V1::Admin::Trends::LinksController < Api::V1::Trends::LinksController
|
||||||
before_action -> { authorize_if_got_token! :'admin:read' }
|
include Authorization
|
||||||
|
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:read' }, only: :index
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:write' }, except: :index
|
||||||
|
|
||||||
|
after_action :verify_authorized, except: :index
|
||||||
|
|
||||||
|
def index
|
||||||
|
if current_user&.can?(:manage_taxonomies)
|
||||||
|
render json: @links, each_serializer: REST::Admin::Trends::LinkSerializer
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def approve
|
||||||
|
authorize :preview_card, :review?
|
||||||
|
|
||||||
|
link = PreviewCard.find(params[:id])
|
||||||
|
link.update(trendable: true)
|
||||||
|
render json: link, serializer: REST::Admin::Trends::LinkSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def reject
|
||||||
|
authorize :preview_card, :review?
|
||||||
|
|
||||||
|
link = PreviewCard.find(params[:id])
|
||||||
|
link.update(trendable: false)
|
||||||
|
render json: link, serializer: REST::Admin::Trends::LinkSerializer
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,36 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::V1::Admin::Trends::StatusesController < Api::V1::Trends::StatusesController
|
class Api::V1::Admin::Trends::StatusesController < Api::V1::Trends::StatusesController
|
||||||
before_action -> { authorize_if_got_token! :'admin:read' }
|
include Authorization
|
||||||
|
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:read' }, only: :index
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:write' }, except: :index
|
||||||
|
|
||||||
|
after_action :verify_authorized, except: :index
|
||||||
|
|
||||||
|
def index
|
||||||
|
if current_user&.can?(:manage_taxonomies)
|
||||||
|
render json: @statuses, each_serializer: REST::Admin::Trends::StatusSerializer
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def approve
|
||||||
|
authorize [:admin, :status], :review?
|
||||||
|
|
||||||
|
status = Status.find(params[:id])
|
||||||
|
status.update(trendable: true)
|
||||||
|
render json: status, serializer: REST::Admin::Trends::StatusSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def reject
|
||||||
|
authorize [:admin, :status], :review?
|
||||||
|
|
||||||
|
status = Status.find(params[:id])
|
||||||
|
status.update(trendable: false)
|
||||||
|
render json: status, serializer: REST::Admin::Trends::StatusSerializer
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController
|
class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController
|
||||||
before_action -> { authorize_if_got_token! :'admin:read' }
|
include Authorization
|
||||||
|
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:read' }, only: :index
|
||||||
|
before_action -> { authorize_if_got_token! :'admin:write' }, except: :index
|
||||||
|
|
||||||
|
after_action :verify_authorized, except: :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
if current_user&.can?(:manage_taxonomies)
|
if current_user&.can?(:manage_taxonomies)
|
||||||
|
@ -11,6 +16,22 @@ class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def approve
|
||||||
|
authorize :tag, :review?
|
||||||
|
|
||||||
|
tag = Tag.find(params[:id])
|
||||||
|
tag.update(trendable: true, reviewed_at: Time.now.utc)
|
||||||
|
render json: tag, serializer: REST::Admin::TagSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
def reject
|
||||||
|
authorize :tag, :review?
|
||||||
|
|
||||||
|
tag = Tag.find(params[:id])
|
||||||
|
tag.update(trendable: false, reviewed_at: Time.now.utc)
|
||||||
|
render json: tag, serializer: REST::Admin::TagSerializer
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def enabled?
|
def enabled?
|
||||||
|
|
|
@ -18,9 +18,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_announcements
|
def set_announcements
|
||||||
@announcements = begin
|
@announcements = Announcement.published.chronological
|
||||||
Announcement.published.chronological
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_announcement
|
def set_announcement
|
||||||
|
|
|
@ -33,15 +33,11 @@ class Api::V1::BlocksController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_blocks_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_blocks_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless paginated_blocks.empty?
|
api_v1_blocks_url pagination_params(since_id: pagination_since_id) unless paginated_blocks.empty?
|
||||||
api_v1_blocks_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@conversations = paginated_conversations
|
@conversations = paginated_conversations
|
||||||
render json: @conversations, each_serializer: REST::ConversationSerializer
|
render json: @conversations, each_serializer: REST::ConversationSerializer, relationships: StatusRelationshipsPresenter.new(@conversations.map(&:last_status), current_user&.account_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def read
|
def read
|
||||||
|
@ -19,6 +19,11 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||||
render json: @conversation, serializer: REST::ConversationSerializer
|
render json: @conversation, serializer: REST::ConversationSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def unread
|
||||||
|
@conversation.update!(unread: true)
|
||||||
|
render json: @conversation, serializer: REST::ConversationSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@conversation.destroy!
|
@conversation.destroy!
|
||||||
render_empty
|
render_empty
|
||||||
|
@ -32,6 +37,19 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||||
|
|
||||||
def paginated_conversations
|
def paginated_conversations
|
||||||
AccountConversation.where(account: current_account)
|
AccountConversation.where(account: current_account)
|
||||||
|
.includes(
|
||||||
|
account: :account_stat,
|
||||||
|
last_status: [
|
||||||
|
:media_attachments,
|
||||||
|
:preview_cards,
|
||||||
|
:status_stat,
|
||||||
|
:tags,
|
||||||
|
{
|
||||||
|
active_mentions: [account: :account_stat],
|
||||||
|
account: :account_stat,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
)
|
||||||
.to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id))
|
.to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,15 +58,11 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_conversations_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_conversations_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @conversations.empty?
|
api_v1_conversations_url pagination_params(min_id: pagination_since_id) unless @conversations.empty?
|
||||||
api_v1_conversations_url pagination_params(min_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::V1::CustomEmojisController < Api::BaseController
|
class Api::V1::CustomEmojisController < Api::BaseController
|
||||||
skip_before_action :set_cache_headers
|
vary_by '', unless: :disallow_unauthenticated_api_access?
|
||||||
|
|
||||||
def index
|
def index
|
||||||
expires_in 3.minutes, public: true
|
cache_even_if_authenticated! unless disallow_unauthenticated_api_access?
|
||||||
render_with_cache(each_serializer: REST::CustomEmojiSerializer) { CustomEmoji.listed.includes(:category) }
|
render_with_cache(each_serializer: REST::CustomEmojiSerializer) { CustomEmoji.listed.includes(:category) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,7 @@ class Api::V1::DirectoriesController < Api::BaseController
|
||||||
before_action :set_accounts
|
before_action :set_accounts
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
cache_if_unauthenticated!
|
||||||
render json: @accounts, each_serializer: REST::AccountSerializer
|
render json: @accounts, each_serializer: REST::AccountSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,11 +21,35 @@ class Api::V1::DirectoriesController < Api::BaseController
|
||||||
|
|
||||||
def accounts_scope
|
def accounts_scope
|
||||||
Account.discoverable.tap do |scope|
|
Account.discoverable.tap do |scope|
|
||||||
scope.merge!(Account.local) if truthy_param?(:local)
|
scope.merge!(account_order_scope)
|
||||||
scope.merge!(Account.by_recent_status) if params[:order].blank? || params[:order] == 'active'
|
scope.merge!(local_account_scope) if local_accounts?
|
||||||
scope.merge!(Account.order(id: :desc)) if params[:order] == 'new'
|
scope.merge!(account_exclusion_scope) if current_account
|
||||||
scope.merge!(Account.not_excluded_by_account(current_account)) if current_account
|
scope.merge!(account_domain_block_scope) if current_account && !local_accounts?
|
||||||
scope.merge!(Account.not_domain_blocked_by_account(current_account)) if current_account && !truthy_param?(:local)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def local_accounts?
|
||||||
|
truthy_param?(:local)
|
||||||
|
end
|
||||||
|
|
||||||
|
def account_order_scope
|
||||||
|
case params[:order]
|
||||||
|
when 'new'
|
||||||
|
Account.order(id: :desc)
|
||||||
|
when 'active', nil
|
||||||
|
Account.by_recent_status
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def local_account_scope
|
||||||
|
Account.local
|
||||||
|
end
|
||||||
|
|
||||||
|
def account_exclusion_scope
|
||||||
|
Account.not_excluded_by_account(current_account)
|
||||||
|
end
|
||||||
|
|
||||||
|
def account_domain_block_scope
|
||||||
|
Account.not_domain_blocked_by_account(current_account)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,15 +43,11 @@ class Api::V1::DomainBlocksController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_domain_blocks_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_domain_blocks_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @blocks.empty?
|
api_v1_domain_blocks_url pagination_params(since_id: pagination_since_id) unless @blocks.empty?
|
||||||
api_v1_domain_blocks_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::V1::Emails::ConfirmationsController < Api::BaseController
|
class Api::V1::Emails::ConfirmationsController < Api::BaseController
|
||||||
before_action -> { doorkeeper_authorize! :write, :'write:accounts' }
|
before_action -> { authorize_if_got_token! :read, :'read:accounts' }, only: :check
|
||||||
before_action :require_user_owned_by_application!
|
before_action -> { doorkeeper_authorize! :write, :'write:accounts' }, except: :check
|
||||||
before_action :require_user_not_confirmed!
|
before_action :require_user_owned_by_application!, except: :check
|
||||||
|
before_action :require_user_not_confirmed!, except: :check
|
||||||
|
before_action :require_authenticated_user!, only: :check
|
||||||
|
|
||||||
def create
|
def create
|
||||||
current_user.update!(email: params[:email]) if params.key?(:email)
|
current_user.update!(email: params[:email]) if params.key?(:email)
|
||||||
|
@ -12,13 +14,17 @@ class Api::V1::Emails::ConfirmationsController < Api::BaseController
|
||||||
render_empty
|
render_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check
|
||||||
|
render json: current_user.confirmed?
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def require_user_owned_by_application!
|
def require_user_owned_by_application!
|
||||||
render json: { error: 'This method is only available to the application the user originally signed-up with' }, status: :forbidden unless current_user && current_user.created_by_application_id == doorkeeper_token.application_id
|
render json: { error: 'This method is only available to the application the user originally signed-up with' }, status: 403 unless current_user && current_user.created_by_application_id == doorkeeper_token.application_id
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_user_not_confirmed!
|
def require_user_not_confirmed!
|
||||||
render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: :forbidden unless !current_user.confirmed? || current_user.unconfirmed_email.present?
|
render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: 403 unless !current_user.confirmed? || current_user.unconfirmed_email.present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,17 +35,13 @@ class Api::V1::EndorsementsController < Api::BaseController
|
||||||
def next_path
|
def next_path
|
||||||
return if unlimited?
|
return if unlimited?
|
||||||
|
|
||||||
if records_continue?
|
api_v1_endorsements_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_endorsements_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
return if unlimited?
|
return if unlimited?
|
||||||
|
|
||||||
unless @accounts.empty?
|
api_v1_endorsements_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
|
||||||
api_v1_endorsements_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -36,15 +36,11 @@ class Api::V1::FavouritesController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_favourites_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_favourites_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless results.empty?
|
api_v1_favourites_url pagination_params(min_id: pagination_since_id) unless results.empty?
|
||||||
api_v1_favourites_url pagination_params(min_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Api::V1::FeaturedTagsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
featured_tag = CreateFeaturedTagService.new.call(current_account, featured_tag_params[:name])
|
featured_tag = CreateFeaturedTagService.new.call(current_account, params.require(:name))
|
||||||
render json: featured_tag, serializer: REST::FeaturedTagSerializer
|
render json: featured_tag, serializer: REST::FeaturedTagSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,8 +31,4 @@ class Api::V1::FeaturedTagsController < Api::BaseController
|
||||||
def set_featured_tags
|
def set_featured_tags
|
||||||
@featured_tags = current_account.featured_tags.order(statuses_count: :desc)
|
@featured_tags = current_account.featured_tags.order(statuses_count: :desc)
|
||||||
end
|
end
|
||||||
|
|
||||||
def featured_tag_params
|
|
||||||
params.permit(:name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,6 +11,10 @@ class Api::V1::FiltersController < Api::BaseController
|
||||||
render json: @filters, each_serializer: REST::V1::FilterSerializer
|
render json: @filters, each_serializer: REST::V1::FilterSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
render json: @filter, serializer: REST::V1::FilterSerializer
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
filter_category = current_account.custom_filters.create!(filter_params)
|
filter_category = current_account.custom_filters.create!(filter_params)
|
||||||
|
@ -20,10 +24,6 @@ class Api::V1::FiltersController < Api::BaseController
|
||||||
render json: @filter, serializer: REST::V1::FilterSerializer
|
render json: @filter, serializer: REST::V1::FilterSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
|
||||||
render json: @filter, serializer: REST::V1::FilterSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
@filter.update!(keyword_params)
|
@filter.update!(keyword_params)
|
||||||
|
|
|
@ -53,15 +53,11 @@ class Api::V1::FollowRequestsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
if records_continue?
|
api_v1_follow_requests_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
api_v1_follow_requests_url pagination_params(max_id: pagination_max_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
unless @accounts.empty?
|
api_v1_follow_requests_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
|
||||||
api_v1_follow_requests_url pagination_params(since_id: pagination_since_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
class Api::V1::Instances::ActivityController < Api::BaseController
|
class Api::V1::Instances::ActivityController < Api::BaseController
|
||||||
before_action :require_enabled_api!
|
before_action :require_enabled_api!
|
||||||
|
|
||||||
skip_before_action :set_cache_headers
|
|
||||||
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
||||||
|
|
||||||
|
vary_by ''
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 1.day, public: true
|
cache_even_if_authenticated!
|
||||||
render_with_cache json: :activity, expires_in: 1.day
|
render_with_cache json: :activity, expires_in: 1.day
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,15 @@ class Api::V1::Instances::DomainBlocksController < Api::BaseController
|
||||||
before_action :require_enabled_api!
|
before_action :require_enabled_api!
|
||||||
before_action :set_domain_blocks
|
before_action :set_domain_blocks
|
||||||
|
|
||||||
|
vary_by '', if: -> { Setting.show_domain_blocks == 'all' }
|
||||||
|
|
||||||
def index
|
def index
|
||||||
expires_in 3.minutes, public: true
|
if Setting.show_domain_blocks == 'all'
|
||||||
|
cache_even_if_authenticated!
|
||||||
|
else
|
||||||
|
cache_if_unauthenticated!
|
||||||
|
end
|
||||||
|
|
||||||
render json: @domain_blocks, each_serializer: REST::DomainBlockSerializer, with_comment: (Setting.show_domain_blocks_rationale == 'all' || (Setting.show_domain_blocks_rationale == 'users' && user_signed_in?))
|
render json: @domain_blocks, each_serializer: REST::DomainBlockSerializer, with_comment: (Setting.show_domain_blocks_rationale == 'all' || (Setting.show_domain_blocks_rationale == 'users' && user_signed_in?))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,19 @@
|
||||||
|
|
||||||
class Api::V1::Instances::ExtendedDescriptionsController < Api::BaseController
|
class Api::V1::Instances::ExtendedDescriptionsController < Api::BaseController
|
||||||
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
||||||
|
skip_around_action :set_locale
|
||||||
|
|
||||||
before_action :set_extended_description
|
before_action :set_extended_description
|
||||||
|
|
||||||
|
vary_by ''
|
||||||
|
|
||||||
|
# Override `current_user` to avoid reading session cookies unless in whitelist mode
|
||||||
|
def current_user
|
||||||
|
super if whitelist_mode?
|
||||||
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 3.minutes, public: true
|
cache_even_if_authenticated!
|
||||||
render json: @extended_description, serializer: REST::ExtendedDescriptionSerializer
|
render json: @extended_description, serializer: REST::ExtendedDescriptionSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,18 @@
|
||||||
class Api::V1::Instances::PeersController < Api::BaseController
|
class Api::V1::Instances::PeersController < Api::BaseController
|
||||||
before_action :require_enabled_api!
|
before_action :require_enabled_api!
|
||||||
|
|
||||||
skip_before_action :set_cache_headers
|
|
||||||
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
||||||
|
skip_around_action :set_locale
|
||||||
|
|
||||||
|
vary_by ''
|
||||||
|
|
||||||
|
# Override `current_user` to avoid reading session cookies unless in whitelist mode
|
||||||
|
def current_user
|
||||||
|
super if whitelist_mode?
|
||||||
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
expires_in 1.day, public: true
|
cache_even_if_authenticated!
|
||||||
render_with_cache(expires_in: 1.day) { Instance.where.not(domain: DomainBlock.select(:domain)).pluck(:domain) }
|
render_with_cache(expires_in: 1.day) { Instance.where.not(domain: DomainBlock.select(:domain)).pluck(:domain) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,10 @@ class Api::V1::Instances::PrivacyPoliciesController < Api::BaseController
|
||||||
|
|
||||||
before_action :set_privacy_policy
|
before_action :set_privacy_policy
|
||||||
|
|
||||||
|
vary_by ''
|
||||||
|
|
||||||
def show
|
def show
|
||||||
expires_in 1.day, public: true
|
cache_even_if_authenticated!
|
||||||
render json: @privacy_policy, serializer: REST::PrivacyPolicySerializer
|
render json: @privacy_policy, serializer: REST::PrivacyPolicySerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,19 @@
|
||||||
|
|
||||||
class Api::V1::Instances::RulesController < Api::BaseController
|
class Api::V1::Instances::RulesController < Api::BaseController
|
||||||
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
||||||
|
skip_around_action :set_locale
|
||||||
|
|
||||||
before_action :set_rules
|
before_action :set_rules
|
||||||
|
|
||||||
|
vary_by ''
|
||||||
|
|
||||||
|
# Override `current_user` to avoid reading session cookies unless in whitelist mode
|
||||||
|
def current_user
|
||||||
|
super if whitelist_mode?
|
||||||
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
cache_even_if_authenticated!
|
||||||
render json: @rules, each_serializer: REST::RuleSerializer
|
render json: @rules, each_serializer: REST::RuleSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue