diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c6dcc4d46a37d6..3aa0bbf7da4ec3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -11,5 +11,8 @@ RUN apt-get update && \ export DEBIAN_FRONTEND=noninteractive && \ apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev +# Disable download prompt for Corepack +ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 + # Move welcome message to where VS Code expects it COPY .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt diff --git a/.devcontainer/codespaces/devcontainer.json b/.devcontainer/codespaces/devcontainer.json index 8acffec8259867..d2358657f6d664 100644 --- a/.devcontainer/codespaces/devcontainer.json +++ b/.devcontainer/codespaces/devcontainer.json @@ -39,7 +39,7 @@ }, "onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", - "postCreateCommand": "COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/setup", + "postCreateCommand": "bin/setup", "waitFor": "postCreateCommand", "customizations": { diff --git a/.ruby-version b/.ruby-version index a0891f563f38b0..fa7adc7ac72a28 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.4 +3.3.5 diff --git a/Gemfile.lock b/Gemfile.lock index 461a2d43a23550..a533b662411414 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,17 +100,17 @@ GEM attr_required (1.0.2) awrence (1.2.1) aws-eventstream (1.3.0) - aws-partitions (1.969.0) - aws-sdk-core (3.202.1) + aws-partitions (1.970.0) + aws-sdk-core (3.203.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.88.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-kms (1.89.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.159.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-s3 (1.160.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sigv4 (1.9.1) @@ -790,7 +790,7 @@ GEM rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) semantic_range (3.0.0) - shoulda-matchers (6.3.1) + shoulda-matchers (6.4.0) activesupport (>= 5.2.0) sidekiq (6.5.12) connection_pool (>= 2.2.5, < 3) @@ -837,7 +837,7 @@ GEM unicode-display_width (>= 1.1.1, < 3) terrapin (1.0.1) climate_control - test-prof (1.4.1) + test-prof (1.4.2) thor (1.3.2) tilt (2.4.0) timeout (0.4.1) diff --git a/app/controllers/api/v2_alpha/notifications_controller.rb b/app/controllers/api/v2_alpha/notifications_controller.rb index bd6979955aa38c..e8aa0b9e498777 100644 --- a/app/controllers/api/v2_alpha/notifications_controller.rb +++ b/app/controllers/api/v2_alpha/notifications_controller.rb @@ -77,6 +77,8 @@ def load_notifications end def load_grouped_notifications + return [] if @notifications.empty? + MastodonOTELTracer.in_span('Api::V2Alpha::NotificationsController#load_grouped_notifications') do NotificationGroup.from_notifications(@notifications, pagination_range: (@notifications.last.id)..(@notifications.first.id), grouped_types: params[:grouped_types]) end diff --git a/app/javascript/flavours/glitch/actions/notification_groups.ts b/app/javascript/flavours/glitch/actions/notification_groups.ts index ba93ab776b65b5..b0a54ad5b45a69 100644 --- a/app/javascript/flavours/glitch/actions/notification_groups.ts +++ b/app/javascript/flavours/glitch/actions/notification_groups.ts @@ -18,7 +18,7 @@ import { selectSettingsNotificationsQuickFilterActive, selectSettingsNotificationsShows, } from 'flavours/glitch/selectors/settings'; -import type { AppDispatch } from 'flavours/glitch/store'; +import type { AppDispatch, RootState } from 'flavours/glitch/store'; import { createAppAsyncThunk, createDataLoadingThunk, @@ -32,6 +32,14 @@ function excludeAllTypesExcept(filter: string) { return allNotificationTypes.filter((item) => item !== filter); } +function getExcludedTypes(state: RootState) { + const activeFilter = selectSettingsNotificationsQuickFilterActive(state); + + return activeFilter === 'all' + ? selectSettingsNotificationsExcludedTypes(state) + : excludeAllTypesExcept(activeFilter); +} + function dispatchAssociatedRecords( dispatch: AppDispatch, notifications: ApiNotificationGroupJSON[] | ApiNotificationJSON[], @@ -62,17 +70,8 @@ function dispatchAssociatedRecords( export const fetchNotifications = createDataLoadingThunk( 'notificationGroups/fetch', - async (_params, { getState }) => { - const activeFilter = - selectSettingsNotificationsQuickFilterActive(getState()); - - return apiFetchNotifications({ - exclude_types: - activeFilter === 'all' - ? selectSettingsNotificationsExcludedTypes(getState()) - : excludeAllTypesExcept(activeFilter), - }); - }, + async (_params, { getState }) => + apiFetchNotifications({ exclude_types: getExcludedTypes(getState()) }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -92,9 +91,11 @@ export const fetchNotifications = createDataLoadingThunk( export const fetchNotificationsGap = createDataLoadingThunk( 'notificationGroups/fetchGap', - async (params: { gap: NotificationGap }) => - apiFetchNotifications({ max_id: params.gap.maxId }), - + async (params: { gap: NotificationGap }, { getState }) => + apiFetchNotifications({ + max_id: params.gap.maxId, + exclude_types: getExcludedTypes(getState()), + }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -109,6 +110,7 @@ export const pollRecentNotifications = createDataLoadingThunk( async (_params, { getState }) => { return apiFetchNotifications({ max_id: undefined, + exclude_types: getExcludedTypes(getState()), // In slow mode, we don't want to include notifications that duplicate the already-displayed ones since_id: usePendingItems ? getState().notificationGroups.groups.find( @@ -183,7 +185,6 @@ export const setNotificationsFilter = createAppAsyncThunk( path: ['notifications', 'quickFilter', 'active'], value: filterType, }); - // dispatch(expandNotifications({ forceLoad: true })); void dispatch(fetchNotifications()); dispatch(saveSettings()); }, diff --git a/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx b/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx index fc2d3149b3006f..3ab87291637286 100644 --- a/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx +++ b/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx @@ -42,19 +42,11 @@ export const NotificationAdminReport: React.FC<{ if (!account || !targetAccount) return null; + const domain = account.acct.split('@')[1]; + const values = { - name: ( - - ), - target: ( - - ), + name: {domain ?? `@${account.acct}`}, + target: @{targetAccount.acct}, category: intl.formatMessage(messages[report.category]), count: report.status_ids.length, }; diff --git a/app/javascript/mastodon/actions/notification_groups.ts b/app/javascript/mastodon/actions/notification_groups.ts index 51f83f1d241a4a..2ee46500ab8035 100644 --- a/app/javascript/mastodon/actions/notification_groups.ts +++ b/app/javascript/mastodon/actions/notification_groups.ts @@ -18,7 +18,7 @@ import { selectSettingsNotificationsQuickFilterActive, selectSettingsNotificationsShows, } from 'mastodon/selectors/settings'; -import type { AppDispatch } from 'mastodon/store'; +import type { AppDispatch, RootState } from 'mastodon/store'; import { createAppAsyncThunk, createDataLoadingThunk, @@ -32,6 +32,14 @@ function excludeAllTypesExcept(filter: string) { return allNotificationTypes.filter((item) => item !== filter); } +function getExcludedTypes(state: RootState) { + const activeFilter = selectSettingsNotificationsQuickFilterActive(state); + + return activeFilter === 'all' + ? selectSettingsNotificationsExcludedTypes(state) + : excludeAllTypesExcept(activeFilter); +} + function dispatchAssociatedRecords( dispatch: AppDispatch, notifications: ApiNotificationGroupJSON[] | ApiNotificationJSON[], @@ -62,17 +70,8 @@ function dispatchAssociatedRecords( export const fetchNotifications = createDataLoadingThunk( 'notificationGroups/fetch', - async (_params, { getState }) => { - const activeFilter = - selectSettingsNotificationsQuickFilterActive(getState()); - - return apiFetchNotifications({ - exclude_types: - activeFilter === 'all' - ? selectSettingsNotificationsExcludedTypes(getState()) - : excludeAllTypesExcept(activeFilter), - }); - }, + async (_params, { getState }) => + apiFetchNotifications({ exclude_types: getExcludedTypes(getState()) }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -92,9 +91,11 @@ export const fetchNotifications = createDataLoadingThunk( export const fetchNotificationsGap = createDataLoadingThunk( 'notificationGroups/fetchGap', - async (params: { gap: NotificationGap }) => - apiFetchNotifications({ max_id: params.gap.maxId }), - + async (params: { gap: NotificationGap }, { getState }) => + apiFetchNotifications({ + max_id: params.gap.maxId, + exclude_types: getExcludedTypes(getState()), + }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -109,6 +110,7 @@ export const pollRecentNotifications = createDataLoadingThunk( async (_params, { getState }) => { return apiFetchNotifications({ max_id: undefined, + exclude_types: getExcludedTypes(getState()), // In slow mode, we don't want to include notifications that duplicate the already-displayed ones since_id: usePendingItems ? getState().notificationGroups.groups.find( @@ -183,7 +185,6 @@ export const setNotificationsFilter = createAppAsyncThunk( path: ['notifications', 'quickFilter', 'active'], value: filterType, }); - // dispatch(expandNotifications({ forceLoad: true })); void dispatch(fetchNotifications()); dispatch(saveSettings()); }, diff --git a/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx b/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx index fda5798ae98b49..e41a6b2736c3c4 100644 --- a/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx +++ b/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx @@ -42,19 +42,11 @@ export const NotificationAdminReport: React.FC<{ if (!account || !targetAccount) return null; + const domain = account.acct.split('@')[1]; + const values = { - name: ( - - ), - target: ( - - ), + name: {domain ?? `@${account.acct}`}, + target: @{targetAccount.acct}, category: intl.formatMessage(messages[report.category]), count: report.status_ids.length, }; diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index e925246bf75954..aeff65485e0494 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -524,7 +524,9 @@ "notification.moderation_warning.action_silence": "Sua conta foi limitada.", "notification.moderation_warning.action_suspend": "Sua conta foi suspensa.", "notification.own_poll": "Sua enquete terminou", + "notification.poll": "Uma enquete que você votou terminou", "notification.reblog": "{name} deu boost no teu toot", + "notification.reblog.name_and_others_with_link": "{name} e {count, plural, one {# outra} other {# outras}} impulsionaram a publicação", "notification.relationships_severance_event": "Conexões perdidas com {name}", "notification.relationships_severance_event.account_suspension": "Um administrador de {from} suspendeu {target}, o que significa que você não pode mais receber atualizações deles ou interagir com eles.", "notification.relationships_severance_event.domain_block": "An admin from {from} has blocked {target}, including {followersCount} of your followers and {followingCount, plural, one {# account} other {# accounts}} you follow.", @@ -533,16 +535,32 @@ "notification.status": "{name} acabou de tootar", "notification.update": "{name} editou uma publicação", "notification_requests.accept": "Aceitar", + "notification_requests.accept_multiple": "{count, plural, one {Aceite # pedido…} other {Aceite # pedidos…}}", + "notification_requests.confirm_accept_multiple.button": "{count, plural, one {Aceite # pedido} other {Aceite # pedidos}}", + "notification_requests.confirm_accept_multiple.message": "Você está prestes a aceitar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Tem certeza de que deseja continuar?", + "notification_requests.confirm_accept_multiple.title": "Aceitar solicitações de notificação?", + "notification_requests.confirm_dismiss_multiple.button": "{count, plural, one {Dispensar pedido} other {Dispensar pedidos}}", + "notification_requests.confirm_dismiss_multiple.message": "Você está prestes a descartar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Você não será capaz de acessar facilmente{count, plural, one {} other {}} novamente. Tem certeza de que deseja continuar?", + "notification_requests.confirm_dismiss_multiple.title": "Descartar solicitações de notificação?", "notification_requests.dismiss": "Rejeitar", + "notification_requests.dismiss_multiple": "{count, plural, one {Dispensar # pedido…} other {Dispensar # pedidos…}}", + "notification_requests.edit_selection": "Editar", + "notification_requests.exit_selection": "Concluído", + "notification_requests.explainer_for_limited_account": "As notificações desta conta foram filtradas porque a conta foi limitada por um moderador.", + "notification_requests.explainer_for_limited_remote_account": "As notificações desta conta foram filtradas porque a conta ou o seu servidor foi limitado por um moderador.", "notification_requests.maximize": "Maximizar", + "notification_requests.minimize_banner": "Minimizar banner de notificações filtradas", "notification_requests.notifications_from": "Notificações de {name}", "notification_requests.title": "Notificações filtradas", + "notification_requests.view": "Ver notificações", "notifications.clear": "Limpar notificações", "notifications.clear_confirmation": "Você tem certeza de que deseja limpar todas as suas notificações?", "notifications.clear_title": "Limpar notificações?", "notifications.column_settings.admin.report": "Novas denúncias:", "notifications.column_settings.admin.sign_up": "Novas inscrições:", "notifications.column_settings.alert": "Notificações no computador", + "notifications.column_settings.beta.category": "Recursos experimentais", + "notifications.column_settings.beta.grouping": "Agrupar notificações", "notifications.column_settings.favourite": "Favoritos:", "notifications.column_settings.filter_bar.advanced": "Exibir todas as categorias", "notifications.column_settings.filter_bar.category": "Barra de filtro rápido", @@ -574,6 +592,11 @@ "notifications.policy.accept": "Aceitar", "notifications.policy.accept_hint": "Mostrar nas notificações", "notifications.policy.drop": "Ignorar", + "notifications.policy.drop_hint": "Envie para o void, para nunca mais ser visto novamente", + "notifications.policy.filter": "Filtrar", + "notifications.policy.filter_hint": "Enviar para caixa de notificações filtradas", + "notifications.policy.filter_limited_accounts_hint": "Limitado pelos moderadores do servidor", + "notifications.policy.filter_limited_accounts_title": "Contas moderadas", "notifications.policy.filter_new_accounts.hint": "Created within the past {days, plural, one {one day} other {# days}}", "notifications.policy.filter_new_accounts_title": "Novas contas", "notifications.policy.filter_not_followers_hint": "Including people who have been following you fewer than {days, plural, one {one day} other {# days}}", @@ -582,6 +605,7 @@ "notifications.policy.filter_not_following_title": "Pessoas que você não segue", "notifications.policy.filter_private_mentions_hint": "Filtrado, a menos que respondido em sua própria menção ou se você segue o remetente", "notifications.policy.filter_private_mentions_title": "Menções privadas não solicitadas", + "notifications.policy.title": "Gerenciar notificações de…", "notifications_permission_banner.enable": "Ativar notificações no computador", "notifications_permission_banner.how_to_control": "Para receber notificações quando o Mastodon não estiver aberto, ative as notificações no computador. Você pode controlar precisamente quais tipos de interações geram notificações no computador através do botão {icon}.", "notifications_permission_banner.title": "Nunca perca nada", @@ -708,9 +732,13 @@ "report.unfollow_explanation": "Você está seguindo esta conta. Para não ver as publicações dela em sua página inicial, deixe de segui-la.", "report_notification.attached_statuses": "{count, plural, one {{count} publicação anexada} other {{count} publicações anexadas}}", "report_notification.categories.legal": "Legal", + "report_notification.categories.legal_sentence": "conteúdo ilegal", "report_notification.categories.other": "Outro", + "report_notification.categories.other_sentence": "outro", "report_notification.categories.spam": "Spam", + "report_notification.categories.spam_sentence": "spam", "report_notification.categories.violation": "Violação de regra", + "report_notification.categories.violation_sentence": "violação de regra", "report_notification.open": "Abrir denúncia", "search.no_recent_searches": "Nenhuma busca recente", "search.placeholder": "Pesquisar", diff --git a/app/lib/annual_report/source.rb b/app/lib/annual_report/source.rb index 1ccb622676faf4..d56a1fcccf697f 100644 --- a/app/lib/annual_report/source.rb +++ b/app/lib/annual_report/source.rb @@ -11,6 +11,16 @@ def initialize(account, year) protected def year_as_snowflake_range - (Mastodon::Snowflake.id_at(DateTime.new(year, 1, 1))..Mastodon::Snowflake.id_at(DateTime.new(year, 12, 31))) + (beginning_snowflake_id..ending_snowflake_id) + end + + private + + def beginning_snowflake_id + Mastodon::Snowflake.id_at DateTime.new(year).beginning_of_year + end + + def ending_snowflake_id + Mastodon::Snowflake.id_at DateTime.new(year).end_of_year end end diff --git a/app/models/account_statuses_cleanup_policy.rb b/app/models/account_statuses_cleanup_policy.rb index a102795446d465..e2c035284be24f 100644 --- a/app/models/account_statuses_cleanup_policy.rb +++ b/app/models/account_statuses_cleanup_policy.rb @@ -145,15 +145,15 @@ def old_enough_scope(max_id = nil) end def without_self_fav_scope - Status.where('NOT EXISTS (SELECT 1 FROM favourites fav WHERE fav.account_id = statuses.account_id AND fav.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(Favourite)) end def without_self_bookmark_scope - Status.where('NOT EXISTS (SELECT 1 FROM bookmarks bookmark WHERE bookmark.account_id = statuses.account_id AND bookmark.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(Bookmark)) end def without_pinned_scope - Status.where('NOT EXISTS (SELECT 1 FROM status_pins pin WHERE pin.account_id = statuses.account_id AND pin.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(StatusPin)) end def without_media_scope @@ -174,4 +174,13 @@ def without_popular_scope def account_statuses Status.where(account_id: account_id) end + + def self_status_reference_exists(model) + model + .where(model.arel_table[:account_id].eq Status.arel_table[:account_id]) + .where(model.arel_table[:status_id].eq Status.arel_table[:id]) + .select(1) + .arel + .exists + end end diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 37a818bf467bf9..c530693a3f3a41 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -22,6 +22,7 @@ expose: %w(Link X-RateLimit-Reset X-RateLimit-Limit X-RateLimit-Remaining X-Request-Id), methods: %i(post put delete get patch options) resource '/oauth/token', methods: [:post] + resource '/oauth/revoke', methods: [:post] end end end diff --git a/config/locales/activerecord.pt-BR.yml b/config/locales/activerecord.pt-BR.yml index ae78026629025a..3199eb8e2d2e7d 100644 --- a/config/locales/activerecord.pt-BR.yml +++ b/config/locales/activerecord.pt-BR.yml @@ -32,7 +32,7 @@ pt-BR: import: attributes: data: - malformed: está incorreto + malformed: está malformado status: attributes: reblog: @@ -43,16 +43,16 @@ pt-BR: blocked: usa provedor de e-mail não permitido unreachable: parece não existir role_id: - elevated: não pode ser maior que seu cargo atual + elevated: não pode maior que sua função atual user_role: attributes: permissions_as_keys: - dangerous: incluir permissões que não são seguras para o cargo base - elevated: não pode incluir permissões que o seu cargo atual não possui - own_role: não pode ser alterado com seu cargo atual + dangerous: incluir permissões que não são seguras para a função base + elevated: não pode incluir permissões que a sua função atual não possui + own_role: não pode ser alterado com sua função atual position: - elevated: não pode ser maior do que seu cargo atual - own_role: não pode ser alterado com seu cargo atual + elevated: não pode ser maior do que sua função atual + own_role: não pode ser alterado com sua função atual webhook: attributes: events: diff --git a/config/locales/devise.pt-BR.yml b/config/locales/devise.pt-BR.yml index 4a7f346fabcf85..8f504362defe3e 100644 --- a/config/locales/devise.pt-BR.yml +++ b/config/locales/devise.pt-BR.yml @@ -14,7 +14,7 @@ pt-BR: not_found_in_database: "%{authentication_keys} ou senha inválida." omniauth_user_creation_failure: Erro ao criar uma conta para esta identidade. pending: Sua conta está sendo revisada. - timeout: Sua sessão expirou. Por favor, entre novamente para continuar. + timeout: Sua sessão expirou. Faça ‘login’ novamente para continuar. unauthenticated: Você precisa entrar ou criar uma conta antes de continuar. unconfirmed: Você precisa confirmar o seu endereço de e-mail antes de continuar. mailer: @@ -48,12 +48,12 @@ pt-BR: subject: 'Mastodon: Instruções para alterar senha' title: Redefinir senha two_factor_disabled: - explanation: O ‘login’ agora é possível usando apenas o endereço de e-mail e senha. + explanation: O ‘login’ agora é possível usando apenas o endereço eletrônico e senha. subject: 'Mastodon: Autenticação de dois fatores desativada' subtitle: A autenticação de dois fatores foi desativada. title: 2FA desativada two_factor_enabled: - explanation: Será necessário um código gerado pelo aplicativo de autenticação para fazer login. + explanation: Será necessário um código gerado pelo aplicativo de autenticação TOTP para fazer login. subject: 'Mastodon: Autenticação de dois fatores ativada' subtitle: A autenticação de dois fatores foi ativada para sua conta. title: 2FA ativada @@ -75,11 +75,11 @@ pt-BR: title: Uma das suas chaves de segurança foi excluída webauthn_disabled: explanation: A autenticação por chaves de segurança foi desativada para sua conta. - extra: O login agora é possível usando o código gerado por um aplicativo de autenticação de dois fatores. + extra: Agora você pode fazer login usando apenas o código gerado pelo aplicativo de autenticação TOTP. subject: 'Mastodon: Autenticação por chaves de segurança desativada' title: Chaves de segurança desativadas webauthn_enabled: - explanation: Autenticação por chave de segurança foi ativada para sua conta. + explanation: A autenticação por chave de segurança foi ativada para sua conta. extra: Sua chave de segurança agora pode ser usada para ‘login’. subject: 'Mastodon: Autenticação por chaves de segurança ativada' title: Chaves de segurança ativadas diff --git a/config/locales/doorkeeper.pt-BR.yml b/config/locales/doorkeeper.pt-BR.yml index 6b076e9081c7a6..c991850c68cc7a 100644 --- a/config/locales/doorkeeper.pt-BR.yml +++ b/config/locales/doorkeeper.pt-BR.yml @@ -60,8 +60,8 @@ pt-BR: error: title: Ocorreu um erro new: - prompt_html: O %{client_name} gostaria de ter permissão para acessar sua conta. É uma aplicação de terceiros. Se você não confia, então você não deve autorizá-lo. - review_permissions: Revisar permissões + prompt_html: O %{client_name} gostaria de ter permissão para acessar sua conta. Trata-se de uma aplicação de terceiros. Se você não confia nesta aplicação, então você não deve autorizá-la. + review_permissions: Rever permissões title: Autorização necessária show: title: Copie este código de autorização e cole no aplicativo. @@ -72,8 +72,8 @@ pt-BR: revoke: Você tem certeza? index: authorized_at: Autorizado em %{date} - description_html: Estas são as aplicações que podem acessar sua conta usando a API. Se houver aplicativos que você não reconhece ou com mau funcionamento, você pode revogar seu acesso. - last_used_at: Última vez usado em %{date} + description_html: Estas são as aplicações que podem acessar sua conta usando a API. Se houver aplicações que você não reconhece ou que não funcionem corretamente, você pode revogar os acessos. + last_used_at: Usado pela última vez em %{date} never_used: Nunca usado scopes: Permissões superapp: Interno @@ -83,6 +83,7 @@ pt-BR: access_denied: O proprietário do recurso ou servidor de autorização recusou a solicitação. credential_flow_not_configured: Fluxo das Credenciais de Senha do Proprietário do Recurso falhou porque Doorkeeper.configure.resource_owner_from_credentials não foi configurado. invalid_client: Autenticação do cliente falhou por causa de um cliente desconhecido, nenhum cliente de autenticação foi incluído ou o método de autenticação não é suportado. + invalid_code_challenge_method: O método de desafio de código deve ser S256; o método 'plain' não é suportado. invalid_grant: A garantia de autorização está inválida, expirou ou foi revogada, não é equivalente ao link de redirecionamento usado na solicitação de autorização ou foi emitido por outro cliente. invalid_redirect_uri: O link de redirecionamento é inválido. invalid_request: @@ -114,23 +115,23 @@ pt-BR: notice: Aplicativo revogado. grouped_scopes: access: - read: Acesso somente para leitura + read: Acesso somente leitura read/write: Acesso de leitura e escrita - write: Acesso somente para escrita + write: Acesso somente escrita title: accounts: Contas admin/accounts: Administração de contas admin/all: Todas as funções administrativas - admin/reports: Controle de denúncias + admin/reports: Administração de denúncias all: Acesso total à sua conta Mastodon blocks: Bloqueios bookmarks: Salvos conversations: Conversas crypto: Criptografia de ponta a ponta - favourites: Favoritas + favourites: Favoritos filters: Filtros - follow: Seguidores, Silenciados e Bloqueados - follows: Seguidores + follow: Seguimentos, Silenciamentos e Bloqueios + follows: Seguidos lists: Listas media: Mídias anexadas mutes: Silenciados @@ -151,17 +152,17 @@ pt-BR: admin:read: ler todos os dados no servidor admin:read:accounts: ler informações sensíveis de todas as contas admin:read:canonical_email_blocks: ler informações sensíveis de todos os blocos de e-mail canônicos - admin:read:domain_allows: ler informações sensíveis de todos os domínios (URL) permitidos - admin:read:domain_blocks: ler informações sensíveis de todos os domínios (URL) bloqueados - admin:read:email_domain_blocks: ler informações sensíveis de todos os e-mails de domínios bloqueados + admin:read:domain_allows: ler informações sensíveis de todos os domínios permitidos + admin:read:domain_blocks: ler informações sensíveis de todos os domínios bloqueados + admin:read:email_domain_blocks: ler informações sensíveis de todos os domínios de e-mail bloqueados admin:read:ip_blocks: ler informações sensíveis de todos os endereços de IP bloqueados admin:read:reports: ler informações sensíveis de todas as denúncias e contas denunciadas admin:write: alterar todos os dados no servidor admin:write:accounts: executar ações de moderação em contas admin:write:canonical_email_blocks: executar ações de moderação em blocos canônicos de e-mail - admin:write:domain_allows: executar ações de moderação em domínios (URL) permitidos - admin:write:domain_blocks: executar ações de moderação em domínios (URL) bloqueados - admin:write:email_domain_blocks: executar ações de moderação em blocos de e-mail bloqueados + admin:write:domain_allows: executar ações de moderação em domínios permitidos + admin:write:domain_blocks: executar ações de moderação em domínios bloqueados + admin:write:email_domain_blocks: executar ações de moderação em domínios de e-mail bloqueados admin:write:ip_blocks: executar ações de moderação em IPs bloqueados admin:write:reports: executar ações de moderação em denúncias crypto: usar criptografia de ponta-a-ponta @@ -172,7 +173,7 @@ pt-BR: read:accounts: ver informações das contas read:blocks: ver seus bloqueados read:bookmarks: ver seus salvos - read:favourites: veja suas favoritas + read:favourites: veja seus favoritos read:filters: ver seus filtros read:follows: ver quem você segue read:lists: ver suas listas diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 012d0d91ee6128..bcde9956c2b4aa 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -182,14 +182,17 @@ en-GB: create_custom_emoji: Create Custom Emoji create_domain_allow: Create Domain Allow create_domain_block: Create Domain Block + create_email_domain_block: Create Email Domain Block create_ip_block: Create IP rule create_unavailable_domain: Create Unavailable Domain create_user_role: Create Role demote_user: Demote User destroy_announcement: Delete Announcement + destroy_canonical_email_block: Delete Email Block destroy_custom_emoji: Delete Custom Emoji destroy_domain_allow: Delete Domain Allow destroy_domain_block: Delete Domain Block + destroy_email_domain_block: Delete Email Domain Block destroy_instance: Purge Domain destroy_ip_block: Delete IP rule destroy_status: Delete Post @@ -197,8 +200,10 @@ en-GB: destroy_user_role: Destroy Role disable_2fa_user: Disable 2FA disable_custom_emoji: Disable Custom Emoji + disable_sign_in_token_auth_user: Disable Email Token Authentication for User disable_user: Disable User enable_custom_emoji: Enable Custom Emoji + enable_sign_in_token_auth_user: Enable Email Token Authentication for User enable_user: Enable User memorialize_account: Memorialise Account promote_user: Promote User @@ -228,20 +233,26 @@ en-GB: approve_appeal_html: "%{name} approved moderation decision appeal from %{target}" approve_user_html: "%{name} approved sign-up from %{target}" assigned_to_self_report_html: "%{name} assigned report %{target} to themselves" + change_email_user_html: "%{name} changed the email address of user %{target}" change_role_user_html: "%{name} changed role of %{target}" + confirm_user_html: "%{name} confirmed email address of user %{target}" create_account_warning_html: "%{name} sent a warning to %{target}" create_announcement_html: "%{name} created new announcement %{target}" + create_canonical_email_block_html: "%{name} blocked email with the hash %{target}" create_custom_emoji_html: "%{name} uploaded new emoji %{target}" create_domain_allow_html: "%{name} allowed federation with domain %{target}" create_domain_block_html: "%{name} blocked domain %{target}" + create_email_domain_block_html: "%{name} blocked email domain %{target}" create_ip_block_html: "%{name} created rule for IP %{target}" create_unavailable_domain_html: "%{name} stopped delivery to domain %{target}" create_user_role_html: "%{name} created %{target} role" demote_user_html: "%{name} demoted user %{target}" destroy_announcement_html: "%{name} deleted announcement %{target}" + destroy_canonical_email_block_html: "%{name} unblocked email with the hash %{target}" destroy_custom_emoji_html: "%{name} deleted emoji %{target}" destroy_domain_allow_html: "%{name} disallowed federation with domain %{target}" destroy_domain_block_html: "%{name} unblocked domain %{target}" + destroy_email_domain_block_html: "%{name} unblocked email domain %{target}" destroy_instance_html: "%{name} purged domain %{target}" destroy_ip_block_html: "%{name} deleted rule for IP %{target}" destroy_status_html: "%{name} removed post by %{target}" @@ -249,8 +260,10 @@ en-GB: destroy_user_role_html: "%{name} deleted %{target} role" disable_2fa_user_html: "%{name} disabled two factor requirement for user %{target}" disable_custom_emoji_html: "%{name} disabled emoji %{target}" + disable_sign_in_token_auth_user_html: "%{name} disabled email token authentication for %{target}" disable_user_html: "%{name} disabled login for user %{target}" enable_custom_emoji_html: "%{name} enabled emoji %{target}" + enable_sign_in_token_auth_user_html: "%{name} enabled email token authentication for %{target}" enable_user_html: "%{name} enabled login for user %{target}" memorialize_account_html: "%{name} turned %{target}'s account into a memoriam page" promote_user_html: "%{name} promoted user %{target}" @@ -258,6 +271,7 @@ en-GB: reject_user_html: "%{name} rejected sign-up from %{target}" remove_avatar_user_html: "%{name} removed %{target}'s avatar" reopen_report_html: "%{name} reopened report %{target}" + resend_user_html: "%{name} resent confirmation email for %{target}" reset_password_user_html: "%{name} reset password of user %{target}" resolve_report_html: "%{name} resolved report %{target}" sensitive_account_html: "%{name} marked %{target}'s media as sensitive" @@ -418,6 +432,7 @@ en-GB: attempts_over_week: one: "%{count} attempt over the last week" other: "%{count} sign-up attempts over the last week" + created_msg: Successfully blocked email domain delete: Delete dns: types: @@ -426,8 +441,12 @@ en-GB: new: create: Add domain resolve: Resolve domain + title: Block new email domain + no_email_domain_block_selected: No email domain blocks were changed as none were selected not_permitted: Not permitted + resolved_dns_records_hint_html: The domain name resolves to the following MX domains, which are ultimately responsible for accepting email. Blocking an MX domain will block sign-ups from any email address which uses the same MX domain, even if the visible domain name is different. Be careful not to block major email providers. resolved_through_html: Resolved through %{domain} + title: Blocked email domains export_domain_allows: new: title: Import domain allows @@ -581,6 +600,7 @@ en-GB: resolve_description_html: No action will be taken against the reported account, no strike recorded, and the report will be closed. silence_description_html: The account will be visible only to those who already follow it or manually look it up, severely limiting its reach. Can always be reverted. Closes all reports against this account. suspend_description_html: The account and all its contents will be inaccessible and eventually deleted, and interacting with it will be impossible. Reversible within 30 days. Closes all reports against this account. + actions_description_html: Decide which action to take to resolve this report. If you take a punitive action against the reported account, an email notification will be sent to them, except when the Spam category is selected. actions_description_remote_html: Decide which action to take to resolve this report. This will only affect how your server communicates with this remote account and handle its content. add_to_report: Add more to report already_suspended_badges: @@ -645,6 +665,7 @@ en-GB: delete_data_html: Delete @%{acct}'s profile and contents 30 days from now unless they get unsuspended in the meantime preview_preamble_html: "@%{acct} will receive a warning with the following contents:" record_strike_html: Record a strike against @%{acct} to help you escalate on future violations from this account + send_email_html: Send @%{acct} a warning email warning_placeholder: Optional additional reasoning for the moderation action. target_origin: Origin of reported account title: Reports @@ -684,6 +705,7 @@ en-GB: manage_appeals: Manage Appeals manage_appeals_description: Allows users to review appeals against moderation actions manage_blocks: Manage Blocks + manage_blocks_description: Allows users to block email providers and IP addresses manage_custom_emojis: Manage Custom Emojis manage_custom_emojis_description: Allows users to manage custom emojis on the server manage_federation: Manage Federation diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index c38435c7fb523b..45c6baece912ba 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -58,6 +58,7 @@ fr-CA: demote: Rétrograder destroyed_msg: Les données de %{username} sont maintenant en file d’attente pour être supprimées imminemment disable: Geler + disable_sign_in_token_auth: Désactiver le jeton d'authentification par e-mail disable_two_factor_authentication: Désactiver l’authentification à deux facteurs disabled: Gelé display_name: Nom affiché @@ -66,6 +67,7 @@ fr-CA: email: Courriel email_status: État du courriel enable: Dégeler + enable_sign_in_token_auth: Activer le jeton d'authentification par e-mail enabled: Activé enabled_msg: Le compte de %{username} a été dégelé avec succès followers: Abonné·e·s @@ -195,8 +197,10 @@ fr-CA: destroy_user_role: Détruire le rôle disable_2fa_user: Désactiver l’A2F disable_custom_emoji: Désactiver les émojis personnalisés + disable_sign_in_token_auth_user: Désactiver le jeton d'authentification par e-mail pour l'utilisateur disable_user: Désactiver le compte enable_custom_emoji: Activer les émojis personnalisées + enable_sign_in_token_auth_user: Activer le jeton d'authentification par e-mail pour l'utilisateur enable_user: Activer l’utilisateur memorialize_account: Ériger en mémorial promote_user: Promouvoir l’utilisateur @@ -219,18 +223,22 @@ fr-CA: update_custom_emoji: Mettre à jour les émojis personnalisés update_domain_block: Mettre à jour le blocage de domaine update_ip_block: Mettre à jour la règle IP + update_report: Mettre à jour le rapport update_status: Mettre à jour le message update_user_role: Mettre à jour le rôle actions: approve_appeal_html: "%{name} a approuvé l'appel de la décision de modération émis par %{target}" approve_user_html: "%{name} a approuvé l’inscription de %{target}" assigned_to_self_report_html: "%{name} s’est assigné·e le signalement de %{target}" + change_email_user_html: "%{name} a changé l'adresse e-mail de l'utilisateur \n%{target}" change_role_user_html: "%{name} a changé le rôle de %{target}" + confirm_user_html: "%{name} a confirmé l'adresse e-mail de l'utilisateur %{target}" create_account_warning_html: "%{name} a envoyé un avertissement à %{target}" create_announcement_html: "%{name} a créé une nouvelle annonce %{target}" create_custom_emoji_html: "%{name} a téléversé un nouvel émoji %{target}" create_domain_allow_html: "%{name} a autorisé la fédération avec le domaine %{target}" create_domain_block_html: "%{name} a bloqué le domaine %{target}" + create_email_domain_block_html: "%{name} a bloqué le domaine d'e-mail %{target}" create_ip_block_html: "%{name} a créé une règle pour l'IP %{target}" create_unavailable_domain_html: "%{name} a arrêté la livraison vers le domaine %{target}" create_user_role_html: "%{name} a créé le rôle %{target}" @@ -239,6 +247,7 @@ fr-CA: destroy_custom_emoji_html: "%{name} a supprimé l'émoji %{target}" destroy_domain_allow_html: "%{name} a rejeté la fédération avec le domaine %{target}" destroy_domain_block_html: "%{name} a débloqué le domaine %{target}" + destroy_email_domain_block_html: "%{name} a débloqué le domaine d'e-mail %{target}" destroy_instance_html: "%{name} a purgé le domaine %{target}" destroy_ip_block_html: "%{name} a supprimé la règle pour l'IP %{target}" destroy_status_html: "%{name} a supprimé le message de %{target}" @@ -276,6 +285,7 @@ fr-CA: filter_by_action: Filtrer par action filter_by_user: Filtrer par utilisateur·ice title: Journal d’audit + unavailable_instance: "(nom de domaine indisponible)" announcements: destroyed_msg: Annonce supprimée avec succès ! edit: @@ -413,6 +423,7 @@ fr-CA: attempts_over_week: one: "%{count} tentative au cours de la dernière semaine" other: "%{count} tentatives au cours de la dernière semaine" + created_msg: Domaine d'e-mail bloqué avec succès delete: Supprimer dns: types: @@ -914,6 +925,10 @@ fr-CA: statuses: allow: Autoriser le message allow_account: Autoriser l'auteur·rice + confirm_allow: Êtes-vous sûr de vouloir autoriser les statuts sélectionnés ? + confirm_allow_account: Êtes-vous sûr de vouloir autoriser les comptes sélectionnés ? + confirm_disallow: Êtes-vous sûr de vouloir rejeter les statuts sélectionnés ? + confirm_disallow_account: Êtes-vous sûr de vouloir rejeter les comptes sélectionnés ? description_html: Voici les messages dont votre serveur a connaissance qui sont beaucoup partagés et mis en favoris en ce moment. Cela peut aider vos utilisateur⋅rice⋅s, néophytes comme aguerri⋅e⋅s, à trouver plus de comptes à suivre. Aucun message n'est publiquement affiché tant que vous n'en avez pas approuvé l'auteur⋅rice, et seulement si icellui permet que son compte soit suggéré aux autres. Vous pouvez également autoriser ou rejeter les messages individuellement. disallow: Proscrire le message disallow_account: Proscrire l'auteur·rice @@ -1896,6 +1911,7 @@ fr-CA: invalid_otp_token: Le code d’authentification à deux facteurs est invalide otp_lost_help_html: Si vous perdez accès aux deux, vous pouvez contacter %{email} rate_limited: Trop de tentatives d'authentification, réessayez plus tard. + seamless_external_login: Vous êtes connectés sur un service externe, de fait les paramètres de mot de passe et d'e-mail ne sont pas disponibles. signed_in_as: 'Connecté·e en tant que :' verification: extra_instructions_html: Astuce: Le lien sur votre site Web peut être invisible. La partie importante est rel="me" qui évite d’autres liens provenant de contenu générés par des utilisateurs tiers d'être pris en compte. Vous pouvez même utiliser une balise link dans l’en-tête de la page au lieu de a, mais le HTML doit être accessible sans avoir besoin d’exécuter du JavaScript. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c3fa237759f1a1..4434a165317f18 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -58,6 +58,7 @@ fr: demote: Rétrograder destroyed_msg: Les données de %{username} sont maintenant en file d’attente pour être supprimées imminemment disable: Geler + disable_sign_in_token_auth: Désactiver le jeton d'authentification par e-mail disable_two_factor_authentication: Désactiver l’authentification à deux facteurs disabled: Gelé display_name: Nom affiché @@ -66,6 +67,7 @@ fr: email: Adresse de courriel email_status: État du courriel enable: Dégeler + enable_sign_in_token_auth: Activer le jeton d'authentification par e-mail enabled: Activé enabled_msg: Le compte de %{username} a été dégelé avec succès followers: Abonné·e·s @@ -195,8 +197,10 @@ fr: destroy_user_role: Détruire le rôle disable_2fa_user: Désactiver l’A2F disable_custom_emoji: Désactiver les émojis personnalisés + disable_sign_in_token_auth_user: Désactiver le jeton d'authentification par e-mail pour l'utilisateur disable_user: Désactiver le compte enable_custom_emoji: Activer les émojis personnalisées + enable_sign_in_token_auth_user: Activer le jeton d'authentification par e-mail pour l'utilisateur enable_user: Activer le compte memorialize_account: Ériger en mémorial promote_user: Promouvoir le compte @@ -219,18 +223,22 @@ fr: update_custom_emoji: Mettre à jour les émojis personnalisés update_domain_block: Mettre à jour le blocage de domaine update_ip_block: Mettre à jour la règle IP + update_report: Mettre à jour le rapport update_status: Mettre à jour le message update_user_role: Mettre à jour le rôle actions: approve_appeal_html: "%{name} a approuvé l'appel de la décision de modération émis par %{target}" approve_user_html: "%{name} a approuvé l’inscription de %{target}" assigned_to_self_report_html: "%{name} s’est assigné·e le signalement de %{target}" + change_email_user_html: "%{name} a changé l'adresse e-mail de l'utilisateur \n%{target}" change_role_user_html: "%{name} a changé le rôle de %{target}" + confirm_user_html: "%{name} a confirmé l'adresse e-mail de l'utilisateur %{target}" create_account_warning_html: "%{name} a envoyé un avertissement à %{target}" create_announcement_html: "%{name} a créé une nouvelle annonce %{target}" create_custom_emoji_html: "%{name} a téléversé un nouvel émoji %{target}" create_domain_allow_html: "%{name} a autorisé la fédération avec le domaine %{target}" create_domain_block_html: "%{name} a bloqué le domaine %{target}" + create_email_domain_block_html: "%{name} a bloqué le domaine d'e-mail %{target}" create_ip_block_html: "%{name} a créé une règle pour l'IP %{target}" create_unavailable_domain_html: "%{name} a arrêté la livraison vers le domaine %{target}" create_user_role_html: "%{name} a créé le rôle %{target}" @@ -239,6 +247,7 @@ fr: destroy_custom_emoji_html: "%{name} a supprimé l'émoji %{target}" destroy_domain_allow_html: "%{name} a rejeté la fédération avec le domaine %{target}" destroy_domain_block_html: "%{name} a débloqué le domaine %{target}" + destroy_email_domain_block_html: "%{name} a débloqué le domaine d'e-mail %{target}" destroy_instance_html: "%{name} a purgé le domaine %{target}" destroy_ip_block_html: "%{name} a supprimé la règle pour l'IP %{target}" destroy_status_html: "%{name} a supprimé le message de %{target}" @@ -276,6 +285,7 @@ fr: filter_by_action: Filtrer par action filter_by_user: Filtrer par utilisateur·ice title: Journal d’audit + unavailable_instance: "(nom de domaine indisponible)" announcements: destroyed_msg: Annonce supprimée avec succès ! edit: @@ -413,6 +423,7 @@ fr: attempts_over_week: one: "%{count} tentative au cours de la dernière semaine" other: "%{count} tentatives au cours de la dernière semaine" + created_msg: Domaine d'e-mail bloqué avec succès delete: Supprimer dns: types: @@ -914,6 +925,10 @@ fr: statuses: allow: Autoriser le message allow_account: Autoriser l'auteur·rice + confirm_allow: Êtes-vous sûr de vouloir autoriser les statuts sélectionnés ? + confirm_allow_account: Êtes-vous sûr de vouloir autoriser les comptes sélectionnés ? + confirm_disallow: Êtes-vous sûr de vouloir rejeter les statuts sélectionnés ? + confirm_disallow_account: Êtes-vous sûr de vouloir rejeter les comptes sélectionnés ? description_html: Voici les messages dont votre serveur a connaissance qui sont beaucoup partagés et mis en favoris en ce moment. Cela peut aider vos utilisateur⋅rice⋅s, néophytes comme aguerri⋅e⋅s, à trouver plus de comptes à suivre. Aucun message n'est publiquement affiché tant que vous n'en avez pas approuvé l'auteur⋅rice, et seulement si icellui permet que son compte soit suggéré aux autres. Vous pouvez également autoriser ou rejeter les messages individuellement. disallow: Proscrire le message disallow_account: Proscrire l'auteur·rice @@ -1896,6 +1911,7 @@ fr: invalid_otp_token: Le code d’authentification à deux facteurs est invalide otp_lost_help_html: Si vous perdez accès aux deux, vous pouvez contacter %{email} rate_limited: Trop de tentatives d'authentification, réessayez plus tard. + seamless_external_login: Vous êtes connectés sur un service externe, de fait les paramètres de mot de passe et d'e-mail ne sont pas disponibles. signed_in_as: 'Connecté·e en tant que :' verification: extra_instructions_html: Astuce : Le lien sur votre site Web peut être invisible. La partie importante est rel="me" qui évite que soient pris en compte d’autres liens provenant de contenu générés par des utilisateurs tiers. Vous pouvez même utiliser une balise link dans l’en-tête de la page au lieu de a, mais le HTML doit être accessible sans avoir besoin d’exécuter du JavaScript. diff --git a/config/locales/he.yml b/config/locales/he.yml index 72b4156dbf0500..47ec5cafbe29dc 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1506,6 +1506,7 @@ he: media_attachments: validations: images_and_video: לא ניתן להוסיף וידאו להודעה שכבר מכילה תמונות + not_found: קובץ %{ids} לא נמצא, או שהוצמד כבר להודעה אחרת not_ready: לא ניתן להצמיד קבצים שהעלאתם לא הסתיימה. נסה/י שוב בעוד רגע! too_many: לא ניתן להוסיף יותר מארבעה קבצים migrations: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index cdddc79b0e9e5e..2bf138d9be10ad 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1454,6 +1454,7 @@ hu: media_attachments: validations: images_and_video: Nem csatolhatsz videót olyan bejegyzéshez, amelyhez már csatoltál képet + not_found: A(z) %{ids} média nem található, vagy már egy másik bejegyzéshez lett csatolva not_ready: Nem lehet olyan fájlt csatolni, melynek még nem fejeződött be a feldolgozása. Próbáld kicsit később! too_many: Maximum négy fájlt csatolhatsz migrations: diff --git a/config/locales/is.yml b/config/locales/is.yml index 41347d44bbf97c..2c73dbae744520 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -1458,6 +1458,7 @@ is: media_attachments: validations: images_and_video: Ekki er hægt að hengja myndskeið við færslu sem þegar inniheldur myndir + not_found: Myndefnið %{ids} fannst ekki eða er þegar hengt við aðra færslu not_ready: Ekki er hægt að hengja við skrár sem ekki er búið að vinna til fulls. Prófaðu aftur eftir augnablik! too_many: Ekki er hægt að hengja við fleiri en 4 skrár migrations: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 9632a3027bfbaa..ef3775d4df7197 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -830,7 +830,7 @@ ko: sensitive: "%{name} 님이 %{target}의 계정을 민감함으로 표시했습니다" silence: "%{name} 님이 %{target}의 계정을 제한시켰습니다" suspend: "%{name} 님이 %{target}의 계정을 정지시켰습니다" - appeal_approved: 이의제기됨 + appeal_approved: 이의 받아들여짐 appeal_pending: 이의제기 대기중 appeal_rejected: 이의 제기 거절됨 system_checks: diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 90b3d216c3bae6..f301b8ca98cc56 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -1454,6 +1454,7 @@ nn: media_attachments: validations: images_and_video: Kan ikkje leggja ved video til status som allereie inneheld bilete + not_found: Media %{ids} vart ikkje funne eller er allereie kopla til eit anna innlegg not_ready: Kan ikke legge til filer som ikke er ferdigbehandlet. Prøv igjen om et øyeblikk! too_many: Kan ikkje leggja til meir enn 4 filer migrations: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 418d3d059e0e44..579dbd967fbacd 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -4,7 +4,7 @@ pt-BR: about_mastodon_html: 'A rede social do futuro: Sem anúncios, sem vigilância corporativa, com design ético e muita descentralização! Possua seus próprios dados com o Mastodon!' contact_missing: Não definido contact_unavailable: Não disponível - hosted_on: Servidor Mastodon em %{domain} + hosted_on: Mastodon hospedado em %{domain} title: Sobre accounts: follow: Seguir @@ -31,6 +31,7 @@ pt-BR: created_msg: Nota de moderação criada! destroyed_msg: Nota de moderação excluída! accounts: + add_email_domain_block: Bloquear domínio de email approve: Aprovar approved_msg: O registro de %{username} foi aprovado are_you_sure: Você tem certeza? @@ -44,10 +45,10 @@ pt-BR: submit: Alterar e-mail title: Alterar e-mail para %{username} change_role: - changed_msg: Cargo alterado! - label: Alterar cargo - no_role: Sem cargo - title: Alterar cargo para %{username} + changed_msg: Função alterada com sucesso! + label: Alterar função + no_role: Nenhuma função + title: Alterar função para %{username} confirm: Confirmar confirmed: Confirmado confirming: Confirmando @@ -57,6 +58,7 @@ pt-BR: demote: Rebaixar destroyed_msg: Os dados de %{username} estão na fila para serem excluídos em breve disable: Congelar + disable_sign_in_token_auth: Desativar autenticação via token por email disable_two_factor_authentication: Desativar autenticação de dois fatores disabled: Congelada display_name: Nome de exibição @@ -65,6 +67,7 @@ pt-BR: email: E-mail email_status: Estado do e-mail enable: Descongelar + enable_sign_in_token_auth: Ativar autenticação via token por email enabled: Ativada enabled_msg: A conta de %{username} foi descongelada followers: Seguidores @@ -129,6 +132,7 @@ pt-BR: resubscribe: Reinscrever-se role: Cargo search: Buscar + search_same_email_domain: Outros usuários com o mesmo domínio de e-mail search_same_ip: Outros usuários com o mesmo IP security: Segurança security_measures: @@ -169,21 +173,26 @@ pt-BR: approve_appeal: Aprovar revisão approve_user: Aprovar usuário assigned_to_self_report: Atribuir denúncia + change_email_user: Alterar o Email para o usuário change_role_user: Alterar cargo do usuário confirm_user: Confirmar usuário create_account_warning: Criar aviso create_announcement: Criar anúncio + create_canonical_email_block: Criar bloqueio de Email create_custom_emoji: Criar emoji personalizado create_domain_allow: Permitir domínio create_domain_block: Bloquear domínio + create_email_domain_block: Criar Bloqueio de Domínio de Email create_ip_block: Criar regra de IP create_unavailable_domain: Criar domínio indisponível create_user_role: Criar cargo demote_user: Rebaixar usuário destroy_announcement: Excluir anúncio + destroy_canonical_email_block: Deletar bloqueio de Email destroy_custom_emoji: Excluir emoji personalizado destroy_domain_allow: Excluir domínio permitido destroy_domain_block: Desbloquear domínio + destroy_email_domain_block: Deletar bloqueio de domínio Email destroy_instance: Limpar domínio destroy_ip_block: Excluir regra de IP destroy_status: Excluir publicação @@ -191,8 +200,10 @@ pt-BR: destroy_user_role: Destruir cargo disable_2fa_user: Desativar autenticação de dois fatores disable_custom_emoji: Desativar emoji personalizado + disable_sign_in_token_auth_user: Desativar autenticação via Token de Email para Usuário disable_user: Desativar usuário enable_custom_emoji: Ativar emoji personalizado + enable_sign_in_token_auth_user: Desativar autenticação via token por e-mail para o usuário enable_user: Ativar usuário memorialize_account: Converter conta em memorial promote_user: Promover usuário @@ -215,6 +226,7 @@ pt-BR: update_custom_emoji: Editar Emoji Personalizado update_domain_block: Atualizar bloqueio de domínio update_ip_block: Atualizar regra de IP + update_report: Atualizar Relatório update_status: Editar Status update_user_role: Atualizar cargo actions: @@ -223,19 +235,24 @@ pt-BR: assigned_to_self_report_html: "%{name} atribuiu a denúncia %{target} para si" change_email_user_html: "%{name} alterou o endereço de e-mail do usuário %{target}" change_role_user_html: "%{name} alterou o cargo de %{target}" + confirm_user_html: "%{name} confirmou o endereço de e-mail do usuário %{target}" create_account_warning_html: "%{name} enviou um aviso para %{target}" create_announcement_html: "%{name} criou o novo anúncio %{target}" + create_canonical_email_block_html: "%{name} bloqueou o endereço de e-mail com o hash %{target}" create_custom_emoji_html: "%{name} enviou o novo emoji %{target}" create_domain_allow_html: "%{name} permitiu federação com domínio %{target}" create_domain_block_html: "%{name} bloqueou o domínio %{target}" + create_email_domain_block_html: "%{name} bloqueou o domínio de e-mail %{target}" create_ip_block_html: "%{name} criou a regra para o IP %{target}" create_unavailable_domain_html: "%{name} parou a entrega ao domínio %{target}" create_user_role_html: "%{name} criou o cargo %{target}" demote_user_html: "%{name} rebaixou o usuário %{target}" destroy_announcement_html: "%{name} excluiu o anúncio %{target}" + destroy_canonical_email_block_html: "%{name} desbloqueou o endereço e-mail com o hash %{target}" destroy_custom_emoji_html: "%{name} apagou o emoji %{target}" destroy_domain_allow_html: "%{name} bloqueou federação com domínio %{target}" destroy_domain_block_html: "%{name} desbloqueou o domínio %{target}" + destroy_email_domain_block_html: "%{name} desbloqueou o domínio de e-mail %{target}" destroy_instance_html: "%{name} limpou o domínio %{target}" destroy_ip_block_html: "%{name} excluiu a regra para o IP %{target}" destroy_status_html: "%{name} removeu a publicação de %{target}" @@ -243,8 +260,10 @@ pt-BR: destroy_user_role_html: "%{name} excluiu o cargo %{target}" disable_2fa_user_html: "%{name} desativou a exigência da autenticação de dois fatores para o usuário %{target}" disable_custom_emoji_html: "%{name} desativou o emoji %{target}" + disable_sign_in_token_auth_user_html: "%{name} desativou a autenticação via token por e-mail para %{target}" disable_user_html: "%{name} desativou o login para %{target}" enable_custom_emoji_html: "%{name} ativou o emoji %{target}" + enable_sign_in_token_auth_user_html: "%{name} ativou a autenticação via token por e-mail para %{target}" enable_user_html: "%{name} ativou o login para %{target}" memorialize_account_html: "%{name} transformou a conta de %{target} em um memorial" promote_user_html: "%{name} promoveu o usuário %{target}" @@ -252,6 +271,7 @@ pt-BR: reject_user_html: "%{name} rejeitou a inscrição de %{target}" remove_avatar_user_html: "%{name} removeu a imagem de perfil de %{target}" reopen_report_html: "%{name} reabriu a denúncia %{target}" + resend_user_html: "%{name} reenviou um e-mail de confirmação para %{target}" reset_password_user_html: "%{name} redefiniu a senha de %{target}" resolve_report_html: "%{name} resolveu a denúncia %{target}" sensitive_account_html: "%{name} marcou a mídia de %{target} como sensível" @@ -412,6 +432,7 @@ pt-BR: attempts_over_week: one: "%{count} tentativa na última semana" other: "%{count} tentativas de inscrição na última semana" + created_msg: Domínio de e-mail bloqueado com sucesso delete: Excluir dns: types: @@ -420,8 +441,11 @@ pt-BR: new: create: Adicionar domínio resolve: Resolver domínio + title: Bloquear novo domínio de e-mail not_permitted: Não permitido + resolved_dns_records_hint_html: O nome de domínio é associado aos seguintes domínios MX, que são responsáveis por aceitar e-mails. Ao bloquear um domínio MX, você bloqueará as inscrições de qualquer endereço de e-mail que use o mesmo domínio MX, mesmo que o nome de domínio visível seja diferente. Tenha cuidado para não bloquear os principais provedores de e-mail. resolved_through_html: Resolvido através de %{domain} + title: Domínios de e-mail bloqueados export_domain_allows: new: title: Importar domínios permitidos @@ -446,6 +470,9 @@ pt-BR: title: Recomendações de contas unsuppress: Restaurar recomendação de contas instances: + audit_log: + title: Logs de auditoria recentes + view_all: Ver todos os logs de auditoria availability: description_html: one: Se a entrega ao domínio falhar em %{count} dia sem sucesso, nenhuma tentativa de entrega será feita a menos que uma entrega do domínio seja recebida. @@ -572,6 +599,7 @@ pt-BR: resolve_description_html: Nenhuma ação será tomada contra a conta denunciada, nenhuma violação será guardada e a denúncia será encerrada. silence_description_html: A conta ficará visível apenas para aqueles que já a seguem ou que a procuram manualmente, limitando severamente seu alcance. Pode ser revertido a qualquer momento. Fecha todas as denúncias desta conta. suspend_description_html: A conta e todo o seu conteúdo ficará inacessível e, eventualmente, excluído e interagir com ela será impossível. Reversível dentro de 30 dias. Encerra todas as denúncias contra esta conta. + actions_description_html: Decida qual ação tomar para responder a essa denúncia. Se você tomar uma ação punitiva contra a conta denunciada, uma notificação por e-mail será enviada ao usuário, exceto quando a categoria Spam for selecionada. actions_description_remote_html: Decida quais medidas tomará para resolver esta denúncia. Isso só afetará como seu servidor se comunica com esta conta remota e manipula seu conteúdo. add_to_report: Adicionar mais à denúncia already_suspended_badges: @@ -613,6 +641,7 @@ pt-BR: report: 'Denúncia #%{id}' reported_account: Conta denunciada reported_by: Denunciada por + reported_with_application: Denunciado pelo aplicativo resolved: Resolvido resolved_msg: Denúncia resolvida! skip_to_actions: Pular para ações @@ -635,6 +664,7 @@ pt-BR: delete_data_html: Exclua o perfil e o conteúdo de @%{acct} daqui a 30 dias, a menos que a suspensão seja desfeita nesse meio tempo preview_preamble_html: "@%{acct} receberá um aviso com o seguinte conteúdo:" record_strike_html: Registre uma ação contra @%{acct} para te ajudar em futuras violações desta conta + send_email_html: Enviar @%{acct} um e-mail de alerta warning_placeholder: Argumentos adicionais para a ação de moderação. target_origin: Origem da conta denunciada title: Denúncias @@ -674,6 +704,7 @@ pt-BR: manage_appeals: Gerenciar revisões manage_appeals_description: Permite aos usuários visualizar as revisões das decisões da moderação manage_blocks: Gerenciar Bloqueios + manage_blocks_description: Permite aos usuários bloquear provedores de e-mail e endereços IP manage_custom_emojis: Gerenciar Emojis Personalizados manage_custom_emojis_description: Permite aos usuários gerenciar emojis personalizados no servidor manage_federation: Gerenciar Federação @@ -691,6 +722,7 @@ pt-BR: manage_taxonomies: Gerenciar taxonomias manage_taxonomies_description: Permite aos usuários rever o conteúdo em alta e atualizar as configurações de hashtag manage_user_access: Gerenciar Acesso de Usuário + manage_user_access_description: Permite aos usuários desativar a autenticação de dois fatores de outros usuários, alterar seu endereço de e-mail e redefinir sua senha manage_users: Gerenciar usuários manage_users_description: Permite aos usuários ver os detalhes de outros usuários e executar ações de moderação contra eles manage_webhooks: Gerenciar Webhooks @@ -765,6 +797,7 @@ pt-BR: destroyed_msg: Upload do site excluído com sucesso! software_updates: critical_update: Crítico — por favor, atualize rapidamente + description: É recomendável que você mantenha a instalação do Mastodon atualizada para se beneficiar das correções e das novas funcionalidades. Além disso, às vezes é imprescindível atualizar o Mastodon rapidamente para evitar problemas de segurança. Por esses motivos, o Mastodon verifica se há atualizações a cada 30 minutos e notificará você de acordo com as suas preferências de notificação por e-mail. documentation_link: Saiba mais release_notes: Notas de lançamento title: Atualizações disponíveis @@ -851,16 +884,39 @@ pt-BR: action: Confira aqui para mais informações message_html: "Seu armazenamento de objetos está mal configurado. A privacidade de seus usuários está em risco." tags: + moderation: + not_trendable: Fora de moda + not_usable: Não utilizável + pending_review: Revisão pendente + review_requested: Revisão solicitada + reviewed: Revisado + title: Status + trendable: Tendências + unreviewed: Não revisado + usable: Utilizável + name: Nome + newest: Mais recente + oldest: Mais antigos + open: Visualizar Publicamente + reset: Reinicializar review: Status da revisão + search: Buscar + title: Hashtags updated_msg: Configurações de hashtag atualizadas title: Administração trends: allow: Permitir approved: Aprovado + confirm_allow: Você tem certeza que deseja permitir as tags selecionadas? + confirm_disallow: Você tem certeza de que deseja vetar as tags selecionadas? disallow: Impedir links: allow: Permitir link allow_provider: Permitir editor + confirm_allow: Tem certeza que deseja permitir os links selecionados? + confirm_allow_provider: Tem certeza que deseja permitir os provedores selecionados? + confirm_disallow: Tem certeza que deseja vetar os links selecionados? + confirm_disallow_provider: Tem certeza que deseja vetar os provedores selecionados? description_html: Estes são links que estão sendo compartilhados por contas que seu servidor vê. Você pode ajudar seus usuários a descobrir o que está acontecendo no mundo. Nenhum link é exibido publicamente até que você aprove o editor. Você também pode permitir ou rejeitar links individuais. disallow: Proibir link disallow_provider: Proibir autor @@ -884,6 +940,10 @@ pt-BR: statuses: allow: Permitir publicação allow_account: Permitir autor + confirm_allow: Tem certeza que deseja permitir os status selecionados? + confirm_allow_account: Tem certeza que deseja permitir as contas selecionadas? + confirm_disallow: Tem certeza que deseja vetar os status selecionados? + confirm_disallow_account: Tem certeza que deseja vetar as contas selecionadas? description_html: Estes são as publicações que seu servidor sabe que estão sendo muito compartilhadas e favorecidas no momento. Isso pode ajudar seus usuários, novos e atuais, a encontrar mais pessoas para seguir. Nenhuma publicação é exibida publicamente até que você aprove o autor e o autor permitir que sua conta seja sugerida a outros. Você também pode permitir ou rejeitar publicações individuais. disallow: Proibir publicação disallow_account: Proibir autor @@ -916,6 +976,7 @@ pt-BR: used_by_over_week: one: Usado por uma pessoa na última semana other: Usado por %{count} pessoas na última semana + title: Recomendações e tendências trending: Em alta warning_presets: add_new: Adicionar novo @@ -1000,7 +1061,9 @@ pt-BR: guide_link_text: Todos podem contribuir. sensitive_content: Conteúdo sensível application_mailer: + notification_preferences: Alterar preferências de e-mail salutation: "%{name}," + settings: 'Alterar preferências de e-mail: %{link}' unsubscribe: Desinscrever view: 'Ver:' view_profile: Ver perfil @@ -1020,6 +1083,7 @@ pt-BR: hint_html: Só mais uma coisa! Precisamos confirmar que você é um humano (isso é para que possamos evitar o spam!). Resolva o CAPTCHA abaixo e clique em "Continuar". title: Verificação de segurança confirmations: + awaiting_review: Seu endereço de e-mail está confirmado! A equipe %{domain} está agora revisando a sua inscrição. Você receberá um e-mail se a sua conta for aprovada! awaiting_review_title: Seu cadastro está sendo analisado clicking_this_link: clicar este link login_link: entrar @@ -1027,6 +1091,7 @@ pt-BR: redirect_to_app_html: Você deveria ter sido redirecionado para o aplicativo %{app_name}. Se isso não aconteceu, tente %{clicking_this_link} ou volte manualmente para o aplicativo. registration_complete: Seu cadastro no %{domain} foi concluído! welcome_title: Boas vindas, %{name}! + wrong_email_hint: Se esse endereço de e-mail não estiver correto, você pode alterá-lo nas configurações da conta. delete_account: Excluir conta delete_account_html: Se você deseja excluir sua conta, você pode fazer isso aqui. Uma confirmação será solicitada. description: @@ -1047,6 +1112,7 @@ pt-BR: or_log_in_with: Ou entre com privacy_policy_agreement_html: Eu li e concordo com a política de privacidade progress: + confirm: Confirmar e-mail details: Suas informações review: Nossa avaliação rules: Aceitar regras @@ -1068,8 +1134,10 @@ pt-BR: security: Segurança set_new_password: Definir uma nova senha setup: + email_below_hint_html: Verifique a sua pasta de spam, ou solicite outra. Você pode corrigir o seu endereço de e-mail se estiver errado. email_settings_hint_html: Clique no link que te enviamos para verificar %{email}. Esperaremos aqui. link_not_received: Não recebeu um link? + new_confirmation_instructions_sent: Você receberá um novo e-mail com o link de confirmação em alguns minutos! title: Verifique sua caixa de entrada sign_in: preamble_html: Entre com suas credenciais de domínios ( %{domain} ) . Se sua conta estiver hospedada em um servidor diferente, você não deve conseguir acessar este conteúdo. @@ -1080,7 +1148,9 @@ pt-BR: title: Então vamos lá criar uma conta em %{domain}. status: account_status: Status da conta + confirming: Confirmação por e-mail pendente. functional: Sua conta está totalmente operacional. + pending: Sua inscrição está aguardando revisão pela nossa equipe. Isto pode levar algum tempo. Você receberá um e-mail se sua inscrição for aprovada. redirecting_to: Sua conta está inativa porque atualmente está redirecionando para %{acct}. self_destruct: Como %{domain} está se encerrando, você só terá acesso limitado à sua conta. view_strikes: Veja os avisos anteriores em relação à sua conta @@ -1123,6 +1193,9 @@ pt-BR: before: 'Antes de prosseguir, leia com cuidado:' caches: Conteúdo que foi armazenado em cache por outros servidores pode continuar a existir data_removal: Suas publicações e outros dados serão removidos permanentemente + email_change_html: Você pode alterar seu endereço de e-mail sem excluir sua conta + email_contact_html: Se ainda não chegar, você pode enviar um e-mail para %{email} para obter ajuda + email_reconfirmation_html: Se você não recebeu o e-mail de confirmação, você pode solicitá-lo novamente irreversible: Você não conseguirá restaurar ou reativar a sua conta more_details_html: Para mais detalhes, consulte a Política de Privacidade. username_available: Seu nome de usuário ficará disponível novamente @@ -1355,6 +1428,7 @@ pt-BR: authentication_methods: otp: autenticação de dois fatores password: senha + sign_in_token: código de segurança do e-mail webauthn: chaves de segurança description_html: Se você vir atividades suspeitas ou não reconhecidas, considere alterar sua senha e ativar a autenticação de dois fatores. empty: Sem histórico de autenticação disponível @@ -1365,10 +1439,14 @@ pt-BR: unsubscribe: action: Sim, cancelar subscrição complete: Desinscrito + confirmation_html: Tem certeza que deseja cancelar a assinatura de %{type} para Mastodon no %{domain} para o seu endereço de e-mail %{email}? Você sempre pode se inscrever novamente nas configurações de notificação de email. + resubscribe_html: Se você cancelou sua inscrição por engano, você pode se inscrever novamente em suas configurações de notificações por e-mail. + success_html: Você não mais receberá %{type} no Mastodon em %{domain} ao seu endereço de e-mail %{email}. title: Cancelar inscrição media_attachments: validations: images_and_video: Não foi possível anexar um vídeo a uma publicação que já contém imagens + not_found: Mídia %{ids} não encontrada ou já anexada a outra publicação not_ready: Não é possível anexar arquivos que não terminaram de ser processados. Tente novamente daqui a pouco! too_many: Não foi possível anexar mais de 4 imagens migrations: @@ -1445,6 +1523,8 @@ pt-BR: update: subject: "%{name} editou uma publicação" notifications: + administration_emails: Notificações de e-mail do administrador + email_events: Eventos para notificações por e-mail email_events_hint: 'Selecione os eventos que deseja receber notificações:' number: human: @@ -1603,6 +1683,7 @@ pt-BR: import: Importar import_and_export: Importar e exportar migrate: Migração de conta + notifications: Notificações por e-mail preferences: Preferências profile: Perfil relationships: Seguindo e seguidores @@ -1849,6 +1930,7 @@ pt-BR: invalid_otp_token: Código de dois fatores inválido otp_lost_help_html: Se você perder o acesso à ambos, você pode entrar em contato com %{email} rate_limited: Muitas tentativas de autenticação; tente novamente mais tarde. + seamless_external_login: Você está logado através de um serviço externo, portanto as configurações de senha e e-mail não estão disponíveis. signed_in_as: 'Entrou como:' verification: extra_instructions_html: Dica: O link do seu site não precisa ser visível. O importante é a parte rel="me", que impede a personificação em sites com conteúdo gerado pelo usuário. Você pode até usar uma tag link no cabeçalho da página ao invés de uma tag a, mas é importante que o HTML esteja acessível sem executar JavaScript. diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index fc3c09cf1d09d0..65d3883690112c 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -211,6 +211,7 @@ pt-BR: setting_default_privacy: Privacidade dos toots setting_default_sensitive: Sempre marcar mídia como sensível setting_delete_modal: Solicitar confirmação antes de excluir toot + setting_disable_hover_cards: Desativar visualização de perfil ao passar o mouse por cima setting_disable_swiping: Desabilitar movimentos deslizantes setting_display_media: Exibição das mídias setting_display_media_default: Padrão @@ -242,11 +243,13 @@ pt-BR: warn: Ocultar com um aviso form_admin_settings: activity_api_enabled: Publicar estatísticas agregadas sobre atividade de usuários na API + app_icon: Ícone do aplicativo backups_retention_period: Período de retenção do arquivo de usuário bootstrap_timeline_accounts: Sempre recomendar essas contas para novos usuários closed_registrations_message: Mensagem personalizada quando inscrições não estão disponíveis content_cache_retention_period: Período de retenção de conteúdo remoto custom_css: CSS personalizável + favicon: Favicon mascot: Mascote personalizado (legado) media_cache_retention_period: Período de retenção do cachê de mídia peers_api_enabled: Publicar lista de instâncias de servidor descobertas na API @@ -311,6 +314,7 @@ pt-BR: listable: Permitir que esta hashtag apareça em pesquisas e sugestões name: Hashtag trendable: Permitir que esta hashtag fique em alta + usable: Permitir que as publicações usem esta hashtag localmente user: role: Cargo time_zone: Fuso horário diff --git a/config/locales/tr.yml b/config/locales/tr.yml index fc9fde36154daa..4318f4eac48c18 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1454,6 +1454,7 @@ tr: media_attachments: validations: images_and_video: Zaten resim içeren bir duruma video eklenemez + not_found: "%{ids} medya dosyaları bulunamadı veya başka bir gönderiye zaten eklenmiş" not_ready: İşlemi tamamlanmamış dosyalar eklenemez. Birazdan tekrar deneyin! too_many: 4'ten fazla dosya eklenemiyor migrations: diff --git a/lib/mastodon/redis_configuration.rb b/lib/mastodon/redis_configuration.rb index 3cd121e4ac2762..9139d87583e33f 100644 --- a/lib/mastodon/redis_configuration.rb +++ b/lib/mastodon/redis_configuration.rb @@ -1,34 +1,33 @@ # frozen_string_literal: true class Mastodon::RedisConfiguration + DEFAULTS = { + host: 'localhost', + port: 6379, + db: 0, + }.freeze + def base - @base ||= { - url: setup_base_redis_url, - driver: driver, - namespace: base_namespace, - } + @base ||= setup_config(prefix: nil, defaults: DEFAULTS) + .merge(namespace: base_namespace) end def sidekiq - @sidekiq ||= { - url: setup_prefixed_redis_url(:sidekiq), - driver: driver, - namespace: sidekiq_namespace, - } + @sidekiq ||= setup_config(prefix: 'SIDEKIQ_') + .merge(namespace: sidekiq_namespace) end def cache - @cache ||= { - url: setup_prefixed_redis_url(:cache), - driver: driver, - namespace: cache_namespace, - expires_in: 10.minutes, - connect_timeout: 5, - pool: { - size: Sidekiq.server? ? Sidekiq[:concurrency] : Integer(ENV['MAX_THREADS'] || 5), - timeout: 5, - }, - } + @cache ||= setup_config(prefix: 'CACHE_') + .merge({ + namespace: cache_namespace, + expires_in: 10.minutes, + connect_timeout: 5, + pool: { + size: Sidekiq.server? ? Sidekiq[:concurrency] : Integer(ENV['MAX_THREADS'] || 5), + timeout: 5, + }, + }) end private @@ -55,42 +54,53 @@ def cache_namespace namespace ? "#{namespace}_cache" : 'cache' end - def setup_base_redis_url - url = ENV.fetch('REDIS_URL', nil) - return url if url.present? - - user = ENV.fetch('REDIS_USER', '') - password = ENV.fetch('REDIS_PASSWORD', '') - host = ENV.fetch('REDIS_HOST', 'localhost') - port = ENV.fetch('REDIS_PORT', 6379) - db = ENV.fetch('REDIS_DB', 0) + def setup_config(prefix: nil, defaults: {}) + prefix = "#{prefix}REDIS_" - construct_uri(host, port, db, user, password) - end + url = ENV.fetch("#{prefix}URL", nil) + user = ENV.fetch("#{prefix}USER", nil) + password = ENV.fetch("#{prefix}PASSWORD", nil) + host = ENV.fetch("#{prefix}HOST", defaults[:host]) + port = ENV.fetch("#{prefix}PORT", defaults[:port]) + db = ENV.fetch("#{prefix}DB", defaults[:db]) + name = ENV.fetch("#{prefix}SENTINEL_MASTER", nil) + sentinels = parse_sentinels(ENV.fetch("#{prefix}SENTINELS", nil)) - def setup_prefixed_redis_url(prefix) - prefix = "#{prefix.to_s.upcase}_" - url = ENV.fetch("#{prefix}REDIS_URL", nil) + return { url:, driver: } if url - return url if url.present? + if name.present? && sentinels.present? + host = name + port = nil + db ||= 0 + else + sentinels = nil + end - user = ENV.fetch("#{prefix}REDIS_USER", nil) - password = ENV.fetch("#{prefix}REDIS_PASSWORD", nil) - host = ENV.fetch("#{prefix}REDIS_HOST", nil) - port = ENV.fetch("#{prefix}REDIS_PORT", nil) - db = ENV.fetch("#{prefix}REDIS_DB", nil) + url = construct_uri(host, port, db, user, password) - if host.nil? - base[:url] + if url.present? + { url:, driver:, name:, sentinels: } else - construct_uri(host, port, db, user, password) + # Fall back to base config. This has defaults for the URL + # so this cannot lead to an endless loop. + base end end def construct_uri(host, port, db, user, password) + return nil if host.blank? + Addressable::URI.parse("redis://#{host}:#{port}/#{db}").tap do |uri| uri.user = user if user.present? uri.password = password if password.present? end.normalize.to_str end + + def parse_sentinels(sentinels_string) + (sentinels_string || '').split(',').map do |sentinel| + host, port = sentinel.split(':') + port = port.present? ? port.to_i : 26_379 + { host: host, port: port } + end.presence + end end diff --git a/package.json b/package.json index 02444a3def1a0f..4c7af5c16dbbc1 100644 --- a/package.json +++ b/package.json @@ -178,9 +178,9 @@ "eslint-define-config": "^2.0.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-formatjs": "^4.10.1", - "eslint-plugin-import": "~2.29.0", + "eslint-plugin-import": "~2.30.0", "eslint-plugin-jsdoc": "^50.0.0", - "eslint-plugin-jsx-a11y": "~6.9.0", + "eslint-plugin-jsx-a11y": "~6.10.0", "eslint-plugin-promise": "~7.1.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/spec/chewy/accounts_index_spec.rb b/spec/chewy/accounts_index_spec.rb index f9c5922c76efea..f7b5b2e249b6fa 100644 --- a/spec/chewy/accounts_index_spec.rb +++ b/spec/chewy/accounts_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountsIndex do +RSpec.describe AccountsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/public_statuses_index_spec.rb b/spec/chewy/public_statuses_index_spec.rb index 2f93d0ff025a59..6bc08832f33992 100644 --- a/spec/chewy/public_statuses_index_spec.rb +++ b/spec/chewy/public_statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublicStatusesIndex do +RSpec.describe PublicStatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/statuses_index_spec.rb b/spec/chewy/statuses_index_spec.rb index 768e9415fc1f69..e3899f3a1767a5 100644 --- a/spec/chewy/statuses_index_spec.rb +++ b/spec/chewy/statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesIndex do +RSpec.describe StatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/tags_index_spec.rb b/spec/chewy/tags_index_spec.rb index 054589bdfb1929..6b57da65e4d737 100644 --- a/spec/chewy/tags_index_spec.rb +++ b/spec/chewy/tags_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagsIndex do +RSpec.describe TagsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/config/initializers/rack/attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb index 19de4808983bc9..c7af11bea7c128 100644 --- a/spec/config/initializers/rack/attack_spec.rb +++ b/spec/config/initializers/rack/attack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rack::Attack, type: :request do +RSpec.describe Rack::Attack, type: :request do def app Rails.application end diff --git a/spec/controllers/activitypub/claims_controller_spec.rb b/spec/controllers/activitypub/claims_controller_spec.rb index f00eeb732a7af2..e887be2cbe1ae2 100644 --- a/spec/controllers/activitypub/claims_controller_spec.rb +++ b/spec/controllers/activitypub/claims_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ClaimsController do +RSpec.describe ActivityPub::ClaimsController do let(:account) { Fabricate(:account) } describe 'POST #create' do diff --git a/spec/controllers/admin/account_actions_controller_spec.rb b/spec/controllers/admin/account_actions_controller_spec.rb index b8dae7993935e1..d513b3d4a09261 100644 --- a/spec/controllers/admin/account_actions_controller_spec.rb +++ b/spec/controllers/admin/account_actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountActionsController do +RSpec.describe Admin::AccountActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/action_logs_controller_spec.rb b/spec/controllers/admin/action_logs_controller_spec.rb index be4222df080f87..3daf2606729fcb 100644 --- a/spec/controllers/admin/action_logs_controller_spec.rb +++ b/spec/controllers/admin/action_logs_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ActionLogsController do +RSpec.describe Admin::ActionLogsController do render_views # Action logs typically cause issues when their targets are not in the database diff --git a/spec/controllers/admin/base_controller_spec.rb b/spec/controllers/admin/base_controller_spec.rb index 1f1fa8441af24a..8b8b7fe63d931d 100644 --- a/spec/controllers/admin/base_controller_spec.rb +++ b/spec/controllers/admin/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::BaseController do +RSpec.describe Admin::BaseController do controller do def success authorize :dashboard, :index? diff --git a/spec/controllers/admin/custom_emojis_controller_spec.rb b/spec/controllers/admin/custom_emojis_controller_spec.rb index 9e732200dd26a7..57c2a6d21b4b9f 100644 --- a/spec/controllers/admin/custom_emojis_controller_spec.rb +++ b/spec/controllers/admin/custom_emojis_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::CustomEmojisController do +RSpec.describe Admin::CustomEmojisController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index 3e29ce1278583b..9177be4b6dc2cb 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardController do +RSpec.describe Admin::DashboardController do render_views describe 'GET #index' do diff --git a/spec/controllers/admin/follow_recommendations_controller_spec.rb b/spec/controllers/admin/follow_recommendations_controller_spec.rb index f62aa6e4b2f030..d614f2ef43d4f0 100644 --- a/spec/controllers/admin/follow_recommendations_controller_spec.rb +++ b/spec/controllers/admin/follow_recommendations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FollowRecommendationsController do +RSpec.describe Admin::FollowRecommendationsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/invites_controller_spec.rb b/spec/controllers/admin/invites_controller_spec.rb index 8638f8e2141fc1..b6471e80b2766b 100644 --- a/spec/controllers/admin/invites_controller_spec.rb +++ b/spec/controllers/admin/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::InvitesController do +RSpec.describe Admin::InvitesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/ip_blocks_controller_spec.rb b/spec/controllers/admin/ip_blocks_controller_spec.rb index 05190f13408eac..2e32db5a0118b9 100644 --- a/spec/controllers/admin/ip_blocks_controller_spec.rb +++ b/spec/controllers/admin/ip_blocks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::IpBlocksController do +RSpec.describe Admin::IpBlocksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relationships_controller_spec.rb b/spec/controllers/admin/relationships_controller_spec.rb index 1099a37a3b3b31..214be7c7cd212e 100644 --- a/spec/controllers/admin/relationships_controller_spec.rb +++ b/spec/controllers/admin/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelationshipsController do +RSpec.describe Admin::RelationshipsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relays_controller_spec.rb b/spec/controllers/admin/relays_controller_spec.rb index ca351c39b2c7e8..c6251a6d764025 100644 --- a/spec/controllers/admin/relays_controller_spec.rb +++ b/spec/controllers/admin/relays_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelaysController do +RSpec.describe Admin::RelaysController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb index 8d5b5c7aecf871..423a64ebc455e1 100644 --- a/spec/controllers/admin/report_notes_controller_spec.rb +++ b/spec/controllers/admin/report_notes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportNotesController do +RSpec.describe Admin::ReportNotesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports/actions_controller_spec.rb b/spec/controllers/admin/reports/actions_controller_spec.rb index 06d4b31f54e469..6185702c303811 100644 --- a/spec/controllers/admin/reports/actions_controller_spec.rb +++ b/spec/controllers/admin/reports/actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Reports::ActionsController do +RSpec.describe Admin::Reports::ActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb index 67fb28e7a57fff..d07468a37b4fa4 100644 --- a/spec/controllers/admin/reports_controller_spec.rb +++ b/spec/controllers/admin/reports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportsController do +RSpec.describe Admin::ReportsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/roles_controller_spec.rb b/spec/controllers/admin/roles_controller_spec.rb index 223d0a472a5164..2c43a0ca870ae5 100644 --- a/spec/controllers/admin/roles_controller_spec.rb +++ b/spec/controllers/admin/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RolesController do +RSpec.describe Admin::RolesController do render_views let(:permissions) { UserRole::Flags::NONE } diff --git a/spec/controllers/admin/rules_controller_spec.rb b/spec/controllers/admin/rules_controller_spec.rb index 92ffb415671c3c..1b2a2010d0de77 100644 --- a/spec/controllers/admin/rules_controller_spec.rb +++ b/spec/controllers/admin/rules_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RulesController do +RSpec.describe Admin::RulesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/site_uploads_controller_spec.rb b/spec/controllers/admin/site_uploads_controller_spec.rb index 4ea37f396a7773..9c65c63b78e11b 100644 --- a/spec/controllers/admin/site_uploads_controller_spec.rb +++ b/spec/controllers/admin/site_uploads_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SiteUploadsController do +RSpec.describe Admin::SiteUploadsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb index 4ab6d109ef89b5..e6053a6e8a9cca 100644 --- a/spec/controllers/admin/statuses_controller_spec.rb +++ b/spec/controllers/admin/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::StatusesController do +RSpec.describe Admin::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb index 95ed38d6b1da5e..ce62a13db6c7f2 100644 --- a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb +++ b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::Links::PreviewCardProvidersController do +RSpec.describe Admin::Trends::Links::PreviewCardProvidersController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links_controller_spec.rb b/spec/controllers/admin/trends/links_controller_spec.rb index 7c67f5e5aa3e41..984f3007c2db8b 100644 --- a/spec/controllers/admin/trends/links_controller_spec.rb +++ b/spec/controllers/admin/trends/links_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::LinksController do +RSpec.describe Admin::Trends::LinksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/statuses_controller_spec.rb b/spec/controllers/admin/trends/statuses_controller_spec.rb index b752234d3cd4f5..eecf4ab4f2695f 100644 --- a/spec/controllers/admin/trends/statuses_controller_spec.rb +++ b/spec/controllers/admin/trends/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesController do +RSpec.describe Admin::Trends::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/tags_controller_spec.rb b/spec/controllers/admin/trends/tags_controller_spec.rb index 4f74a55455d613..51ad1860c8aebb 100644 --- a/spec/controllers/admin/trends/tags_controller_spec.rb +++ b/spec/controllers/admin/trends/tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::TagsController do +RSpec.describe Admin::Trends::TagsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/users/roles_controller_spec.rb b/spec/controllers/admin/users/roles_controller_spec.rb index 97f69a0b0a90da..bfc2bb151fa7c5 100644 --- a/spec/controllers/admin/users/roles_controller_spec.rb +++ b/spec/controllers/admin/users/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Users::RolesController do +RSpec.describe Admin::Users::RolesController do render_views let(:current_role) { UserRole.create(name: 'Foo', permissions: UserRole::FLAGS[:manage_roles], position: 10) } diff --git a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb index eb10d4796302c0..1f0a6ac34d3ecd 100644 --- a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb +++ b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Admin::Users::TwoFactorAuthenticationsController do +RSpec.describe Admin::Users::TwoFactorAuthenticationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/admin/warning_presets_controller_spec.rb b/spec/controllers/admin/warning_presets_controller_spec.rb index b32a58e990f1af..4171bbad824c8e 100644 --- a/spec/controllers/admin/warning_presets_controller_spec.rb +++ b/spec/controllers/admin/warning_presets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WarningPresetsController do +RSpec.describe Admin::WarningPresetsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks/secrets_controller_spec.rb b/spec/controllers/admin/webhooks/secrets_controller_spec.rb index 291a10fba5e0ca..61ae8cdaa50bf1 100644 --- a/spec/controllers/admin/webhooks/secrets_controller_spec.rb +++ b/spec/controllers/admin/webhooks/secrets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Webhooks::SecretsController do +RSpec.describe Admin::Webhooks::SecretsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks_controller_spec.rb b/spec/controllers/admin/webhooks_controller_spec.rb index 17d85060256207..4fe787c26cd470 100644 --- a/spec/controllers/admin/webhooks_controller_spec.rb +++ b/spec/controllers/admin/webhooks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WebhooksController do +RSpec.describe Admin::WebhooksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/api/base_controller_spec.rb b/spec/controllers/api/base_controller_spec.rb index 659d55f8012d0e..1e0e7c8f4dcffe 100644 --- a/spec/controllers/api/base_controller_spec.rb +++ b/spec/controllers/api/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::BaseController do +RSpec.describe Api::BaseController do controller do def success head 200 diff --git a/spec/controllers/api/web/push_subscriptions_controller_spec.rb b/spec/controllers/api/web/push_subscriptions_controller_spec.rb index 58677841ca7785..acc03121132332 100644 --- a/spec/controllers/api/web/push_subscriptions_controller_spec.rb +++ b/spec/controllers/api/web/push_subscriptions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::Web::PushSubscriptionsController do +RSpec.describe Api::Web::PushSubscriptionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 704cc1270e6ed7..52d92a2b6c5074 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationController do +RSpec.describe ApplicationController do controller do def success head 200 diff --git a/spec/controllers/auth/challenges_controller_spec.rb b/spec/controllers/auth/challenges_controller_spec.rb index 32bbedde633a94..56fdfa61b58078 100644 --- a/spec/controllers/auth/challenges_controller_spec.rb +++ b/spec/controllers/auth/challenges_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ChallengesController do +RSpec.describe Auth::ChallengesController do render_views let(:password) { 'foobar12345' } diff --git a/spec/controllers/auth/confirmations_controller_spec.rb b/spec/controllers/auth/confirmations_controller_spec.rb index 15403e8ea13513..a5b212e660036d 100644 --- a/spec/controllers/auth/confirmations_controller_spec.rb +++ b/spec/controllers/auth/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ConfirmationsController do +RSpec.describe Auth::ConfirmationsController do render_views describe 'GET #new' do diff --git a/spec/controllers/auth/passwords_controller_spec.rb b/spec/controllers/auth/passwords_controller_spec.rb index d70490abcf15ad..9ccbb9e4942921 100644 --- a/spec/controllers/auth/passwords_controller_spec.rb +++ b/spec/controllers/auth/passwords_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::PasswordsController do +RSpec.describe Auth::PasswordsController do include Devise::Test::ControllerHelpers describe 'GET #new' do diff --git a/spec/controllers/auth/setup_controller_spec.rb b/spec/controllers/auth/setup_controller_spec.rb index 75e42aaf96d672..28b07cb4b289e9 100644 --- a/spec/controllers/auth/setup_controller_spec.rb +++ b/spec/controllers/auth/setup_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::SetupController do +RSpec.describe Auth::SetupController do render_views describe 'GET #show' do diff --git a/spec/controllers/authorize_interactions_controller_spec.rb b/spec/controllers/authorize_interactions_controller_spec.rb index ed55df08d9a74b..2a0422efa927cf 100644 --- a/spec/controllers/authorize_interactions_controller_spec.rb +++ b/spec/controllers/authorize_interactions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AuthorizeInteractionsController do +RSpec.describe AuthorizeInteractionsController do render_views describe 'GET #show' do diff --git a/spec/controllers/concerns/account_controller_concern_spec.rb b/spec/controllers/concerns/account_controller_concern_spec.rb index 122ef21e93039f..3eee46d7b956fc 100644 --- a/spec/controllers/concerns/account_controller_concern_spec.rb +++ b/spec/controllers/concerns/account_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountControllerConcern do +RSpec.describe AccountControllerConcern do controller(ApplicationController) do include AccountControllerConcern diff --git a/spec/controllers/concerns/api/error_handling_spec.rb b/spec/controllers/concerns/api/error_handling_spec.rb index 9b36fc20a32403..eff01605d2a89a 100644 --- a/spec/controllers/concerns/api/error_handling_spec.rb +++ b/spec/controllers/concerns/api/error_handling_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::ErrorHandling do +RSpec.describe Api::ErrorHandling do before do stub_const('FakeService', Class.new) end diff --git a/spec/controllers/concerns/api/rate_limit_headers_spec.rb b/spec/controllers/concerns/api/rate_limit_headers_spec.rb index 2050de2aed4ed8..6372c94e6c2af4 100644 --- a/spec/controllers/concerns/api/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/api/rate_limit_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::RateLimitHeaders do +RSpec.describe Api::RateLimitHeaders do controller(ApplicationController) do include Api::RateLimitHeaders diff --git a/spec/controllers/concerns/localized_spec.rb b/spec/controllers/concerns/localized_spec.rb index ce31e786f0a352..b1f805ae50c883 100644 --- a/spec/controllers/concerns/localized_spec.rb +++ b/spec/controllers/concerns/localized_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Localized do +RSpec.describe Localized do controller(ApplicationController) do include Localized diff --git a/spec/controllers/concerns/settings/export_controller_concern_spec.rb b/spec/controllers/concerns/settings/export_controller_concern_spec.rb index a19af8689ac877..2c67991e3a8251 100644 --- a/spec/controllers/concerns/settings/export_controller_concern_spec.rb +++ b/spec/controllers/concerns/settings/export_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportControllerConcern do +RSpec.describe Settings::ExportControllerConcern do controller(ApplicationController) do include Settings::ExportControllerConcern diff --git a/spec/controllers/concerns/user_tracking_concern_spec.rb b/spec/controllers/concerns/user_tracking_concern_spec.rb index f23d482f5f9303..cc61e285cc2e2c 100644 --- a/spec/controllers/concerns/user_tracking_concern_spec.rb +++ b/spec/controllers/concerns/user_tracking_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserTrackingConcern do +RSpec.describe UserTrackingConcern do controller(ApplicationController) do include UserTrackingConcern diff --git a/spec/controllers/filters/statuses_controller_spec.rb b/spec/controllers/filters/statuses_controller_spec.rb index 2c80613302cb9e..f1fed76fca6069 100644 --- a/spec/controllers/filters/statuses_controller_spec.rb +++ b/spec/controllers/filters/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Filters::StatusesController do +RSpec.describe Filters::StatusesController do render_views describe 'GET #index' do diff --git a/spec/controllers/filters_controller_spec.rb b/spec/controllers/filters_controller_spec.rb index 091f714bb37cb2..de043e8ae3f996 100644 --- a/spec/controllers/filters_controller_spec.rb +++ b/spec/controllers/filters_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FiltersController do +RSpec.describe FiltersController do render_views describe 'GET #index' do diff --git a/spec/controllers/follower_accounts_controller_spec.rb b/spec/controllers/follower_accounts_controller_spec.rb index dd78c96c053934..e84528d13e085e 100644 --- a/spec/controllers/follower_accounts_controller_spec.rb +++ b/spec/controllers/follower_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowerAccountsController do +RSpec.describe FollowerAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/following_accounts_controller_spec.rb b/spec/controllers/following_accounts_controller_spec.rb index 7bb78fb4204569..1e01b9f4945722 100644 --- a/spec/controllers/following_accounts_controller_spec.rb +++ b/spec/controllers/following_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowingAccountsController do +RSpec.describe FollowingAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 5221941267fa00..192c5b00ba86e7 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InvitesController do +RSpec.describe InvitesController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/oauth/authorized_applications_controller_spec.rb b/spec/controllers/oauth/authorized_applications_controller_spec.rb index 3fd9f9499f4387..52d3dbde83e034 100644 --- a/spec/controllers/oauth/authorized_applications_controller_spec.rb +++ b/spec/controllers/oauth/authorized_applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Oauth::AuthorizedApplicationsController do +RSpec.describe Oauth::AuthorizedApplicationsController do render_views describe 'GET #index' do diff --git a/spec/controllers/relationships_controller_spec.rb b/spec/controllers/relationships_controller_spec.rb index 9495fc214f04ac..323fcc995de83b 100644 --- a/spec/controllers/relationships_controller_spec.rb +++ b/spec/controllers/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipsController do +RSpec.describe RelationshipsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/aliases_controller_spec.rb b/spec/controllers/settings/aliases_controller_spec.rb index 18e568be0be43b..4858c15298c7df 100644 --- a/spec/controllers/settings/aliases_controller_spec.rb +++ b/spec/controllers/settings/aliases_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::AliasesController do +RSpec.describe Settings::AliasesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/applications_controller_spec.rb b/spec/controllers/settings/applications_controller_spec.rb index ce2e0749a763b8..721741bacb2272 100644 --- a/spec/controllers/settings/applications_controller_spec.rb +++ b/spec/controllers/settings/applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ApplicationsController do +RSpec.describe Settings::ApplicationsController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/deletes_controller_spec.rb b/spec/controllers/settings/deletes_controller_spec.rb index 3342599bc1172e..98104b8454b782 100644 --- a/spec/controllers/settings/deletes_controller_spec.rb +++ b/spec/controllers/settings/deletes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::DeletesController do +RSpec.describe Settings::DeletesController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/exports_controller_spec.rb b/spec/controllers/settings/exports_controller_spec.rb index 3399f78ac58f5b..1eafabc7e50129 100644 --- a/spec/controllers/settings/exports_controller_spec.rb +++ b/spec/controllers/settings/exports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportsController do +RSpec.describe Settings::ExportsController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/featured_tags_controller_spec.rb b/spec/controllers/settings/featured_tags_controller_spec.rb index 4e1dd52945902b..a56ae1c498cf00 100644 --- a/spec/controllers/settings/featured_tags_controller_spec.rb +++ b/spec/controllers/settings/featured_tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::FeaturedTagsController do +RSpec.describe Settings::FeaturedTagsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/login_activities_controller_spec.rb b/spec/controllers/settings/login_activities_controller_spec.rb index 294bf85c97ad26..3447620abbf8ff 100644 --- a/spec/controllers/settings/login_activities_controller_spec.rb +++ b/spec/controllers/settings/login_activities_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::LoginActivitiesController do +RSpec.describe Settings::LoginActivitiesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/migration/redirects_controller_spec.rb b/spec/controllers/settings/migration/redirects_controller_spec.rb index b909a02668b787..d853fe8ae64249 100644 --- a/spec/controllers/settings/migration/redirects_controller_spec.rb +++ b/spec/controllers/settings/migration/redirects_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Migration::RedirectsController do +RSpec.describe Settings::Migration::RedirectsController do render_views let!(:user) { Fabricate(:user, password: 'testtest') } diff --git a/spec/controllers/settings/migrations_controller_spec.rb b/spec/controllers/settings/migrations_controller_spec.rb index f3340574d08be5..93c5de08990e96 100644 --- a/spec/controllers/settings/migrations_controller_spec.rb +++ b/spec/controllers/settings/migrations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::MigrationsController do +RSpec.describe Settings::MigrationsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/pictures_controller_spec.rb b/spec/controllers/settings/pictures_controller_spec.rb index 705878f03da7a0..683d231ed1e433 100644 --- a/spec/controllers/settings/pictures_controller_spec.rb +++ b/spec/controllers/settings/pictures_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::PicturesController do +RSpec.describe Settings::PicturesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/appearance_controller_spec.rb b/spec/controllers/settings/preferences/appearance_controller_spec.rb index c59d3151041fc7..ede00699a200ec 100644 --- a/spec/controllers/settings/preferences/appearance_controller_spec.rb +++ b/spec/controllers/settings/preferences/appearance_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::AppearanceController do +RSpec.describe Settings::Preferences::AppearanceController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/base_controller_spec.rb b/spec/controllers/settings/preferences/base_controller_spec.rb index 53b3a461ed589a..75fc999a4831f8 100644 --- a/spec/controllers/settings/preferences/base_controller_spec.rb +++ b/spec/controllers/settings/preferences/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::BaseController do +RSpec.describe Settings::Preferences::BaseController do describe 'after_update_redirect_path' do it 'raises error when called' do expect { described_class.new.send(:after_update_redirect_path) }.to raise_error(/Override/) diff --git a/spec/controllers/settings/preferences/notifications_controller_spec.rb b/spec/controllers/settings/preferences/notifications_controller_spec.rb index e0f0bc55a7580d..edfdea50e066b8 100644 --- a/spec/controllers/settings/preferences/notifications_controller_spec.rb +++ b/spec/controllers/settings/preferences/notifications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::NotificationsController do +RSpec.describe Settings::Preferences::NotificationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/other_controller_spec.rb b/spec/controllers/settings/preferences/other_controller_spec.rb index 61a94a41423775..117fdeea7c8bb4 100644 --- a/spec/controllers/settings/preferences/other_controller_spec.rb +++ b/spec/controllers/settings/preferences/other_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::OtherController do +RSpec.describe Settings::Preferences::OtherController do render_views let(:user) { Fabricate(:user, chosen_languages: []) } diff --git a/spec/controllers/settings/sessions_controller_spec.rb b/spec/controllers/settings/sessions_controller_spec.rb index a4248e1bde6f11..c098af74855bef 100644 --- a/spec/controllers/settings/sessions_controller_spec.rb +++ b/spec/controllers/settings/sessions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::SessionsController do +RSpec.describe Settings::SessionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb index 1c8b483a0a22e7..34eaacdf498f96 100644 --- a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::ConfirmationsController do +RSpec.describe Settings::TwoFactorAuthentication::ConfirmationsController do render_views shared_examples 'renders :new' do diff --git a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb index 007df87d954c75..a03c4a4adb2442 100644 --- a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::OtpAuthenticationController do +RSpec.describe Settings::TwoFactorAuthentication::OtpAuthenticationController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb index dbc2e3059ce2c9..0defc52cde92db 100644 --- a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::RecoveryCodesController do +RSpec.describe Settings::TwoFactorAuthentication::RecoveryCodesController do render_views describe 'POST #create' do diff --git a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb index 41a3ba5eb5bbf5..cccf3c51d321b1 100644 --- a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do +RSpec.describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb index de0d28463bb2aa..c55f113d4d2d3e 100644 --- a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthenticationMethodsController do +RSpec.describe Settings::TwoFactorAuthenticationMethodsController do render_views context 'when not signed in' do diff --git a/spec/controllers/statuses_controller_spec.rb b/spec/controllers/statuses_controller_spec.rb index 084dcfaa751d69..289109a1fab450 100644 --- a/spec/controllers/statuses_controller_spec.rb +++ b/spec/controllers/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesController do +RSpec.describe StatusesController do render_views describe 'GET #show' do diff --git a/spec/fabrication/fabricators_spec.rb b/spec/fabrication/fabricators_spec.rb index 2cf45041a4a80d..f7bb504543d239 100644 --- a/spec/fabrication/fabricators_spec.rb +++ b/spec/fabrication/fabricators_spec.rb @@ -5,7 +5,7 @@ Fabrication.manager.load_definitions if Fabrication.manager.empty? Fabrication.manager.schematics.map(&:first).each do |factory_name| - describe "The #{factory_name} factory" do + RSpec.describe "The #{factory_name} factory" do it 'is able to create valid records' do records = Fabricate.times(2, factory_name) # Create multiple of each to uncover uniqueness issues expect(records).to all(be_valid) diff --git a/spec/generators/post_deployment_migration_generator_spec.rb b/spec/generators/post_deployment_migration_generator_spec.rb index 55e70a7917032c..1aa8e0915c3d7a 100644 --- a/spec/generators/post_deployment_migration_generator_spec.rb +++ b/spec/generators/post_deployment_migration_generator_spec.rb @@ -6,7 +6,7 @@ require 'generators/post_deployment_migration/post_deployment_migration_generator' -describe PostDeploymentMigrationGenerator, type: :generator do +RSpec.describe PostDeploymentMigrationGenerator, type: :generator do include Rails::Generators::Testing::Behavior include Rails::Generators::Testing::Assertions include FileUtils diff --git a/spec/helpers/admin/dashboard_helper_spec.rb b/spec/helpers/admin/dashboard_helper_spec.rb index 59062e48396b9d..9c674fb4b9664d 100644 --- a/spec/helpers/admin/dashboard_helper_spec.rb +++ b/spec/helpers/admin/dashboard_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardHelper do +RSpec.describe Admin::DashboardHelper do describe 'relevant_account_timestamp' do context 'with an account with older sign in' do let(:account) { Fabricate(:account) } diff --git a/spec/helpers/admin/disputes_helper_spec.rb b/spec/helpers/admin/disputes_helper_spec.rb index 5f9a85df869140..a6ac021bd491bb 100644 --- a/spec/helpers/admin/disputes_helper_spec.rb +++ b/spec/helpers/admin/disputes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DisputesHelper do +RSpec.describe Admin::DisputesHelper do describe 'strike_action_label' do it 'returns html describing the appeal' do adam = Account.new(username: 'Adam') diff --git a/spec/helpers/admin/filter_helper_spec.rb b/spec/helpers/admin/filter_helper_spec.rb index 40ed63239f03a7..d07a6e1bb756c4 100644 --- a/spec/helpers/admin/filter_helper_spec.rb +++ b/spec/helpers/admin/filter_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FilterHelper do +RSpec.describe Admin::FilterHelper do it 'Uses filter_link_to to create filter links' do params = ActionController::Parameters.new( { test: 'test' } diff --git a/spec/helpers/admin/trends/statuses_helper_spec.rb b/spec/helpers/admin/trends/statuses_helper_spec.rb index 92caae6909960e..fa5c337e973643 100644 --- a/spec/helpers/admin/trends/statuses_helper_spec.rb +++ b/spec/helpers/admin/trends/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesHelper do +RSpec.describe Admin::Trends::StatusesHelper do describe '.one_line_preview' do before do allow(helper).to receive(:current_user).and_return(Fabricate.build(:user)) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index f37dc480c42fea..1ea5b573c9e803 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationHelper do +RSpec.describe ApplicationHelper do describe 'body_classes' do context 'with a body class string from a controller' do before { helper.extend controller_helpers } diff --git a/spec/helpers/flashes_helper_spec.rb b/spec/helpers/flashes_helper_spec.rb index a6a3b062d7ef28..aaef7ab1443e74 100644 --- a/spec/helpers/flashes_helper_spec.rb +++ b/spec/helpers/flashes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FlashesHelper do +RSpec.describe FlashesHelper do describe 'user_facing_flashes' do before do # rubocop:disable Rails/I18nLocaleTexts diff --git a/spec/helpers/formatting_helper_spec.rb b/spec/helpers/formatting_helper_spec.rb index d6e7631f66c1ee..136a609b1c9cf4 100644 --- a/spec/helpers/formatting_helper_spec.rb +++ b/spec/helpers/formatting_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FormattingHelper do +RSpec.describe FormattingHelper do include Devise::Test::ControllerHelpers describe '#rss_status_content_format' do diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb index 9a2d8841586e31..e7b15e6513cc7c 100644 --- a/spec/helpers/instance_helper_spec.rb +++ b/spec/helpers/instance_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstanceHelper do +RSpec.describe InstanceHelper do describe 'site_title' do it 'Uses the Setting.site_title value when it exists' do Setting.site_title = 'New site title' diff --git a/spec/helpers/json_ld_helper_spec.rb b/spec/helpers/json_ld_helper_spec.rb index f4b849d7a12b8c..d76c5167a7d9a3 100644 --- a/spec/helpers/json_ld_helper_spec.rb +++ b/spec/helpers/json_ld_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe JsonLdHelper do +RSpec.describe JsonLdHelper do describe '#equals_or_includes?' do it 'returns true when value equals' do expect(helper.equals_or_includes?('foo', 'foo')).to be true diff --git a/spec/helpers/languages_helper_spec.rb b/spec/helpers/languages_helper_spec.rb index 99461b293ba6f9..dd9b6004d1cf5b 100644 --- a/spec/helpers/languages_helper_spec.rb +++ b/spec/helpers/languages_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguagesHelper do +RSpec.describe LanguagesHelper do describe 'the SUPPORTED_LOCALES constant' do it 'includes all i18n locales' do expect(Set.new(described_class::SUPPORTED_LOCALES.keys + described_class::REGIONAL_LOCALE_NAMES.keys)).to include(*I18n.available_locales) diff --git a/spec/helpers/media_component_helper_spec.rb b/spec/helpers/media_component_helper_spec.rb index af5d92769ca249..ec87a707cb6e8e 100644 --- a/spec/helpers/media_component_helper_spec.rb +++ b/spec/helpers/media_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MediaComponentHelper do +RSpec.describe MediaComponentHelper do before { helper.extend controller_helpers } describe 'render_video_component' do diff --git a/spec/helpers/react_component_helper_spec.rb b/spec/helpers/react_component_helper_spec.rb index 28208b619bae0f..202694fbe4d8b0 100644 --- a/spec/helpers/react_component_helper_spec.rb +++ b/spec/helpers/react_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactComponentHelper do +RSpec.describe ReactComponentHelper do describe 'react_component' do context 'with no block passed in' do let(:result) { helper.react_component('name', { one: :two }) } diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb index ca447d8ce12633..ecff2edbfa159d 100644 --- a/spec/helpers/settings_helper_spec.rb +++ b/spec/helpers/settings_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SettingsHelper do +RSpec.describe SettingsHelper do describe 'session_device_icon' do context 'with a mobile device' do let(:session) { SessionActivation.new(user_agent: 'Mozilla/5.0 (iPhone)') } diff --git a/spec/helpers/statuses_helper_spec.rb b/spec/helpers/statuses_helper_spec.rb index 66eb996f996704..8809d0afaeb303 100644 --- a/spec/helpers/statuses_helper_spec.rb +++ b/spec/helpers/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesHelper do +RSpec.describe StatusesHelper do describe 'status_text_summary' do context 'with blank text' do let(:status) { Status.new(spoiler_text: '') } diff --git a/spec/helpers/theme_helper_spec.rb b/spec/helpers/theme_helper_spec.rb index aae1ae2a3b1afe..83a68f473982c4 100644 --- a/spec/helpers/theme_helper_spec.rb +++ b/spec/helpers/theme_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ThemeHelper do +RSpec.describe ThemeHelper do describe 'theme_style_tags' do let(:result) { helper.theme_style_tags(theme) } diff --git a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb index 2b14e6956c8d6c..c8683afda9e222 100644 --- a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceAccountsDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceAccountsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb index e4e9fbe2b7b0a8..c633041f9d40d8 100644 --- a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb index 9d8097069390cc..801b3d84dfc8cc 100644 --- a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::LanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::LanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb index 5661441d5d0c0f..d86ccd099a1af9 100644 --- a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::ServersDimension do +RSpec.describe Admin::Metrics::Dimension::ServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb index 5d31121ab3bd10..5b0fb902e015a9 100644 --- a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SoftwareVersionsDimension do +RSpec.describe Admin::Metrics::Dimension::SoftwareVersionsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb index 5fa5aa8af51730..ca7f716afd3e92 100644 --- a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SourcesDimension do +RSpec.describe Admin::Metrics::Dimension::SourcesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb index 96ff9c66dc7f55..4be5ed30ee1663 100644 --- a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SpaceUsageDimension do +RSpec.describe Admin::Metrics::Dimension::SpaceUsageDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb index c1dfd0eaf4eb2e..166edf92b0aac4 100644 --- a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::TagLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb index 025cf1b7ec7870..7391b5545624b5 100644 --- a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagServersDimension do +RSpec.describe Admin::Metrics::Dimension::TagServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension_spec.rb b/spec/lib/admin/metrics/dimension_spec.rb index 109250b72b73ff..0a52d442be92f2 100644 --- a/spec/lib/admin/metrics/dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension do +RSpec.describe Admin::Metrics::Dimension do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, 5, params) } diff --git a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb index 38ee14075b3e38..653e677354b8be 100644 --- a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ActiveUsersMeasure do +RSpec.describe Admin::Metrics::Measure::ActiveUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb index 0d2ad31c399a45..f974f2ca462d25 100644 --- a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb index 27bf30d17d5f49..643249fa4e23d2 100644 --- a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowersMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowersMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb index 9961ea56c42b1d..70f5004fefc277 100644 --- a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb index 3634450930656b..11f13b85bc17fa 100644 --- a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb index ca64049d9265bd..62c9dec464434c 100644 --- a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceReportsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb index ac28658ea07b67..0fc903a2a81cde 100644 --- a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceStatusesMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceStatusesMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb index ed333380cfbe9d..edbec2eabff630 100644 --- a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InteractionsMeasure do +RSpec.describe Admin::Metrics::Measure::InteractionsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb index 085acbcede811b..5c03b67a18c5d4 100644 --- a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::NewUsersMeasure do +RSpec.describe Admin::Metrics::Measure::NewUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb index d5ba78527ea2ac..f4d3a66454a297 100644 --- a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::OpenedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::OpenedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb index f7b497590d3df9..432dbbe79635de 100644 --- a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ResolvedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::ResolvedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb index b33ae7bb7106f3..577b1260ff044a 100644 --- a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::TagAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb index e1e2ced43a5802..42715e5adc78e0 100644 --- a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagServersMeasure do +RSpec.describe Admin::Metrics::Measure::TagServersMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb index dd66f00de05694..b258455dabbb21 100644 --- a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagUsesMeasure do +RSpec.describe Admin::Metrics::Measure::TagUsesMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure_spec.rb b/spec/lib/admin/metrics/measure_spec.rb index c9809b0f792d30..49a5aecc611cc4 100644 --- a/spec/lib/admin/metrics/measure_spec.rb +++ b/spec/lib/admin/metrics/measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure do +RSpec.describe Admin::Metrics::Measure do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, params) } diff --git a/spec/lib/admin/system_check/base_check_spec.rb b/spec/lib/admin/system_check/base_check_spec.rb index fdd9f6b6c44d5c..769e0e1d180ebe 100644 --- a/spec/lib/admin/system_check/base_check_spec.rb +++ b/spec/lib/admin/system_check/base_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::BaseCheck do +RSpec.describe Admin::SystemCheck::BaseCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/database_schema_check_spec.rb b/spec/lib/admin/system_check/database_schema_check_spec.rb index db1dcb52fa43e2..311d5249563ea2 100644 --- a/spec/lib/admin/system_check/database_schema_check_spec.rb +++ b/spec/lib/admin/system_check/database_schema_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::DatabaseSchemaCheck do +RSpec.describe Admin::SystemCheck::DatabaseSchemaCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/elasticsearch_check_spec.rb b/spec/lib/admin/system_check/elasticsearch_check_spec.rb index 8f210579d000ac..05d204c4530698 100644 --- a/spec/lib/admin/system_check/elasticsearch_check_spec.rb +++ b/spec/lib/admin/system_check/elasticsearch_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::ElasticsearchCheck do +RSpec.describe Admin::SystemCheck::ElasticsearchCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/media_privacy_check_spec.rb b/spec/lib/admin/system_check/media_privacy_check_spec.rb index 316bf121561f10..0d5bcdb3e87a6b 100644 --- a/spec/lib/admin/system_check/media_privacy_check_spec.rb +++ b/spec/lib/admin/system_check/media_privacy_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::MediaPrivacyCheck do +RSpec.describe Admin::SystemCheck::MediaPrivacyCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/message_spec.rb b/spec/lib/admin/system_check/message_spec.rb index c0671f34525ff5..81ef4f2f09d40f 100644 --- a/spec/lib/admin/system_check/message_spec.rb +++ b/spec/lib/admin/system_check/message_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::Message do +RSpec.describe Admin::SystemCheck::Message do subject(:check) { described_class.new(:key_value, :value_value, :action_value, :critical_value) } it 'providers readers when initialized' do diff --git a/spec/lib/admin/system_check/rules_check_spec.rb b/spec/lib/admin/system_check/rules_check_spec.rb index fb3293fb2d0615..32650d9cd8a410 100644 --- a/spec/lib/admin/system_check/rules_check_spec.rb +++ b/spec/lib/admin/system_check/rules_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::RulesCheck do +RSpec.describe Admin::SystemCheck::RulesCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb index 9bd9daddf6722f..992fd7aee0f378 100644 --- a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb +++ b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SidekiqProcessCheck do +RSpec.describe Admin::SystemCheck::SidekiqProcessCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/software_version_check_spec.rb b/spec/lib/admin/system_check/software_version_check_spec.rb index de4335fc519fc2..1affaa3a969d82 100644 --- a/spec/lib/admin/system_check/software_version_check_spec.rb +++ b/spec/lib/admin/system_check/software_version_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SoftwareVersionCheck do +RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do include RoutingHelper subject(:check) { described_class.new(user) } diff --git a/spec/lib/admin/system_check_spec.rb b/spec/lib/admin/system_check_spec.rb index 30048fd3ade0e0..92852ab025baa8 100644 --- a/spec/lib/admin/system_check_spec.rb +++ b/spec/lib/admin/system_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck do +RSpec.describe Admin::SystemCheck do let(:user) { Fabricate(:user) } describe 'perform' do diff --git a/spec/lib/annual_report_spec.rb b/spec/lib/annual_report_spec.rb index ffb742697b3f09..bd4d0f33876a06 100644 --- a/spec/lib/annual_report_spec.rb +++ b/spec/lib/annual_report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AnnualReport do +RSpec.describe AnnualReport do describe '#generate' do subject { described_class.new(account, Time.zone.now.year) } diff --git a/spec/lib/cache_buster_spec.rb b/spec/lib/cache_buster_spec.rb index 84085608e8544e..f7cff9c1c36050 100644 --- a/spec/lib/cache_buster_spec.rb +++ b/spec/lib/cache_buster_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBuster do +RSpec.describe CacheBuster do subject { described_class.new(secret_header: secret_header, secret: secret, http_method: http_method) } let(:secret_header) { nil } diff --git a/spec/lib/connection_pool/shared_connection_pool_spec.rb b/spec/lib/connection_pool/shared_connection_pool_spec.rb index a2fe75f742a78b..2352703b5a376c 100644 --- a/spec/lib/connection_pool/shared_connection_pool_spec.rb +++ b/spec/lib/connection_pool/shared_connection_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedConnectionPool do +RSpec.describe ConnectionPool::SharedConnectionPool do subject { described_class.new(size: 5, timeout: 5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/connection_pool/shared_timed_stack_spec.rb b/spec/lib/connection_pool/shared_timed_stack_spec.rb index 04d550eec57156..7469664ea0acb1 100644 --- a/spec/lib/connection_pool/shared_timed_stack_spec.rb +++ b/spec/lib/connection_pool/shared_timed_stack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedTimedStack do +RSpec.describe ConnectionPool::SharedTimedStack do subject { described_class.new(5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/content_security_policy_spec.rb b/spec/lib/content_security_policy_spec.rb index 27a3e8025731a3..5ecea6054310da 100644 --- a/spec/lib/content_security_policy_spec.rb +++ b/spec/lib/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ContentSecurityPolicy do +RSpec.describe ContentSecurityPolicy do subject { described_class.new } around do |example| diff --git a/spec/lib/delivery_failure_tracker_spec.rb b/spec/lib/delivery_failure_tracker_spec.rb index c8179ebd91cdea..40c8adc4c80620 100644 --- a/spec/lib/delivery_failure_tracker_spec.rb +++ b/spec/lib/delivery_failure_tracker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeliveryFailureTracker do +RSpec.describe DeliveryFailureTracker do subject { described_class.new('http://example.com/inbox') } describe '#track_success!' do diff --git a/spec/lib/extractor_spec.rb b/spec/lib/extractor_spec.rb index af5c62d4c8a3a9..bc3ee8ac496a2b 100644 --- a/spec/lib/extractor_spec.rb +++ b/spec/lib/extractor_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Extractor do +RSpec.describe Extractor do describe 'extract_mentions_or_lists_with_indices' do it 'returns an empty array if the given string does not have at signs' do text = 'a string without at signs' diff --git a/spec/lib/fast_ip_map_spec.rb b/spec/lib/fast_ip_map_spec.rb index 78b3ddb054258e..a3a647e3e3a35b 100644 --- a/spec/lib/fast_ip_map_spec.rb +++ b/spec/lib/fast_ip_map_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FastIpMap do +RSpec.describe FastIpMap do describe '#include?' do subject { described_class.new([IPAddr.new('20.4.0.0/16'), IPAddr.new('145.22.30.0/24'), IPAddr.new('189.45.86.3')]) } diff --git a/spec/lib/hashtag_normalizer_spec.rb b/spec/lib/hashtag_normalizer_spec.rb index fbb9f37c07076b..796445043a3b1f 100644 --- a/spec/lib/hashtag_normalizer_spec.rb +++ b/spec/lib/hashtag_normalizer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe HashtagNormalizer do +RSpec.describe HashtagNormalizer do subject { described_class.new } describe '#normalize' do diff --git a/spec/lib/importer/accounts_index_importer_spec.rb b/spec/lib/importer/accounts_index_importer_spec.rb index 73f9bce39914d9..a5d11c747ad256 100644 --- a/spec/lib/importer/accounts_index_importer_spec.rb +++ b/spec/lib/importer/accounts_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::AccountsIndexImporter do +RSpec.describe Importer::AccountsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/base_importer_spec.rb b/spec/lib/importer/base_importer_spec.rb index 78e9a869b8beed..0d12f975aa21c9 100644 --- a/spec/lib/importer/base_importer_spec.rb +++ b/spec/lib/importer/base_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::BaseImporter do +RSpec.describe Importer::BaseImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/public_statuses_index_importer_spec.rb b/spec/lib/importer/public_statuses_index_importer_spec.rb index bc7c038a97c5a8..2407717409bdfe 100644 --- a/spec/lib/importer/public_statuses_index_importer_spec.rb +++ b/spec/lib/importer/public_statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::PublicStatusesIndexImporter do +RSpec.describe Importer::PublicStatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/statuses_index_importer_spec.rb b/spec/lib/importer/statuses_index_importer_spec.rb index d5e1c9f2cb9a0f..f6fac3bd678fc5 100644 --- a/spec/lib/importer/statuses_index_importer_spec.rb +++ b/spec/lib/importer/statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::StatusesIndexImporter do +RSpec.describe Importer::StatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/tags_index_importer_spec.rb b/spec/lib/importer/tags_index_importer_spec.rb index 348990c01e8235..44de9e7c3459ad 100644 --- a/spec/lib/importer/tags_index_importer_spec.rb +++ b/spec/lib/importer/tags_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::TagsIndexImporter do +RSpec.describe Importer::TagsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb index 3988e0b0271836..f6cc28297a94cd 100644 --- a/spec/lib/mastodon/cli/accounts_spec.rb +++ b/spec/lib/mastodon/cli/accounts_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/accounts' -describe Mastodon::CLI::Accounts do +RSpec.describe Mastodon::CLI::Accounts do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/cache_spec.rb b/spec/lib/mastodon/cli/cache_spec.rb index 247a14f9e2713f..dc571238d21f33 100644 --- a/spec/lib/mastodon/cli/cache_spec.rb +++ b/spec/lib/mastodon/cli/cache_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/cache' -describe Mastodon::CLI::Cache do +RSpec.describe Mastodon::CLI::Cache do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb index 1745ea01bf3311..faa5ec7cb83f72 100644 --- a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb +++ b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/canonical_email_blocks' -describe Mastodon::CLI::CanonicalEmailBlocks do +RSpec.describe Mastodon::CLI::CanonicalEmailBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb index 448e6fe42b34e7..d1c26546f04dd9 100644 --- a/spec/lib/mastodon/cli/domains_spec.rb +++ b/spec/lib/mastodon/cli/domains_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/domains' -describe Mastodon::CLI::Domains do +RSpec.describe Mastodon::CLI::Domains do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb index 55e3da0bb89be7..a5fbd23e652a63 100644 --- a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb +++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/email_domain_blocks' -describe Mastodon::CLI::EmailDomainBlocks do +RSpec.describe Mastodon::CLI::EmailDomainBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb index d05e972e77c15a..4336db17d37472 100644 --- a/spec/lib/mastodon/cli/emoji_spec.rb +++ b/spec/lib/mastodon/cli/emoji_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/emoji' -describe Mastodon::CLI::Emoji do +RSpec.describe Mastodon::CLI::Emoji do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/feeds_spec.rb b/spec/lib/mastodon/cli/feeds_spec.rb index 420cb3d5872893..75a8cb3ebc6f56 100644 --- a/spec/lib/mastodon/cli/feeds_spec.rb +++ b/spec/lib/mastodon/cli/feeds_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/feeds' -describe Mastodon::CLI::Feeds do +RSpec.describe Mastodon::CLI::Feeds do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/ip_blocks_spec.rb b/spec/lib/mastodon/cli/ip_blocks_spec.rb index d44b1b9fe44e3e..68d6b198593c61 100644 --- a/spec/lib/mastodon/cli/ip_blocks_spec.rb +++ b/spec/lib/mastodon/cli/ip_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/ip_blocks' -describe Mastodon::CLI::IpBlocks do +RSpec.describe Mastodon::CLI::IpBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/main_spec.rb b/spec/lib/mastodon/cli/main_spec.rb index 99d770a81dd188..a63b798683c4d1 100644 --- a/spec/lib/mastodon/cli/main_spec.rb +++ b/spec/lib/mastodon/cli/main_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/main' -describe Mastodon::CLI::Main do +RSpec.describe Mastodon::CLI::Main do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/maintenance_spec.rb b/spec/lib/mastodon/cli/maintenance_spec.rb index cde25d39eda357..6a15677f43ab91 100644 --- a/spec/lib/mastodon/cli/maintenance_spec.rb +++ b/spec/lib/mastodon/cli/maintenance_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/maintenance' -describe Mastodon::CLI::Maintenance do +RSpec.describe Mastodon::CLI::Maintenance do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index ecc7101b6cf8c8..fa7a3161d09945 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/media' -describe Mastodon::CLI::Media do +RSpec.describe Mastodon::CLI::Media do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/preview_cards_spec.rb b/spec/lib/mastodon/cli/preview_cards_spec.rb index 951ae3758f0642..949787a7590fab 100644 --- a/spec/lib/mastodon/cli/preview_cards_spec.rb +++ b/spec/lib/mastodon/cli/preview_cards_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/preview_cards' -describe Mastodon::CLI::PreviewCards do +RSpec.describe Mastodon::CLI::PreviewCards do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/search_spec.rb b/spec/lib/mastodon/cli/search_spec.rb index ed3789c3e7d282..8a6c2492aa43d0 100644 --- a/spec/lib/mastodon/cli/search_spec.rb +++ b/spec/lib/mastodon/cli/search_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/search' -describe Mastodon::CLI::Search do +RSpec.describe Mastodon::CLI::Search do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/settings_spec.rb b/spec/lib/mastodon/cli/settings_spec.rb index e1b353eb90296d..5565b798ef9cd1 100644 --- a/spec/lib/mastodon/cli/settings_spec.rb +++ b/spec/lib/mastodon/cli/settings_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/settings' -describe Mastodon::CLI::Settings do +RSpec.describe Mastodon::CLI::Settings do it_behaves_like 'CLI Command' describe 'subcommand "registrations"' do diff --git a/spec/lib/mastodon/cli/statuses_spec.rb b/spec/lib/mastodon/cli/statuses_spec.rb index 161b7c02bbf64a..2597ad7f2741eb 100644 --- a/spec/lib/mastodon/cli/statuses_spec.rb +++ b/spec/lib/mastodon/cli/statuses_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/statuses' -describe Mastodon::CLI::Statuses do +RSpec.describe Mastodon::CLI::Statuses do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb index 6861e04887655f..6861e1a06854d1 100644 --- a/spec/lib/mastodon/cli/upgrade_spec.rb +++ b/spec/lib/mastodon/cli/upgrade_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/upgrade' -describe Mastodon::CLI::Upgrade do +RSpec.describe Mastodon::CLI::Upgrade do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/migration_warning_spec.rb b/spec/lib/mastodon/migration_warning_spec.rb index 4adf0837ab23d7..d796d1e90210ea 100644 --- a/spec/lib/mastodon/migration_warning_spec.rb +++ b/spec/lib/mastodon/migration_warning_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/migration_warning' -describe Mastodon::MigrationWarning do +RSpec.describe Mastodon::MigrationWarning do describe 'migration_duration_warning' do before do allow(migration).to receive(:valid_environment?).and_return(true) diff --git a/spec/lib/mastodon/redis_configuration_spec.rb b/spec/lib/mastodon/redis_configuration_spec.rb index c7326fd41175a4..a48ffc80e6c743 100644 --- a/spec/lib/mastodon/redis_configuration_spec.rb +++ b/spec/lib/mastodon/redis_configuration_spec.rb @@ -45,6 +45,20 @@ it 'uses the url from the base config' do expect(subject[:url]).to eq 'redis://localhost:6379/0' end + + context 'when the base config uses sentinel' do + around do |example| + ClimateControl.modify REDIS_SENTINELS: '192.168.0.1:3000,192.168.0.2:4000', REDIS_SENTINEL_MASTER: 'mainsentinel' do + example.run + end + end + + it 'uses the sentinel configuration from base config' do + expect(subject[:url]).to eq 'redis://mainsentinel/0' + expect(subject[:name]).to eq 'mainsentinel' + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 3000 }, { host: '192.168.0.2', port: 4000 }) + end + end end context "when the `#{prefix}_REDIS_URL` environment variable is present" do @@ -72,6 +86,39 @@ end end + shared_examples 'sentinel support' do |prefix = nil| + prefix = prefix ? "#{prefix}_" : '' + + context 'when configuring sentinel support' do + around do |example| + ClimateControl.modify "#{prefix}REDIS_PASSWORD": 'testpass1', "#{prefix}REDIS_HOST": 'redis2.example.com', "#{prefix}REDIS_SENTINELS": '192.168.0.1:3000,192.168.0.2:4000', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'constructs the url using the sentinel master name' do + expect(subject[:url]).to eq 'redis://:testpass1@mainsentinel/0' + end + + it 'includes the sentinel master name and list of sentinels' do + expect(subject[:name]).to eq 'mainsentinel' + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 3000 }, { host: '192.168.0.2', port: 4000 }) + end + end + + context 'when giving sentinels without port numbers' do + around do |example| + ClimateControl.modify "#{prefix}REDIS_SENTINELS": '192.168.0.1,192.168.0.2', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'uses the default sentinel port' do + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 26_379 }, { host: '192.168.0.2', port: 26_379 }) + end + end + end + describe '#base' do subject { redis_environment.base } @@ -81,6 +128,8 @@ url: 'redis://localhost:6379/0', driver: :hiredis, namespace: nil, + name: nil, + sentinels: nil, }) end end @@ -113,12 +162,15 @@ url: 'redis://:testpass@redis.example.com:3333/3', driver: :hiredis, namespace: nil, + name: nil, + sentinels: nil, }) end end include_examples 'setting a different driver' include_examples 'setting a namespace' + include_examples 'sentinel support' end describe '#sidekiq' do @@ -127,6 +179,7 @@ include_examples 'secondary configuration', 'SIDEKIQ' include_examples 'setting a different driver' include_examples 'setting a namespace' + include_examples 'sentinel support', 'SIDEKIQ' end describe '#cache' do @@ -139,6 +192,8 @@ namespace: 'cache', expires_in: 10.minutes, connect_timeout: 5, + name: nil, + sentinels: nil, pool: { size: 5, timeout: 5, @@ -166,5 +221,6 @@ include_examples 'secondary configuration', 'CACHE' include_examples 'setting a different driver' + include_examples 'sentinel support', 'CACHE' end end diff --git a/spec/lib/ostatus/tag_manager_spec.rb b/spec/lib/ostatus/tag_manager_spec.rb index 0e20f26c7c335a..f808b96289d436 100644 --- a/spec/lib/ostatus/tag_manager_spec.rb +++ b/spec/lib/ostatus/tag_manager_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OStatus::TagManager do +RSpec.describe OStatus::TagManager do describe '#unique_tag' do it 'returns a unique tag' do expect(described_class.instance.unique_tag(Time.utc(2000), 12, 'Status')).to eq 'tag:cb6e6126.ngrok.io,2000-01-01:objectId=12:objectType=Status' diff --git a/spec/lib/paperclip/response_with_limit_adapter_spec.rb b/spec/lib/paperclip/response_with_limit_adapter_spec.rb index baf8bf5bb72b59..3db52ffa0d85ad 100644 --- a/spec/lib/paperclip/response_with_limit_adapter_spec.rb +++ b/spec/lib/paperclip/response_with_limit_adapter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Paperclip::ResponseWithLimitAdapter do +RSpec.describe Paperclip::ResponseWithLimitAdapter do subject { described_class.new(response_with_limit) } before { stub_request(:get, url).to_return(headers: headers, body: body) } diff --git a/spec/lib/permalink_redirector_spec.rb b/spec/lib/permalink_redirector_spec.rb index a0091365616f67..3f77d7665a23d2 100644 --- a/spec/lib/permalink_redirector_spec.rb +++ b/spec/lib/permalink_redirector_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PermalinkRedirector do +RSpec.describe PermalinkRedirector do let(:remote_account) { Fabricate(:account, username: 'alice', domain: 'example.com', url: 'https://example.com/@alice', id: 2) } describe '#redirect_url' do diff --git a/spec/lib/request_pool_spec.rb b/spec/lib/request_pool_spec.rb index a82eb5a188c0d9..2e8c785de8b3e6 100644 --- a/spec/lib/request_pool_spec.rb +++ b/spec/lib/request_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RequestPool do +RSpec.describe RequestPool do subject { described_class.new } describe '#with' do diff --git a/spec/lib/request_spec.rb b/spec/lib/request_spec.rb index c99f18838ba432..c600a48ee24e3a 100644 --- a/spec/lib/request_spec.rb +++ b/spec/lib/request_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'securerandom' -describe Request do +RSpec.describe Request do subject { described_class.new(:get, 'http://example.com') } describe '#headers' do diff --git a/spec/lib/sanitize/config_spec.rb b/spec/lib/sanitize/config_spec.rb index a1e39153e62138..c2008544f50e95 100644 --- a/spec/lib/sanitize/config_spec.rb +++ b/spec/lib/sanitize/config_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Sanitize::Config do +RSpec.describe Sanitize::Config do shared_examples 'common HTML sanitization' do it 'keeps h1' do expect(Sanitize.fragment('

Foo

', subject)).to eq '

Foo

' diff --git a/spec/lib/scope_transformer_spec.rb b/spec/lib/scope_transformer_spec.rb index 7bc226e94f7a0e..09a31e04c57f32 100644 --- a/spec/lib/scope_transformer_spec.rb +++ b/spec/lib/scope_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ScopeTransformer do +RSpec.describe ScopeTransformer do describe '#apply' do subject { described_class.new.apply(ScopeParser.new.parse(input)) } diff --git a/spec/lib/search_query_parser_spec.rb b/spec/lib/search_query_parser_spec.rb index 66b0e8f9e2367b..22149b34028842 100644 --- a/spec/lib/search_query_parser_spec.rb +++ b/spec/lib/search_query_parser_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'parslet/rig/rspec' -describe SearchQueryParser do +RSpec.describe SearchQueryParser do let(:parser) { described_class.new } context 'with term' do diff --git a/spec/lib/search_query_transformer_spec.rb b/spec/lib/search_query_transformer_spec.rb index 5817e3d1d2015c..00220f84fd2225 100644 --- a/spec/lib/search_query_transformer_spec.rb +++ b/spec/lib/search_query_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchQueryTransformer do +RSpec.describe SearchQueryTransformer do subject { described_class.new.apply(parser, current_account: account) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_cache_hydrator_spec.rb b/spec/lib/status_cache_hydrator_spec.rb index 5b80ccb97080fa..958e2f62d74ede 100644 --- a/spec/lib/status_cache_hydrator_spec.rb +++ b/spec/lib/status_cache_hydrator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusCacheHydrator do +RSpec.describe StatusCacheHydrator do let(:status) { Fabricate(:status) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_filter_spec.rb b/spec/lib/status_filter_spec.rb index cf6f3c79592c40..16c2e84f229006 100644 --- a/spec/lib/status_filter_spec.rb +++ b/spec/lib/status_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFilter do +RSpec.describe StatusFilter do describe '#filtered?' do let(:status) { Fabricate(:status) } diff --git a/spec/lib/status_finder_spec.rb b/spec/lib/status_finder_spec.rb index 53f5039af97838..4d1c27afff8f11 100644 --- a/spec/lib/status_finder_spec.rb +++ b/spec/lib/status_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFinder do +RSpec.describe StatusFinder do include RoutingHelper describe '#status' do diff --git a/spec/lib/status_reach_finder_spec.rb b/spec/lib/status_reach_finder_spec.rb index 7181717dc11e58..c045980ea9db80 100644 --- a/spec/lib/status_reach_finder_spec.rb +++ b/spec/lib/status_reach_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusReachFinder do +RSpec.describe StatusReachFinder do describe '#inboxes' do context 'with a local status' do subject { described_class.new(status) } diff --git a/spec/lib/webfinger_resource_spec.rb b/spec/lib/webfinger_resource_spec.rb index 442f91aad02095..0b86b41c481db3 100644 --- a/spec/lib/webfinger_resource_spec.rb +++ b/spec/lib/webfinger_resource_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe WebfingerResource do +RSpec.describe WebfingerResource do around do |example| before_local = Rails.configuration.x.local_domain before_web = Rails.configuration.x.web_domain diff --git a/spec/lib/webhooks/payload_renderer_spec.rb b/spec/lib/webhooks/payload_renderer_spec.rb index 074847c74c569b..0623edd25475d4 100644 --- a/spec/lib/webhooks/payload_renderer_spec.rb +++ b/spec/lib/webhooks/payload_renderer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::PayloadRenderer do +RSpec.describe Webhooks::PayloadRenderer do subject(:renderer) { described_class.new(json) } let(:event) { Webhooks::EventPresenter.new(type, object) } diff --git a/spec/locales/i18n_spec.rb b/spec/locales/i18n_spec.rb index cfce8e2234b4ef..8facf6612c07d1 100644 --- a/spec/locales/i18n_spec.rb +++ b/spec/locales/i18n_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'I18n' do +RSpec.describe 'I18n' do describe 'Pluralizing locale translations' do subject { I18n.t('generic.validation_errors', count: 1) } diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 5a8c293740bdbd..0257465817418e 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserMailer do +RSpec.describe UserMailer do let(:receiver) { Fabricate(:user) } describe '#confirmation_instructions' do diff --git a/spec/models/account_alias_spec.rb b/spec/models/account_alias_spec.rb new file mode 100644 index 00000000000000..fc8c6bd250efde --- /dev/null +++ b/spec/models/account_alias_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe AccountAlias do + describe 'Normalizations' do + describe 'acct' do + it { is_expected.to normalize(:acct).from(' @username@domain ').to('username@domain') } + end + end +end diff --git a/spec/models/account_filter_spec.rb b/spec/models/account_filter_spec.rb index fa47b5954a8e31..5cb7fa92d44b4d 100644 --- a/spec/models/account_filter_spec.rb +++ b/spec/models/account_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountFilter do +RSpec.describe AccountFilter do describe 'with empty params' do it 'excludes instance actor by default' do filter = described_class.new({}) diff --git a/spec/models/account_migration_spec.rb b/spec/models/account_migration_spec.rb index 1f32c6082ef00b..d658915ce3c4e6 100644 --- a/spec/models/account_migration_spec.rb +++ b/spec/models/account_migration_spec.rb @@ -3,6 +3,12 @@ require 'rails_helper' RSpec.describe AccountMigration do + describe 'Normalizations' do + describe 'acct' do + it { is_expected.to normalize(:acct).from(' @username@domain ').to('username@domain') } + end + end + describe 'validations' do subject { described_class.new(account: source_account, acct: target_acct) } diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 83f1585b612f2d..27707fa897e3d1 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -723,14 +723,15 @@ end end + describe 'Normalizations' do + describe 'username' do + it { is_expected.to normalize(:username).from(" \u3000bob \t \u00a0 \n ").to('bob') } + end + end + describe 'validations' do it { is_expected.to validate_presence_of(:username) } - it 'squishes the username before validation' do - account = Fabricate(:account, domain: nil, username: " \u3000bob \t \u00a0 \n ") - expect(account.username).to eq 'bob' - end - context 'when is local' do it 'is invalid if the username is not unique in case-insensitive comparison among local accounts' do _account = Fabricate(:account, username: 'the_doctor') diff --git a/spec/models/account_warning_preset_spec.rb b/spec/models/account_warning_preset_spec.rb index f171df7c974ea6..e7a98551751373 100644 --- a/spec/models/account_warning_preset_spec.rb +++ b/spec/models/account_warning_preset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountWarningPreset do +RSpec.describe AccountWarningPreset do describe 'alphabetical' do let(:first) { Fabricate(:account_warning_preset, title: 'aaa', text: 'aaa') } let(:second) { Fabricate(:account_warning_preset, title: 'bbb', text: 'aaa') } diff --git a/spec/models/account_warning_spec.rb b/spec/models/account_warning_spec.rb new file mode 100644 index 00000000000000..37866ce3da95f6 --- /dev/null +++ b/spec/models/account_warning_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe AccountWarning do + describe 'Normalizations' do + describe 'text' do + it { is_expected.to normalize(:text).from(nil).to('') } + end + end +end diff --git a/spec/models/admin/appeal_filter_spec.rb b/spec/models/admin/appeal_filter_spec.rb index e840bc3bc12575..8303e58ad6311c 100644 --- a/spec/models/admin/appeal_filter_spec.rb +++ b/spec/models/admin/appeal_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AppealFilter do +RSpec.describe Admin::AppealFilter do describe '#results' do let(:approved_appeal) { Fabricate(:appeal, approved_at: 10.days.ago) } let(:not_approved_appeal) { Fabricate(:appeal, approved_at: nil) } diff --git a/spec/models/admin/tag_filter_spec.rb b/spec/models/admin/tag_filter_spec.rb index 21dc28affb3209..1baae117b87701 100644 --- a/spec/models/admin/tag_filter_spec.rb +++ b/spec/models/admin/tag_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::TagFilter do +RSpec.describe Admin::TagFilter do describe 'with invalid params' do it 'raises with key error' do filter = described_class.new(wrong: true) diff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rb index 1e7283ca77090f..e3865e6fc7ff50 100644 --- a/spec/models/announcement_spec.rb +++ b/spec/models/announcement_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Announcement do +RSpec.describe Announcement do describe 'Scopes' do context 'with published and unpublished records' do let!(:published) { Fabricate(:announcement, published: true) } diff --git a/spec/models/appeal_spec.rb b/spec/models/appeal_spec.rb index 13ca3a2d901ae5..7e324582ed5d37 100644 --- a/spec/models/appeal_spec.rb +++ b/spec/models/appeal_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Appeal do +RSpec.describe Appeal do describe 'Validations' do it 'validates text length is under limit' do appeal = Fabricate.build( diff --git a/spec/models/concerns/account/counters_spec.rb b/spec/models/concerns/account/counters_spec.rb index ccac9e95de6712..bbbaa7d06c9402 100644 --- a/spec/models/concerns/account/counters_spec.rb +++ b/spec/models/concerns/account/counters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Counters do +RSpec.describe Account::Counters do let!(:account) { Fabricate(:account) } describe '#increment_count!' do diff --git a/spec/models/concerns/account/finder_concern_spec.rb b/spec/models/concerns/account/finder_concern_spec.rb index ab5149e987ff15..b3fae56dfc51e8 100644 --- a/spec/models/concerns/account/finder_concern_spec.rb +++ b/spec/models/concerns/account/finder_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::FinderConcern do +RSpec.describe Account::FinderConcern do describe 'local finders' do let!(:account) { Fabricate(:account, username: 'Alice') } diff --git a/spec/models/concerns/account/interactions_spec.rb b/spec/models/concerns/account/interactions_spec.rb index 798a8672da1d86..68f334cdbad4cf 100644 --- a/spec/models/concerns/account/interactions_spec.rb +++ b/spec/models/concerns/account/interactions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Interactions do +RSpec.describe Account::Interactions do let(:account) { Fabricate(:account, username: 'account') } let(:account_id) { account.id } let(:account_ids) { [account_id] } diff --git a/spec/models/concerns/account/statuses_search_spec.rb b/spec/models/concerns/account/statuses_search_spec.rb index ab249d62d0756a..9488d42021c882 100644 --- a/spec/models/concerns/account/statuses_search_spec.rb +++ b/spec/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch do +RSpec.describe Account::StatusesSearch do let(:account) { Fabricate(:account, indexable: indexable) } before do diff --git a/spec/models/concerns/status/threading_concern_spec.rb b/spec/models/concerns/status/threading_concern_spec.rb index 09fb21856618a1..a13487c10a3514 100644 --- a/spec/models/concerns/status/threading_concern_spec.rb +++ b/spec/models/concerns/status/threading_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Status::ThreadingConcern do +RSpec.describe Status::ThreadingConcern do describe '#ancestors' do let!(:alice) { Fabricate(:account, username: 'alice') } let!(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com') } diff --git a/spec/models/custom_emoji_category_spec.rb b/spec/models/custom_emoji_category_spec.rb index 30de07bd81c7fb..3da77344e26721 100644 --- a/spec/models/custom_emoji_category_spec.rb +++ b/spec/models/custom_emoji_category_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CustomEmojiCategory do +RSpec.describe CustomEmojiCategory do describe 'validations' do it 'validates name presence' do record = described_class.new(name: nil) diff --git a/spec/models/custom_emoji_spec.rb b/spec/models/custom_emoji_spec.rb index cb8cb5c11bd67e..87b111441a1df3 100644 --- a/spec/models/custom_emoji_spec.rb +++ b/spec/models/custom_emoji_spec.rb @@ -79,22 +79,9 @@ end describe 'Normalizations' do - describe 'downcase domain value' do - context 'with a mixed case domain value' do - it 'normalizes the value to downcased' do - custom_emoji = Fabricate.build(:custom_emoji, domain: 'wWw.MaStOdOn.CoM') - - expect(custom_emoji.domain).to eq('www.mastodon.com') - end - end - - context 'with a nil domain value' do - it 'leaves the value as nil' do - custom_emoji = Fabricate.build(:custom_emoji, domain: nil) - - expect(custom_emoji.domain).to be_nil - end - end + describe 'domain' do + it { is_expected.to normalize(:domain).from('wWw.MaStOdOn.CoM').to('www.mastodon.com') } + it { is_expected.to normalize(:domain).from(nil).to(nil) } end end end diff --git a/spec/models/custom_filter_spec.rb b/spec/models/custom_filter_spec.rb index 8ac9dbb896434e..5bb615bb37f68e 100644 --- a/spec/models/custom_filter_spec.rb +++ b/spec/models/custom_filter_spec.rb @@ -34,10 +34,8 @@ end describe 'Normalizations' do - it 'cleans up context values' do - record = described_class.new(context: ['home', 'notifications', 'public ', '']) - - expect(record.context).to eq(%w(home notifications public)) + describe 'context' do + it { is_expected.to normalize(:context).from(['home', 'notifications', 'public ', '']).to(%w(home notifications public)) } end end end diff --git a/spec/models/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 12504211a1f19d..92f1ef8ccf3308 100644 --- a/spec/models/domain_allow_spec.rb +++ b/spec/models/domain_allow_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainAllow do +RSpec.describe DomainAllow do describe 'Validations' do it 'is invalid without a domain' do domain_allow = Fabricate.build(:domain_allow, domain: nil) diff --git a/spec/models/export_spec.rb b/spec/models/export_spec.rb index 75468898d2739c..06bf07ed78a314 100644 --- a/spec/models/export_spec.rb +++ b/spec/models/export_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Export do +RSpec.describe Export do let(:account) { Fabricate(:account) } let(:target_accounts) do [{}, { username: 'one', domain: 'local.host' }].map(&method(:Fabricate).curry(2).call(:account)) diff --git a/spec/models/extended_description_spec.rb b/spec/models/extended_description_spec.rb index ecc27c0f6dd2a3..368ca33f5b1290 100644 --- a/spec/models/extended_description_spec.rb +++ b/spec/models/extended_description_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExtendedDescription do +RSpec.describe ExtendedDescription do describe '.current' do context 'with the default values' do it 'makes a new instance' do diff --git a/spec/models/featured_tag_spec.rb b/spec/models/featured_tag_spec.rb new file mode 100644 index 00000000000000..6056e645e05b2b --- /dev/null +++ b/spec/models/featured_tag_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe FeaturedTag do + describe 'Normalizations' do + describe 'name' do + it { is_expected.to normalize(:name).from(' #hashtag ').to('hashtag') } + end + end +end diff --git a/spec/models/form/admin_settings_spec.rb b/spec/models/form/admin_settings_spec.rb index 0dc2d881ad2fce..6080b9e081d39e 100644 --- a/spec/models/form/admin_settings_spec.rb +++ b/spec/models/form/admin_settings_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::AdminSettings do +RSpec.describe Form::AdminSettings do describe 'validations' do describe 'site_contact_username' do context 'with no accounts' do diff --git a/spec/models/form/custom_emoji_batch_spec.rb b/spec/models/form/custom_emoji_batch_spec.rb index abeada5d507984..180c6abd23c353 100644 --- a/spec/models/form/custom_emoji_batch_spec.rb +++ b/spec/models/form/custom_emoji_batch_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::CustomEmojiBatch do +RSpec.describe Form::CustomEmojiBatch do describe '#save' do subject { described_class.new({ current_account: account }.merge(options)) } diff --git a/spec/models/form/status_filter_batch_action_spec.rb b/spec/models/form/status_filter_batch_action_spec.rb index f06a11cc8b0320..8ea9d7545e8c2f 100644 --- a/spec/models/form/status_filter_batch_action_spec.rb +++ b/spec/models/form/status_filter_batch_action_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::StatusFilterBatchAction do +RSpec.describe Form::StatusFilterBatchAction do describe '#save!' do it 'does nothing if status_filter_ids is empty' do batch_action = described_class.new(status_filter_ids: []) diff --git a/spec/models/ip_block_spec.rb b/spec/models/ip_block_spec.rb index 290b99b28842b6..6f1eb38425c7d4 100644 --- a/spec/models/ip_block_spec.rb +++ b/spec/models/ip_block_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe IpBlock do +RSpec.describe IpBlock do describe 'validations' do it 'validates ip presence', :aggregate_failures do ip_block = described_class.new(ip: nil, severity: :no_access) diff --git a/spec/models/marker_spec.rb b/spec/models/marker_spec.rb index 51dd584388dfca..8339f8e259b150 100644 --- a/spec/models/marker_spec.rb +++ b/spec/models/marker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Marker do +RSpec.describe Marker do describe 'validations' do describe 'timeline' do it 'must be included in valid list' do diff --git a/spec/models/one_time_key_spec.rb b/spec/models/one_time_key_spec.rb index 6ff7ffc5c148e3..17fcdf37883987 100644 --- a/spec/models/one_time_key_spec.rb +++ b/spec/models/one_time_key_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OneTimeKey do +RSpec.describe OneTimeKey do describe 'validations' do context 'with an invalid signature' do let(:one_time_key) { Fabricate.build(:one_time_key, signature: 'wrong!') } diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb index ebcc459078b88c..740ef63d81aaf0 100644 --- a/spec/models/poll_spec.rb +++ b/spec/models/poll_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Poll do +RSpec.describe Poll do describe 'scopes' do let(:status) { Fabricate(:status) } let(:attached_poll) { Fabricate(:poll, status: status) } diff --git a/spec/models/preview_card_provider_spec.rb b/spec/models/preview_card_provider_spec.rb index 8b18b3d2b71237..12bca83440f126 100644 --- a/spec/models/preview_card_provider_spec.rb +++ b/spec/models/preview_card_provider_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCardProvider do +RSpec.describe PreviewCardProvider do include_examples 'Reviewable' describe 'scopes' do diff --git a/spec/models/preview_card_spec.rb b/spec/models/preview_card_spec.rb index a17c7532e9eeb3..2f0ea38ee450ef 100644 --- a/spec/models/preview_card_spec.rb +++ b/spec/models/preview_card_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCard do +RSpec.describe PreviewCard do describe 'validations' do describe 'urls' do it 'allows http schemes' do diff --git a/spec/models/privacy_policy_spec.rb b/spec/models/privacy_policy_spec.rb index 03bbe7264b6ee9..742cac8e185691 100644 --- a/spec/models/privacy_policy_spec.rb +++ b/spec/models/privacy_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PrivacyPolicy do +RSpec.describe PrivacyPolicy do describe '.current' do context 'with the default values' do it 'has the privacy text' do diff --git a/spec/models/relationship_filter_spec.rb b/spec/models/relationship_filter_spec.rb index fccd42aaad0622..b56da91f8d6acc 100644 --- a/spec/models/relationship_filter_spec.rb +++ b/spec/models/relationship_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipFilter do +RSpec.describe RelationshipFilter do let(:account) { Fabricate(:account) } describe '#results' do diff --git a/spec/models/relay_spec.rb b/spec/models/relay_spec.rb new file mode 100644 index 00000000000000..4b95c596e4566b --- /dev/null +++ b/spec/models/relay_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Relay do + describe 'Normalizations' do + describe 'inbox_url' do + it { is_expected.to normalize(:inbox_url).from(' http://host.example ').to('http://host.example') } + end + end +end diff --git a/spec/models/report_filter_spec.rb b/spec/models/report_filter_spec.rb index 6baf0ea421c54e..8668eb3d1085e8 100644 --- a/spec/models/report_filter_spec.rb +++ b/spec/models/report_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReportFilter do +RSpec.describe ReportFilter do describe 'with empty params' do it 'defaults to unresolved reports list' do filter = described_class.new({}) diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index d01d37bd8bba0e..a0e4f6fafd5e71 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Report do +RSpec.describe Report do describe 'statuses' do it 'returns the statuses for the report' do status = Fabricate(:status) diff --git a/spec/models/rule_spec.rb b/spec/models/rule_spec.rb index c9b9c55028f366..375483e0dbbafb 100644 --- a/spec/models/rule_spec.rb +++ b/spec/models/rule_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rule do +RSpec.describe Rule do describe 'scopes' do describe 'ordered' do let(:deleted_rule) { Fabricate(:rule, deleted_at: 10.days.ago) } diff --git a/spec/models/status_edit_spec.rb b/spec/models/status_edit_spec.rb index 2d3351452258bc..7a469b44dc80b7 100644 --- a/spec/models/status_edit_spec.rb +++ b/spec/models/status_edit_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusEdit do +RSpec.describe StatusEdit do describe '#reblog?' do it 'returns false' do record = described_class.new diff --git a/spec/models/tag_feed_spec.rb b/spec/models/tag_feed_spec.rb index 82d5af0f029c70..939b9f3e82e30e 100644 --- a/spec/models/tag_feed_spec.rb +++ b/spec/models/tag_feed_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagFeed do +RSpec.describe TagFeed do describe '#get' do let(:account) { Fabricate(:account) } let(:tag_cats) { Fabricate(:tag, name: 'cats') } diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0f3e25576ee688..5c2af4dc396902 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -59,45 +59,18 @@ describe 'Normalizations' do describe 'locale' do - it 'preserves valid locale' do - user = Fabricate.build(:user, locale: 'en') - - expect(user.locale).to eq('en') - end - - it 'cleans out invalid locale' do - user = Fabricate.build(:user, locale: 'toto') - - expect(user.locale).to be_nil - end + it { is_expected.to_not normalize(:locale).from('en') } + it { is_expected.to normalize(:locale).from('toto').to(nil) } end describe 'time_zone' do - it 'preserves valid timezone' do - user = Fabricate.build(:user, time_zone: 'UTC') - - expect(user.time_zone).to eq('UTC') - end - - it 'cleans out invalid timezone' do - user = Fabricate.build(:user, time_zone: 'toto') - - expect(user.time_zone).to be_nil - end + it { is_expected.to_not normalize(:time_zone).from('UTC') } + it { is_expected.to normalize(:time_zone).from('toto').to(nil) } end - describe 'languages' do - it 'preserves valid options for languages' do - user = Fabricate.build(:user, chosen_languages: ['en', 'fr', '']) - - expect(user.chosen_languages).to eq(['en', 'fr']) - end - - it 'cleans out empty string from languages' do - user = Fabricate.build(:user, chosen_languages: ['']) - - expect(user.chosen_languages).to be_nil - end + describe 'chosen_languages' do + it { is_expected.to normalize(:chosen_languages).from(['en', 'fr', '']).to(%w(en fr)) } + it { is_expected.to normalize(:chosen_languages).from(['']).to(nil) } end end diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb index 864baf2e1aebfb..1b2d803bd75ed0 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -29,10 +29,8 @@ end describe 'Normalizations' do - it 'cleans up events values' do - record = described_class.new(events: ['account.approved', 'account.created ', '']) - - expect(record.events).to eq(%w(account.approved account.created)) + describe 'events' do + it { is_expected.to normalize(:events).from(['account.approved', 'account.created ', '']).to(%w(account.approved account.created)) } end end diff --git a/spec/policies/account_warning_preset_policy_spec.rb b/spec/policies/account_warning_preset_policy_spec.rb index 63bf33de249948..53e224f19f7f00 100644 --- a/spec/policies/account_warning_preset_policy_spec.rb +++ b/spec/policies/account_warning_preset_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AccountWarningPresetPolicy do +RSpec.describe AccountWarningPresetPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/admin/status_policy_spec.rb b/spec/policies/admin/status_policy_spec.rb index af9f7716be382c..07af425516d93b 100644 --- a/spec/policies/admin/status_policy_spec.rb +++ b/spec/policies/admin/status_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe Admin::StatusPolicy do +RSpec.describe Admin::StatusPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/announcement_policy_spec.rb b/spec/policies/announcement_policy_spec.rb index 3d230b3cb46179..503ffca6dca518 100644 --- a/spec/policies/announcement_policy_spec.rb +++ b/spec/policies/announcement_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AnnouncementPolicy do +RSpec.describe AnnouncementPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/appeal_policy_spec.rb b/spec/policies/appeal_policy_spec.rb index d7498eb9f09eae..1bf8ce0a0da0e6 100644 --- a/spec/policies/appeal_policy_spec.rb +++ b/spec/policies/appeal_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AppealPolicy do +RSpec.describe AppealPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/canonical_email_block_policy_spec.rb b/spec/policies/canonical_email_block_policy_spec.rb index 0e55febfa90fa4..f5029d9e6b60e8 100644 --- a/spec/policies/canonical_email_block_policy_spec.rb +++ b/spec/policies/canonical_email_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe CanonicalEmailBlockPolicy do +RSpec.describe CanonicalEmailBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/delivery_policy_spec.rb b/spec/policies/delivery_policy_spec.rb index fbcbf390d73312..bb82389eec8a47 100644 --- a/spec/policies/delivery_policy_spec.rb +++ b/spec/policies/delivery_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe DeliveryPolicy do +RSpec.describe DeliveryPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/follow_recommendation_policy_spec.rb b/spec/policies/follow_recommendation_policy_spec.rb index 01f4da0be2929e..ae74d5c3a862ab 100644 --- a/spec/policies/follow_recommendation_policy_spec.rb +++ b/spec/policies/follow_recommendation_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe FollowRecommendationPolicy do +RSpec.describe FollowRecommendationPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/ip_block_policy_spec.rb b/spec/policies/ip_block_policy_spec.rb index 3cfa85863ca7fe..97bc239e9ac91e 100644 --- a/spec/policies/ip_block_policy_spec.rb +++ b/spec/policies/ip_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe IpBlockPolicy do +RSpec.describe IpBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_policy_spec.rb b/spec/policies/preview_card_policy_spec.rb index d6675c5b341ad2..a1944303e17ffc 100644 --- a/spec/policies/preview_card_policy_spec.rb +++ b/spec/policies/preview_card_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardPolicy do +RSpec.describe PreviewCardPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_provider_policy_spec.rb b/spec/policies/preview_card_provider_policy_spec.rb index 8d3715de9552ff..676039a1b79a97 100644 --- a/spec/policies/preview_card_provider_policy_spec.rb +++ b/spec/policies/preview_card_provider_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardProviderPolicy do +RSpec.describe PreviewCardProviderPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/rule_policy_spec.rb b/spec/policies/rule_policy_spec.rb index 0e45f6df02f9da..5d435e38c1fe33 100644 --- a/spec/policies/rule_policy_spec.rb +++ b/spec/policies/rule_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe RulePolicy do +RSpec.describe RulePolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/webhook_policy_spec.rb b/spec/policies/webhook_policy_spec.rb index 909311461a842f..96aaae2c306726 100644 --- a/spec/policies/webhook_policy_spec.rb +++ b/spec/policies/webhook_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe WebhookPolicy do +RSpec.describe WebhookPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/presenters/instance_presenter_spec.rb b/spec/presenters/instance_presenter_spec.rb index 3e8a2c9f7adf5d..9ac8f08b164e4e 100644 --- a/spec/presenters/instance_presenter_spec.rb +++ b/spec/presenters/instance_presenter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstancePresenter do +RSpec.describe InstancePresenter do let(:instance_presenter) { described_class.new } describe '#description' do diff --git a/spec/requests/account_show_page_spec.rb b/spec/requests/account_show_page_spec.rb index bdcec12fdb5a59..d0857c8980ec3e 100644 --- a/spec/requests/account_show_page_spec.rb +++ b/spec/requests/account_show_page_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The account show page' do +RSpec.describe 'The account show page' do it 'has valid opengraph tags' do alice = Fabricate(:account, username: 'alice', display_name: 'Alice') _status = Fabricate(:status, account: alice, text: 'Hello World') diff --git a/spec/requests/accounts_spec.rb b/spec/requests/accounts_spec.rb index 238524c75c7ec1..d53816eff0632d 100644 --- a/spec/requests/accounts_spec.rb +++ b/spec/requests/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts show response' do +RSpec.describe 'Accounts show response' do let(:account) { Fabricate(:account) } context 'with an unapproved account' do diff --git a/spec/requests/anonymous_cookies_spec.rb b/spec/requests/anonymous_cookies_spec.rb index 337ed4ec31cd28..235dd46a63dcd7 100644 --- a/spec/requests/anonymous_cookies_spec.rb +++ b/spec/requests/anonymous_cookies_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Anonymous visits' do +RSpec.describe 'Anonymous visits' do around do |example| old = ActionController::Base.allow_forgery_protection ActionController::Base.allow_forgery_protection = true diff --git a/spec/requests/api/v1/accounts/familiar_followers_spec.rb b/spec/requests/api/v1/accounts/familiar_followers_spec.rb index fdc0a3a9323e1a..475f1b17e4add0 100644 --- a/spec/requests/api/v1/accounts/familiar_followers_spec.rb +++ b/spec/requests/api/v1/accounts/familiar_followers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Familiar Followers API' do +RSpec.describe 'Accounts Familiar Followers API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/accounts/follower_accounts_spec.rb b/spec/requests/api/v1/accounts/follower_accounts_spec.rb index 7ff92d6a4809c5..400b1c7aff1c85 100644 --- a/spec/requests/api/v1/accounts/follower_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/follower_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowerAccounts' do +RSpec.describe 'API V1 Accounts FollowerAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/following_accounts_spec.rb b/spec/requests/api/v1/accounts/following_accounts_spec.rb index b343a48654cd22..b0bb5141ca2799 100644 --- a/spec/requests/api/v1/accounts/following_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowingAccounts' do +RSpec.describe 'API V1 Accounts FollowingAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/identity_proofs_spec.rb b/spec/requests/api/v1/accounts/identity_proofs_spec.rb index 3727af7e8931bb..d1d9db8e737973 100644 --- a/spec/requests/api/v1/accounts/identity_proofs_spec.rb +++ b/spec/requests/api/v1/accounts/identity_proofs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Identity Proofs API' do +RSpec.describe 'Accounts Identity Proofs API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/lists_spec.rb b/spec/requests/api/v1/accounts/lists_spec.rb index 48c0337e5497cf..8b04f07f652519 100644 --- a/spec/requests/api/v1/accounts/lists_spec.rb +++ b/spec/requests/api/v1/accounts/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lists API' do +RSpec.describe 'Accounts Lists API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:lists' } diff --git a/spec/requests/api/v1/accounts/lookup_spec.rb b/spec/requests/api/v1/accounts/lookup_spec.rb index 4c022c7c1316fe..dfd9fad49d8a96 100644 --- a/spec/requests/api/v1/accounts/lookup_spec.rb +++ b/spec/requests/api/v1/accounts/lookup_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lookup API' do +RSpec.describe 'Accounts Lookup API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/notes_spec.rb b/spec/requests/api/v1/accounts/notes_spec.rb index 4f3ac68c7479c8..b8c493abcc96d0 100644 --- a/spec/requests/api/v1/accounts/notes_spec.rb +++ b/spec/requests/api/v1/accounts/notes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Notes API' do +RSpec.describe 'Accounts Notes API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/pins_spec.rb b/spec/requests/api/v1/accounts/pins_spec.rb index c293715f7ed237..c66b80c7fd98d5 100644 --- a/spec/requests/api/v1/accounts/pins_spec.rb +++ b/spec/requests/api/v1/accounts/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Pins API' do +RSpec.describe 'Accounts Pins API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/relationships_spec.rb b/spec/requests/api/v1/accounts/relationships_spec.rb index b06ce0509df366..76b1830bbe0ac2 100644 --- a/spec/requests/api/v1/accounts/relationships_spec.rb +++ b/spec/requests/api/v1/accounts/relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'GET /api/v1/accounts/relationships' do +RSpec.describe 'GET /api/v1/accounts/relationships' do subject do get '/api/v1/accounts/relationships', headers: headers, params: params end diff --git a/spec/requests/api/v1/accounts/search_spec.rb b/spec/requests/api/v1/accounts/search_spec.rb index 76b32e7b2ca3af..f6ab7a85319da1 100644 --- a/spec/requests/api/v1/accounts/search_spec.rb +++ b/spec/requests/api/v1/accounts/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Search API' do +RSpec.describe 'Accounts Search API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/statuses_spec.rb b/spec/requests/api/v1/accounts/statuses_spec.rb index 97cdbe0156f7b0..4a4d9383db31bb 100644 --- a/spec/requests/api/v1/accounts/statuses_spec.rb +++ b/spec/requests/api/v1/accounts/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts Statuses' do +RSpec.describe 'API V1 Accounts Statuses' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/accounts_spec.rb b/spec/requests/api/v1/accounts_spec.rb index 3432106a469f54..e31644352b7eac 100644 --- a/spec/requests/api/v1/accounts_spec.rb +++ b/spec/requests/api/v1/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/accounts' do +RSpec.describe '/api/v1/accounts' do let(:user) { Fabricate(:user) } let(:scopes) { '' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/admin/dimensions_spec.rb b/spec/requests/api/v1/admin/dimensions_spec.rb index 87534a74b85c5b..43e2db00c5c2d5 100644 --- a/spec/requests/api/v1/admin/dimensions_spec.rb +++ b/spec/requests/api/v1/admin/dimensions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Dimensions' do +RSpec.describe 'Admin Dimensions' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/measures_spec.rb b/spec/requests/api/v1/admin/measures_spec.rb index 80fed79d9a6720..56a2c1eaee38fb 100644 --- a/spec/requests/api/v1/admin/measures_spec.rb +++ b/spec/requests/api/v1/admin/measures_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Measures' do +RSpec.describe 'Admin Measures' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/retention_spec.rb b/spec/requests/api/v1/admin/retention_spec.rb index 9178335ba5f55b..138959a0ab7015 100644 --- a/spec/requests/api/v1/admin/retention_spec.rb +++ b/spec/requests/api/v1/admin/retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Retention' do +RSpec.describe 'Admin Retention' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/trends/links/links_spec.rb b/spec/requests/api/v1/admin/trends/links/links_spec.rb index 48842828b32b0f..082af785ab0e37 100644 --- a/spec/requests/api/v1/admin/trends/links/links_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Links' do +RSpec.describe 'Links' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb index 384a305d4a0551..193906ab057b6d 100644 --- a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Links Preview Card Providers' do +RSpec.describe 'API V1 Admin Trends Links Preview Card Providers' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/statuses_spec.rb b/spec/requests/api/v1/admin/trends/statuses_spec.rb index 04aa0465f2809e..e33a9658a9ff1e 100644 --- a/spec/requests/api/v1/admin/trends/statuses_spec.rb +++ b/spec/requests/api/v1/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Statuses' do +RSpec.describe 'API V1 Admin Trends Statuses' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/tags_spec.rb b/spec/requests/api/v1/admin/trends/tags_spec.rb index b1437dad8dbd0e..748a27283c14b7 100644 --- a/spec/requests/api/v1/admin/trends/tags_spec.rb +++ b/spec/requests/api/v1/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Tags' do +RSpec.describe 'API V1 Admin Trends Tags' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/annual_reports_spec.rb b/spec/requests/api/v1/annual_reports_spec.rb index 60cd8ed5262eeb..bab184787f3e4a 100644 --- a/spec/requests/api/v1/annual_reports_spec.rb +++ b/spec/requests/api/v1/annual_reports_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Annual Reports' do +RSpec.describe 'API V1 Annual Reports' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/apps/credentials_spec.rb b/spec/requests/api/v1/apps/credentials_spec.rb index 6e6970ce53f03d..b899999640bff0 100644 --- a/spec/requests/api/v1/apps/credentials_spec.rb +++ b/spec/requests/api/v1/apps/credentials_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Credentials' do +RSpec.describe 'Credentials' do describe 'GET /api/v1/apps/verify_credentials' do subject do get '/api/v1/apps/verify_credentials', headers: headers diff --git a/spec/requests/api/v1/csp_spec.rb b/spec/requests/api/v1/csp_spec.rb index 2db52ac72502fd..5d61d7f3f54712 100644 --- a/spec/requests/api/v1/csp_spec.rb +++ b/spec/requests/api/v1/csp_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API namespace minimal Content-Security-Policy' do +RSpec.describe 'API namespace minimal Content-Security-Policy' do before { stub_tests_controller } after { Rails.application.reload_routes! } diff --git a/spec/requests/api/v1/custom_emojis_spec.rb b/spec/requests/api/v1/custom_emojis_spec.rb index 2f0dc729449c51..798d8e29ed0b71 100644 --- a/spec/requests/api/v1/custom_emojis_spec.rb +++ b/spec/requests/api/v1/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom Emojis' do +RSpec.describe 'Custom Emojis' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/directories_spec.rb b/spec/requests/api/v1/directories_spec.rb index 0a1864d136cc5e..94306c06ec32fe 100644 --- a/spec/requests/api/v1/directories_spec.rb +++ b/spec/requests/api/v1/directories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Directories API' do +RSpec.describe 'Directories API' do let(:user) { Fabricate(:user, confirmed_at: nil) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/endorsements_spec.rb b/spec/requests/api/v1/endorsements_spec.rb index e267f2abd26f14..255211a4041848 100644 --- a/spec/requests/api/v1/endorsements_spec.rb +++ b/spec/requests/api/v1/endorsements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Endorsements' do +RSpec.describe 'Endorsements' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/featured_tags/suggestions_spec.rb b/spec/requests/api/v1/featured_tags/suggestions_spec.rb index 00451540cac0ea..0a7bfe5cda9f78 100644 --- a/spec/requests/api/v1/featured_tags/suggestions_spec.rb +++ b/spec/requests/api/v1/featured_tags/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Featured Tags Suggestions API' do +RSpec.describe 'Featured Tags Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/instance_spec.rb b/spec/requests/api/v1/instance_spec.rb index 600584eccb88f5..e32d8acadbbc44 100644 --- a/spec/requests/api/v1/instance_spec.rb +++ b/spec/requests/api/v1/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/instances/translation_languages_spec.rb b/spec/requests/api/v1/instances/translation_languages_spec.rb index 7cfb24e86fbe34..e5a480c17515cd 100644 --- a/spec/requests/api/v1/instances/translation_languages_spec.rb +++ b/spec/requests/api/v1/instances/translation_languages_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Translation Languages' do +RSpec.describe 'Translation Languages' do describe 'GET /api/v1/instances/translation_languages' do context 'when no translation service is configured' do it 'returns empty language matrix', :aggregate_failures do diff --git a/spec/requests/api/v1/peers/search_spec.rb b/spec/requests/api/v1/peers/search_spec.rb index dcdea387a5b455..87b0dc4f642c2f 100644 --- a/spec/requests/api/v1/peers/search_spec.rb +++ b/spec/requests/api/v1/peers/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API Peers Search' do +RSpec.describe 'API Peers Search' do describe 'GET /api/v1/peers/search' do context 'when peers api is disabled' do before do diff --git a/spec/requests/api/v1/preferences_spec.rb b/spec/requests/api/v1/preferences_spec.rb index 6f4188c35a1e1f..6508b51c04e6d9 100644 --- a/spec/requests/api/v1/preferences_spec.rb +++ b/spec/requests/api/v1/preferences_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Preferences' do +RSpec.describe 'Preferences' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/push/subscriptions_spec.rb b/spec/requests/api/v1/push/subscriptions_spec.rb index 54ef5a13ade6b8..6674b048e854b2 100644 --- a/spec/requests/api/v1/push/subscriptions_spec.rb +++ b/spec/requests/api/v1/push/subscriptions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Push Subscriptions' do +RSpec.describe 'API V1 Push Subscriptions' do let(:user) { Fabricate(:user) } let(:endpoint) { 'https://fcm.googleapis.com/fcm/send/fiuH06a27qE:APA91bHnSiGcLwdaxdyqVXNDR9w1NlztsHb6lyt5WDKOC_Z_Q8BlFxQoR8tWFSXUIDdkyw0EdvxTu63iqamSaqVSevW5LfoFwojws8XYDXv_NRRLH6vo2CdgiN4jgHv5VLt2A8ah6lUX' } let(:keys) do diff --git a/spec/requests/api/v1/scheduled_status_spec.rb b/spec/requests/api/v1/scheduled_status_spec.rb index f4612410bf38cc..b35d297a60ee95 100644 --- a/spec/requests/api/v1/scheduled_status_spec.rb +++ b/spec/requests/api/v1/scheduled_status_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Scheduled Statuses' do +RSpec.describe 'Scheduled Statuses' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/statuses/histories_spec.rb b/spec/requests/api/v1/statuses/histories_spec.rb index b3761ca6882a44..f13bf798670f9e 100644 --- a/spec/requests/api/v1/statuses/histories_spec.rb +++ b/spec/requests/api/v1/statuses/histories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Histories' do +RSpec.describe 'API V1 Statuses Histories' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses/mutes_spec.rb b/spec/requests/api/v1/statuses/mutes_spec.rb index 72fd7d9d11503d..69ae948852888a 100644 --- a/spec/requests/api/v1/statuses/mutes_spec.rb +++ b/spec/requests/api/v1/statuses/mutes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Mutes' do +RSpec.describe 'API V1 Statuses Mutes' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:mutes' } diff --git a/spec/requests/api/v1/statuses/pins_spec.rb b/spec/requests/api/v1/statuses/pins_spec.rb index db07fa424f7a61..3be1a16ee19a82 100644 --- a/spec/requests/api/v1/statuses/pins_spec.rb +++ b/spec/requests/api/v1/statuses/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Pins' do +RSpec.describe 'Pins' do let(:user) { Fabricate(:user) } let(:scopes) { 'write:accounts' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/statuses/reblogs_spec.rb b/spec/requests/api/v1/statuses/reblogs_spec.rb index 77542d294e3187..0978c890a4bf81 100644 --- a/spec/requests/api/v1/statuses/reblogs_spec.rb +++ b/spec/requests/api/v1/statuses/reblogs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Reblogs' do +RSpec.describe 'API V1 Statuses Reblogs' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:statuses' } diff --git a/spec/requests/api/v1/statuses/translations_spec.rb b/spec/requests/api/v1/statuses/translations_spec.rb index e2ab5d0b806825..047b2f0485548e 100644 --- a/spec/requests/api/v1/statuses/translations_spec.rb +++ b/spec/requests/api/v1/statuses/translations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Translations' do +RSpec.describe 'API V1 Statuses Translations' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses_spec.rb b/spec/requests/api/v1/statuses_spec.rb index 3e91fcdd98ed7d..1a211d14d87f6c 100644 --- a/spec/requests/api/v1/statuses_spec.rb +++ b/spec/requests/api/v1/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/statuses' do +RSpec.describe '/api/v1/statuses' do context 'with an oauth token' do let(:user) { Fabricate(:user) } let(:client_app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } diff --git a/spec/requests/api/v1/streaming_spec.rb b/spec/requests/api/v1/streaming_spec.rb index 6ce35c2fe60f14..a1f64846cf7d6a 100644 --- a/spec/requests/api/v1/streaming_spec.rb +++ b/spec/requests/api/v1/streaming_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Streaming' do +RSpec.describe 'API V1 Streaming' do around do |example| before = Rails.configuration.x.streaming_api_base_url Rails.configuration.x.streaming_api_base_url = "wss://#{Rails.configuration.x.web_domain}" diff --git a/spec/requests/api/v1/timelines/direct_spec.rb b/spec/requests/api/v1/timelines/direct_spec.rb index f882e4ccc59406..2551060fa99323 100644 --- a/spec/requests/api/v1/timelines/direct_spec.rb +++ b/spec/requests/api/v1/timelines/direct_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Direct Timeline' do +RSpec.describe 'API V1 Direct Timeline' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/home_spec.rb b/spec/requests/api/v1/timelines/home_spec.rb index 96bd153affe5a4..d158e0801c1e6d 100644 --- a/spec/requests/api/v1/timelines/home_spec.rb +++ b/spec/requests/api/v1/timelines/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home', :inline_jobs do +RSpec.describe 'Home', :inline_jobs do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/link_spec.rb b/spec/requests/api/v1/timelines/link_spec.rb index 57969fbd0e2aa8..87072c7caf3b25 100644 --- a/spec/requests/api/v1/timelines/link_spec.rb +++ b/spec/requests/api/v1/timelines/link_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link' do +RSpec.describe 'Link' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/list_spec.rb b/spec/requests/api/v1/timelines/list_spec.rb index 98d24567459c51..753c784866519f 100644 --- a/spec/requests/api/v1/timelines/list_spec.rb +++ b/spec/requests/api/v1/timelines/list_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Timelines List' do +RSpec.describe 'API V1 Timelines List' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/public_spec.rb b/spec/requests/api/v1/timelines/public_spec.rb index f17311af9ba8c5..91e93f454cc112 100644 --- a/spec/requests/api/v1/timelines/public_spec.rb +++ b/spec/requests/api/v1/timelines/public_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Public' do +RSpec.describe 'Public' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v2/instance_spec.rb b/spec/requests/api/v2/instance_spec.rb index 2b80a4cdf68e60..3fe957ef5923c1 100644 --- a/spec/requests/api/v2/instance_spec.rb +++ b/spec/requests/api/v2/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v2/search_spec.rb b/spec/requests/api/v2/search_spec.rb index 13bcf17984b11b..039e7513cdfeca 100644 --- a/spec/requests/api/v2/search_spec.rb +++ b/spec/requests/api/v2/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Search API' do +RSpec.describe 'Search API' do context 'with token' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v2/suggestions_spec.rb b/spec/requests/api/v2/suggestions_spec.rb index a7d6a0864f542e..8895efd23de9e0 100644 --- a/spec/requests/api/v2/suggestions_spec.rb +++ b/spec/requests/api/v2/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Suggestions API' do +RSpec.describe 'Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read' } diff --git a/spec/requests/api/v2_alpha/notifications_spec.rb b/spec/requests/api/v2_alpha/notifications_spec.rb index 7663d215ebf96f..8009e7edce798a 100644 --- a/spec/requests/api/v2_alpha/notifications_spec.rb +++ b/spec/requests/api/v2_alpha/notifications_spec.rb @@ -116,6 +116,19 @@ it_behaves_like 'forbidden for wrong scope', 'write write:notifications' + context 'when there are no notifications' do + before do + user.account.notifications.destroy_all + end + + it 'returns 0 notifications' do + subject + + expect(response).to have_http_status(200) + expect(body_as_json[:notification_groups]).to eq [] + end + end + context 'with no options' do it 'returns expected notification types', :aggregate_failures do subject diff --git a/spec/requests/backups_spec.rb b/spec/requests/backups_spec.rb index a6c2efe0db02f1..a8c1124ed2611b 100644 --- a/spec/requests/backups_spec.rb +++ b/spec/requests/backups_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Backups' do +RSpec.describe 'Backups' do include RoutingHelper describe 'GET backups#download' do diff --git a/spec/requests/cache_spec.rb b/spec/requests/cache_spec.rb index 91e5b022e3951a..9cce241b38b66c 100644 --- a/spec/requests/cache_spec.rb +++ b/spec/requests/cache_spec.rb @@ -118,7 +118,7 @@ module DisabledAnonymousAPI end end -describe 'Caching behavior' do +RSpec.describe 'Caching behavior' do shared_examples 'cachable response' do |http_success: false| it 'does not set cookies or set public cache control', :aggregate_failures do expect(response.cookies).to be_empty diff --git a/spec/requests/catch_all_route_request_spec.rb b/spec/requests/catch_all_route_request_spec.rb index e600bedfe07eb9..e7ea21524c5994 100644 --- a/spec/requests/catch_all_route_request_spec.rb +++ b/spec/requests/catch_all_route_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The catch all route' do +RSpec.describe 'The catch all route' do describe 'with a simple value' do it 'returns a 404 page as html' do get '/test' diff --git a/spec/requests/content_security_policy_spec.rb b/spec/requests/content_security_policy_spec.rb index ba6fe47741665b..7520ecb0db4cd0 100644 --- a/spec/requests/content_security_policy_spec.rb +++ b/spec/requests/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Content-Security-Policy' do +RSpec.describe 'Content-Security-Policy' do before { allow(SecureRandom).to receive(:base64).with(16).and_return('ZbA+JmE7+bK8F5qvADZHuQ==') } it 'sets the expected CSP headers' do diff --git a/spec/requests/custom_css_spec.rb b/spec/requests/custom_css_spec.rb index 5271ed4a5a6d53..a46ebd7281f930 100644 --- a/spec/requests/custom_css_spec.rb +++ b/spec/requests/custom_css_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom CSS' do +RSpec.describe 'Custom CSS' do include RoutingHelper describe 'GET /custom.css' do diff --git a/spec/requests/custom_stylesheets_spec.rb b/spec/requests/custom_stylesheets_spec.rb index 128d173f3abb8a..9c5c058344e0b1 100644 --- a/spec/requests/custom_stylesheets_spec.rb +++ b/spec/requests/custom_stylesheets_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom stylesheets' do +RSpec.describe 'Custom stylesheets' do describe 'GET /custom.css' do before { get '/custom.css' } diff --git a/spec/requests/disabled_oauth_endpoints_spec.rb b/spec/requests/disabled_oauth_endpoints_spec.rb index 7c2c09f3804bf3..279d2576a35795 100644 --- a/spec/requests/disabled_oauth_endpoints_spec.rb +++ b/spec/requests/disabled_oauth_endpoints_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Disabled OAuth routes' do +RSpec.describe 'Disabled OAuth routes' do # These routes are disabled via the doorkeeper configuration for # `admin_authenticator`, as these routes should only be accessible by server # administrators. For now, these routes are not properly designed and diff --git a/spec/requests/emojis_spec.rb b/spec/requests/emojis_spec.rb index 458d500762c837..b2e4702f2dc95c 100644 --- a/spec/requests/emojis_spec.rb +++ b/spec/requests/emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Emojis' do +RSpec.describe 'Emojis' do describe 'GET /emojis/:id' do let(:emoji) { Fabricate(:custom_emoji, shortcode: 'coolcat') } diff --git a/spec/requests/health_spec.rb b/spec/requests/health_spec.rb index 03317f9723986c..1d2f96bb3d5a80 100644 --- a/spec/requests/health_spec.rb +++ b/spec/requests/health_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Health check endpoint' do +RSpec.describe 'Health check endpoint' do describe 'GET /health' do it 'returns http success when server is functioning' do get '/health' diff --git a/spec/requests/invite_spec.rb b/spec/requests/invite_spec.rb index c44ef2419c0c20..4ce6c78e940aba 100644 --- a/spec/requests/invite_spec.rb +++ b/spec/requests/invite_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'invites' do +RSpec.describe 'invites' do let(:invite) { Fabricate(:invite) } context 'when requesting a JSON document' do diff --git a/spec/requests/link_headers_spec.rb b/spec/requests/link_headers_spec.rb index 522cff46427f0a..3116a54d6a41c4 100644 --- a/spec/requests/link_headers_spec.rb +++ b/spec/requests/link_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link headers' do +RSpec.describe 'Link headers' do describe 'on the account show page' do let(:account) { Fabricate(:account, username: 'test') } diff --git a/spec/requests/localization_spec.rb b/spec/requests/localization_spec.rb index b7fb53ed8d7374..26fc204ea4f609 100644 --- a/spec/requests/localization_spec.rb +++ b/spec/requests/localization_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Localization' do +RSpec.describe 'Localization' do around do |example| I18n.with_locale(I18n.locale) do example.run diff --git a/spec/requests/log_out_spec.rb b/spec/requests/log_out_spec.rb index 62ca1ac54728b3..62ede0c1060aea 100644 --- a/spec/requests/log_out_spec.rb +++ b/spec/requests/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log Out' do +RSpec.describe 'Log Out' do include RoutingHelper describe 'DELETE /auth/sign_out' do diff --git a/spec/requests/manifest_spec.rb b/spec/requests/manifest_spec.rb index c72e27fc7c14dd..fb64e8237aaedd 100644 --- a/spec/requests/manifest_spec.rb +++ b/spec/requests/manifest_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Manifest' do +RSpec.describe 'Manifest' do describe 'GET /manifest' do before { get '/manifest' } diff --git a/spec/requests/media_proxy_spec.rb b/spec/requests/media_proxy_spec.rb index 814d4c11664bcb..fb4801ee67a866 100644 --- a/spec/requests/media_proxy_spec.rb +++ b/spec/requests/media_proxy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Media Proxy' do +RSpec.describe 'Media Proxy' do describe 'GET /media_proxy/:id' do before { stub_attachment_request } diff --git a/spec/requests/omniauth_callbacks_spec.rb b/spec/requests/omniauth_callbacks_spec.rb index 095535e48598e0..e13a49ec622782 100644 --- a/spec/requests/omniauth_callbacks_spec.rb +++ b/spec/requests/omniauth_callbacks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OmniAuth callbacks' do +RSpec.describe 'OmniAuth callbacks' do shared_examples 'omniauth provider callbacks' do |provider| subject { post send :"user_#{provider}_omniauth_callback_path" } diff --git a/spec/requests/remote_interaction_helper_spec.rb b/spec/requests/remote_interaction_helper_spec.rb index e6364fe8ce83e9..942f70b9a411a2 100644 --- a/spec/requests/remote_interaction_helper_spec.rb +++ b/spec/requests/remote_interaction_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Remote Interaction Helper' do +RSpec.describe 'Remote Interaction Helper' do describe 'GET /remote_interaction_helper' do it 'returns http success' do get remote_interaction_helper_path diff --git a/spec/requests/self_destruct_spec.rb b/spec/requests/self_destruct_spec.rb index f71a2325e2a897..651a894c89b9d5 100644 --- a/spec/requests/self_destruct_spec.rb +++ b/spec/requests/self_destruct_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Self-destruct mode' do +RSpec.describe 'Self-destruct mode' do before do allow(SelfDestructHelper).to receive(:self_destruct?).and_return(true) end diff --git a/spec/requests/settings/exports/blocked_accounts_spec.rb b/spec/requests/settings/exports/blocked_accounts_spec.rb index f335ba18c05281..9d0768a1e333ec 100644 --- a/spec/requests/settings/exports/blocked_accounts_spec.rb +++ b/spec/requests/settings/exports/blocked_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Accounts' do +RSpec.describe 'Settings / Exports / Blocked Accounts' do describe 'GET /settings/exports/blocks' do context 'with a signed in user who has blocked accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/blocked_domains_spec.rb b/spec/requests/settings/exports/blocked_domains_spec.rb index 762907585f3a2b..838baf8cdb2fcd 100644 --- a/spec/requests/settings/exports/blocked_domains_spec.rb +++ b/spec/requests/settings/exports/blocked_domains_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Domains' do +RSpec.describe 'Settings / Exports / Blocked Domains' do describe 'GET /settings/exports/domain_blocks' do context 'with a signed in user who has blocked domains' do let(:account) { Fabricate :account, domain: 'example.com' } diff --git a/spec/requests/settings/exports/bookmarks_spec.rb b/spec/requests/settings/exports/bookmarks_spec.rb index f200e70383eef3..e97f4a84d2b06c 100644 --- a/spec/requests/settings/exports/bookmarks_spec.rb +++ b/spec/requests/settings/exports/bookmarks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Bookmarks' do +RSpec.describe 'Settings / Exports / Bookmarks' do describe 'GET /settings/exports/bookmarks' do context 'with a signed in user who has bookmarks' do let(:account) { Fabricate(:account, domain: 'foo.bar') } diff --git a/spec/requests/settings/exports/following_accounts_spec.rb b/spec/requests/settings/exports/following_accounts_spec.rb index 268b72c4128160..c34ec261a696db 100644 --- a/spec/requests/settings/exports/following_accounts_spec.rb +++ b/spec/requests/settings/exports/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Following Accounts' do +RSpec.describe 'Settings / Exports / Following Accounts' do describe 'GET /settings/exports/follows' do context 'with a signed in user who is following accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/lists_spec.rb b/spec/requests/settings/exports/lists_spec.rb index b868f8dfda359f..4c13225bb99fd2 100644 --- a/spec/requests/settings/exports/lists_spec.rb +++ b/spec/requests/settings/exports/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Lists' do +RSpec.describe 'Settings / Exports / Lists' do describe 'GET /settings/exports/lists' do context 'with a signed in user who has lists' do let(:account) { Fabricate(:account, username: 'test', domain: 'example.com') } diff --git a/spec/requests/settings/exports/muted_accounts_spec.rb b/spec/requests/settings/exports/muted_accounts_spec.rb index efdb0d8221f012..98ccb3e4a2be5c 100644 --- a/spec/requests/settings/exports/muted_accounts_spec.rb +++ b/spec/requests/settings/exports/muted_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Muted Accounts' do +RSpec.describe 'Settings / Exports / Muted Accounts' do describe 'GET /settings/exports/mutes' do context 'with a signed in user who has muted accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/signature_verification_spec.rb b/spec/requests/signature_verification_spec.rb index 401828c4a3c5d1..580d0283389b65 100644 --- a/spec/requests/signature_verification_spec.rb +++ b/spec/requests/signature_verification_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'signature verification concern' do +RSpec.describe 'signature verification concern' do before do stub_tests_controller diff --git a/spec/requests/well_known/change_password_spec.rb b/spec/requests/well_known/change_password_spec.rb index 04134b71ff5e68..77fec154127902 100644 --- a/spec/requests/well_known/change_password_spec.rb +++ b/spec/requests/well_known/change_password_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/change-password request' do +RSpec.describe 'The /.well-known/change-password request' do it 'redirects to the change password page' do get '/.well-known/change-password' diff --git a/spec/requests/well_known/host_meta_spec.rb b/spec/requests/well_known/host_meta_spec.rb index ca10a51a01b26f..09f17baa894d64 100644 --- a/spec/requests/well_known/host_meta_spec.rb +++ b/spec/requests/well_known/host_meta_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/host-meta request' do +RSpec.describe 'The /.well-known/host-meta request' do it 'returns http success with valid XML response' do get '/.well-known/host-meta' diff --git a/spec/requests/well_known/node_info_spec.rb b/spec/requests/well_known/node_info_spec.rb index 0934b0fde6fed8..d02732c32bb231 100644 --- a/spec/requests/well_known/node_info_spec.rb +++ b/spec/requests/well_known/node_info_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The well-known node-info endpoints' do +RSpec.describe 'The well-known node-info endpoints' do describe 'The /.well-known/node-info endpoint' do it 'returns JSON document pointing to node info' do get '/.well-known/nodeinfo' diff --git a/spec/requests/well_known/oauth_metadata_spec.rb b/spec/requests/well_known/oauth_metadata_spec.rb index 9d2d20228677e4..378295b5a356ec 100644 --- a/spec/requests/well_known/oauth_metadata_spec.rb +++ b/spec/requests/well_known/oauth_metadata_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/oauth-authorization-server request' do +RSpec.describe 'The /.well-known/oauth-authorization-server request' do let(:protocol) { ENV.fetch('LOCAL_HTTPS', true) ? :https : :http } before do diff --git a/spec/requests/well_known/webfinger_spec.rb b/spec/requests/well_known/webfinger_spec.rb index cd8a35c7023d05..e5ce352d50791f 100644 --- a/spec/requests/well_known/webfinger_spec.rb +++ b/spec/requests/well_known/webfinger_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/webfinger endpoint' do +RSpec.describe 'The /.well-known/webfinger endpoint' do subject(:perform_request!) { get webfinger_url(resource: resource) } let(:alternate_domains) { [] } diff --git a/spec/routing/accounts_routing_spec.rb b/spec/routing/accounts_routing_spec.rb index 588855943e64be..8ff711a681e082 100644 --- a/spec/routing/accounts_routing_spec.rb +++ b/spec/routing/accounts_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Routes under accounts/' do +RSpec.describe 'Routes under accounts/' do context 'with local username' do let(:username) { 'alice' } diff --git a/spec/routing/api_routing_spec.rb b/spec/routing/api_routing_spec.rb index a822fba4c55c7d..c46fa75d1fdeba 100644 --- a/spec/routing/api_routing_spec.rb +++ b/spec/routing/api_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API routes' do +RSpec.describe 'API routes' do describe 'Credentials routes' do it 'routes to verify credentials' do expect(get('/api/v1/accounts/verify_credentials')) diff --git a/spec/routing/well_known_routes_spec.rb b/spec/routing/well_known_routes_spec.rb index 8cf08c13c127ed..6578e939ae1e14 100644 --- a/spec/routing/well_known_routes_spec.rb +++ b/spec/routing/well_known_routes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Well Known routes' do +RSpec.describe 'Well Known routes' do describe 'the host-meta route' do it 'routes to correct place with xml format' do expect(get('/.well-known/host-meta')) diff --git a/spec/search/models/concerns/account/search_spec.rb b/spec/search/models/concerns/account/search_spec.rb index d8d7f355dd4bf3..de12161ef9f3a6 100644 --- a/spec/search/models/concerns/account/search_spec.rb +++ b/spec/search/models/concerns/account/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Search do +RSpec.describe Account::Search do describe 'a non-discoverable account becoming discoverable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/search/models/concerns/account/statuses_search_spec.rb b/spec/search/models/concerns/account/statuses_search_spec.rb index b1bf4968ca9abd..bce1aecd7505f3 100644 --- a/spec/search/models/concerns/account/statuses_search_spec.rb +++ b/spec/search/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch, :inline_jobs do +RSpec.describe Account::StatusesSearch, :inline_jobs do describe 'a non-indexable account becoming indexable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/serializers/activitypub/device_serializer_spec.rb b/spec/serializers/activitypub/device_serializer_spec.rb index 23f0b24c4eabf5..226e1364465407 100644 --- a/spec/serializers/activitypub/device_serializer_spec.rb +++ b/spec/serializers/activitypub/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeviceSerializer do +RSpec.describe ActivityPub::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:device) } diff --git a/spec/serializers/activitypub/note_serializer_spec.rb b/spec/serializers/activitypub/note_serializer_spec.rb index 338d66b308ebaa..285b241ee237e3 100644 --- a/spec/serializers/activitypub/note_serializer_spec.rb +++ b/spec/serializers/activitypub/note_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::NoteSerializer do +RSpec.describe ActivityPub::NoteSerializer do subject { serialized_record_json(parent, described_class, adapter: ActivityPub::Adapter) } let!(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/one_time_key_serializer_spec.rb b/spec/serializers/activitypub/one_time_key_serializer_spec.rb index 89efe95c8c2e3e..b9792ebae35445 100644 --- a/spec/serializers/activitypub/one_time_key_serializer_spec.rb +++ b/spec/serializers/activitypub/one_time_key_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::OneTimeKeySerializer do +RSpec.describe ActivityPub::OneTimeKeySerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:one_time_key) } diff --git a/spec/serializers/activitypub/undo_like_serializer_spec.rb b/spec/serializers/activitypub/undo_like_serializer_spec.rb index 3d61e8675195ea..c7190adc1aa4f6 100644 --- a/spec/serializers/activitypub/undo_like_serializer_spec.rb +++ b/spec/serializers/activitypub/undo_like_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UndoLikeSerializer do +RSpec.describe ActivityPub::UndoLikeSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:favourite) } diff --git a/spec/serializers/activitypub/update_poll_serializer_spec.rb b/spec/serializers/activitypub/update_poll_serializer_spec.rb index 8ff4fd27013467..6a4d8177fcc32d 100644 --- a/spec/serializers/activitypub/update_poll_serializer_spec.rb +++ b/spec/serializers/activitypub/update_poll_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdatePollSerializer do +RSpec.describe ActivityPub::UpdatePollSerializer do subject { serialized_record_json(status, described_class, adapter: ActivityPub::Adapter) } let(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/vote_serializer_spec.rb b/spec/serializers/activitypub/vote_serializer_spec.rb index b7c0b8928b862b..4e8a2beca38aa3 100644 --- a/spec/serializers/activitypub/vote_serializer_spec.rb +++ b/spec/serializers/activitypub/vote_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::VoteSerializer do +RSpec.describe ActivityPub::VoteSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:poll_vote) } diff --git a/spec/serializers/rest/account_serializer_spec.rb b/spec/serializers/rest/account_serializer_spec.rb index 15939e484d86e5..7daa0796a9c964 100644 --- a/spec/serializers/rest/account_serializer_spec.rb +++ b/spec/serializers/rest/account_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::AccountSerializer do +RSpec.describe REST::AccountSerializer do subject { serialized_record_json(account, described_class) } let(:role) { Fabricate(:user_role, name: 'Role', highlighted: true) } diff --git a/spec/serializers/rest/encrypted_message_serializer_spec.rb b/spec/serializers/rest/encrypted_message_serializer_spec.rb index 01db1149af52e9..a4b8ee83b2a1e9 100644 --- a/spec/serializers/rest/encrypted_message_serializer_spec.rb +++ b/spec/serializers/rest/encrypted_message_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::EncryptedMessageSerializer do +RSpec.describe REST::EncryptedMessageSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:encrypted_message) } diff --git a/spec/serializers/rest/instance_serializer_spec.rb b/spec/serializers/rest/instance_serializer_spec.rb index 39e6b3820b7049..2d8d14e39a81e8 100644 --- a/spec/serializers/rest/instance_serializer_spec.rb +++ b/spec/serializers/rest/instance_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::InstanceSerializer do +RSpec.describe REST::InstanceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { InstancePresenter.new } diff --git a/spec/serializers/rest/keys/claim_result_serializer_spec.rb b/spec/serializers/rest/keys/claim_result_serializer_spec.rb index 7f7fb850cdacaa..e45112705b70cd 100644 --- a/spec/serializers/rest/keys/claim_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/claim_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::ClaimResultSerializer do +RSpec.describe REST::Keys::ClaimResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::ClaimService::Result.new(Account.new(id: 123), 456) } diff --git a/spec/serializers/rest/keys/device_serializer_spec.rb b/spec/serializers/rest/keys/device_serializer_spec.rb index 28177a3db5a212..b8370beac706f6 100644 --- a/spec/serializers/rest/keys/device_serializer_spec.rb +++ b/spec/serializers/rest/keys/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::DeviceSerializer do +RSpec.describe REST::Keys::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Device.new(name: 'Device name') } diff --git a/spec/serializers/rest/keys/query_result_serializer_spec.rb b/spec/serializers/rest/keys/query_result_serializer_spec.rb index ef67d706750ffb..41492f5e78f265 100644 --- a/spec/serializers/rest/keys/query_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/query_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::QueryResultSerializer do +RSpec.describe REST::Keys::QueryResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::QueryService::Result.new(Account.new(id: 123), []) } diff --git a/spec/serializers/rest/suggestion_serializer_spec.rb b/spec/serializers/rest/suggestion_serializer_spec.rb index b5efba082defa0..288d1daa230e10 100644 --- a/spec/serializers/rest/suggestion_serializer_spec.rb +++ b/spec/serializers/rest/suggestion_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::SuggestionSerializer do +RSpec.describe REST::SuggestionSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) do AccountSuggestions::Suggestion.new( diff --git a/spec/services/account_search_service_spec.rb b/spec/services/account_search_service_spec.rb index 5ec08859031759..7d251641ee45db 100644 --- a/spec/services/account_search_service_spec.rb +++ b/spec/services/account_search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountSearchService do +RSpec.describe AccountSearchService do describe '#call' do context 'with a query to ignore' do it 'returns empty array for missing query' do diff --git a/spec/services/account_statuses_cleanup_service_spec.rb b/spec/services/account_statuses_cleanup_service_spec.rb index 403c4632d74303..857bd4fda499af 100644 --- a/spec/services/account_statuses_cleanup_service_spec.rb +++ b/spec/services/account_statuses_cleanup_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountStatusesCleanupService do +RSpec.describe AccountStatusesCleanupService do let(:account) { Fabricate(:account, username: 'alice', domain: nil) } let(:account_policy) { Fabricate(:account_statuses_cleanup_policy, account: account) } let!(:unrelated_status) { Fabricate(:status, created_at: 3.years.ago) } diff --git a/spec/services/fetch_oembed_service_spec.rb b/spec/services/fetch_oembed_service_spec.rb index c9f84048b615f4..52d2b9cf2283ad 100644 --- a/spec/services/fetch_oembed_service_spec.rb +++ b/spec/services/fetch_oembed_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FetchOEmbedService do +RSpec.describe FetchOEmbedService do subject { described_class.new } before do diff --git a/spec/services/resolve_url_service_spec.rb b/spec/services/resolve_url_service_spec.rb index 3d59a55f105855..80f2a5a4baf55d 100644 --- a/spec/services/resolve_url_service_spec.rb +++ b/spec/services/resolve_url_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveURLService do +RSpec.describe ResolveURLService do subject { described_class.new } describe '#call' do diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index 394ee7c3a660e7..cd4c42463012f3 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchService do +RSpec.describe SearchService do subject { described_class.new } describe '#call' do diff --git a/spec/services/unblock_domain_service_spec.rb b/spec/services/unblock_domain_service_spec.rb index 289ddfc218bcaa..405fe1cfd2f8a3 100644 --- a/spec/services/unblock_domain_service_spec.rb +++ b/spec/services/unblock_domain_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnblockDomainService do +RSpec.describe UnblockDomainService do subject { described_class.new } describe 'call' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2d20239b27749d..60bec918ea4100 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,8 @@ expectations.include_chain_clauses_in_custom_matcher_descriptions = true end + config.disable_monkey_patching! + config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end diff --git a/spec/support/examples/api.rb b/spec/support/examples/api.rb index d531860abfddfe..ddc61fcbe08b6d 100644 --- a/spec/support/examples/api.rb +++ b/spec/support/examples/api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'forbidden for wrong scope' do |wrong_scope| +RSpec.shared_examples 'forbidden for wrong scope' do |wrong_scope| let(:scopes) { wrong_scope } it 'returns http forbidden' do @@ -11,7 +11,7 @@ end end -shared_examples 'forbidden for wrong role' do |wrong_role| +RSpec.shared_examples 'forbidden for wrong role' do |wrong_role| let(:role) { UserRole.find_by(name: wrong_role) } it 'returns http forbidden' do diff --git a/spec/support/examples/cli.rb b/spec/support/examples/cli.rb index 091c842bd1aaec..5f357fc915466a 100644 --- a/spec/support/examples/cli.rb +++ b/spec/support/examples/cli.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'CLI Command' do +RSpec.shared_examples 'CLI Command' do it 'configures Thor to exit on failure' do expect(described_class.exit_on_failure?).to be true end diff --git a/spec/support/examples/lib/admin/checks.rb b/spec/support/examples/lib/admin/checks.rb index b50faa77ba00ab..e8c1336c5f9fb6 100644 --- a/spec/support/examples/lib/admin/checks.rb +++ b/spec/support/examples/lib/admin/checks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'a check available to devops users' do +RSpec.shared_examples 'a check available to devops users' do describe 'skip?' do context 'when user can view devops' do before { allow(user).to receive(:can?).with(:view_devops).and_return(true) } diff --git a/spec/support/examples/mailers.rb b/spec/support/examples/mailers.rb index 213e873b4e18e7..a8469f196490ac 100644 --- a/spec/support/examples/mailers.rb +++ b/spec/support/examples/mailers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'localized subject' do |*args, **kwrest| +RSpec.shared_examples 'localized subject' do |*args, **kwrest| it 'renders subject localized for the locale of the receiver' do locale = :de receiver.update!(locale: locale) diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index ab6020d834a8f7..232f51fa3c7bd4 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountAvatar' do |fabricator| +RSpec.shared_examples 'AccountAvatar' do |fabricator| describe 'static avatars', :attachment_processing do describe 'when GIF' do it 'creates a png static style' do diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index 43bbdaacf425d9..af8d22d633089e 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountHeader' do |fabricator| +RSpec.shared_examples 'AccountHeader' do |fabricator| describe 'base64-encoded files', :attachment_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, header: base64_attachment) } diff --git a/spec/support/examples/models/concerns/reviewable.rb b/spec/support/examples/models/concerns/reviewable.rb index 562183d1ccbe6b..b63e44b43f9853 100644 --- a/spec/support/examples/models/concerns/reviewable.rb +++ b/spec/support/examples/models/concerns/reviewable.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'Reviewable' do +RSpec.shared_examples 'Reviewable' do subject { described_class.new(reviewed_at: reviewed_at, requested_review_at: requested_review_at) } let(:reviewed_at) { nil } diff --git a/spec/support/matchers/cacheable_response.rb b/spec/support/matchers/cacheable_response.rb index da8570c8c5a6a1..e48eb28cc15aca 100644 --- a/spec/support/matchers/cacheable_response.rb +++ b/spec/support/matchers/cacheable_response.rb @@ -27,8 +27,6 @@ end def check_vary - puts @expected_vary - pp @response.headers "Response `Vary` header does not contain `#{@expected_vary}`" unless @response.headers['Vary'].include?(@expected_vary) end diff --git a/spec/system/about_spec.rb b/spec/system/about_spec.rb index dc976b91e07b53..f832802f91dc3c 100644 --- a/spec/system/about_spec.rb +++ b/spec/system/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'About page' do +RSpec.describe 'About page' do it 'visits the about page and renders the web app' do visit about_path diff --git a/spec/system/admin/accounts_spec.rb b/spec/system/admin/accounts_spec.rb index 20813f6be42505..c21e01e4f3da05 100644 --- a/spec/system/admin/accounts_spec.rb +++ b/spec/system/admin/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Accounts' do +RSpec.describe 'Admin::Accounts' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/announcements_spec.rb b/spec/system/admin/announcements_spec.rb index 5c4e5d3e6ab429..1da5699656a20f 100644 --- a/spec/system/admin/announcements_spec.rb +++ b/spec/system/admin/announcements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Announcements' do +RSpec.describe 'Admin::Announcements' do include ActionView::RecordIdentifier describe 'Viewing announcements' do diff --git a/spec/system/admin/custom_emojis_spec.rb b/spec/system/admin/custom_emojis_spec.rb index 8a8b6efcd119fb..e47f21f8a93881 100644 --- a/spec/system/admin/custom_emojis_spec.rb +++ b/spec/system/admin/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::CustomEmojis' do +RSpec.describe 'Admin::CustomEmojis' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/domain_blocks_spec.rb b/spec/system/admin/domain_blocks_spec.rb index 99aa7cf1a760fa..9a39e290623cd3 100644 --- a/spec/system/admin/domain_blocks_spec.rb +++ b/spec/system/admin/domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'blocking domains through the moderation interface' do +RSpec.describe 'blocking domains through the moderation interface' do before do allow(DomainBlockWorker).to receive(:perform_async).and_return(true) sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user diff --git a/spec/system/admin/email_domain_blocks_spec.rb b/spec/system/admin/email_domain_blocks_spec.rb index 14959cbe74b0dd..a90bede827e33e 100644 --- a/spec/system/admin/email_domain_blocks_spec.rb +++ b/spec/system/admin/email_domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::EmailDomainBlocks' do +RSpec.describe 'Admin::EmailDomainBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/ip_blocks_spec.rb b/spec/system/admin/ip_blocks_spec.rb index c9b16f6f78fb1d..9c03520277534c 100644 --- a/spec/system/admin/ip_blocks_spec.rb +++ b/spec/system/admin/ip_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::IpBlocks' do +RSpec.describe 'Admin::IpBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/reset_spec.rb b/spec/system/admin/reset_spec.rb index 50fb4b46dfaf2d..1e787ea110f2d4 100644 --- a/spec/system/admin/reset_spec.rb +++ b/spec/system/admin/reset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Reset' do +RSpec.describe 'Admin::Reset' do it 'Resets password for account user' do account = Fabricate :account sign_in admin_user diff --git a/spec/system/admin/settings/about_spec.rb b/spec/system/admin/settings/about_spec.rb index 0f8ae5605cec0c..c7405a8d5aab56 100644 --- a/spec/system/admin/settings/about_spec.rb +++ b/spec/system/admin/settings/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::About' do +RSpec.describe 'Admin::Settings::About' do it 'Saves changes to about settings' do sign_in admin_user visit admin_settings_about_path diff --git a/spec/system/admin/settings/appearance_spec.rb b/spec/system/admin/settings/appearance_spec.rb index 99e97ea4d128dc..56af58c81267ee 100644 --- a/spec/system/admin/settings/appearance_spec.rb +++ b/spec/system/admin/settings/appearance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Appearance' do +RSpec.describe 'Admin::Settings::Appearance' do it 'Saves changes to appearance settings' do sign_in admin_user visit admin_settings_appearance_path diff --git a/spec/system/admin/settings/branding_spec.rb b/spec/system/admin/settings/branding_spec.rb index ac47e04d53442a..5cd9319ce0308f 100644 --- a/spec/system/admin/settings/branding_spec.rb +++ b/spec/system/admin/settings/branding_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Branding' do +RSpec.describe 'Admin::Settings::Branding' do it 'Saves changes to branding settings' do sign_in admin_user visit admin_settings_branding_path diff --git a/spec/system/admin/settings/content_retention_spec.rb b/spec/system/admin/settings/content_retention_spec.rb index 9867122675a280..f788f8eea0f51b 100644 --- a/spec/system/admin/settings/content_retention_spec.rb +++ b/spec/system/admin/settings/content_retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::ContentRetention' do +RSpec.describe 'Admin::Settings::ContentRetention' do it 'Saves changes to content retention settings' do sign_in admin_user visit admin_settings_content_retention_path diff --git a/spec/system/admin/settings/discovery_spec.rb b/spec/system/admin/settings/discovery_spec.rb index bdab91107d0334..f000d183709099 100644 --- a/spec/system/admin/settings/discovery_spec.rb +++ b/spec/system/admin/settings/discovery_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Discovery' do +RSpec.describe 'Admin::Settings::Discovery' do it 'Saves changes to discovery settings' do sign_in admin_user visit admin_settings_discovery_path diff --git a/spec/system/admin/settings/registrations_spec.rb b/spec/system/admin/settings/registrations_spec.rb index 88c750e8ee1b7a..d026b07c85f16b 100644 --- a/spec/system/admin/settings/registrations_spec.rb +++ b/spec/system/admin/settings/registrations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Registrations' do +RSpec.describe 'Admin::Settings::Registrations' do it 'Saves changes to registrations settings' do sign_in admin_user visit admin_settings_registrations_path diff --git a/spec/system/admin/software_updates_spec.rb b/spec/system/admin/software_updates_spec.rb index 4a635d1a794f8f..77e9f166842d02 100644 --- a/spec/system/admin/software_updates_spec.rb +++ b/spec/system/admin/software_updates_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'finding software updates through the admin interface' do +RSpec.describe 'finding software updates through the admin interface' do before do Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99') diff --git a/spec/system/admin/statuses_spec.rb b/spec/system/admin/statuses_spec.rb index 531d0de9538b21..bb76a2963d0d07 100644 --- a/spec/system/admin/statuses_spec.rb +++ b/spec/system/admin/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Statuses' do +RSpec.describe 'Admin::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links/preview_card_providers_spec.rb b/spec/system/admin/trends/links/preview_card_providers_spec.rb index dca89117b1079a..16343a68917c44 100644 --- a/spec/system/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/system/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links::PreviewCardProviders' do +RSpec.describe 'Admin::Trends::Links::PreviewCardProviders' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links_spec.rb b/spec/system/admin/trends/links_spec.rb index 99638bc069ffbe..7a51c337c9f04b 100644 --- a/spec/system/admin/trends/links_spec.rb +++ b/spec/system/admin/trends/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links' do +RSpec.describe 'Admin::Trends::Links' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/statuses_spec.rb b/spec/system/admin/trends/statuses_spec.rb index 779a15d38fbec3..13fc966dfd17af 100644 --- a/spec/system/admin/trends/statuses_spec.rb +++ b/spec/system/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Statuses' do +RSpec.describe 'Admin::Trends::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/tags_spec.rb b/spec/system/admin/trends/tags_spec.rb index 52e49c3a5d92b6..d914badbd4c443 100644 --- a/spec/system/admin/trends/tags_spec.rb +++ b/spec/system/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Tags' do +RSpec.describe 'Admin::Trends::Tags' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/captcha_spec.rb b/spec/system/captcha_spec.rb index 06c823adf258eb..4c0ce02d1be970 100644 --- a/spec/system/captcha_spec.rb +++ b/spec/system/captcha_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'email confirmation flow when captcha is enabled' do +RSpec.describe 'email confirmation flow when captcha is enabled' do let(:user) { Fabricate(:user, confirmed_at: nil, confirmation_token: 'foobar', created_by_application: client_app) } let(:client_app) { nil } diff --git a/spec/system/filters_spec.rb b/spec/system/filters_spec.rb index a0cb965a61b100..052b5e17306543 100644 --- a/spec/system/filters_spec.rb +++ b/spec/system/filters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Filters' do +RSpec.describe 'Filters' do let(:user) { Fabricate(:user) } let(:filter_title) { 'Filter of fun and games' } diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb index 08b9737d6b6d8a..c1ce4e17261b3e 100644 --- a/spec/system/home_spec.rb +++ b/spec/system/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home page' do +RSpec.describe 'Home page' do context 'when signed in' do before { sign_in Fabricate(:user) } diff --git a/spec/system/log_in_spec.rb b/spec/system/log_in_spec.rb index 8a73c42d2edf00..f8765e8e1cbd52 100644 --- a/spec/system/log_in_spec.rb +++ b/spec/system/log_in_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log in' do +RSpec.describe 'Log in' do include ProfileStories subject { page } diff --git a/spec/system/log_out_spec.rb b/spec/system/log_out_spec.rb index f50f7c2d18d91f..2e52254ca03bb3 100644 --- a/spec/system/log_out_spec.rb +++ b/spec/system/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log out' do +RSpec.describe 'Log out' do include ProfileStories before do diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index 2f2fcf22485ee4..317508a0bb4192 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'NewStatuses', :inline_jobs, :js, :streaming do +RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do include ProfileStories subject { page } diff --git a/spec/system/oauth_spec.rb b/spec/system/oauth_spec.rb index 5d06f6111cee79..0f96a59675803b 100644 --- a/spec/system/oauth_spec.rb +++ b/spec/system/oauth_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Using OAuth from an external app' do +RSpec.describe 'Using OAuth from an external app' do include ProfileStories subject { visit "/oauth/authorize?#{params.to_query}" } diff --git a/spec/system/ocr_spec.rb b/spec/system/ocr_spec.rb index 17d18af1586ed7..fc816b6dbafa13 100644 --- a/spec/system/ocr_spec.rb +++ b/spec/system/ocr_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do +RSpec.describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/privacy_spec.rb b/spec/system/privacy_spec.rb index f2ab1310cc40fd..631440ebb2c72f 100644 --- a/spec/system/privacy_spec.rb +++ b/spec/system/privacy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Privacy policy page' do +RSpec.describe 'Privacy policy page' do it 'visits the privacy policy page and renders the web app' do visit privacy_policy_path diff --git a/spec/system/profile_spec.rb b/spec/system/profile_spec.rb index 2517e823b50c5f..7e3cbfd334ea44 100644 --- a/spec/system/profile_spec.rb +++ b/spec/system/profile_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Profile' do +RSpec.describe 'Profile' do include ProfileStories subject { page } diff --git a/spec/system/redirections_spec.rb b/spec/system/redirections_spec.rb index f73ab58470194c..860bbdd6b72c12 100644 --- a/spec/system/redirections_spec.rb +++ b/spec/system/redirections_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'redirection confirmations' do +RSpec.describe 'redirection confirmations' do let(:account) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/users/foo', url: 'https://example.com/@foo') } let(:status) { Fabricate(:status, account: account, uri: 'https://example.com/users/foo/statuses/1', url: 'https://example.com/@foo/1') } diff --git a/spec/system/report_interface_spec.rb b/spec/system/report_interface_spec.rb index e6cc3b1b68870f..257a1cd6fd371c 100644 --- a/spec/system/report_interface_spec.rb +++ b/spec/system/report_interface_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'report interface', :attachment_processing, :js, :streaming do +RSpec.describe 'report interface', :attachment_processing, :js, :streaming do include ProfileStories let(:email) { 'admin@example.com' } diff --git a/spec/system/severed_relationships_spec.rb b/spec/system/severed_relationships_spec.rb index b933398a083888..4a7bf3e280faaa 100644 --- a/spec/system/severed_relationships_spec.rb +++ b/spec/system/severed_relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Severed relationships page' do +RSpec.describe 'Severed relationships page' do include ProfileStories describe 'GET severed_relationships#index' do diff --git a/spec/system/share_entrypoint_spec.rb b/spec/system/share_entrypoint_spec.rb index 5e27781f2ae5df..7ccfee599ac97f 100644 --- a/spec/system/share_entrypoint_spec.rb +++ b/spec/system/share_entrypoint_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Share page', :js, :streaming do +RSpec.describe 'Share page', :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/unlogged_spec.rb b/spec/system/unlogged_spec.rb index 417ccdaeb65668..26d1bd4542604b 100644 --- a/spec/system/unlogged_spec.rb +++ b/spec/system/unlogged_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'UnloggedBrowsing', :js, :streaming do +RSpec.describe 'UnloggedBrowsing', :js, :streaming do subject { page } before do diff --git a/spec/validators/email_mx_validator_spec.rb b/spec/validators/email_mx_validator_spec.rb index 23a5f768efc8b6..7109c9f4e23b01 100644 --- a/spec/validators/email_mx_validator_spec.rb +++ b/spec/validators/email_mx_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe EmailMxValidator do +RSpec.describe EmailMxValidator do describe '#validate' do let(:user) { instance_double(User, email: 'foo@example.com', sign_up_ip: '1.2.3.4', errors: instance_double(ActiveModel::Errors, add: nil)) } let(:resolv_dns_double) { instance_double(Resolv::DNS) } diff --git a/spec/validators/existing_username_validator_spec.rb b/spec/validators/existing_username_validator_spec.rb index 4f1dd55a17bb07..25ecb1fbcdedaa 100644 --- a/spec/validators/existing_username_validator_spec.rb +++ b/spec/validators/existing_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExistingUsernameValidator do +RSpec.describe ExistingUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/language_validator_spec.rb b/spec/validators/language_validator_spec.rb index cb693dcd81fc5e..19e55f34672f6c 100644 --- a/spec/validators/language_validator_spec.rb +++ b/spec/validators/language_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguageValidator do +RSpec.describe LanguageValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/note_length_validator_spec.rb b/spec/validators/note_length_validator_spec.rb index 3bca93a283da2f..3fdb4ae8b9000e 100644 --- a/spec/validators/note_length_validator_spec.rb +++ b/spec/validators/note_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe NoteLengthValidator do +RSpec.describe NoteLengthValidator do subject { described_class.new(attributes: { note: true }, maximum: 500) } describe '#validate' do diff --git a/spec/validators/reaction_validator_spec.rb b/spec/validators/reaction_validator_spec.rb index f99c1cb5f93ddf..c4d4a517799bc0 100644 --- a/spec/validators/reaction_validator_spec.rb +++ b/spec/validators/reaction_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactionValidator do +RSpec.describe ReactionValidator do let(:announcement) { Fabricate(:announcement) } describe '#validate' do diff --git a/spec/validators/status_length_validator_spec.rb b/spec/validators/status_length_validator_spec.rb index 249b90f4904e3d..ecbfd4ba37fb50 100644 --- a/spec/validators/status_length_validator_spec.rb +++ b/spec/validators/status_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusLengthValidator do +RSpec.describe StatusLengthValidator do describe '#validate' do before { stub_const("#{described_class}::MAX_CHARS", 500) } # Example values below are relative to this baseline diff --git a/spec/validators/unique_username_validator_spec.rb b/spec/validators/unique_username_validator_spec.rb index 0d172c8408959d..037ddadb9f70f7 100644 --- a/spec/validators/unique_username_validator_spec.rb +++ b/spec/validators/unique_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UniqueUsernameValidator do +RSpec.describe UniqueUsernameValidator do describe '#validate' do context 'when local account' do it 'does not add errors if username is nil' do diff --git a/spec/validators/unreserved_username_validator_spec.rb b/spec/validators/unreserved_username_validator_spec.rb index 0eb5f83683df4f..ad1092109db7bb 100644 --- a/spec/validators/unreserved_username_validator_spec.rb +++ b/spec/validators/unreserved_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnreservedUsernameValidator do +RSpec.describe UnreservedUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/url_validator_spec.rb b/spec/validators/url_validator_spec.rb index 4f32b7b39957ac..2297dddaa01b7b 100644 --- a/spec/validators/url_validator_spec.rb +++ b/spec/validators/url_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe URLValidator do +RSpec.describe URLValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb index 82a1dee6d72feb..47a8564eff406d 100644 --- a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb +++ b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'admin/trends/links/_preview_card.html.haml' do +RSpec.describe 'admin/trends/links/_preview_card.html.haml' do it 'correctly escapes user supplied url values' do form = instance_double(ActionView::Helpers::FormHelper, check_box: nil) trend = PreviewCardTrend.new(allowed: false) diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb index 663d639d3606d0..9e3f4082b5ea3d 100644 --- a/spec/views/statuses/show.html.haml_spec.rb +++ b/spec/views/statuses/show.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'statuses/show.html.haml' do +RSpec.describe 'statuses/show.html.haml' do let(:alice) { Fabricate(:account, username: 'alice', display_name: 'Alice') } let(:status) { Fabricate(:status, account: alice, text: 'Hello World') } diff --git a/spec/workers/account_refresh_worker_spec.rb b/spec/workers/account_refresh_worker_spec.rb index 361d69aa0a5940..3e88e8db28be7f 100644 --- a/spec/workers/account_refresh_worker_spec.rb +++ b/spec/workers/account_refresh_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountRefreshWorker do +RSpec.describe AccountRefreshWorker do let(:worker) { described_class.new } let(:service) { instance_double(ResolveAccountService, call: true) } diff --git a/spec/workers/activitypub/delivery_worker_spec.rb b/spec/workers/activitypub/delivery_worker_spec.rb index efce610ae4ecd4..3dfbef31a43594 100644 --- a/spec/workers/activitypub/delivery_worker_spec.rb +++ b/spec/workers/activitypub/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeliveryWorker do +RSpec.describe ActivityPub::DeliveryWorker do include RoutingHelper subject { described_class.new } diff --git a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb index 4427cfdf95988f..9ff4731f96aa3c 100644 --- a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb +++ b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributePollUpdateWorker do +RSpec.describe ActivityPub::DistributePollUpdateWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/distribution_worker_spec.rb b/spec/workers/activitypub/distribution_worker_spec.rb index 0eb6227859d758..9e5db53185fbdb 100644 --- a/spec/workers/activitypub/distribution_worker_spec.rb +++ b/spec/workers/activitypub/distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributionWorker do +RSpec.describe ActivityPub::DistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status) } diff --git a/spec/workers/activitypub/fetch_replies_worker_spec.rb b/spec/workers/activitypub/fetch_replies_worker_spec.rb index 2d080e286ecc98..56d19705a4d034 100644 --- a/spec/workers/activitypub/fetch_replies_worker_spec.rb +++ b/spec/workers/activitypub/fetch_replies_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::FetchRepliesWorker do +RSpec.describe ActivityPub::FetchRepliesWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.com') } diff --git a/spec/workers/activitypub/move_distribution_worker_spec.rb b/spec/workers/activitypub/move_distribution_worker_spec.rb index c810b33c23a644..63396834de01db 100644 --- a/spec/workers/activitypub/move_distribution_worker_spec.rb +++ b/spec/workers/activitypub/move_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::MoveDistributionWorker do +RSpec.describe ActivityPub::MoveDistributionWorker do subject { described_class.new } let(:migration) { Fabricate(:account_migration) } diff --git a/spec/workers/activitypub/post_upgrade_worker_spec.rb b/spec/workers/activitypub/post_upgrade_worker_spec.rb index 08de150ad960e8..fe1c5e895eda51 100644 --- a/spec/workers/activitypub/post_upgrade_worker_spec.rb +++ b/spec/workers/activitypub/post_upgrade_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::PostUpgradeWorker do +RSpec.describe ActivityPub::PostUpgradeWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/activitypub/processing_worker_spec.rb b/spec/workers/activitypub/processing_worker_spec.rb index 66d1cf48904b9e..c06ba63d39b8e1 100644 --- a/spec/workers/activitypub/processing_worker_spec.rb +++ b/spec/workers/activitypub/processing_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ProcessingWorker do +RSpec.describe ActivityPub::ProcessingWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/status_update_distribution_worker_spec.rb b/spec/workers/activitypub/status_update_distribution_worker_spec.rb index 66e52c4f288281..e9a70d11d19f81 100644 --- a/spec/workers/activitypub/status_update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/status_update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::StatusUpdateDistributionWorker do +RSpec.describe ActivityPub::StatusUpdateDistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status, text: 'foo') } diff --git a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb index 8cf13cb9001c85..d10ea8a75e088a 100644 --- a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb +++ b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do +RSpec.describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do let(:worker) { described_class.new } let(:service) { instance_double(ActivityPub::FetchFeaturedTagsCollectionService, call: true) } diff --git a/spec/workers/activitypub/update_distribution_worker_spec.rb b/spec/workers/activitypub/update_distribution_worker_spec.rb index b183a58dfd074c..7d786063988b59 100644 --- a/spec/workers/activitypub/update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdateDistributionWorker do +RSpec.describe ActivityPub::UpdateDistributionWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/add_to_public_statuses_index_worker_spec.rb b/spec/workers/add_to_public_statuses_index_worker_spec.rb index fa150722419bd4..edaec1dd3a6ce1 100644 --- a/spec/workers/add_to_public_statuses_index_worker_spec.rb +++ b/spec/workers/add_to_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AddToPublicStatusesIndexWorker do +RSpec.describe AddToPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/admin/account_deletion_worker_spec.rb b/spec/workers/admin/account_deletion_worker_spec.rb index 631cab6648ef5f..e41b734f214711 100644 --- a/spec/workers/admin/account_deletion_worker_spec.rb +++ b/spec/workers/admin/account_deletion_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountDeletionWorker do +RSpec.describe Admin::AccountDeletionWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/domain_purge_worker_spec.rb b/spec/workers/admin/domain_purge_worker_spec.rb index 861fd71a7f91d5..32bdd0868bc2b5 100644 --- a/spec/workers/admin/domain_purge_worker_spec.rb +++ b/spec/workers/admin/domain_purge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DomainPurgeWorker do +RSpec.describe Admin::DomainPurgeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/suspension_worker_spec.rb b/spec/workers/admin/suspension_worker_spec.rb index da12037edcb987..445e0b635ec516 100644 --- a/spec/workers/admin/suspension_worker_spec.rb +++ b/spec/workers/admin/suspension_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SuspensionWorker do +RSpec.describe Admin::SuspensionWorker do let(:worker) { described_class.new } let(:service) { instance_double(SuspendAccountService, call: true) } diff --git a/spec/workers/after_account_domain_block_worker_spec.rb b/spec/workers/after_account_domain_block_worker_spec.rb index 54a113a2b318f8..56f5957ea23736 100644 --- a/spec/workers/after_account_domain_block_worker_spec.rb +++ b/spec/workers/after_account_domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AfterAccountDomainBlockWorker do +RSpec.describe AfterAccountDomainBlockWorker do let(:worker) { described_class.new } let(:service) { instance_double(AfterBlockDomainFromAccountService, call: true) } diff --git a/spec/workers/backup_worker_spec.rb b/spec/workers/backup_worker_spec.rb index db1b50140b6790..5d1d91267a52bf 100644 --- a/spec/workers/backup_worker_spec.rb +++ b/spec/workers/backup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BackupWorker do +RSpec.describe BackupWorker do let(:worker) { described_class.new } let(:service) { instance_double(BackupService, call: true) } diff --git a/spec/workers/bulk_import_worker_spec.rb b/spec/workers/bulk_import_worker_spec.rb index 91f51fbb425428..2d429c880b0848 100644 --- a/spec/workers/bulk_import_worker_spec.rb +++ b/spec/workers/bulk_import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BulkImportWorker do +RSpec.describe BulkImportWorker do subject { described_class.new } let(:import) { Fabricate(:bulk_import, state: :scheduled) } diff --git a/spec/workers/cache_buster_worker_spec.rb b/spec/workers/cache_buster_worker_spec.rb index adeb287fa37246..b6948395b88fa2 100644 --- a/spec/workers/cache_buster_worker_spec.rb +++ b/spec/workers/cache_buster_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBusterWorker do +RSpec.describe CacheBusterWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/delete_mute_worker_spec.rb b/spec/workers/delete_mute_worker_spec.rb index 1fc84491c3bfa3..a5d1fe343d19c2 100644 --- a/spec/workers/delete_mute_worker_spec.rb +++ b/spec/workers/delete_mute_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeleteMuteWorker do +RSpec.describe DeleteMuteWorker do let(:worker) { described_class.new } let(:service) { instance_double(UnmuteService, call: true) } diff --git a/spec/workers/domain_block_worker_spec.rb b/spec/workers/domain_block_worker_spec.rb index 33c3ca009ac32a..c55aa2c0c337f6 100644 --- a/spec/workers/domain_block_worker_spec.rb +++ b/spec/workers/domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainBlockWorker do +RSpec.describe DomainBlockWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/domain_clear_media_worker_spec.rb b/spec/workers/domain_clear_media_worker_spec.rb index 21f8f87b2f615c..20911007b0f3d1 100644 --- a/spec/workers/domain_clear_media_worker_spec.rb +++ b/spec/workers/domain_clear_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainClearMediaWorker do +RSpec.describe DomainClearMediaWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/feed_insert_worker_spec.rb b/spec/workers/feed_insert_worker_spec.rb index e9484879ff4190..92ae304d0e84cf 100644 --- a/spec/workers/feed_insert_worker_spec.rb +++ b/spec/workers/feed_insert_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FeedInsertWorker do +RSpec.describe FeedInsertWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/filtered_notification_cleanup_worker_spec.rb b/spec/workers/filtered_notification_cleanup_worker_spec.rb index 2636b70ad4aec1..5ecd4291af900b 100644 --- a/spec/workers/filtered_notification_cleanup_worker_spec.rb +++ b/spec/workers/filtered_notification_cleanup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FilteredNotificationCleanupWorker do +RSpec.describe FilteredNotificationCleanupWorker do describe '#perform' do let(:sender) { Fabricate(:account) } let(:recipient) { Fabricate(:account) } diff --git a/spec/workers/import/row_worker_spec.rb b/spec/workers/import/row_worker_spec.rb index 0a71a838fcc573..edb02cb3914227 100644 --- a/spec/workers/import/row_worker_spec.rb +++ b/spec/workers/import/row_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Import::RowWorker do +RSpec.describe Import::RowWorker do subject { described_class.new } let(:row) { Fabricate(:bulk_import_row, bulk_import: import) } diff --git a/spec/workers/import_worker_spec.rb b/spec/workers/import_worker_spec.rb index 4095a5d354b9a9..1d34aafe861656 100644 --- a/spec/workers/import_worker_spec.rb +++ b/spec/workers/import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ImportWorker do +RSpec.describe ImportWorker do let(:worker) { described_class.new } let(:service) { instance_double(ImportService, call: true) } diff --git a/spec/workers/move_worker_spec.rb b/spec/workers/move_worker_spec.rb index b25992e44bd615..a24de57e274a6e 100644 --- a/spec/workers/move_worker_spec.rb +++ b/spec/workers/move_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MoveWorker do +RSpec.describe MoveWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account, domain: nil) } diff --git a/spec/workers/poll_expiration_notify_worker_spec.rb b/spec/workers/poll_expiration_notify_worker_spec.rb index 4bd90270d89b79..b3ccdd3d7775af 100644 --- a/spec/workers/poll_expiration_notify_worker_spec.rb +++ b/spec/workers/poll_expiration_notify_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PollExpirationNotifyWorker do +RSpec.describe PollExpirationNotifyWorker do let(:worker) { described_class.new } let(:account) { Fabricate(:account, domain: remote? ? 'example.com' : nil) } let(:status) { Fabricate(:status, account: account) } diff --git a/spec/workers/post_process_media_worker_spec.rb b/spec/workers/post_process_media_worker_spec.rb index 1a274623d73fba..f4b441a9202384 100644 --- a/spec/workers/post_process_media_worker_spec.rb +++ b/spec/workers/post_process_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PostProcessMediaWorker, :attachment_processing do +RSpec.describe PostProcessMediaWorker, :attachment_processing do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_announcement_reaction_worker_spec.rb b/spec/workers/publish_announcement_reaction_worker_spec.rb index 91668b5ada6992..37687ca1a8ab94 100644 --- a/spec/workers/publish_announcement_reaction_worker_spec.rb +++ b/spec/workers/publish_announcement_reaction_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishAnnouncementReactionWorker do +RSpec.describe PublishAnnouncementReactionWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_scheduled_announcement_worker_spec.rb b/spec/workers/publish_scheduled_announcement_worker_spec.rb index 2e50d4a50da398..c4e17903a94a0e 100644 --- a/spec/workers/publish_scheduled_announcement_worker_spec.rb +++ b/spec/workers/publish_scheduled_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledAnnouncementWorker do +RSpec.describe PublishScheduledAnnouncementWorker do subject { described_class.new } let!(:remote_account) { Fabricate(:account, domain: 'domain.com', username: 'foo', uri: 'https://domain.com/users/foo') } diff --git a/spec/workers/publish_scheduled_status_worker_spec.rb b/spec/workers/publish_scheduled_status_worker_spec.rb index f8547e6fe2a685..35e510d2539cf0 100644 --- a/spec/workers/publish_scheduled_status_worker_spec.rb +++ b/spec/workers/publish_scheduled_status_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledStatusWorker do +RSpec.describe PublishScheduledStatusWorker do subject { described_class.new } let(:scheduled_status) { Fabricate(:scheduled_status, params: { text: 'Hello world, future!' }) } diff --git a/spec/workers/push_conversation_worker_spec.rb b/spec/workers/push_conversation_worker_spec.rb index 5fbb4c6853b4a9..d651059c9a6ed8 100644 --- a/spec/workers/push_conversation_worker_spec.rb +++ b/spec/workers/push_conversation_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushConversationWorker do +RSpec.describe PushConversationWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_encrypted_message_worker_spec.rb b/spec/workers/push_encrypted_message_worker_spec.rb index 3cd04ce7b4c60f..311545cf562297 100644 --- a/spec/workers/push_encrypted_message_worker_spec.rb +++ b/spec/workers/push_encrypted_message_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushEncryptedMessageWorker do +RSpec.describe PushEncryptedMessageWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_update_worker_spec.rb b/spec/workers/push_update_worker_spec.rb index c8f94fa82a81d1..6206ab59867a27 100644 --- a/spec/workers/push_update_worker_spec.rb +++ b/spec/workers/push_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushUpdateWorker do +RSpec.describe PushUpdateWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/redownload_avatar_worker_spec.rb b/spec/workers/redownload_avatar_worker_spec.rb index 6ef320bc4fd2ad..6712ce8f4029f5 100644 --- a/spec/workers/redownload_avatar_worker_spec.rb +++ b/spec/workers/redownload_avatar_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadAvatarWorker do +RSpec.describe RedownloadAvatarWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_header_worker_spec.rb b/spec/workers/redownload_header_worker_spec.rb index 746c1a63ffbb76..a57ed3179235d9 100644 --- a/spec/workers/redownload_header_worker_spec.rb +++ b/spec/workers/redownload_header_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadHeaderWorker do +RSpec.describe RedownloadHeaderWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_media_worker_spec.rb b/spec/workers/redownload_media_worker_spec.rb index cd561d148b11f0..adf9a7171c37ca 100644 --- a/spec/workers/redownload_media_worker_spec.rb +++ b/spec/workers/redownload_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadMediaWorker do +RSpec.describe RedownloadMediaWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/refollow_worker_spec.rb b/spec/workers/refollow_worker_spec.rb index 5718d4db497652..30d53279473ec0 100644 --- a/spec/workers/refollow_worker_spec.rb +++ b/spec/workers/refollow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RefollowWorker do +RSpec.describe RefollowWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.org', protocol: :activitypub) } diff --git a/spec/workers/regeneration_worker_spec.rb b/spec/workers/regeneration_worker_spec.rb index 37b0a04c49fb5b..980f1d81db71b0 100644 --- a/spec/workers/regeneration_worker_spec.rb +++ b/spec/workers/regeneration_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RegenerationWorker do +RSpec.describe RegenerationWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/removal_worker_spec.rb b/spec/workers/removal_worker_spec.rb index 5071e882b6ad97..784e72441cd83d 100644 --- a/spec/workers/removal_worker_spec.rb +++ b/spec/workers/removal_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemovalWorker do +RSpec.describe RemovalWorker do let(:worker) { described_class.new } let(:service) { instance_double(RemoveStatusService, call: true) } diff --git a/spec/workers/remove_featured_tag_worker_spec.rb b/spec/workers/remove_featured_tag_worker_spec.rb index a64bd0605f3db0..7866824ee751fc 100644 --- a/spec/workers/remove_featured_tag_worker_spec.rb +++ b/spec/workers/remove_featured_tag_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFeaturedTagWorker do +RSpec.describe RemoveFeaturedTagWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/remove_from_public_statuses_index_worker_spec.rb b/spec/workers/remove_from_public_statuses_index_worker_spec.rb index 43ff211eaa772a..90f05d6a26793a 100644 --- a/spec/workers/remove_from_public_statuses_index_worker_spec.rb +++ b/spec/workers/remove_from_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFromPublicStatusesIndexWorker do +RSpec.describe RemoveFromPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/resolve_account_worker_spec.rb b/spec/workers/resolve_account_worker_spec.rb index 6f3cff099f16c4..de349adacb6f39 100644 --- a/spec/workers/resolve_account_worker_spec.rb +++ b/spec/workers/resolve_account_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveAccountWorker do +RSpec.describe ResolveAccountWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb index 08ebf82785f6d9..28a41761931d02 100644 --- a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AccountsStatusesCleanupScheduler do +RSpec.describe Scheduler::AccountsStatusesCleanupScheduler do subject { described_class.new } let!(:account_alice) { Fabricate(:account, domain: nil, username: 'alice') } diff --git a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb index c0c50b128d8f47..d9355248ba8389 100644 --- a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb +++ b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AutoCloseRegistrationsScheduler do +RSpec.describe Scheduler::AutoCloseRegistrationsScheduler do subject { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb index 246012e128c9ce..eb9d88e59a485d 100644 --- a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb +++ b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::FollowRecommendationsScheduler do +RSpec.describe Scheduler::FollowRecommendationsScheduler do let!(:target_accounts) do Fabricate.times(3, :account) do statuses(count: 6) diff --git a/spec/workers/scheduler/indexing_scheduler_spec.rb b/spec/workers/scheduler/indexing_scheduler_spec.rb index 568f0fc84dbd06..39a88e80637c6c 100644 --- a/spec/workers/scheduler/indexing_scheduler_spec.rb +++ b/spec/workers/scheduler/indexing_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IndexingScheduler do +RSpec.describe Scheduler::IndexingScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb index 8f686a69988c79..37682ebb8f1a4f 100644 --- a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::InstanceRefreshScheduler do +RSpec.describe Scheduler::InstanceRefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb index 50af0301174d1a..7071fa6e984e2f 100644 --- a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IpCleanupScheduler do +RSpec.describe Scheduler::IpCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/pghero_scheduler_spec.rb b/spec/workers/scheduler/pghero_scheduler_spec.rb index e404e5fe4726a7..c99e5bb164c58f 100644 --- a/spec/workers/scheduler/pghero_scheduler_spec.rb +++ b/spec/workers/scheduler/pghero_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::PgheroScheduler do +RSpec.describe Scheduler::PgheroScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb index 13c853c62ac9f7..2eeaeffe376de2 100644 --- a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb +++ b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::ScheduledStatusesScheduler do +RSpec.describe Scheduler::ScheduledStatusesScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/self_destruct_scheduler_spec.rb b/spec/workers/scheduler/self_destruct_scheduler_spec.rb index 2bf578357197ae..a79559efddd571 100644 --- a/spec/workers/scheduler/self_destruct_scheduler_spec.rb +++ b/spec/workers/scheduler/self_destruct_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SelfDestructScheduler do +RSpec.describe Scheduler::SelfDestructScheduler do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/software_update_check_scheduler_spec.rb b/spec/workers/scheduler/software_update_check_scheduler_spec.rb index f596c0a1eca5a7..c88dbfe0af2ec2 100644 --- a/spec/workers/scheduler/software_update_check_scheduler_spec.rb +++ b/spec/workers/scheduler/software_update_check_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SoftwareUpdateCheckScheduler do +RSpec.describe Scheduler::SoftwareUpdateCheckScheduler do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb index 25f0e1fce4793e..2782848e76d9e8 100644 --- a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SuspendedUserCleanupScheduler do +RSpec.describe Scheduler::SuspendedUserCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb index c0c5f032bfcc8e..34bcd8fdd8266c 100644 --- a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::RefreshScheduler do +RSpec.describe Scheduler::Trends::RefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb index cc971c24b40978..ec35236172ffe9 100644 --- a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::ReviewNotificationsScheduler do +RSpec.describe Scheduler::Trends::ReviewNotificationsScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb index 7952f2c146309c..b1be7c46117203 100644 --- a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::UserCleanupScheduler do +RSpec.describe Scheduler::UserCleanupScheduler do subject { described_class.new } let!(:new_unconfirmed_user) { Fabricate(:user) } diff --git a/spec/workers/scheduler/vacuum_scheduler_spec.rb b/spec/workers/scheduler/vacuum_scheduler_spec.rb index 36ecc93d8e4aac..29a7eeac40a8e7 100644 --- a/spec/workers/scheduler/vacuum_scheduler_spec.rb +++ b/spec/workers/scheduler/vacuum_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::VacuumScheduler do +RSpec.describe Scheduler::VacuumScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/tag_unmerge_worker_spec.rb b/spec/workers/tag_unmerge_worker_spec.rb index 5d3a12c4492af6..a0e53e36d936e7 100644 --- a/spec/workers/tag_unmerge_worker_spec.rb +++ b/spec/workers/tag_unmerge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagUnmergeWorker do +RSpec.describe TagUnmergeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/unfilter_notifications_worker_spec.rb b/spec/workers/unfilter_notifications_worker_spec.rb index 629eb644e4f2bb..464a4520ffd535 100644 --- a/spec/workers/unfilter_notifications_worker_spec.rb +++ b/spec/workers/unfilter_notifications_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfilterNotificationsWorker do +RSpec.describe UnfilterNotificationsWorker do let(:recipient) { Fabricate(:account) } let(:sender) { Fabricate(:account) } diff --git a/spec/workers/unfollow_follow_worker_spec.rb b/spec/workers/unfollow_follow_worker_spec.rb index 8025b88c0c366c..7b9d49b902dbe3 100644 --- a/spec/workers/unfollow_follow_worker_spec.rb +++ b/spec/workers/unfollow_follow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfollowFollowWorker do +RSpec.describe UnfollowFollowWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account) } diff --git a/spec/workers/unpublish_announcement_worker_spec.rb b/spec/workers/unpublish_announcement_worker_spec.rb index c742c30bcea4a2..f4838ac2487a14 100644 --- a/spec/workers/unpublish_announcement_worker_spec.rb +++ b/spec/workers/unpublish_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnpublishAnnouncementWorker do +RSpec.describe UnpublishAnnouncementWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/verify_account_links_worker_spec.rb b/spec/workers/verify_account_links_worker_spec.rb index 227591392c5bc1..3f600b8c979199 100644 --- a/spec/workers/verify_account_links_worker_spec.rb +++ b/spec/workers/verify_account_links_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe VerifyAccountLinksWorker do +RSpec.describe VerifyAccountLinksWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/web/push_notification_worker_spec.rb b/spec/workers/web/push_notification_worker_spec.rb index 637206a40939ab..ced21d5bf799b4 100644 --- a/spec/workers/web/push_notification_worker_spec.rb +++ b/spec/workers/web/push_notification_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Web::PushNotificationWorker do +RSpec.describe Web::PushNotificationWorker do subject { described_class.new } let(:p256dh) { 'BN4GvZtEZiZuqFxSKVZfSfluwKBD7UxHNBmWkfiZfCtgDE8Bwh-_MtLXbBxTBAWH9r7IPKL0lhdcaqtL1dfxU5E=' } diff --git a/spec/workers/webhooks/delivery_worker_spec.rb b/spec/workers/webhooks/delivery_worker_spec.rb index 6a5483d1d46e0a..48fcfc607bff7a 100644 --- a/spec/workers/webhooks/delivery_worker_spec.rb +++ b/spec/workers/webhooks/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::DeliveryWorker do +RSpec.describe Webhooks::DeliveryWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/streaming/index.js b/streaming/index.js index dc847f8654e417..f4aeadf23f5bbf 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -111,6 +111,35 @@ const startServer = async () => { const server = http.createServer(); const wss = new WebSocketServer({ noServer: true }); + /** + * Adds a namespace to Redis keys or channel names + * Fixes: https://github.com/redis/ioredis/issues/1910 + * @param {string} keyOrChannel + * @returns {string} + */ + function redisNamespaced(keyOrChannel) { + if (redisConfig.namespace) { + return `${redisConfig.namespace}:${keyOrChannel}`; + } else { + return keyOrChannel; + } + } + + /** + * Removes the redis namespace from a channel name + * @param {string} channel + * @returns {string} + */ + function redisUnnamespaced(channel) { + if (typeof redisConfig.namespace === "string") { + // Note: this removes the configured namespace and the colon that is used + // to separate it: + return channel.slice(redisConfig.namespace.length + 1); + } else { + return channel; + } + } + // Set the X-Request-Id header on WebSockets: wss.on("headers", function onHeaders(headers, req) { headers.push(`X-Request-Id: ${req.id}`); @@ -200,7 +229,6 @@ const startServer = async () => { const subs = {}; const redisSubscribeClient = Redis.createClient(redisConfig, logger); - const { redisPrefix } = redisConfig; // When checking metrics in the browser, the favicon is requested this // prevents the request from falling through to the API Router, which would @@ -222,7 +250,7 @@ const startServer = async () => { const interval = 6 * 60; const tellSubscribed = () => { - channels.forEach(channel => redisClient.set(`${redisPrefix}subscribed:${channel}`, '1', 'EX', interval * 3)); + channels.forEach(channel => redisClient.set(redisNamespaced(`subscribed:${channel}`), '1', 'EX', interval * 3)); }; tellSubscribed(); @@ -240,11 +268,10 @@ const startServer = async () => { */ const onRedisMessage = (channel, message) => { metrics.redisMessagesReceived.inc(); + logger.debug(`New message on channel ${channel}`); - const callbacks = subs[channel]; - - logger.debug(`New message on channel ${redisPrefix}${channel}`); - + const key = redisUnnamespaced(channel); + const callbacks = subs[key]; if (!callbacks) { return; } @@ -273,7 +300,8 @@ const startServer = async () => { if (subs[channel].length === 0) { logger.debug(`Subscribe ${channel}`); - redisSubscribeClient.subscribe(channel, (err, count) => { + + redisSubscribeClient.subscribe(redisNamespaced(channel), (err, count) => { if (err) { logger.error(`Error subscribing to ${channel}`); } else if (typeof count === 'number') { @@ -300,7 +328,9 @@ const startServer = async () => { if (subs[channel].length === 0) { logger.debug(`Unsubscribe ${channel}`); - redisSubscribeClient.unsubscribe(channel, (err, count) => { + + // FIXME: https://github.com/redis/ioredis/issues/1910 + redisSubscribeClient.unsubscribe(redisNamespaced(channel), (err, count) => { if (err) { logger.error(`Error unsubscribing to ${channel}`); } else if (typeof count === 'number') { @@ -481,14 +511,14 @@ const startServer = async () => { }); res.on('close', () => { - unsubscribe(`${redisPrefix}${accessTokenChannelId}`, listener); - unsubscribe(`${redisPrefix}${systemChannelId}`, listener); + unsubscribe(accessTokenChannelId, listener); + unsubscribe(systemChannelId, listener); metrics.connectedChannels.labels({ type: 'eventsource', channel: 'system' }).dec(2); }); - subscribe(`${redisPrefix}${accessTokenChannelId}`, listener); - subscribe(`${redisPrefix}${systemChannelId}`, listener); + subscribe(accessTokenChannelId, listener); + subscribe(systemChannelId, listener); metrics.connectedChannels.labels({ type: 'eventsource', channel: 'system' }).inc(2); }; @@ -812,11 +842,11 @@ const startServer = async () => { }; channelIds.forEach(id => { - subscribe(`${redisPrefix}${id}`, listener); + subscribe(id, listener); }); if (typeof attachCloseHandler === 'function') { - attachCloseHandler(channelIds.map(id => `${redisPrefix}${id}`), listener); + attachCloseHandler(channelIds, listener); } return listener; @@ -1177,7 +1207,7 @@ const startServer = async () => { } channelIds.forEach(channelId => { - unsubscribe(`${redisPrefix}${channelId}`, subscription.listener); + unsubscribe(channelId, subscription.listener); }); metrics.connectedChannels.labels({ type: 'websocket', channel: subscription.channelName }).dec(); @@ -1221,8 +1251,8 @@ const startServer = async () => { }, }); - subscribe(`${redisPrefix}${accessTokenChannelId}`, listener); - subscribe(`${redisPrefix}${systemChannelId}`, listener); + subscribe(accessTokenChannelId, listener); + subscribe(systemChannelId, listener); subscriptions[accessTokenChannelId] = { channelName: 'system', diff --git a/streaming/redis.js b/streaming/redis.js index 208d6ae0784b76..2a36b89dc553a3 100644 --- a/streaming/redis.js +++ b/streaming/redis.js @@ -4,44 +4,114 @@ import { parseIntFromEnvValue } from './utils.js'; /** * @typedef RedisConfiguration - * @property {import('ioredis').RedisOptions} redisParams - * @property {string} redisPrefix - * @property {string|undefined} redisUrl + * @property {string|undefined} namespace + * @property {string|undefined} url + * @property {import('ioredis').RedisOptions} options */ +/** + * + * @param {NodeJS.ProcessEnv} env + * @returns {boolean} + */ +function hasSentinelConfiguration(env) { + return ( + typeof env.REDIS_SENTINELS === 'string' && + env.REDIS_SENTINELS.length > 0 && + typeof env.REDIS_SENTINEL_MASTER === 'string' && + env.REDIS_SENTINEL_MASTER.length > 0 + ); +} + +/** + * + * @param {NodeJS.ProcessEnv} env + * @param {import('ioredis').SentinelConnectionOptions} commonOptions + * @returns {import('ioredis').SentinelConnectionOptions} + */ +function getSentinelConfiguration(env, commonOptions) { + const redisDatabase = parseIntFromEnvValue(env.REDIS_DB, 0, 'REDIS_DB'); + const sentinelPort = parseIntFromEnvValue(env.REDIS_SENTINEL_PORT, 26379, 'REDIS_SENTINEL_PORT'); + + const sentinels = env.REDIS_SENTINELS.split(',').map((sentinel) => { + const [host, port] = sentinel.split(':', 2); + + /** @type {import('ioredis').SentinelAddress} */ + return { + host: host, + port: port ?? sentinelPort, + // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, + // only allowing IPv4 connections: + // https://github.com/redis/ioredis/issues/1576 + family: 0 + }; + }); + + return { + db: redisDatabase, + name: env.REDIS_SENTINEL_MASTER, + username: env.REDIS_USERNAME, + password: env.REDIS_PASSWORD, + sentinelUsername: env.REDIS_SENTINEL_USERNAME ?? env.REDIS_USERNAME, + sentinelPassword: env.REDIS_SENTINEL_PASSWORD ?? env.REDIS_PASSWORD, + sentinels, + ...commonOptions, + }; +} + /** * @param {NodeJS.ProcessEnv} env the `process.env` value to read configuration from * @returns {RedisConfiguration} configuration for the Redis connection */ export function configFromEnv(env) { - // ioredis *can* transparently add prefixes for us, but it doesn't *in some cases*, - // which means we can't use it. But this is something that should be looked into. - const redisPrefix = env.REDIS_NAMESPACE ? `${env.REDIS_NAMESPACE}:` : ''; + const redisNamespace = env.REDIS_NAMESPACE; + // These options apply for both REDIS_URL based connections and connections + // using the other REDIS_* environment variables: + const commonOptions = { + // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, + // only allowing IPv4 connections: + // https://github.com/redis/ioredis/issues/1576 + family: 0 + // Note: we don't use auto-prefixing of keys since this doesn't apply to + // subscribe/unsubscribe which have "channel" instead of "key" arguments + }; + + // If we receive REDIS_URL, don't continue parsing any other REDIS_* + // environment variables: + if (typeof env.REDIS_URL === 'string' && env.REDIS_URL.length > 0) { + return { + url: env.REDIS_URL, + options: commonOptions, + namespace: redisNamespace + }; + } + + // If we have configuration for Redis Sentinel mode, prefer that: + if (hasSentinelConfiguration(env)) { + return { + options: getSentinelConfiguration(env, commonOptions), + namespace: redisNamespace + }; + } + + // Finally, handle all the other REDIS_* environment variables: let redisPort = parseIntFromEnvValue(env.REDIS_PORT, 6379, 'REDIS_PORT'); let redisDatabase = parseIntFromEnvValue(env.REDIS_DB, 0, 'REDIS_DB'); /** @type {import('ioredis').RedisOptions} */ - const redisParams = { - host: env.REDIS_HOST || '127.0.0.1', + const options = { + host: env.REDIS_HOST ?? '127.0.0.1', port: redisPort, - // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, - // only allowing IPv4 connections: - // https://github.com/redis/ioredis/issues/1576 - family: 0, db: redisDatabase, - password: env.REDIS_PASSWORD || undefined, + username: env.REDIS_USERNAME, + password: env.REDIS_PASSWORD, + ...commonOptions, }; - // redisParams.path takes precedence over host and port. - if (env.REDIS_URL && env.REDIS_URL.startsWith('unix://')) { - redisParams.path = env.REDIS_URL.slice(7); - } - return { - redisParams, - redisPrefix, - redisUrl: typeof env.REDIS_URL === 'string' ? env.REDIS_URL : undefined, + options, + namespace: redisNamespace }; } @@ -50,13 +120,13 @@ export function configFromEnv(env) { * @param {import('pino').Logger} logger * @returns {Redis} */ -export function createClient({ redisParams, redisUrl }, logger) { +export function createClient({ url, options }, logger) { let client; - if (typeof redisUrl === 'string') { - client = new Redis(redisUrl, redisParams); + if (typeof url === 'string') { + client = new Redis(url, options); } else { - client = new Redis(redisParams); + client = new Redis(options); } client.on('error', (err) => logger.error({ err }, 'Redis Client Error!')); diff --git a/yarn.lock b/yarn.lock index 2271061a7eb850..5d9c2be90a4909 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2820,9 +2820,9 @@ __metadata: eslint-define-config: "npm:^2.0.0" eslint-import-resolver-typescript: "npm:^3.5.5" eslint-plugin-formatjs: "npm:^4.10.1" - eslint-plugin-import: "npm:~2.29.0" + eslint-plugin-import: "npm:~2.30.0" eslint-plugin-jsdoc: "npm:^50.0.0" - eslint-plugin-jsx-a11y: "npm:~6.9.0" + eslint-plugin-jsx-a11y: "npm:~6.10.0" eslint-plugin-promise: "npm:~7.1.0" eslint-plugin-react: "npm:^7.33.2" eslint-plugin-react-hooks: "npm:^4.6.0" @@ -2975,6 +2975,13 @@ __metadata: languageName: node linkType: hard +"@nolyfill/is-core-module@npm:1.0.39": + version: 1.0.39 + resolution: "@nolyfill/is-core-module@npm:1.0.39" + checksum: 10c0/34ab85fdc2e0250879518841f74a30c276bca4f6c3e13526d2d1fe515e1adf6d46c25fcd5989d22ea056d76f7c39210945180b4859fc83b050e2da411aa86289 + languageName: node + linkType: hard + "@npmcli/agent@npm:^2.0.0": version: 2.2.0 resolution: "@npmcli/agent@npm:2.2.0" @@ -3183,6 +3190,13 @@ __metadata: languageName: node linkType: hard +"@rtsao/scc@npm:^1.1.0": + version: 1.1.0 + resolution: "@rtsao/scc@npm:1.1.0" + checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -4833,7 +4847,7 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7, array-includes@npm:^3.1.8": +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8": version: 3.1.8 resolution: "array-includes@npm:3.1.8" dependencies: @@ -4891,16 +4905,17 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.findlastindex@npm:1.2.3" +"array.prototype.findlastindex@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/2c5c4d3f07512d6729f728f6260a314c00f2eb0a243123092661fa1bc65dce90234c3b483b5f978396eccef6f69c50f0bea248448aaf9cdfcd1cedad6217acbb + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 languageName: node linkType: hard @@ -5123,10 +5138,10 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:^4.9.1": - version: 4.9.1 - resolution: "axe-core@npm:4.9.1" - checksum: 10c0/ac9e5a0c6fa115a43ebffc32a1d2189e1ca6431b5a78e88cdcf94a72a25c5964185682edd94fe6bdb1cb4266c0d06301b022866e0e50dcdf6e3cefe556470110 +"axe-core@npm:^4.10.0": + version: 4.10.0 + resolution: "axe-core@npm:4.10.0" + checksum: 10c0/732c171d48caaace5e784895c4dacb8ca6155e9d98045138ebe3952f78457dd05b92c57d05b41ce2a570aff87dbd0471e8398d2c0f6ebe79617b746c8f658998 languageName: node linkType: hard @@ -5141,12 +5156,10 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:~3.1.1": - version: 3.1.1 - resolution: "axobject-query@npm:3.1.1" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10c0/fff3175a22fd1f41fceb7ae0cd25f6594a0d7fba28c2335dd904538b80eb4e1040432564a3c643025cd2bb748f68d35aaabffb780b794da97ecfc748810b25ad +"axobject-query@npm:^4.1.0": + version: 4.1.0 + resolution: "axobject-query@npm:4.1.0" + checksum: 10c0/c470e4f95008f232eadd755b018cb55f16c03ccf39c027b941cd8820ac6b68707ce5d7368a46756db4256fbc91bb4ead368f84f7fb034b2b7932f082f6dc0775 languageName: node linkType: hard @@ -6916,7 +6929,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6, debug@npm:~4.3.6": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:~4.3.6": version: 4.3.6 resolution: "debug@npm:4.3.6" dependencies: @@ -7525,13 +7538,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.12.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" +"enhanced-resolve@npm:^5.15.0": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" dependencies: graceful-fs: "npm:^4.2.4" tapable: "npm:^2.2.0" - checksum: 10c0/69984a7990913948b4150855aed26a84afb4cb1c5a94fb8e3a65bd00729a73fc2eaff6871fb8e345377f294831afe349615c93560f2f54d61b43cdfdf668f19a + checksum: 10c0/81a0515675eca17efdba2cf5bad87abc91a528fc1191aad50e275e74f045b41506167d420099022da7181c8d787170ea41e4a11a0b10b7a16f6237daecb15370 languageName: node linkType: hard @@ -7834,32 +7847,39 @@ __metadata: linkType: hard "eslint-import-resolver-typescript@npm:^3.5.5": - version: 3.6.1 - resolution: "eslint-import-resolver-typescript@npm:3.6.1" + version: 3.6.3 + resolution: "eslint-import-resolver-typescript@npm:3.6.3" dependencies: - debug: "npm:^4.3.4" - enhanced-resolve: "npm:^5.12.0" - eslint-module-utils: "npm:^2.7.4" - fast-glob: "npm:^3.3.1" - get-tsconfig: "npm:^4.5.0" - is-core-module: "npm:^2.11.0" + "@nolyfill/is-core-module": "npm:1.0.39" + debug: "npm:^4.3.5" + enhanced-resolve: "npm:^5.15.0" + eslint-module-utils: "npm:^2.8.1" + fast-glob: "npm:^3.3.2" + get-tsconfig: "npm:^4.7.5" + is-bun-module: "npm:^1.0.2" is-glob: "npm:^4.0.3" peerDependencies: eslint: "*" eslint-plugin-import: "*" - checksum: 10c0/cb1cb4389916fe78bf8c8567aae2f69243dbfe624bfe21078c56ad46fa1ebf0634fa7239dd3b2055ab5c27359e4b4c28b69b11fcb3a5df8a9e6f7add8e034d86 + eslint-plugin-import-x: "*" + peerDependenciesMeta: + eslint-plugin-import: + optional: true + eslint-plugin-import-x: + optional: true + checksum: 10c0/5933b00791b7b077725b9ba9a85327d2e2dc7c8944c18a868feb317a0bf0e1e77aed2254c9c5e24dcc49360d119331d2c15281837f4269592965ace380a75111 languageName: node linkType: hard -"eslint-module-utils@npm:^2.7.4, eslint-module-utils@npm:^2.8.0": - version: 2.8.0 - resolution: "eslint-module-utils@npm:2.8.0" +"eslint-module-utils@npm:^2.8.1, eslint-module-utils@npm:^2.9.0": + version: 2.9.0 + resolution: "eslint-module-utils@npm:2.9.0" dependencies: debug: "npm:^3.2.7" peerDependenciesMeta: eslint: optional: true - checksum: 10c0/c7a8d1a58d76ec8217a8fea49271ec8132d1b9390965a75f6a4ecbc9e5983d742195b46d2e4378231d2186801439fe1aa5700714b0bfd4eb17aac6e1b65309df + checksum: 10c0/7c45c5b54402a969e99315890c10e9bf8c8bee16c7890573343af05dfa04566d61546585678c413e5228af0550e39461be47e35a8ff0d1863e113bdbb28d1d29 languageName: node linkType: hard @@ -7884,30 +7904,31 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:~2.29.0": - version: 2.29.1 - resolution: "eslint-plugin-import@npm:2.29.1" +"eslint-plugin-import@npm:~2.30.0": + version: 2.30.0 + resolution: "eslint-plugin-import@npm:2.30.0" dependencies: - array-includes: "npm:^3.1.7" - array.prototype.findlastindex: "npm:^1.2.3" + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.8" + array.prototype.findlastindex: "npm:^1.2.5" array.prototype.flat: "npm:^1.3.2" array.prototype.flatmap: "npm:^1.3.2" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.8.0" - hasown: "npm:^2.0.0" - is-core-module: "npm:^2.13.1" + eslint-module-utils: "npm:^2.9.0" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.15.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.7" - object.groupby: "npm:^1.0.1" - object.values: "npm:^1.1.7" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.0" semver: "npm:^6.3.1" tsconfig-paths: "npm:^3.15.0" peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10c0/5f35dfbf4e8e67f741f396987de9504ad125c49f4144508a93282b4ea0127e052bde65ab6def1f31b6ace6d5d430be698333f75bdd7dca3bc14226c92a083196 + checksum: 10c0/4c9dcb1f27505c4d5dd891d2b551f56c70786d136aa3992a77e785bdc67c9f60200a2c7fb0ce55b7647fe550b12bc433d5dfa59e2c00ab44227791c5ab86badf languageName: node linkType: hard @@ -7932,16 +7953,16 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:~6.9.0": - version: 6.9.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.9.0" +"eslint-plugin-jsx-a11y@npm:~6.10.0": + version: 6.10.0 + resolution: "eslint-plugin-jsx-a11y@npm:6.10.0" dependencies: aria-query: "npm:~5.1.3" array-includes: "npm:^3.1.8" array.prototype.flatmap: "npm:^1.3.2" ast-types-flow: "npm:^0.0.8" - axe-core: "npm:^4.9.1" - axobject-query: "npm:~3.1.1" + axe-core: "npm:^4.10.0" + axobject-query: "npm:^4.1.0" damerau-levenshtein: "npm:^1.0.8" emoji-regex: "npm:^9.2.2" es-iterator-helpers: "npm:^1.0.19" @@ -7953,8 +7974,8 @@ __metadata: safe-regex-test: "npm:^1.0.3" string.prototype.includes: "npm:^2.0.0" peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/72ac719ca90b6149c8f3c708ac5b1177f6757668b6e174d72a78512d4ac10329331b9c666c21e9561237a96a45d7f147f6a5d270dadbb99eb4ee093f127792c3 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + checksum: 10c0/9f8e29a3317fb6a82e2ecd333fe0fab3a69fff786d087eb65dc723d6e954473ab681d14a252d7cb2971f5e7f68816cb6f7731766558e1833a77bd73af1b5ab34 languageName: node linkType: hard @@ -7977,8 +7998,8 @@ __metadata: linkType: hard "eslint-plugin-react@npm:^7.33.2": - version: 7.35.0 - resolution: "eslint-plugin-react@npm:7.35.0" + version: 7.35.2 + resolution: "eslint-plugin-react@npm:7.35.2" dependencies: array-includes: "npm:^3.1.8" array.prototype.findlast: "npm:^1.2.5" @@ -8000,7 +8021,7 @@ __metadata: string.prototype.repeat: "npm:^1.0.0" peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10c0/eedcc33de4b2cda91d56ae517a4f771a0c76da9c1e26c95543969012871381e11d4d6cffdf6fa8423036585c289eb3500f3f93fb1d314fb2624e0aa1e463305e + checksum: 10c0/5f891f5a77e902a0ca8d10b23d0b800e90a09400187febe5986c5078d6277baa4b974d6acdbba25baae065dbcf12eb9241b5f5782527d0780314c2ee5006a8af languageName: node linkType: hard @@ -8419,7 +8440,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1, fast-glob@npm:^3.3.2": +"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -8955,12 +8976,12 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.5.0": - version: 4.7.2 - resolution: "get-tsconfig@npm:4.7.2" +"get-tsconfig@npm:^4.7.5": + version: 4.8.0 + resolution: "get-tsconfig@npm:4.8.0" dependencies: resolve-pkg-maps: "npm:^1.0.0" - checksum: 10c0/169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + checksum: 10c0/943721c996d9a77351aa7c07956de77baece97f997bd30f3247f46907e4b743f7b9da02c7b3692a36f0884d3724271faeb88ed1c3aca3aba2afe3f27d6c4aeb3 languageName: node linkType: hard @@ -9932,6 +9953,15 @@ __metadata: languageName: node linkType: hard +"is-bun-module@npm:^1.0.2": + version: 1.1.0 + resolution: "is-bun-module@npm:1.1.0" + dependencies: + semver: "npm:^7.6.3" + checksum: 10c0/17cae968c3fe08e2bd66f8477e4d5a166d6299b5e7ce5c7558355551c50267f77dd386297fada6b68e4a32f01ce8920b0423e4d258242ea463b45901ec474beb + languageName: node + linkType: hard + "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" @@ -9939,12 +9969,12 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1": + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 + hasown: "npm:^2.0.2" + checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 languageName: node linkType: hard @@ -12495,7 +12525,7 @@ __metadata: languageName: node linkType: hard -"object.fromentries@npm:^2.0.7, object.fromentries@npm:^2.0.8": +"object.fromentries@npm:^2.0.8": version: 2.0.8 resolution: "object.fromentries@npm:2.0.8" dependencies: @@ -12520,15 +12550,14 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.1": - version: 1.0.1 - resolution: "object.groupby@npm:1.0.1" +"object.groupby@npm:^1.0.3": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/61e41fbf08cc04ed860363db9629eedeaa590fce243c0960e948fd7b11f78a9d4350065c339936d118a2dd8775d7259e26207340cc8ce688bec66cb615fec6fe + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c languageName: node linkType: hard @@ -12541,7 +12570,7 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.0, object.values@npm:^1.1.6, object.values@npm:^1.1.7, object.values@npm:^1.2.0": +"object.values@npm:^1.1.0, object.values@npm:^1.1.6, object.values@npm:^1.2.0": version: 1.2.0 resolution: "object.values@npm:1.2.0" dependencies: @@ -13149,14 +13178,14 @@ __metadata: linkType: hard "pino-http@npm:^10.0.0": - version: 10.2.0 - resolution: "pino-http@npm:10.2.0" + version: 10.3.0 + resolution: "pino-http@npm:10.3.0" dependencies: get-caller-file: "npm:^2.0.5" pino: "npm:^9.0.0" pino-std-serializers: "npm:^7.0.0" - process-warning: "npm:^3.0.0" - checksum: 10c0/0b79cd3602531ee5043693e2a3ccf9d955bd93759e80c0b3a458b95b241f36ca8ebc72c8050b395e9d8fcb9581ebc18ecd6b7dc136526bebe924bc5c5079374d + process-warning: "npm:^4.0.0" + checksum: 10c0/da95d93e1176c02201f9b9bb0af53ad737105c5772acbb077dcad0f52ebce2438e0e9fc8216cd96396d1305d0ecf1f1d23142c7a50110a701ea093b2ee999ea7 languageName: node linkType: hard @@ -13192,8 +13221,8 @@ __metadata: linkType: hard "pino@npm:^9.0.0": - version: 9.3.2 - resolution: "pino@npm:9.3.2" + version: 9.4.0 + resolution: "pino@npm:9.4.0" dependencies: atomic-sleep: "npm:^1.0.0" fast-redact: "npm:^3.1.1" @@ -13208,7 +13237,7 @@ __metadata: thread-stream: "npm:^3.0.0" bin: pino: bin.js - checksum: 10c0/698eb2ebfcc4252da9d035fcf9c999bf27615b66ebc47f9b3d7e942750e50ebe38429e6457abcf8014d70125964ddf114e696cb8225b480d9930271708e3fb52 + checksum: 10c0/12a3d74968964d92b18ca7d6095a3c5b86478dc22264a37486d64e102085ed08820fcbe75e640acc3542fdf2937a34e5050b624f98e6ac62dd10f5e1328058a2 languageName: node linkType: hard @@ -14040,13 +14069,13 @@ __metadata: linkType: hard "postcss@npm:^8.2.15, postcss@npm:^8.4.24, postcss@npm:^8.4.41": - version: 8.4.44 - resolution: "postcss@npm:8.4.44" + version: 8.4.45 + resolution: "postcss@npm:8.4.45" dependencies: nanoid: "npm:^3.3.7" picocolors: "npm:^1.0.1" source-map-js: "npm:^1.2.0" - checksum: 10c0/53c33338261a3d4f4198f8893e9dfe8b828d8d9186142ee85f02d228f04245c5bbe31239411a357a556ad20ed96f28db24d0921d63edc428fdc9133289371a1d + checksum: 10c0/ad6f8b9b1157d678560373696109745ab97a947d449f8a997acac41c7f1e4c0f3ca4b092d6df1387f430f2c9a319987b1780dbdc27e35800a88cde9b606c1e8f languageName: node linkType: hard @@ -14176,13 +14205,6 @@ __metadata: languageName: node linkType: hard -"process-warning@npm:^3.0.0": - version: 3.0.0 - resolution: "process-warning@npm:3.0.0" - checksum: 10c0/60f3c8ddee586f0706c1e6cb5aa9c86df05774b9330d792d7c8851cf0031afd759d665404d07037e0b4901b55c44a423f07bdc465c63de07d8d23196bb403622 - languageName: node - linkType: hard - "process-warning@npm:^4.0.0": version: 4.0.0 resolution: "process-warning@npm:4.0.0" @@ -15465,15 +15487,15 @@ __metadata: linkType: hard "sass@npm:^1.62.1": - version: 1.77.8 - resolution: "sass@npm:1.77.8" + version: 1.78.0 + resolution: "sass@npm:1.78.0" dependencies: chokidar: "npm:>=3.0.0 <4.0.0" immutable: "npm:^4.0.0" source-map-js: "npm:>=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 10c0/2bfd62794070352c804f949e69bd8bb5b4ec846deeb924251b2c3f7b503170fb1ae186f513f0166907749eb34e0277dee747edcb78c886fb471aac01be1e864c + checksum: 10c0/6577a87c00b03a5a50f3a11b4b6592f28abce34e61812e381535a3b712151bd94db3ca06467d20395431e0f38a23f99e616d6859d771fb6d4617c359f590c48c languageName: node linkType: hard