From f1003b256055e7eaf5d81cc95c370fc1ab82dfde Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:25 -0400 Subject: [PATCH 01/25] Enable "zero monkey patching" mode in RSpec (#31614) --- spec/chewy/accounts_index_spec.rb | 2 +- spec/chewy/public_statuses_index_spec.rb | 2 +- spec/chewy/statuses_index_spec.rb | 2 +- spec/chewy/tags_index_spec.rb | 2 +- spec/config/initializers/rack/attack_spec.rb | 2 +- spec/controllers/activitypub/claims_controller_spec.rb | 2 +- spec/controllers/admin/account_actions_controller_spec.rb | 2 +- spec/controllers/admin/action_logs_controller_spec.rb | 2 +- spec/controllers/admin/base_controller_spec.rb | 2 +- spec/controllers/admin/custom_emojis_controller_spec.rb | 2 +- spec/controllers/admin/dashboard_controller_spec.rb | 2 +- .../admin/follow_recommendations_controller_spec.rb | 2 +- spec/controllers/admin/invites_controller_spec.rb | 2 +- spec/controllers/admin/ip_blocks_controller_spec.rb | 2 +- spec/controllers/admin/relationships_controller_spec.rb | 2 +- spec/controllers/admin/relays_controller_spec.rb | 2 +- spec/controllers/admin/report_notes_controller_spec.rb | 2 +- spec/controllers/admin/reports/actions_controller_spec.rb | 2 +- spec/controllers/admin/reports_controller_spec.rb | 2 +- spec/controllers/admin/roles_controller_spec.rb | 2 +- spec/controllers/admin/rules_controller_spec.rb | 2 +- spec/controllers/admin/site_uploads_controller_spec.rb | 2 +- spec/controllers/admin/statuses_controller_spec.rb | 2 +- .../trends/links/preview_card_providers_controller_spec.rb | 2 +- spec/controllers/admin/trends/links_controller_spec.rb | 2 +- spec/controllers/admin/trends/statuses_controller_spec.rb | 2 +- spec/controllers/admin/trends/tags_controller_spec.rb | 2 +- spec/controllers/admin/users/roles_controller_spec.rb | 2 +- .../admin/users/two_factor_authentications_controller_spec.rb | 2 +- spec/controllers/admin/warning_presets_controller_spec.rb | 2 +- spec/controllers/admin/webhooks/secrets_controller_spec.rb | 2 +- spec/controllers/admin/webhooks_controller_spec.rb | 2 +- spec/controllers/api/base_controller_spec.rb | 2 +- .../controllers/api/web/push_subscriptions_controller_spec.rb | 2 +- spec/controllers/application_controller_spec.rb | 2 +- spec/controllers/auth/challenges_controller_spec.rb | 2 +- spec/controllers/auth/confirmations_controller_spec.rb | 2 +- spec/controllers/auth/passwords_controller_spec.rb | 2 +- spec/controllers/auth/setup_controller_spec.rb | 2 +- spec/controllers/authorize_interactions_controller_spec.rb | 2 +- spec/controllers/concerns/account_controller_concern_spec.rb | 2 +- spec/controllers/concerns/api/error_handling_spec.rb | 2 +- spec/controllers/concerns/api/rate_limit_headers_spec.rb | 2 +- spec/controllers/concerns/localized_spec.rb | 2 +- .../concerns/settings/export_controller_concern_spec.rb | 2 +- spec/controllers/concerns/user_tracking_concern_spec.rb | 2 +- spec/controllers/filters/statuses_controller_spec.rb | 2 +- spec/controllers/filters_controller_spec.rb | 2 +- spec/controllers/follower_accounts_controller_spec.rb | 2 +- spec/controllers/following_accounts_controller_spec.rb | 2 +- spec/controllers/invites_controller_spec.rb | 2 +- .../oauth/authorized_applications_controller_spec.rb | 2 +- spec/controllers/relationships_controller_spec.rb | 2 +- spec/controllers/settings/aliases_controller_spec.rb | 2 +- spec/controllers/settings/applications_controller_spec.rb | 2 +- spec/controllers/settings/deletes_controller_spec.rb | 2 +- spec/controllers/settings/exports_controller_spec.rb | 2 +- spec/controllers/settings/featured_tags_controller_spec.rb | 2 +- spec/controllers/settings/login_activities_controller_spec.rb | 2 +- .../settings/migration/redirects_controller_spec.rb | 2 +- spec/controllers/settings/migrations_controller_spec.rb | 2 +- spec/controllers/settings/pictures_controller_spec.rb | 2 +- .../settings/preferences/appearance_controller_spec.rb | 2 +- spec/controllers/settings/preferences/base_controller_spec.rb | 2 +- .../settings/preferences/notifications_controller_spec.rb | 2 +- .../controllers/settings/preferences/other_controller_spec.rb | 2 +- spec/controllers/settings/sessions_controller_spec.rb | 2 +- .../confirmations_controller_spec.rb | 2 +- .../otp_authentication_controller_spec.rb | 2 +- .../recovery_codes_controller_spec.rb | 2 +- .../webauthn_credentials_controller_spec.rb | 2 +- .../two_factor_authentication_methods_controller_spec.rb | 2 +- spec/controllers/statuses_controller_spec.rb | 2 +- spec/fabrication/fabricators_spec.rb | 2 +- spec/generators/post_deployment_migration_generator_spec.rb | 2 +- spec/helpers/admin/dashboard_helper_spec.rb | 2 +- spec/helpers/admin/disputes_helper_spec.rb | 2 +- spec/helpers/admin/filter_helper_spec.rb | 2 +- spec/helpers/admin/trends/statuses_helper_spec.rb | 2 +- spec/helpers/application_helper_spec.rb | 2 +- spec/helpers/flashes_helper_spec.rb | 2 +- spec/helpers/formatting_helper_spec.rb | 2 +- spec/helpers/instance_helper_spec.rb | 2 +- spec/helpers/json_ld_helper_spec.rb | 2 +- spec/helpers/languages_helper_spec.rb | 2 +- spec/helpers/media_component_helper_spec.rb | 2 +- spec/helpers/react_component_helper_spec.rb | 2 +- spec/helpers/settings_helper_spec.rb | 2 +- spec/helpers/statuses_helper_spec.rb | 2 +- spec/helpers/theme_helper_spec.rb | 2 +- .../metrics/dimension/instance_accounts_dimension_spec.rb | 2 +- .../metrics/dimension/instance_languages_dimension_spec.rb | 2 +- spec/lib/admin/metrics/dimension/languages_dimension_spec.rb | 2 +- spec/lib/admin/metrics/dimension/servers_dimension_spec.rb | 2 +- .../metrics/dimension/software_versions_dimension_spec.rb | 2 +- spec/lib/admin/metrics/dimension/sources_dimension_spec.rb | 2 +- .../lib/admin/metrics/dimension/space_usage_dimension_spec.rb | 2 +- .../admin/metrics/dimension/tag_languages_dimension_spec.rb | 2 +- .../lib/admin/metrics/dimension/tag_servers_dimension_spec.rb | 2 +- spec/lib/admin/metrics/dimension_spec.rb | 2 +- spec/lib/admin/metrics/measure/active_users_measure_spec.rb | 2 +- .../admin/metrics/measure/instance_accounts_measure_spec.rb | 2 +- .../admin/metrics/measure/instance_followers_measure_spec.rb | 2 +- .../admin/metrics/measure/instance_follows_measure_spec.rb | 2 +- .../measure/instance_media_attachments_measure_spec.rb | 2 +- .../admin/metrics/measure/instance_reports_measure_spec.rb | 2 +- .../admin/metrics/measure/instance_statuses_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/interactions_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/new_users_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb | 2 +- .../admin/metrics/measure/resolved_reports_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb | 2 +- spec/lib/admin/metrics/measure_spec.rb | 2 +- spec/lib/admin/system_check/base_check_spec.rb | 2 +- spec/lib/admin/system_check/database_schema_check_spec.rb | 2 +- spec/lib/admin/system_check/elasticsearch_check_spec.rb | 2 +- spec/lib/admin/system_check/media_privacy_check_spec.rb | 2 +- spec/lib/admin/system_check/message_spec.rb | 2 +- spec/lib/admin/system_check/rules_check_spec.rb | 2 +- spec/lib/admin/system_check/sidekiq_process_check_spec.rb | 2 +- spec/lib/admin/system_check/software_version_check_spec.rb | 2 +- spec/lib/admin/system_check_spec.rb | 2 +- spec/lib/annual_report_spec.rb | 2 +- spec/lib/cache_buster_spec.rb | 2 +- spec/lib/connection_pool/shared_connection_pool_spec.rb | 2 +- spec/lib/connection_pool/shared_timed_stack_spec.rb | 2 +- spec/lib/content_security_policy_spec.rb | 2 +- spec/lib/delivery_failure_tracker_spec.rb | 2 +- spec/lib/extractor_spec.rb | 2 +- spec/lib/fast_ip_map_spec.rb | 2 +- spec/lib/hashtag_normalizer_spec.rb | 2 +- spec/lib/importer/accounts_index_importer_spec.rb | 2 +- spec/lib/importer/base_importer_spec.rb | 2 +- spec/lib/importer/public_statuses_index_importer_spec.rb | 2 +- spec/lib/importer/statuses_index_importer_spec.rb | 2 +- spec/lib/importer/tags_index_importer_spec.rb | 2 +- spec/lib/mastodon/cli/accounts_spec.rb | 2 +- spec/lib/mastodon/cli/cache_spec.rb | 2 +- spec/lib/mastodon/cli/canonical_email_blocks_spec.rb | 2 +- spec/lib/mastodon/cli/domains_spec.rb | 2 +- spec/lib/mastodon/cli/email_domain_blocks_spec.rb | 2 +- spec/lib/mastodon/cli/emoji_spec.rb | 2 +- spec/lib/mastodon/cli/feeds_spec.rb | 2 +- spec/lib/mastodon/cli/ip_blocks_spec.rb | 2 +- spec/lib/mastodon/cli/main_spec.rb | 2 +- spec/lib/mastodon/cli/maintenance_spec.rb | 2 +- spec/lib/mastodon/cli/media_spec.rb | 2 +- spec/lib/mastodon/cli/preview_cards_spec.rb | 2 +- spec/lib/mastodon/cli/search_spec.rb | 2 +- spec/lib/mastodon/cli/settings_spec.rb | 2 +- spec/lib/mastodon/cli/statuses_spec.rb | 2 +- spec/lib/mastodon/cli/upgrade_spec.rb | 2 +- spec/lib/mastodon/migration_warning_spec.rb | 2 +- spec/lib/ostatus/tag_manager_spec.rb | 2 +- spec/lib/paperclip/response_with_limit_adapter_spec.rb | 2 +- spec/lib/permalink_redirector_spec.rb | 2 +- spec/lib/request_pool_spec.rb | 2 +- spec/lib/request_spec.rb | 2 +- spec/lib/sanitize/config_spec.rb | 2 +- spec/lib/scope_transformer_spec.rb | 2 +- spec/lib/search_query_parser_spec.rb | 2 +- spec/lib/search_query_transformer_spec.rb | 2 +- spec/lib/status_cache_hydrator_spec.rb | 2 +- spec/lib/status_filter_spec.rb | 2 +- spec/lib/status_finder_spec.rb | 2 +- spec/lib/status_reach_finder_spec.rb | 2 +- spec/lib/webfinger_resource_spec.rb | 2 +- spec/lib/webhooks/payload_renderer_spec.rb | 2 +- spec/locales/i18n_spec.rb | 2 +- spec/mailers/user_mailer_spec.rb | 2 +- spec/models/account_filter_spec.rb | 2 +- spec/models/account_warning_preset_spec.rb | 2 +- spec/models/admin/appeal_filter_spec.rb | 2 +- spec/models/admin/tag_filter_spec.rb | 2 +- spec/models/announcement_spec.rb | 2 +- spec/models/appeal_spec.rb | 2 +- spec/models/concerns/account/counters_spec.rb | 2 +- spec/models/concerns/account/finder_concern_spec.rb | 2 +- spec/models/concerns/account/interactions_spec.rb | 2 +- spec/models/concerns/account/statuses_search_spec.rb | 2 +- spec/models/concerns/status/threading_concern_spec.rb | 2 +- spec/models/custom_emoji_category_spec.rb | 2 +- spec/models/domain_allow_spec.rb | 2 +- spec/models/export_spec.rb | 2 +- spec/models/extended_description_spec.rb | 2 +- spec/models/form/admin_settings_spec.rb | 2 +- spec/models/form/custom_emoji_batch_spec.rb | 2 +- spec/models/form/status_filter_batch_action_spec.rb | 2 +- spec/models/ip_block_spec.rb | 2 +- spec/models/marker_spec.rb | 2 +- spec/models/one_time_key_spec.rb | 2 +- spec/models/poll_spec.rb | 2 +- spec/models/preview_card_provider_spec.rb | 2 +- spec/models/preview_card_spec.rb | 2 +- spec/models/privacy_policy_spec.rb | 2 +- spec/models/relationship_filter_spec.rb | 2 +- spec/models/report_filter_spec.rb | 2 +- spec/models/report_spec.rb | 2 +- spec/models/rule_spec.rb | 2 +- spec/models/status_edit_spec.rb | 2 +- spec/models/tag_feed_spec.rb | 2 +- spec/policies/account_warning_preset_policy_spec.rb | 2 +- spec/policies/admin/status_policy_spec.rb | 2 +- spec/policies/announcement_policy_spec.rb | 2 +- spec/policies/appeal_policy_spec.rb | 2 +- spec/policies/canonical_email_block_policy_spec.rb | 2 +- spec/policies/delivery_policy_spec.rb | 2 +- spec/policies/follow_recommendation_policy_spec.rb | 2 +- spec/policies/ip_block_policy_spec.rb | 2 +- spec/policies/preview_card_policy_spec.rb | 2 +- spec/policies/preview_card_provider_policy_spec.rb | 2 +- spec/policies/rule_policy_spec.rb | 2 +- spec/policies/webhook_policy_spec.rb | 2 +- spec/presenters/instance_presenter_spec.rb | 2 +- spec/requests/account_show_page_spec.rb | 2 +- spec/requests/accounts_spec.rb | 2 +- spec/requests/anonymous_cookies_spec.rb | 2 +- spec/requests/api/v1/accounts/familiar_followers_spec.rb | 2 +- spec/requests/api/v1/accounts/follower_accounts_spec.rb | 2 +- spec/requests/api/v1/accounts/following_accounts_spec.rb | 2 +- spec/requests/api/v1/accounts/identity_proofs_spec.rb | 2 +- spec/requests/api/v1/accounts/lists_spec.rb | 2 +- spec/requests/api/v1/accounts/lookup_spec.rb | 2 +- spec/requests/api/v1/accounts/notes_spec.rb | 2 +- spec/requests/api/v1/accounts/pins_spec.rb | 2 +- spec/requests/api/v1/accounts/relationships_spec.rb | 2 +- spec/requests/api/v1/accounts/search_spec.rb | 2 +- spec/requests/api/v1/accounts/statuses_spec.rb | 2 +- spec/requests/api/v1/accounts_spec.rb | 2 +- spec/requests/api/v1/admin/dimensions_spec.rb | 2 +- spec/requests/api/v1/admin/measures_spec.rb | 2 +- spec/requests/api/v1/admin/retention_spec.rb | 2 +- spec/requests/api/v1/admin/trends/links/links_spec.rb | 2 +- .../api/v1/admin/trends/links/preview_card_providers_spec.rb | 2 +- spec/requests/api/v1/admin/trends/statuses_spec.rb | 2 +- spec/requests/api/v1/admin/trends/tags_spec.rb | 2 +- spec/requests/api/v1/annual_reports_spec.rb | 2 +- spec/requests/api/v1/apps/credentials_spec.rb | 2 +- spec/requests/api/v1/csp_spec.rb | 2 +- spec/requests/api/v1/custom_emojis_spec.rb | 2 +- spec/requests/api/v1/directories_spec.rb | 2 +- spec/requests/api/v1/endorsements_spec.rb | 2 +- spec/requests/api/v1/featured_tags/suggestions_spec.rb | 2 +- spec/requests/api/v1/instance_spec.rb | 2 +- spec/requests/api/v1/instances/translation_languages_spec.rb | 2 +- spec/requests/api/v1/peers/search_spec.rb | 2 +- spec/requests/api/v1/preferences_spec.rb | 2 +- spec/requests/api/v1/push/subscriptions_spec.rb | 2 +- spec/requests/api/v1/scheduled_status_spec.rb | 2 +- spec/requests/api/v1/statuses/histories_spec.rb | 2 +- spec/requests/api/v1/statuses/mutes_spec.rb | 2 +- spec/requests/api/v1/statuses/pins_spec.rb | 2 +- spec/requests/api/v1/statuses/reblogs_spec.rb | 2 +- spec/requests/api/v1/statuses/translations_spec.rb | 2 +- spec/requests/api/v1/statuses_spec.rb | 2 +- spec/requests/api/v1/streaming_spec.rb | 2 +- spec/requests/api/v1/timelines/home_spec.rb | 2 +- spec/requests/api/v1/timelines/link_spec.rb | 2 +- spec/requests/api/v1/timelines/list_spec.rb | 2 +- spec/requests/api/v1/timelines/public_spec.rb | 2 +- spec/requests/api/v2/instance_spec.rb | 2 +- spec/requests/api/v2/search_spec.rb | 2 +- spec/requests/api/v2/suggestions_spec.rb | 2 +- spec/requests/backups_spec.rb | 2 +- spec/requests/cache_spec.rb | 2 +- spec/requests/catch_all_route_request_spec.rb | 2 +- spec/requests/content_security_policy_spec.rb | 2 +- spec/requests/custom_css_spec.rb | 2 +- spec/requests/custom_stylesheets_spec.rb | 2 +- spec/requests/disabled_oauth_endpoints_spec.rb | 2 +- spec/requests/emojis_spec.rb | 2 +- spec/requests/health_spec.rb | 2 +- spec/requests/invite_spec.rb | 2 +- spec/requests/link_headers_spec.rb | 2 +- spec/requests/localization_spec.rb | 2 +- spec/requests/log_out_spec.rb | 2 +- spec/requests/manifest_spec.rb | 2 +- spec/requests/media_proxy_spec.rb | 2 +- spec/requests/omniauth_callbacks_spec.rb | 2 +- spec/requests/remote_interaction_helper_spec.rb | 2 +- spec/requests/self_destruct_spec.rb | 2 +- spec/requests/settings/exports/blocked_accounts_spec.rb | 2 +- spec/requests/settings/exports/blocked_domains_spec.rb | 2 +- spec/requests/settings/exports/bookmarks_spec.rb | 2 +- spec/requests/settings/exports/following_accounts_spec.rb | 2 +- spec/requests/settings/exports/lists_spec.rb | 2 +- spec/requests/settings/exports/muted_accounts_spec.rb | 2 +- spec/requests/signature_verification_spec.rb | 2 +- spec/requests/well_known/change_password_spec.rb | 2 +- spec/requests/well_known/host_meta_spec.rb | 2 +- spec/requests/well_known/node_info_spec.rb | 2 +- spec/requests/well_known/oauth_metadata_spec.rb | 2 +- spec/requests/well_known/webfinger_spec.rb | 2 +- spec/routing/accounts_routing_spec.rb | 2 +- spec/routing/api_routing_spec.rb | 2 +- spec/routing/well_known_routes_spec.rb | 2 +- spec/search/models/concerns/account/search_spec.rb | 2 +- spec/search/models/concerns/account/statuses_search_spec.rb | 2 +- spec/serializers/activitypub/device_serializer_spec.rb | 2 +- spec/serializers/activitypub/note_serializer_spec.rb | 2 +- spec/serializers/activitypub/one_time_key_serializer_spec.rb | 2 +- spec/serializers/activitypub/undo_like_serializer_spec.rb | 2 +- spec/serializers/activitypub/update_poll_serializer_spec.rb | 2 +- spec/serializers/activitypub/vote_serializer_spec.rb | 2 +- spec/serializers/rest/account_serializer_spec.rb | 2 +- spec/serializers/rest/encrypted_message_serializer_spec.rb | 2 +- spec/serializers/rest/instance_serializer_spec.rb | 2 +- spec/serializers/rest/keys/claim_result_serializer_spec.rb | 2 +- spec/serializers/rest/keys/device_serializer_spec.rb | 2 +- spec/serializers/rest/keys/query_result_serializer_spec.rb | 2 +- spec/serializers/rest/suggestion_serializer_spec.rb | 2 +- spec/services/account_search_service_spec.rb | 2 +- spec/services/account_statuses_cleanup_service_spec.rb | 2 +- spec/services/fetch_oembed_service_spec.rb | 2 +- spec/services/resolve_url_service_spec.rb | 2 +- spec/services/search_service_spec.rb | 2 +- spec/services/unblock_domain_service_spec.rb | 2 +- spec/spec_helper.rb | 2 ++ spec/support/examples/api.rb | 4 ++-- spec/support/examples/cli.rb | 2 +- spec/support/examples/lib/admin/checks.rb | 2 +- spec/support/examples/mailers.rb | 2 +- spec/support/examples/models/concerns/account_avatar.rb | 2 +- spec/support/examples/models/concerns/account_header.rb | 2 +- spec/support/examples/models/concerns/reviewable.rb | 2 +- spec/system/about_spec.rb | 2 +- spec/system/admin/accounts_spec.rb | 2 +- spec/system/admin/announcements_spec.rb | 2 +- spec/system/admin/custom_emojis_spec.rb | 2 +- spec/system/admin/domain_blocks_spec.rb | 2 +- spec/system/admin/email_domain_blocks_spec.rb | 2 +- spec/system/admin/ip_blocks_spec.rb | 2 +- spec/system/admin/reset_spec.rb | 2 +- spec/system/admin/settings/about_spec.rb | 2 +- spec/system/admin/settings/appearance_spec.rb | 2 +- spec/system/admin/settings/branding_spec.rb | 2 +- spec/system/admin/settings/content_retention_spec.rb | 2 +- spec/system/admin/settings/discovery_spec.rb | 2 +- spec/system/admin/settings/registrations_spec.rb | 2 +- spec/system/admin/software_updates_spec.rb | 2 +- spec/system/admin/statuses_spec.rb | 2 +- spec/system/admin/trends/links/preview_card_providers_spec.rb | 2 +- spec/system/admin/trends/links_spec.rb | 2 +- spec/system/admin/trends/statuses_spec.rb | 2 +- spec/system/admin/trends/tags_spec.rb | 2 +- spec/system/captcha_spec.rb | 2 +- spec/system/filters_spec.rb | 2 +- spec/system/home_spec.rb | 2 +- spec/system/log_in_spec.rb | 2 +- spec/system/log_out_spec.rb | 2 +- spec/system/new_statuses_spec.rb | 2 +- spec/system/oauth_spec.rb | 2 +- spec/system/ocr_spec.rb | 2 +- spec/system/privacy_spec.rb | 2 +- spec/system/profile_spec.rb | 2 +- spec/system/redirections_spec.rb | 2 +- spec/system/report_interface_spec.rb | 2 +- spec/system/severed_relationships_spec.rb | 2 +- spec/system/share_entrypoint_spec.rb | 2 +- spec/system/unlogged_spec.rb | 2 +- spec/validators/email_mx_validator_spec.rb | 2 +- spec/validators/existing_username_validator_spec.rb | 2 +- spec/validators/language_validator_spec.rb | 2 +- spec/validators/note_length_validator_spec.rb | 2 +- spec/validators/reaction_validator_spec.rb | 2 +- spec/validators/status_length_validator_spec.rb | 2 +- spec/validators/unique_username_validator_spec.rb | 2 +- spec/validators/unreserved_username_validator_spec.rb | 2 +- spec/validators/url_validator_spec.rb | 2 +- spec/views/admin/trends/links/_preview_card.html.haml_spec.rb | 2 +- spec/views/statuses/show.html.haml_spec.rb | 2 +- spec/workers/account_refresh_worker_spec.rb | 2 +- spec/workers/activitypub/delivery_worker_spec.rb | 2 +- .../workers/activitypub/distribute_poll_update_worker_spec.rb | 2 +- spec/workers/activitypub/distribution_worker_spec.rb | 2 +- spec/workers/activitypub/fetch_replies_worker_spec.rb | 2 +- spec/workers/activitypub/move_distribution_worker_spec.rb | 2 +- spec/workers/activitypub/post_upgrade_worker_spec.rb | 2 +- spec/workers/activitypub/processing_worker_spec.rb | 2 +- .../activitypub/status_update_distribution_worker_spec.rb | 2 +- .../synchronize_featured_tags_collection_worker_spec.rb | 2 +- spec/workers/activitypub/update_distribution_worker_spec.rb | 2 +- spec/workers/add_to_public_statuses_index_worker_spec.rb | 2 +- spec/workers/admin/account_deletion_worker_spec.rb | 2 +- spec/workers/admin/domain_purge_worker_spec.rb | 2 +- spec/workers/admin/suspension_worker_spec.rb | 2 +- spec/workers/after_account_domain_block_worker_spec.rb | 2 +- spec/workers/backup_worker_spec.rb | 2 +- spec/workers/bulk_import_worker_spec.rb | 2 +- spec/workers/cache_buster_worker_spec.rb | 2 +- spec/workers/delete_mute_worker_spec.rb | 2 +- spec/workers/domain_block_worker_spec.rb | 2 +- spec/workers/domain_clear_media_worker_spec.rb | 2 +- spec/workers/feed_insert_worker_spec.rb | 2 +- spec/workers/filtered_notification_cleanup_worker_spec.rb | 2 +- spec/workers/import/row_worker_spec.rb | 2 +- spec/workers/import_worker_spec.rb | 2 +- spec/workers/move_worker_spec.rb | 2 +- spec/workers/poll_expiration_notify_worker_spec.rb | 2 +- spec/workers/post_process_media_worker_spec.rb | 2 +- spec/workers/publish_announcement_reaction_worker_spec.rb | 2 +- spec/workers/publish_scheduled_announcement_worker_spec.rb | 2 +- spec/workers/publish_scheduled_status_worker_spec.rb | 2 +- spec/workers/push_conversation_worker_spec.rb | 2 +- spec/workers/push_encrypted_message_worker_spec.rb | 2 +- spec/workers/push_update_worker_spec.rb | 2 +- spec/workers/redownload_avatar_worker_spec.rb | 2 +- spec/workers/redownload_header_worker_spec.rb | 2 +- spec/workers/redownload_media_worker_spec.rb | 2 +- spec/workers/refollow_worker_spec.rb | 2 +- spec/workers/regeneration_worker_spec.rb | 2 +- spec/workers/removal_worker_spec.rb | 2 +- spec/workers/remove_featured_tag_worker_spec.rb | 2 +- spec/workers/remove_from_public_statuses_index_worker_spec.rb | 2 +- spec/workers/resolve_account_worker_spec.rb | 2 +- .../scheduler/accounts_statuses_cleanup_scheduler_spec.rb | 2 +- .../scheduler/auto_close_registrations_scheduler_spec.rb | 2 +- .../scheduler/follow_recommendations_scheduler_spec.rb | 2 +- spec/workers/scheduler/indexing_scheduler_spec.rb | 2 +- spec/workers/scheduler/instance_refresh_scheduler_spec.rb | 2 +- spec/workers/scheduler/ip_cleanup_scheduler_spec.rb | 2 +- spec/workers/scheduler/pghero_scheduler_spec.rb | 2 +- spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb | 2 +- spec/workers/scheduler/self_destruct_scheduler_spec.rb | 2 +- .../workers/scheduler/software_update_check_scheduler_spec.rb | 2 +- .../scheduler/suspended_user_cleanup_scheduler_spec.rb | 2 +- spec/workers/scheduler/trends/refresh_scheduler_spec.rb | 2 +- .../scheduler/trends/review_notifications_scheduler_spec.rb | 2 +- spec/workers/scheduler/user_cleanup_scheduler_spec.rb | 2 +- spec/workers/scheduler/vacuum_scheduler_spec.rb | 2 +- spec/workers/tag_unmerge_worker_spec.rb | 2 +- spec/workers/unfilter_notifications_worker_spec.rb | 2 +- spec/workers/unfollow_follow_worker_spec.rb | 2 +- spec/workers/unpublish_announcement_worker_spec.rb | 2 +- spec/workers/verify_account_links_worker_spec.rb | 2 +- spec/workers/web/push_notification_worker_spec.rb | 2 +- spec/workers/webhooks/delivery_worker_spec.rb | 2 +- 439 files changed, 441 insertions(+), 439 deletions(-) diff --git a/spec/chewy/accounts_index_spec.rb b/spec/chewy/accounts_index_spec.rb index f9c5922c76..f7b5b2e249 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 2f93d0ff02..6bc08832f3 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 768e9415fc..e3899f3a17 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 054589bdfb..6b57da65e4 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 19de480898..c7af11bea7 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 f00eeb732a..e887be2cbe 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 b8dae79939..d513b3d4a0 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 be4222df08..3daf260672 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 1f1fa8441a..8b8b7fe63d 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 9e732200dd..57c2a6d21b 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 3e29ce1278..9177be4b6d 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 f62aa6e4b2..d614f2ef43 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 8638f8e214..b6471e80b2 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 05190f1340..2e32db5a01 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 1099a37a3b..214be7c7cd 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 ca351c39b2..c6251a6d76 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 8d5b5c7aec..423a64ebc4 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 06d4b31f54..6185702c30 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 67fb28e7a5..d07468a37b 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 223d0a472a..2c43a0ca87 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 92ffb41567..1b2a2010d0 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 4ea37f396a..9c65c63b78 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 4ab6d109ef..e6053a6e8a 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 95ed38d6b1..ce62a13db6 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 7c67f5e5aa..984f3007c2 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 b752234d3c..eecf4ab4f2 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 4f74a55455..51ad1860c8 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 97f69a0b0a..bfc2bb151f 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 eb10d47963..1f0a6ac34d 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 b32a58e990..4171bbad82 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 291a10fba5..61ae8cdaa5 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 17d8506025..4fe787c26c 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 659d55f801..1e0e7c8f4d 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 58677841ca..acc0312113 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 f595e8ca19..4ee951628e 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 32bbedde63..56fdfa61b5 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 15403e8ea1..a5b212e660 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 d70490abcf..9ccbb9e494 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 75e42aaf96..28b07cb4b2 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 ed55df08d9..2a0422efa9 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 122ef21e93..3eee46d7b9 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 9b36fc20a3..eff01605d2 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 2050de2aed..6372c94e6c 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 ce31e786f0..b1f805ae50 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 a19af8689a..2c67991e3a 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 f23d482f5f..cc61e285cc 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 2c80613302..f1fed76fca 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 091f714bb3..de043e8ae3 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 dd78c96c05..e84528d13e 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 7bb78fb420..1e01b9f494 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 5221941267..192c5b00ba 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 3fd9f9499f..52d3dbde83 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 9495fc214f..323fcc995d 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 18e568be0b..4858c15298 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 ce2e0749a7..721741bacb 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 3342599bc1..98104b8454 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 3399f78ac5..1eafabc7e5 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 4e1dd52945..a56ae1c498 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 294bf85c97..3447620abb 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 b909a02668..d853fe8ae6 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 f3340574d0..93c5de0899 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 705878f03d..683d231ed1 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 84b8277250..14f9b244ab 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 53b3a461ed..75fc999a48 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 e0f0bc55a7..edfdea50e0 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 61a94a4142..117fdeea7c 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 a4248e1bde..c098af7485 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 1c8b483a0a..34eaacdf49 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 007df87d95..a03c4a4adb 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 dbc2e3059c..0defc52cde 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 41a3ba5eb5..cccf3c51d3 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 de0d28463b..c55f113d4d 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 084dcfaa75..289109a1fa 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 2cf45041a4..f7bb504543 100644 --- a/spec/fabrication/fabricators_spec.rb +++ b/spec/fabrication/fabricators_spec.rb @@ -5,7 +5,7 @@ require 'rails_helper' 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 55e70a7917..1aa8e0915c 100644 --- a/spec/generators/post_deployment_migration_generator_spec.rb +++ b/spec/generators/post_deployment_migration_generator_spec.rb @@ -6,7 +6,7 @@ require 'rails/generators/testing/assertions' 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 59062e4839..9c674fb4b9 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 5f9a85df86..a6ac021bd4 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 40ed63239f..d07a6e1bb7 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 92caae6909..fa5c337e97 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 0bfce6946b..c2e618c7de 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 a6a3b062d7..aaef7ab144 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 d6e7631f66..136a609b1c 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 9a2d884158..e7b15e6513 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 f4b849d7a1..d76c5167a7 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 99461b293b..dd9b6004d1 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 af5d92769c..ec87a707cb 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 28208b619b..202694fbe4 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 ca447d8ce1..ecff2edbfa 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 66eb996f99..8809d0afae 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 c0b6380a1f..7663e59436 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 2b14e6956c..c8683afda9 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 e4e9fbe2b7..c633041f9d 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 9d80970693..801b3d84df 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 5661441d5d..d86ccd099a 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 5d31121ab3..5b0fb902e0 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 5fa5aa8af5..ca7f716afd 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 96ff9c66dc..4be5ed30ee 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 c1dfd0eaf4..166edf92b0 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 025cf1b7ec..7391b55456 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 109250b72b..0a52d442be 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 38ee14075b..653e677354 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 0d2ad31c39..f974f2ca46 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 27bf30d17d..643249fa4e 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 9961ea56c4..70f5004fef 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 3634450930..11f13b85bc 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 ca64049d92..62c9dec464 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 ac28658ea0..0fc903a2a8 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 ed333380cf..edbec2eabf 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 085acbcede..5c03b67a18 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 d5ba78527e..f4d3a66454 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 f7b497590d..432dbbe796 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 b33ae7bb71..577b1260ff 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 e1e2ced43a..42715e5adc 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 dd66f00de0..b258455dab 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 c9809b0f79..49a5aecc61 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 fdd9f6b6c4..769e0e1d18 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 db1dcb52fa..311d524956 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 8f210579d0..05d204c453 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 316bf12156..0d5bcdb3e8 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 c0671f3452..81ef4f2f09 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 fb3293fb2d..32650d9cd8 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 9bd9daddf6..992fd7aee0 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 de4335fc51..1affaa3a96 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 30048fd3ad..92852ab025 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 ffb742697b..bd4d0f3387 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 84085608e8..f7cff9c1c3 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 a2fe75f742..2352703b5a 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 04d550eec5..7469664ea0 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 27a3e80257..5ecea60543 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 c8179ebd91..40c8adc4c8 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 af5c62d4c8..bc3ee8ac49 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 78b3ddb054..a3a647e3e3 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 fbb9f37c07..796445043a 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 73f9bce399..a5d11c747a 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 78e9a869b8..0d12f975aa 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 bc7c038a97..2407717409 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 d5e1c9f2cb..f6fac3bd67 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 348990c01e..44de9e7c34 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 3988e0b027..f6cc28297a 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 247a14f9e2..dc571238d2 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 1745ea01bf..faa5ec7cb8 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 448e6fe42b..d1c26546f0 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 55e3da0bb8..a5fbd23e65 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 d05e972e77..4336db17d3 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 420cb3d587..75a8cb3ebc 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 d44b1b9fe4..68d6b19859 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 99d770a81d..a63b798683 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 cde25d39ed..6a15677f43 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 ecc7101b6c..fa7a3161d0 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 951ae3758f..949787a759 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 ed3789c3e7..8a6c2492aa 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 e1b353eb90..5565b798ef 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 161b7c02bb..2597ad7f27 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 6861e04887..6861e1a068 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 4adf0837ab..d796d1e902 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/ostatus/tag_manager_spec.rb b/spec/lib/ostatus/tag_manager_spec.rb index 0e20f26c7c..f808b96289 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 baf8bf5bb7..3db52ffa0d 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 a009136561..3f77d7665a 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 a82eb5a188..2e8c785de8 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 c99f18838b..c600a48ee2 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 fe0b272c0a..17b78a95f6 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 describe '::MASTODON_STRICT' do subject { described_class::MASTODON_STRICT } diff --git a/spec/lib/scope_transformer_spec.rb b/spec/lib/scope_transformer_spec.rb index 7bc226e94f..09a31e04c5 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 66b0e8f9e2..22149b3402 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 5817e3d1d2..00220f84fd 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 5b80ccb970..958e2f62d7 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 cf6f3c7959..16c2e84f22 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 53f5039af9..4d1c27afff 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 7181717dc1..c045980ea9 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 442f91aad0..0b86b41c48 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 074847c74c..0623edd254 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 cfce8e2234..8facf6612c 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 5a8c293740..0257465817 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_filter_spec.rb b/spec/models/account_filter_spec.rb index fa47b5954a..5cb7fa92d4 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_warning_preset_spec.rb b/spec/models/account_warning_preset_spec.rb index f171df7c97..e7a9855175 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/admin/appeal_filter_spec.rb b/spec/models/admin/appeal_filter_spec.rb index e840bc3bc1..8303e58ad6 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 21dc28affb..1baae117b8 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 1e7283ca77..e3865e6fc7 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 13ca3a2d90..7e324582ed 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 ccac9e95de..bbbaa7d06c 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 ab5149e987..b3fae56dfc 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 3f2c601f38..4868054df7 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 ab249d62d0..9488d42021 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 09fb218566..a13487c10a 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 30de07bd81..3da77344e2 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/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 12504211a1..92f1ef8ccf 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 75468898d2..06bf07ed78 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 ecc27c0f6d..368ca33f5b 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/form/admin_settings_spec.rb b/spec/models/form/admin_settings_spec.rb index 0dc2d881ad..6080b9e081 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 abeada5d50..180c6abd23 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 f06a11cc8b..8ea9d7545e 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 290b99b288..6f1eb38425 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 51dd584388..8339f8e259 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 6ff7ffc5c1..17fcdf3788 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 ebcc459078..740ef63d81 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 8b18b3d2b7..12bca83440 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 a17c7532e9..2f0ea38ee4 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 03bbe7264b..742cac8e18 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 fccd42aaad..b56da91f8d 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/report_filter_spec.rb b/spec/models/report_filter_spec.rb index 6baf0ea421..8668eb3d10 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 d01d37bd8b..a0e4f6fafd 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 c9b9c55028..375483e0db 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 2d33514522..7a469b44dc 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 61b8d8d824..578fc78238 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/policies/account_warning_preset_policy_spec.rb b/spec/policies/account_warning_preset_policy_spec.rb index 63bf33de24..53e224f19f 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 af9f7716be..07af425516 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 3d230b3cb4..503ffca6dc 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 d7498eb9f0..1bf8ce0a0d 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 0e55febfa9..f5029d9e6b 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 fbcbf390d7..bb82389eec 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 01f4da0be2..ae74d5c3a8 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 3cfa85863c..97bc239e9a 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 d6675c5b34..a1944303e1 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 8d3715de95..676039a1b7 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 0e45f6df02..5d435e38c1 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 909311461a..96aaae2c30 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 516c7e9896..42f5200f3a 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 bdcec12fdb..d0857c8980 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 238524c75c..d53816eff0 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 337ed4ec31..235dd46a63 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 fdc0a3a932..475f1b17e4 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 7ff92d6a48..400b1c7aff 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 b343a48654..b0bb5141ca 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 3727af7e89..d1d9db8e73 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 48c0337e54..8b04f07f65 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 4c022c7c13..dfd9fad49d 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 4f3ac68c74..b8c493abcc 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 c293715f7e..c66b80c7fd 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 b06ce0509d..76b1830bbe 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 76b32e7b2c..f6ab7a8531 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 97cdbe0156..4a4d9383db 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 3432106a46..e31644352b 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 87534a74b8..43e2db00c5 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 80fed79d9a..56a2c1eaee 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 9178335ba5..138959a0ab 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 48842828b3..082af785ab 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 384a305d4a..193906ab05 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 04aa0465f2..e33a9658a9 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 b1437dad8d..748a27283c 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 60cd8ed526..bab184787f 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 6e6970ce53..b899999640 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 2db52ac725..5d61d7f3f5 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 2f0dc72944..798d8e29ed 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 0a1864d136..94306c06ec 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 e267f2abd2..255211a404 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 00451540ca..0a7bfe5cda 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 9cac280c4d..f0a4ceadb8 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 7cfb24e86f..e5a480c175 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 dcdea387a5..87b0dc4f64 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 6f4188c35a..6508b51c04 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 54ef5a13ad..6674b048e8 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 f4612410bf..b35d297a60 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 b3761ca688..f13bf79867 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 72fd7d9d11..69ae948852 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 db07fa424f..3be1a16ee1 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 77542d294e..0978c890a4 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 e2ab5d0b80..047b2f0485 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 3e91fcdd98..1a211d14d8 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 6ce35c2fe6..a1f64846cf 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/home_spec.rb b/spec/requests/api/v1/timelines/home_spec.rb index 96bd153aff..d158e0801c 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 e1c914ab81..67d8bca022 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 98d2456745..753c784866 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 100f6c1bfc..1fc62b3932 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 2636970d6e..2f01db5003 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 13bcf17984..039e7513cd 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 a7d6a0864f..8895efd23d 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/backups_spec.rb b/spec/requests/backups_spec.rb index a6c2efe0db..a8c1124ed2 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 91e5b022e3..9cce241b38 100644 --- a/spec/requests/cache_spec.rb +++ b/spec/requests/cache_spec.rb @@ -118,7 +118,7 @@ module TestEndpoints 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 e600bedfe0..e7ea21524c 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 ba6fe47741..7520ecb0db 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 5271ed4a5a..a46ebd7281 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 128d173f3a..9c5c058344 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 7c2c09f380..279d2576a3 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 458d500762..b2e4702f2d 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 03317f9723..1d2f96bb3d 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 c44ef2419c..4ce6c78e94 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 522cff4642..3116a54d6a 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 b7fb53ed8d..26fc204ea4 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 62ca1ac547..62ede0c106 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 55b8147d7e..69e308e3ce 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 814d4c1166..fb4801ee67 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 095535e485..e13a49ec62 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 e6364fe8ce..942f70b9a4 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 f71a2325e2..651a894c89 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 f335ba18c0..9d0768a1e3 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 762907585f..838baf8cdb 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 f200e70383..e97f4a84d2 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 268b72c412..c34ec261a6 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 b868f8dfda..4c13225bb9 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 efdb0d8221..98ccb3e4a2 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 401828c4a3..580d028338 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 04134b71ff..77fec15412 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 ca10a51a01..09f17baa89 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 0934b0fde6..d02732c32b 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 9d2d202286..378295b5a3 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 cd8a35c702..e5ce352d50 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 588855943e..8ff711a681 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 a822fba4c5..c46fa75d1f 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 8cf08c13c1..6578e939ae 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 d8d7f355dd..de12161ef9 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 b1bf4968ca..bce1aecd75 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 23f0b24c4e..226e136446 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 338d66b308..285b241ee2 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 89efe95c8c..b9792ebae3 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 3d61e86751..c7190adc1a 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 8ff4fd2701..6a4d8177fc 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 b7c0b8928b..4e8a2beca3 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 15939e484d..7daa0796a9 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 01db1149af..a4b8ee83b2 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 39e6b3820b..2d8d14e39a 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 7f7fb850cd..e45112705b 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 28177a3db5..b8370beac7 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 ef67d70675..41492f5e78 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 b5efba082d..288d1daa23 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 5ec0885903..7d251641ee 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 403c4632d7..857bd4fda4 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 c9f84048b6..52d2b9cf22 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 3d59a55f10..80f2a5a4ba 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 394ee7c3a6..cd4c424630 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 289ddfc218..405fe1cfd2 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 2d20239b27..60bec918ea 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,8 @@ RSpec.configure do |config| 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 d531860abf..ddc61fcbe0 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 @@ shared_examples 'forbidden for wrong scope' do |wrong_scope| 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 091c842bd1..5f357fc915 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 b50faa77ba..e8c1336c5f 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 213e873b4e..a8469f1964 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 ab6020d834..232f51fa3c 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 43bbdaacf4..af8d22d633 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 562183d1cc..b63e44b43f 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/system/about_spec.rb b/spec/system/about_spec.rb index dc976b91e0..f832802f91 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 20813f6be4..c21e01e4f3 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 5c4e5d3e6a..1da5699656 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 8a8b6efcd1..e47f21f8a9 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 99aa7cf1a7..9a39e29062 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 14959cbe74..a90bede827 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 c9b16f6f78..9c03520277 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 50fb4b46df..1e787ea110 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 0f8ae5605c..c7405a8d5a 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 99e97ea4d1..56af58c812 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 ac47e04d53..5cd9319ce0 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 9867122675..f788f8eea0 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 bdab91107d..f000d18370 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 88c750e8ee..d026b07c85 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 4a635d1a79..77e9f16684 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 531d0de953..bb76a2963d 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 dca89117b1..16343a6891 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 99638bc069..7a51c337c9 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 779a15d38f..13fc966dfd 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 52e49c3a5d..d914badbd4 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 06c823adf2..4c0ce02d1b 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 a0cb965a61..052b5e1730 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 08b9737d6b..c1ce4e1726 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 8a73c42d2e..f8765e8e1c 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 f50f7c2d18..2e52254ca0 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 2f2fcf2248..317508a0bb 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 5d06f6111c..0f96a59675 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 17d18af158..fc816b6dba 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 f2ab1310cc..631440ebb2 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 2517e823b5..7e3cbfd334 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 f73ab58470..860bbdd6b7 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 e6cc3b1b68..257a1cd6fd 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 b933398a08..4a7bf3e280 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 5e27781f2a..7ccfee599a 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 417ccdaeb6..26d1bd4542 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 23a5f768ef..7109c9f4e2 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 4f1dd55a17..25ecb1fbcd 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 cb693dcd81..19e55f3467 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 3bca93a283..3fdb4ae8b9 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 f99c1cb5f9..c4d4a51779 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 249b90f490..ecbfd4ba37 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 0d172c8408..037ddadb9f 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 0eb5f83683..ad1092109d 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 4f32b7b399..2297dddaa0 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 82a1dee6d7..47a8564eff 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 fd08f2772d..1afcb046d4 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 361d69aa0a..3e88e8db28 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 efce610ae4..3dfbef31a4 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 4427cfdf95..9ff4731f96 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 0eb6227859..9e5db53185 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 2d080e286e..56d19705a4 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 c810b33c23..63396834de 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 08de150ad9..fe1c5e895e 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 66d1cf4890..c06ba63d39 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 66e52c4f28..e9a70d11d1 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 8cf13cb900..d10ea8a75e 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 b183a58dfd..7d78606398 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 fa15072241..edaec1dd3a 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 631cab6648..e41b734f21 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 861fd71a7f..32bdd0868b 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 da12037edc..445e0b635e 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 54a113a2b3..56f5957ea2 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 db1b50140b..5d1d91267a 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 91f51fbb42..2d429c880b 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 adeb287fa3..b6948395b8 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 1fc84491c3..a5d1fe343d 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 33c3ca009a..c55aa2c0c3 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 21f8f87b2f..20911007b0 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 e9484879ff..92ae304d0e 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 2636b70ad4..5ecd4291af 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 0a71a838fc..edb02cb391 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 4095a5d354..1d34aafe86 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 b25992e44b..a24de57e27 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 4bd90270d8..b3ccdd3d77 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 1a274623d7..f4b441a920 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 91668b5ada..37687ca1a8 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 2e50d4a50d..c4e17903a9 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 f8547e6fe2..35e510d253 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 5fbb4c6853..d651059c9a 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 3cd04ce7b4..311545cf56 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 c8f94fa82a..6206ab5986 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 6ef320bc4f..6712ce8f40 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 746c1a63ff..a57ed31792 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 cd561d148b..adf9a7171c 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 5718d4db49..30d5327947 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 37b0a04c49..980f1d81db 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 5071e882b6..784e72441c 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 a64bd0605f..7866824ee7 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 43ff211eaa..90f05d6a26 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 6f3cff099f..de349adacb 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 08ebf82785..28a4176193 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 c0c50b128d..d9355248ba 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 246012e128..eb9d88e59a 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 568f0fc84d..39a88e8063 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 8f686a6998..37682ebb8f 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 50af030117..7071fa6e98 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 e404e5fe47..c99e5bb164 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 13c853c62a..2eeaeffe37 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 2bf5783571..a79559efdd 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 f596c0a1ec..c88dbfe0af 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 25f0e1fce4..2782848e76 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 c0c5f032bf..34bcd8fdd8 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 cc971c24b4..ec35236172 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 7952f2c146..b1be7c4611 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 36ecc93d8e..29a7eeac40 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 5d3a12c449..a0e53e36d9 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 629eb644e4..464a4520ff 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 8025b88c0c..7b9d49b902 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 c742c30bce..f4838ac248 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 227591392c..3f600b8c97 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 637206a409..ced21d5bf7 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 6a5483d1d4..48fcfc607b 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 From 9ed1aab9b7a96076e949d5c47b391376af23d9c8 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:35 -0400 Subject: [PATCH 02/25] Remove accidental matcher debug code (#31732) --- spec/support/matchers/cacheable_response.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/support/matchers/cacheable_response.rb b/spec/support/matchers/cacheable_response.rb index da8570c8c5..e48eb28cc1 100644 --- a/spec/support/matchers/cacheable_response.rb +++ b/spec/support/matchers/cacheable_response.rb @@ -27,8 +27,6 @@ RSpec::Matchers.define :have_cacheable_headers do 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 From 14af5b47ac2230937e9244bec41390301c7b0067 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:40 -0400 Subject: [PATCH 03/25] Add coverage for model normalizations (#31734) --- spec/models/account_alias_spec.rb | 11 +++++++ spec/models/account_migration_spec.rb | 6 ++++ spec/models/account_spec.rb | 11 +++---- spec/models/account_warning_spec.rb | 11 +++++++ spec/models/custom_emoji_spec.rb | 19 ++----------- spec/models/custom_filter_spec.rb | 6 ++-- spec/models/featured_tag_spec.rb | 11 +++++++ spec/models/relay_spec.rb | 11 +++++++ spec/models/user_spec.rb | 41 +++++---------------------- spec/models/webhook_spec.rb | 6 ++-- 10 files changed, 70 insertions(+), 63 deletions(-) create mode 100644 spec/models/account_alias_spec.rb create mode 100644 spec/models/account_warning_spec.rb create mode 100644 spec/models/featured_tag_spec.rb create mode 100644 spec/models/relay_spec.rb diff --git a/spec/models/account_alias_spec.rb b/spec/models/account_alias_spec.rb new file mode 100644 index 0000000000..fc8c6bd250 --- /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_migration_spec.rb b/spec/models/account_migration_spec.rb index 1f32c6082e..d658915ce3 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 83f1585b61..27707fa897 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -723,14 +723,15 @@ RSpec.describe Account do 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_spec.rb b/spec/models/account_warning_spec.rb new file mode 100644 index 0000000000..37866ce3da --- /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/custom_emoji_spec.rb b/spec/models/custom_emoji_spec.rb index cb8cb5c11b..87b111441a 100644 --- a/spec/models/custom_emoji_spec.rb +++ b/spec/models/custom_emoji_spec.rb @@ -79,22 +79,9 @@ RSpec.describe CustomEmoji, :attachment_processing do 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 8ac9dbb896..5bb615bb37 100644 --- a/spec/models/custom_filter_spec.rb +++ b/spec/models/custom_filter_spec.rb @@ -34,10 +34,8 @@ RSpec.describe CustomFilter do 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/featured_tag_spec.rb b/spec/models/featured_tag_spec.rb new file mode 100644 index 0000000000..6056e645e0 --- /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/relay_spec.rb b/spec/models/relay_spec.rb new file mode 100644 index 0000000000..4b95c596e4 --- /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/user_spec.rb b/spec/models/user_spec.rb index 0f3e25576e..5c2af4dc39 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -59,45 +59,18 @@ RSpec.describe User do 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 864baf2e1a..1b2d803bd7 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -29,10 +29,8 @@ RSpec.describe Webhook do 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 From a24049db306a97dc5b29da4d794751b4757529bf Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Wed, 4 Sep 2024 03:20:46 -0500 Subject: [PATCH 04/25] Fix Corepack prompt on Devcontainer (#31729) --- .devcontainer/Dockerfile | 3 +++ .devcontainer/codespaces/devcontainer.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c6dcc4d46a..3aa0bbf7da 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 8acffec825..d2358657f6 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": { From 612802b9e5ede73e76e711a65f5c95e451fab0b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:22:44 +0000 Subject: [PATCH 05/25] Update dependency sass to v1.78.0 (#31739) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 57e928c4de..727dfacd92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15441,15 +15441,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 From 3553d6c36f522d4b3365db0139ff40261fc0728b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:23:00 +0000 Subject: [PATCH 06/25] Update dependency aws-sdk-s3 to v1.160.0 (#31735) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 461a2d43a2..dcd82b273a 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) From 2c6131c9a1957b4847cf6d0b23986824e64c60c2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:23:15 +0200 Subject: [PATCH 07/25] Update dependency test-prof to v1.4.2 (#31733) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index dcd82b273a..09be3e6921 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) From 393a5504e58e05e389781abe7f17e153eb4583eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:25:37 +0200 Subject: [PATCH 08/25] Update dependency ruby to v3.3.5 (#31719) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index a0891f563f..fa7adc7ac7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.4 +3.3.5 From 1c17dca6d9c36371cbcdd0f9a610e9c5eb53718b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:42:36 +0200 Subject: [PATCH 09/25] New Crowdin Translations (automated) (#31741) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/pt-BR.json | 28 +++++++ config/locales/activerecord.pt-BR.yml | 14 ++-- config/locales/devise.pt-BR.yml | 10 +-- config/locales/doorkeeper.pt-BR.yml | 35 ++++---- config/locales/en-GB.yml | 22 ++++++ config/locales/fr-CA.yml | 16 ++++ config/locales/fr.yml | 16 ++++ config/locales/he.yml | 1 + config/locales/hu.yml | 1 + config/locales/is.yml | 1 + config/locales/ko.yml | 2 +- config/locales/nn.yml | 1 + config/locales/pt-BR.yml | 92 ++++++++++++++++++++-- config/locales/simple_form.pt-BR.yml | 4 + config/locales/tr.yml | 1 + 15 files changed, 209 insertions(+), 35 deletions(-) diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index e925246bf7..aeff65485e 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/config/locales/activerecord.pt-BR.yml b/config/locales/activerecord.pt-BR.yml index ae78026629..3199eb8e2d 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 4a7f346fab..8f504362de 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 6b076e9081..c991850c68 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 012d0d91ee..bcde9956c2 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 c38435c7fb..45c6baece9 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 c3fa237759..4434a16531 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 72b4156dbf..47ec5cafbe 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 cdddc79b0e..2bf138d9be 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 41347d44bb..2c73dbae74 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 9632a3027b..ef3775d4df 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 90b3d216c3..f301b8ca98 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 418d3d059e..579dbd967f 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 fc3c09cf1d..65d3883690 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 fc9fde3615..4318f4eac4 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: From 58df00f04d39cf25e7d4d4cbb111bc4cfe1875c4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 04:52:37 -0400 Subject: [PATCH 10/25] Extract method for self-referencing records in `AccountStatusCleanupPolicy` (#31244) --- app/models/account_statuses_cleanup_policy.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/models/account_statuses_cleanup_policy.rb b/app/models/account_statuses_cleanup_policy.rb index a102795446..e2c035284b 100644 --- a/app/models/account_statuses_cleanup_policy.rb +++ b/app/models/account_statuses_cleanup_policy.rb @@ -145,15 +145,15 @@ class AccountStatusesCleanupPolicy < ApplicationRecord 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 @@ class AccountStatusesCleanupPolicy < ApplicationRecord 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 From ffe29ce4174673cd4b19d0ef330c56e584f284e6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:58:28 +0000 Subject: [PATCH 11/25] Update dependency shoulda-matchers to v6.4.0 (#31731) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 09be3e6921..a533b66241 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) From d8bd9ef19082ab3bccd4a8d2b6727e56de25b335 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:25:25 +0000 Subject: [PATCH 12/25] Update eslint (non-major) (#31684) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- yarn.lock | 193 +++++++++++++++++++++++++++++---------------------- 2 files changed, 113 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index a6f86dfd4c..ddf7ee75a2 100644 --- a/package.json +++ b/package.json @@ -175,9 +175,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/yarn.lock b/yarn.lock index 727dfacd92..e9ab694ffe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2819,9 +2819,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" @@ -2972,6 +2972,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" @@ -3180,6 +3187,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" @@ -4830,7 +4844,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: @@ -4888,16 +4902,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 @@ -5113,10 +5128,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 @@ -5131,12 +5146,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 @@ -6906,7 +6919,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: @@ -7515,13 +7528,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 @@ -7824,32 +7837,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 @@ -7874,30 +7894,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 @@ -7922,16 +7943,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" @@ -7943,8 +7964,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 @@ -7967,8 +7988,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" @@ -7990,7 +8011,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 @@ -8402,7 +8423,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: @@ -8931,12 +8952,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 @@ -9908,6 +9929,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" @@ -9915,12 +9945,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 @@ -12471,7 +12501,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: @@ -12496,15 +12526,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 @@ -12517,7 +12546,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: From 44fd0803cea855ef28fc3fe709b3febd9caa8eed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:27:12 +0000 Subject: [PATCH 13/25] Update dependency pino to v9.4.0 (#31720) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index e9ab694ffe..74d545d587 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13197,8 +13197,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" @@ -13213,7 +13213,7 @@ __metadata: thread-stream: "npm:^3.0.0" bin: pino: bin.js - checksum: 10c0/698eb2ebfcc4252da9d035fcf9c999bf27615b66ebc47f9b3d7e942750e50ebe38429e6457abcf8014d70125964ddf114e696cb8225b480d9930271708e3fb52 + checksum: 10c0/12a3d74968964d92b18ca7d6095a3c5b86478dc22264a37486d64e102085ed08820fcbe75e640acc3542fdf2937a34e5050b624f98e6ac62dd10f5e1328058a2 languageName: node linkType: hard From 7fb8834dd79b93f164369d252d505ad983be027b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:29:14 +0000 Subject: [PATCH 14/25] Update dependency pino-http to v10.3.0 (#31721) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 74d545d587..9825260d6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13154,14 +13154,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 @@ -14181,13 +14181,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" From 36710aec8b2cc622034828f0fe7f6c9a649bc0ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:57:28 +0000 Subject: [PATCH 15/25] Update dependency postcss to v8.4.45 (#31742) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9825260d6b..c77ebfa444 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14045,13 +14045,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 From ee55d20fd57fefc3bd865fb0a172bd64e908af3b Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 12:46:28 +0200 Subject: [PATCH 16/25] Allow `POST /oauth/revoke` through CORS (#31743) --- config/initializers/cors.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 37a818bf46..c530693a3f 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -22,6 +22,7 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do 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 From 1fcffa573cf1ca9373ac1b65b2f7e805cc691927 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 14:54:15 +0200 Subject: [PATCH 17/25] Fix 500 error in `GET /api/v2_alpha/notifications` when there are no notifications to return (#31746) --- .../api/v2_alpha/notifications_controller.rb | 2 ++ spec/requests/api/v2_alpha/notifications_spec.rb | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/controllers/api/v2_alpha/notifications_controller.rb b/app/controllers/api/v2_alpha/notifications_controller.rb index bd6979955a..e8aa0b9e49 100644 --- a/app/controllers/api/v2_alpha/notifications_controller.rb +++ b/app/controllers/api/v2_alpha/notifications_controller.rb @@ -77,6 +77,8 @@ class Api::V2Alpha::NotificationsController < Api::BaseController 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/spec/requests/api/v2_alpha/notifications_spec.rb b/spec/requests/api/v2_alpha/notifications_spec.rb index 7663d215eb..8009e7edce 100644 --- a/spec/requests/api/v2_alpha/notifications_spec.rb +++ b/spec/requests/api/v2_alpha/notifications_spec.rb @@ -116,6 +116,19 @@ RSpec.describe 'Notifications' do 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 From fab29ebbe864f0aec84857fc3d87f0d56f4f6b9b Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:28:16 +0200 Subject: [PATCH 18/25] Fix all notification types being stored without filtering when polling (#31745) --- .../mastodon/actions/notification_groups.ts | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/app/javascript/mastodon/actions/notification_groups.ts b/app/javascript/mastodon/actions/notification_groups.ts index 51f83f1d24..2ee46500ab 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()); }, From 585e369e0bb0e17ff5e025385dfefde1e9e81fa3 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:43:08 +0200 Subject: [PATCH 19/25] Fix display name being displayed instead of domain in remote reports (#31613) --- .../components/notification_admin_report.tsx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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 fda5798ae9..e41a6b2736 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, }; From 9ba81eae3e526724dda1c693117aae5c0c235fe9 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Wed, 4 Sep 2024 16:10:26 +0200 Subject: [PATCH 20/25] Streaming: Improve Redis connection options handling (#31623) --- streaming/index.js | 64 +++++++++++++++++------- streaming/redis.js | 120 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 142 insertions(+), 42 deletions(-) diff --git a/streaming/index.js b/streaming/index.js index 5ef1f6f319..b302565a4e 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); }; @@ -805,11 +835,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; @@ -1156,7 +1186,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(); @@ -1200,8 +1230,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 208d6ae078..2a36b89dc5 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!')); From ef2bc8ea261838cf31fe4fe11b2954a19c864295 Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Wed, 4 Sep 2024 16:10:45 +0200 Subject: [PATCH 21/25] Add redis sentinel support to ruby part of code (#31744) --- lib/mastodon/redis_configuration.rb | 102 ++++++++++-------- spec/lib/mastodon/redis_configuration_spec.rb | 56 ++++++++++ 2 files changed, 112 insertions(+), 46 deletions(-) diff --git a/lib/mastodon/redis_configuration.rb b/lib/mastodon/redis_configuration.rb index 3cd121e4ac..9139d87583 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 @@ class Mastodon::RedisConfiguration namespace ? "#{namespace}_cache" : 'cache' end - def setup_base_redis_url - url = ENV.fetch('REDIS_URL', nil) - return url if url.present? + def setup_config(prefix: nil, defaults: {}) + prefix = "#{prefix}REDIS_" - 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) + 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)) - construct_uri(host, port, db, user, password) - end + return { url:, driver: } if url - def setup_prefixed_redis_url(prefix) - prefix = "#{prefix.to_s.upcase}_" - url = ENV.fetch("#{prefix}REDIS_URL", nil) - - return url if url.present? - - 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) - - if host.nil? - base[:url] + if name.present? && sentinels.present? + host = name + port = nil + db ||= 0 else - construct_uri(host, port, db, user, password) + sentinels = nil + end + + url = construct_uri(host, port, db, user, password) + + if url.present? + { url:, driver:, name:, sentinels: } + else + # 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/spec/lib/mastodon/redis_configuration_spec.rb b/spec/lib/mastodon/redis_configuration_spec.rb index c7326fd411..a48ffc80e6 100644 --- a/spec/lib/mastodon/redis_configuration_spec.rb +++ b/spec/lib/mastodon/redis_configuration_spec.rb @@ -45,6 +45,20 @@ RSpec.describe Mastodon::RedisConfiguration do 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 @@ RSpec.describe Mastodon::RedisConfiguration do 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 @@ RSpec.describe Mastodon::RedisConfiguration do url: 'redis://localhost:6379/0', driver: :hiredis, namespace: nil, + name: nil, + sentinels: nil, }) end end @@ -113,12 +162,15 @@ RSpec.describe Mastodon::RedisConfiguration do 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 @@ RSpec.describe Mastodon::RedisConfiguration do 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 @@ RSpec.describe Mastodon::RedisConfiguration do namespace: 'cache', expires_in: 10.minutes, connect_timeout: 5, + name: nil, + sentinels: nil, pool: { size: 5, timeout: 5, @@ -166,5 +221,6 @@ RSpec.describe Mastodon::RedisConfiguration do include_examples 'secondary configuration', 'CACHE' include_examples 'setting a different driver' + include_examples 'sentinel support', 'CACHE' end end From fe04291af46d7cb9d3439fa73739b2ffb2b53d72 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 13:19:53 -0400 Subject: [PATCH 22/25] Use more accurate beginning/ending times in annual report source (#31751) --- app/lib/annual_report/source.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/lib/annual_report/source.rb b/app/lib/annual_report/source.rb index 1ccb622676..d56a1fcccf 100644 --- a/app/lib/annual_report/source.rb +++ b/app/lib/annual_report/source.rb @@ -11,6 +11,16 @@ class AnnualReport::Source 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 From 1d86377ba90c640763cb61ae3a6d79544a92e8df Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:28:16 +0200 Subject: [PATCH 23/25] [Glitch] Fix all notification types being stored without filtering when polling Port fab29ebbe864f0aec84857fc3d87f0d56f4f6b9b to glitch-soc Signed-off-by: Claire --- .../glitch/actions/notification_groups.ts | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/notification_groups.ts b/app/javascript/flavours/glitch/actions/notification_groups.ts index ba93ab776b..b0a54ad5b4 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()); }, From 1fb31ad9b1be6d7c629300657d773b803c943ff1 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:43:08 +0200 Subject: [PATCH 24/25] [Glitch] Fix display name being displayed instead of domain in remote reports Port 585e369e0bb0e17ff5e025385dfefde1e9e81fa3 to glitch-soc Signed-off-by: Claire --- .../components/notification_admin_report.tsx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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 fc2d3149b3..3ab8729163 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, }; From cb1eaa10f21ae0524a0ea909c6271be2621dfade Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 20:07:23 +0200 Subject: [PATCH 25/25] Fix glitch-soc-only tests --- spec/requests/api/v1/timelines/direct_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/api/v1/timelines/direct_spec.rb b/spec/requests/api/v1/timelines/direct_spec.rb index f882e4ccc5..2551060fa9 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) }