From f1003b256055e7eaf5d81cc95c370fc1ab82dfde Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:25 -0400 Subject: [PATCH 01/47] 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 f9c5922c76efea..f7b5b2e249b6fa 100644 --- a/spec/chewy/accounts_index_spec.rb +++ b/spec/chewy/accounts_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountsIndex do +RSpec.describe AccountsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/public_statuses_index_spec.rb b/spec/chewy/public_statuses_index_spec.rb index 2f93d0ff025a59..6bc08832f33992 100644 --- a/spec/chewy/public_statuses_index_spec.rb +++ b/spec/chewy/public_statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublicStatusesIndex do +RSpec.describe PublicStatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/statuses_index_spec.rb b/spec/chewy/statuses_index_spec.rb index 768e9415fc1f69..e3899f3a1767a5 100644 --- a/spec/chewy/statuses_index_spec.rb +++ b/spec/chewy/statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesIndex do +RSpec.describe StatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/tags_index_spec.rb b/spec/chewy/tags_index_spec.rb index 054589bdfb1929..6b57da65e4d737 100644 --- a/spec/chewy/tags_index_spec.rb +++ b/spec/chewy/tags_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagsIndex do +RSpec.describe TagsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/config/initializers/rack/attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb index 19de4808983bc9..c7af11bea7c128 100644 --- a/spec/config/initializers/rack/attack_spec.rb +++ b/spec/config/initializers/rack/attack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rack::Attack, type: :request do +RSpec.describe Rack::Attack, type: :request do def app Rails.application end diff --git a/spec/controllers/activitypub/claims_controller_spec.rb b/spec/controllers/activitypub/claims_controller_spec.rb index f00eeb732a7af2..e887be2cbe1ae2 100644 --- a/spec/controllers/activitypub/claims_controller_spec.rb +++ b/spec/controllers/activitypub/claims_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ClaimsController do +RSpec.describe ActivityPub::ClaimsController do let(:account) { Fabricate(:account) } describe 'POST #create' do diff --git a/spec/controllers/admin/account_actions_controller_spec.rb b/spec/controllers/admin/account_actions_controller_spec.rb index b8dae7993935e1..d513b3d4a09261 100644 --- a/spec/controllers/admin/account_actions_controller_spec.rb +++ b/spec/controllers/admin/account_actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountActionsController do +RSpec.describe Admin::AccountActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/action_logs_controller_spec.rb b/spec/controllers/admin/action_logs_controller_spec.rb index be4222df080f87..3daf2606729fcb 100644 --- a/spec/controllers/admin/action_logs_controller_spec.rb +++ b/spec/controllers/admin/action_logs_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ActionLogsController do +RSpec.describe Admin::ActionLogsController do render_views # Action logs typically cause issues when their targets are not in the database diff --git a/spec/controllers/admin/base_controller_spec.rb b/spec/controllers/admin/base_controller_spec.rb index 1f1fa8441af24a..8b8b7fe63d931d 100644 --- a/spec/controllers/admin/base_controller_spec.rb +++ b/spec/controllers/admin/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::BaseController do +RSpec.describe Admin::BaseController do controller do def success authorize :dashboard, :index? diff --git a/spec/controllers/admin/custom_emojis_controller_spec.rb b/spec/controllers/admin/custom_emojis_controller_spec.rb index 9e732200dd26a7..57c2a6d21b4b9f 100644 --- a/spec/controllers/admin/custom_emojis_controller_spec.rb +++ b/spec/controllers/admin/custom_emojis_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::CustomEmojisController do +RSpec.describe Admin::CustomEmojisController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index 3e29ce1278583b..9177be4b6dc2cb 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardController do +RSpec.describe Admin::DashboardController do render_views describe 'GET #index' do diff --git a/spec/controllers/admin/follow_recommendations_controller_spec.rb b/spec/controllers/admin/follow_recommendations_controller_spec.rb index f62aa6e4b2f030..d614f2ef43d4f0 100644 --- a/spec/controllers/admin/follow_recommendations_controller_spec.rb +++ b/spec/controllers/admin/follow_recommendations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FollowRecommendationsController do +RSpec.describe Admin::FollowRecommendationsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/invites_controller_spec.rb b/spec/controllers/admin/invites_controller_spec.rb index 8638f8e2141fc1..b6471e80b2766b 100644 --- a/spec/controllers/admin/invites_controller_spec.rb +++ b/spec/controllers/admin/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::InvitesController do +RSpec.describe Admin::InvitesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/ip_blocks_controller_spec.rb b/spec/controllers/admin/ip_blocks_controller_spec.rb index 05190f13408eac..2e32db5a0118b9 100644 --- a/spec/controllers/admin/ip_blocks_controller_spec.rb +++ b/spec/controllers/admin/ip_blocks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::IpBlocksController do +RSpec.describe Admin::IpBlocksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relationships_controller_spec.rb b/spec/controllers/admin/relationships_controller_spec.rb index 1099a37a3b3b31..214be7c7cd212e 100644 --- a/spec/controllers/admin/relationships_controller_spec.rb +++ b/spec/controllers/admin/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelationshipsController do +RSpec.describe Admin::RelationshipsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relays_controller_spec.rb b/spec/controllers/admin/relays_controller_spec.rb index ca351c39b2c7e8..c6251a6d764025 100644 --- a/spec/controllers/admin/relays_controller_spec.rb +++ b/spec/controllers/admin/relays_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelaysController do +RSpec.describe Admin::RelaysController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb index 8d5b5c7aecf871..423a64ebc455e1 100644 --- a/spec/controllers/admin/report_notes_controller_spec.rb +++ b/spec/controllers/admin/report_notes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportNotesController do +RSpec.describe Admin::ReportNotesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports/actions_controller_spec.rb b/spec/controllers/admin/reports/actions_controller_spec.rb index 06d4b31f54e469..6185702c303811 100644 --- a/spec/controllers/admin/reports/actions_controller_spec.rb +++ b/spec/controllers/admin/reports/actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Reports::ActionsController do +RSpec.describe Admin::Reports::ActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb index 67fb28e7a57fff..d07468a37b4fa4 100644 --- a/spec/controllers/admin/reports_controller_spec.rb +++ b/spec/controllers/admin/reports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportsController do +RSpec.describe Admin::ReportsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/roles_controller_spec.rb b/spec/controllers/admin/roles_controller_spec.rb index 223d0a472a5164..2c43a0ca870ae5 100644 --- a/spec/controllers/admin/roles_controller_spec.rb +++ b/spec/controllers/admin/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RolesController do +RSpec.describe Admin::RolesController do render_views let(:permissions) { UserRole::Flags::NONE } diff --git a/spec/controllers/admin/rules_controller_spec.rb b/spec/controllers/admin/rules_controller_spec.rb index 92ffb415671c3c..1b2a2010d0de77 100644 --- a/spec/controllers/admin/rules_controller_spec.rb +++ b/spec/controllers/admin/rules_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RulesController do +RSpec.describe Admin::RulesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/site_uploads_controller_spec.rb b/spec/controllers/admin/site_uploads_controller_spec.rb index 4ea37f396a7773..9c65c63b78e11b 100644 --- a/spec/controllers/admin/site_uploads_controller_spec.rb +++ b/spec/controllers/admin/site_uploads_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SiteUploadsController do +RSpec.describe Admin::SiteUploadsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb index 4ab6d109ef89b5..e6053a6e8a9cca 100644 --- a/spec/controllers/admin/statuses_controller_spec.rb +++ b/spec/controllers/admin/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::StatusesController do +RSpec.describe Admin::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb index 95ed38d6b1da5e..ce62a13db6c7f2 100644 --- a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb +++ b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::Links::PreviewCardProvidersController do +RSpec.describe Admin::Trends::Links::PreviewCardProvidersController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links_controller_spec.rb b/spec/controllers/admin/trends/links_controller_spec.rb index 7c67f5e5aa3e41..984f3007c2db8b 100644 --- a/spec/controllers/admin/trends/links_controller_spec.rb +++ b/spec/controllers/admin/trends/links_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::LinksController do +RSpec.describe Admin::Trends::LinksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/statuses_controller_spec.rb b/spec/controllers/admin/trends/statuses_controller_spec.rb index b752234d3cd4f5..eecf4ab4f2695f 100644 --- a/spec/controllers/admin/trends/statuses_controller_spec.rb +++ b/spec/controllers/admin/trends/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesController do +RSpec.describe Admin::Trends::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/tags_controller_spec.rb b/spec/controllers/admin/trends/tags_controller_spec.rb index 4f74a55455d613..51ad1860c8aebb 100644 --- a/spec/controllers/admin/trends/tags_controller_spec.rb +++ b/spec/controllers/admin/trends/tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::TagsController do +RSpec.describe Admin::Trends::TagsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/users/roles_controller_spec.rb b/spec/controllers/admin/users/roles_controller_spec.rb index 97f69a0b0a90da..bfc2bb151fa7c5 100644 --- a/spec/controllers/admin/users/roles_controller_spec.rb +++ b/spec/controllers/admin/users/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Users::RolesController do +RSpec.describe Admin::Users::RolesController do render_views let(:current_role) { UserRole.create(name: 'Foo', permissions: UserRole::FLAGS[:manage_roles], position: 10) } diff --git a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb index eb10d4796302c0..1f0a6ac34d3ecd 100644 --- a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb +++ b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Admin::Users::TwoFactorAuthenticationsController do +RSpec.describe Admin::Users::TwoFactorAuthenticationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/admin/warning_presets_controller_spec.rb b/spec/controllers/admin/warning_presets_controller_spec.rb index b32a58e990f1af..4171bbad824c8e 100644 --- a/spec/controllers/admin/warning_presets_controller_spec.rb +++ b/spec/controllers/admin/warning_presets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WarningPresetsController do +RSpec.describe Admin::WarningPresetsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks/secrets_controller_spec.rb b/spec/controllers/admin/webhooks/secrets_controller_spec.rb index 291a10fba5e0ca..61ae8cdaa50bf1 100644 --- a/spec/controllers/admin/webhooks/secrets_controller_spec.rb +++ b/spec/controllers/admin/webhooks/secrets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Webhooks::SecretsController do +RSpec.describe Admin::Webhooks::SecretsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks_controller_spec.rb b/spec/controllers/admin/webhooks_controller_spec.rb index 17d85060256207..4fe787c26cd470 100644 --- a/spec/controllers/admin/webhooks_controller_spec.rb +++ b/spec/controllers/admin/webhooks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WebhooksController do +RSpec.describe Admin::WebhooksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/api/base_controller_spec.rb b/spec/controllers/api/base_controller_spec.rb index 659d55f8012d0e..1e0e7c8f4dcffe 100644 --- a/spec/controllers/api/base_controller_spec.rb +++ b/spec/controllers/api/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::BaseController do +RSpec.describe Api::BaseController do controller do def success head 200 diff --git a/spec/controllers/api/web/push_subscriptions_controller_spec.rb b/spec/controllers/api/web/push_subscriptions_controller_spec.rb index 58677841ca7785..acc03121132332 100644 --- a/spec/controllers/api/web/push_subscriptions_controller_spec.rb +++ b/spec/controllers/api/web/push_subscriptions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::Web::PushSubscriptionsController do +RSpec.describe Api::Web::PushSubscriptionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index f595e8ca19e6dc..4ee951628e7786 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationController do +RSpec.describe ApplicationController do controller do def success head 200 diff --git a/spec/controllers/auth/challenges_controller_spec.rb b/spec/controllers/auth/challenges_controller_spec.rb index 32bbedde633a94..56fdfa61b58078 100644 --- a/spec/controllers/auth/challenges_controller_spec.rb +++ b/spec/controllers/auth/challenges_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ChallengesController do +RSpec.describe Auth::ChallengesController do render_views let(:password) { 'foobar12345' } diff --git a/spec/controllers/auth/confirmations_controller_spec.rb b/spec/controllers/auth/confirmations_controller_spec.rb index 15403e8ea13513..a5b212e660036d 100644 --- a/spec/controllers/auth/confirmations_controller_spec.rb +++ b/spec/controllers/auth/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ConfirmationsController do +RSpec.describe Auth::ConfirmationsController do render_views describe 'GET #new' do diff --git a/spec/controllers/auth/passwords_controller_spec.rb b/spec/controllers/auth/passwords_controller_spec.rb index d70490abcf15ad..9ccbb9e4942921 100644 --- a/spec/controllers/auth/passwords_controller_spec.rb +++ b/spec/controllers/auth/passwords_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::PasswordsController do +RSpec.describe Auth::PasswordsController do include Devise::Test::ControllerHelpers describe 'GET #new' do diff --git a/spec/controllers/auth/setup_controller_spec.rb b/spec/controllers/auth/setup_controller_spec.rb index 75e42aaf96d672..28b07cb4b289e9 100644 --- a/spec/controllers/auth/setup_controller_spec.rb +++ b/spec/controllers/auth/setup_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::SetupController do +RSpec.describe Auth::SetupController do render_views describe 'GET #show' do diff --git a/spec/controllers/authorize_interactions_controller_spec.rb b/spec/controllers/authorize_interactions_controller_spec.rb index ed55df08d9a74b..2a0422efa927cf 100644 --- a/spec/controllers/authorize_interactions_controller_spec.rb +++ b/spec/controllers/authorize_interactions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AuthorizeInteractionsController do +RSpec.describe AuthorizeInteractionsController do render_views describe 'GET #show' do diff --git a/spec/controllers/concerns/account_controller_concern_spec.rb b/spec/controllers/concerns/account_controller_concern_spec.rb index 122ef21e93039f..3eee46d7b956fc 100644 --- a/spec/controllers/concerns/account_controller_concern_spec.rb +++ b/spec/controllers/concerns/account_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountControllerConcern do +RSpec.describe AccountControllerConcern do controller(ApplicationController) do include AccountControllerConcern diff --git a/spec/controllers/concerns/api/error_handling_spec.rb b/spec/controllers/concerns/api/error_handling_spec.rb index 9b36fc20a32403..eff01605d2a89a 100644 --- a/spec/controllers/concerns/api/error_handling_spec.rb +++ b/spec/controllers/concerns/api/error_handling_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::ErrorHandling do +RSpec.describe Api::ErrorHandling do before do stub_const('FakeService', Class.new) end diff --git a/spec/controllers/concerns/api/rate_limit_headers_spec.rb b/spec/controllers/concerns/api/rate_limit_headers_spec.rb index 2050de2aed4ed8..6372c94e6c2af4 100644 --- a/spec/controllers/concerns/api/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/api/rate_limit_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::RateLimitHeaders do +RSpec.describe Api::RateLimitHeaders do controller(ApplicationController) do include Api::RateLimitHeaders diff --git a/spec/controllers/concerns/localized_spec.rb b/spec/controllers/concerns/localized_spec.rb index ce31e786f0a352..b1f805ae50c883 100644 --- a/spec/controllers/concerns/localized_spec.rb +++ b/spec/controllers/concerns/localized_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Localized do +RSpec.describe Localized do controller(ApplicationController) do include Localized diff --git a/spec/controllers/concerns/settings/export_controller_concern_spec.rb b/spec/controllers/concerns/settings/export_controller_concern_spec.rb index a19af8689ac877..2c67991e3a8251 100644 --- a/spec/controllers/concerns/settings/export_controller_concern_spec.rb +++ b/spec/controllers/concerns/settings/export_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportControllerConcern do +RSpec.describe Settings::ExportControllerConcern do controller(ApplicationController) do include Settings::ExportControllerConcern diff --git a/spec/controllers/concerns/user_tracking_concern_spec.rb b/spec/controllers/concerns/user_tracking_concern_spec.rb index f23d482f5f9303..cc61e285cc2e2c 100644 --- a/spec/controllers/concerns/user_tracking_concern_spec.rb +++ b/spec/controllers/concerns/user_tracking_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserTrackingConcern do +RSpec.describe UserTrackingConcern do controller(ApplicationController) do include UserTrackingConcern diff --git a/spec/controllers/filters/statuses_controller_spec.rb b/spec/controllers/filters/statuses_controller_spec.rb index 2c80613302cb9e..f1fed76fca6069 100644 --- a/spec/controllers/filters/statuses_controller_spec.rb +++ b/spec/controllers/filters/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Filters::StatusesController do +RSpec.describe Filters::StatusesController do render_views describe 'GET #index' do diff --git a/spec/controllers/filters_controller_spec.rb b/spec/controllers/filters_controller_spec.rb index 091f714bb37cb2..de043e8ae3f996 100644 --- a/spec/controllers/filters_controller_spec.rb +++ b/spec/controllers/filters_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FiltersController do +RSpec.describe FiltersController do render_views describe 'GET #index' do diff --git a/spec/controllers/follower_accounts_controller_spec.rb b/spec/controllers/follower_accounts_controller_spec.rb index dd78c96c053934..e84528d13e085e 100644 --- a/spec/controllers/follower_accounts_controller_spec.rb +++ b/spec/controllers/follower_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowerAccountsController do +RSpec.describe FollowerAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/following_accounts_controller_spec.rb b/spec/controllers/following_accounts_controller_spec.rb index 7bb78fb4204569..1e01b9f4945722 100644 --- a/spec/controllers/following_accounts_controller_spec.rb +++ b/spec/controllers/following_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowingAccountsController do +RSpec.describe FollowingAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 5221941267fa00..192c5b00ba86e7 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InvitesController do +RSpec.describe InvitesController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/oauth/authorized_applications_controller_spec.rb b/spec/controllers/oauth/authorized_applications_controller_spec.rb index 3fd9f9499f4387..52d3dbde83e034 100644 --- a/spec/controllers/oauth/authorized_applications_controller_spec.rb +++ b/spec/controllers/oauth/authorized_applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Oauth::AuthorizedApplicationsController do +RSpec.describe Oauth::AuthorizedApplicationsController do render_views describe 'GET #index' do diff --git a/spec/controllers/relationships_controller_spec.rb b/spec/controllers/relationships_controller_spec.rb index 9495fc214f04ac..323fcc995de83b 100644 --- a/spec/controllers/relationships_controller_spec.rb +++ b/spec/controllers/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipsController do +RSpec.describe RelationshipsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/aliases_controller_spec.rb b/spec/controllers/settings/aliases_controller_spec.rb index 18e568be0be43b..4858c15298c7df 100644 --- a/spec/controllers/settings/aliases_controller_spec.rb +++ b/spec/controllers/settings/aliases_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::AliasesController do +RSpec.describe Settings::AliasesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/applications_controller_spec.rb b/spec/controllers/settings/applications_controller_spec.rb index ce2e0749a763b8..721741bacb2272 100644 --- a/spec/controllers/settings/applications_controller_spec.rb +++ b/spec/controllers/settings/applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ApplicationsController do +RSpec.describe Settings::ApplicationsController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/deletes_controller_spec.rb b/spec/controllers/settings/deletes_controller_spec.rb index 3342599bc1172e..98104b8454b782 100644 --- a/spec/controllers/settings/deletes_controller_spec.rb +++ b/spec/controllers/settings/deletes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::DeletesController do +RSpec.describe Settings::DeletesController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/exports_controller_spec.rb b/spec/controllers/settings/exports_controller_spec.rb index 3399f78ac58f5b..1eafabc7e50129 100644 --- a/spec/controllers/settings/exports_controller_spec.rb +++ b/spec/controllers/settings/exports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportsController do +RSpec.describe Settings::ExportsController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/featured_tags_controller_spec.rb b/spec/controllers/settings/featured_tags_controller_spec.rb index 4e1dd52945902b..a56ae1c498cf00 100644 --- a/spec/controllers/settings/featured_tags_controller_spec.rb +++ b/spec/controllers/settings/featured_tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::FeaturedTagsController do +RSpec.describe Settings::FeaturedTagsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/login_activities_controller_spec.rb b/spec/controllers/settings/login_activities_controller_spec.rb index 294bf85c97ad26..3447620abbf8ff 100644 --- a/spec/controllers/settings/login_activities_controller_spec.rb +++ b/spec/controllers/settings/login_activities_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::LoginActivitiesController do +RSpec.describe Settings::LoginActivitiesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/migration/redirects_controller_spec.rb b/spec/controllers/settings/migration/redirects_controller_spec.rb index b909a02668b787..d853fe8ae64249 100644 --- a/spec/controllers/settings/migration/redirects_controller_spec.rb +++ b/spec/controllers/settings/migration/redirects_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Migration::RedirectsController do +RSpec.describe Settings::Migration::RedirectsController do render_views let!(:user) { Fabricate(:user, password: 'testtest') } diff --git a/spec/controllers/settings/migrations_controller_spec.rb b/spec/controllers/settings/migrations_controller_spec.rb index f3340574d08be5..93c5de08990e96 100644 --- a/spec/controllers/settings/migrations_controller_spec.rb +++ b/spec/controllers/settings/migrations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::MigrationsController do +RSpec.describe Settings::MigrationsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/pictures_controller_spec.rb b/spec/controllers/settings/pictures_controller_spec.rb index 705878f03da7a0..683d231ed1e433 100644 --- a/spec/controllers/settings/pictures_controller_spec.rb +++ b/spec/controllers/settings/pictures_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::PicturesController do +RSpec.describe Settings::PicturesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/appearance_controller_spec.rb b/spec/controllers/settings/preferences/appearance_controller_spec.rb index 84b82772502fec..14f9b244ab280f 100644 --- a/spec/controllers/settings/preferences/appearance_controller_spec.rb +++ b/spec/controllers/settings/preferences/appearance_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::AppearanceController do +RSpec.describe Settings::Preferences::AppearanceController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/base_controller_spec.rb b/spec/controllers/settings/preferences/base_controller_spec.rb index 53b3a461ed589a..75fc999a4831f8 100644 --- a/spec/controllers/settings/preferences/base_controller_spec.rb +++ b/spec/controllers/settings/preferences/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::BaseController do +RSpec.describe Settings::Preferences::BaseController do describe 'after_update_redirect_path' do it 'raises error when called' do expect { described_class.new.send(:after_update_redirect_path) }.to raise_error(/Override/) diff --git a/spec/controllers/settings/preferences/notifications_controller_spec.rb b/spec/controllers/settings/preferences/notifications_controller_spec.rb index e0f0bc55a7580d..edfdea50e066b8 100644 --- a/spec/controllers/settings/preferences/notifications_controller_spec.rb +++ b/spec/controllers/settings/preferences/notifications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::NotificationsController do +RSpec.describe Settings::Preferences::NotificationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/other_controller_spec.rb b/spec/controllers/settings/preferences/other_controller_spec.rb index 61a94a41423775..117fdeea7c8bb4 100644 --- a/spec/controllers/settings/preferences/other_controller_spec.rb +++ b/spec/controllers/settings/preferences/other_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::OtherController do +RSpec.describe Settings::Preferences::OtherController do render_views let(:user) { Fabricate(:user, chosen_languages: []) } diff --git a/spec/controllers/settings/sessions_controller_spec.rb b/spec/controllers/settings/sessions_controller_spec.rb index a4248e1bde6f11..c098af74855bef 100644 --- a/spec/controllers/settings/sessions_controller_spec.rb +++ b/spec/controllers/settings/sessions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::SessionsController do +RSpec.describe Settings::SessionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb index 1c8b483a0a22e7..34eaacdf498f96 100644 --- a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::ConfirmationsController do +RSpec.describe Settings::TwoFactorAuthentication::ConfirmationsController do render_views shared_examples 'renders :new' do diff --git a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb index 007df87d954c75..a03c4a4adb2442 100644 --- a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::OtpAuthenticationController do +RSpec.describe Settings::TwoFactorAuthentication::OtpAuthenticationController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb index dbc2e3059ce2c9..0defc52cde92db 100644 --- a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::RecoveryCodesController do +RSpec.describe Settings::TwoFactorAuthentication::RecoveryCodesController do render_views describe 'POST #create' do diff --git a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb index 41a3ba5eb5bbf5..cccf3c51d321b1 100644 --- a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do +RSpec.describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb index de0d28463bb2aa..c55f113d4d2d3e 100644 --- a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthenticationMethodsController do +RSpec.describe Settings::TwoFactorAuthenticationMethodsController do render_views context 'when not signed in' do diff --git a/spec/controllers/statuses_controller_spec.rb b/spec/controllers/statuses_controller_spec.rb index 084dcfaa751d69..289109a1fab450 100644 --- a/spec/controllers/statuses_controller_spec.rb +++ b/spec/controllers/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesController do +RSpec.describe StatusesController do render_views describe 'GET #show' do diff --git a/spec/fabrication/fabricators_spec.rb b/spec/fabrication/fabricators_spec.rb index 2cf45041a4a80d..f7bb504543d239 100644 --- a/spec/fabrication/fabricators_spec.rb +++ b/spec/fabrication/fabricators_spec.rb @@ -5,7 +5,7 @@ Fabrication.manager.load_definitions if Fabrication.manager.empty? Fabrication.manager.schematics.map(&:first).each do |factory_name| - describe "The #{factory_name} factory" do + RSpec.describe "The #{factory_name} factory" do it 'is able to create valid records' do records = Fabricate.times(2, factory_name) # Create multiple of each to uncover uniqueness issues expect(records).to all(be_valid) diff --git a/spec/generators/post_deployment_migration_generator_spec.rb b/spec/generators/post_deployment_migration_generator_spec.rb index 55e70a7917032c..1aa8e0915c3d7a 100644 --- a/spec/generators/post_deployment_migration_generator_spec.rb +++ b/spec/generators/post_deployment_migration_generator_spec.rb @@ -6,7 +6,7 @@ require 'generators/post_deployment_migration/post_deployment_migration_generator' -describe PostDeploymentMigrationGenerator, type: :generator do +RSpec.describe PostDeploymentMigrationGenerator, type: :generator do include Rails::Generators::Testing::Behavior include Rails::Generators::Testing::Assertions include FileUtils diff --git a/spec/helpers/admin/dashboard_helper_spec.rb b/spec/helpers/admin/dashboard_helper_spec.rb index 59062e48396b9d..9c674fb4b9664d 100644 --- a/spec/helpers/admin/dashboard_helper_spec.rb +++ b/spec/helpers/admin/dashboard_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardHelper do +RSpec.describe Admin::DashboardHelper do describe 'relevant_account_timestamp' do context 'with an account with older sign in' do let(:account) { Fabricate(:account) } diff --git a/spec/helpers/admin/disputes_helper_spec.rb b/spec/helpers/admin/disputes_helper_spec.rb index 5f9a85df869140..a6ac021bd491bb 100644 --- a/spec/helpers/admin/disputes_helper_spec.rb +++ b/spec/helpers/admin/disputes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DisputesHelper do +RSpec.describe Admin::DisputesHelper do describe 'strike_action_label' do it 'returns html describing the appeal' do adam = Account.new(username: 'Adam') diff --git a/spec/helpers/admin/filter_helper_spec.rb b/spec/helpers/admin/filter_helper_spec.rb index 40ed63239f03a7..d07a6e1bb756c4 100644 --- a/spec/helpers/admin/filter_helper_spec.rb +++ b/spec/helpers/admin/filter_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FilterHelper do +RSpec.describe Admin::FilterHelper do it 'Uses filter_link_to to create filter links' do params = ActionController::Parameters.new( { test: 'test' } diff --git a/spec/helpers/admin/trends/statuses_helper_spec.rb b/spec/helpers/admin/trends/statuses_helper_spec.rb index 92caae6909960e..fa5c337e973643 100644 --- a/spec/helpers/admin/trends/statuses_helper_spec.rb +++ b/spec/helpers/admin/trends/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesHelper do +RSpec.describe Admin::Trends::StatusesHelper do describe '.one_line_preview' do before do allow(helper).to receive(:current_user).and_return(Fabricate.build(:user)) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 0bfce6946b1a87..c2e618c7def033 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationHelper do +RSpec.describe ApplicationHelper do describe 'body_classes' do context 'with a body class string from a controller' do before { helper.extend controller_helpers } diff --git a/spec/helpers/flashes_helper_spec.rb b/spec/helpers/flashes_helper_spec.rb index a6a3b062d7ef28..aaef7ab1443e74 100644 --- a/spec/helpers/flashes_helper_spec.rb +++ b/spec/helpers/flashes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FlashesHelper do +RSpec.describe FlashesHelper do describe 'user_facing_flashes' do before do # rubocop:disable Rails/I18nLocaleTexts diff --git a/spec/helpers/formatting_helper_spec.rb b/spec/helpers/formatting_helper_spec.rb index d6e7631f66c1ee..136a609b1c9cf4 100644 --- a/spec/helpers/formatting_helper_spec.rb +++ b/spec/helpers/formatting_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FormattingHelper do +RSpec.describe FormattingHelper do include Devise::Test::ControllerHelpers describe '#rss_status_content_format' do diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb index 9a2d8841586e31..e7b15e6513cc7c 100644 --- a/spec/helpers/instance_helper_spec.rb +++ b/spec/helpers/instance_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstanceHelper do +RSpec.describe InstanceHelper do describe 'site_title' do it 'Uses the Setting.site_title value when it exists' do Setting.site_title = 'New site title' diff --git a/spec/helpers/json_ld_helper_spec.rb b/spec/helpers/json_ld_helper_spec.rb index f4b849d7a12b8c..d76c5167a7d9a3 100644 --- a/spec/helpers/json_ld_helper_spec.rb +++ b/spec/helpers/json_ld_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe JsonLdHelper do +RSpec.describe JsonLdHelper do describe '#equals_or_includes?' do it 'returns true when value equals' do expect(helper.equals_or_includes?('foo', 'foo')).to be true diff --git a/spec/helpers/languages_helper_spec.rb b/spec/helpers/languages_helper_spec.rb index 99461b293ba6f9..dd9b6004d1cf5b 100644 --- a/spec/helpers/languages_helper_spec.rb +++ b/spec/helpers/languages_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguagesHelper do +RSpec.describe LanguagesHelper do describe 'the SUPPORTED_LOCALES constant' do it 'includes all i18n locales' do expect(Set.new(described_class::SUPPORTED_LOCALES.keys + described_class::REGIONAL_LOCALE_NAMES.keys)).to include(*I18n.available_locales) diff --git a/spec/helpers/media_component_helper_spec.rb b/spec/helpers/media_component_helper_spec.rb index af5d92769ca249..ec87a707cb6e8e 100644 --- a/spec/helpers/media_component_helper_spec.rb +++ b/spec/helpers/media_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MediaComponentHelper do +RSpec.describe MediaComponentHelper do before { helper.extend controller_helpers } describe 'render_video_component' do diff --git a/spec/helpers/react_component_helper_spec.rb b/spec/helpers/react_component_helper_spec.rb index 28208b619bae0f..202694fbe4d8b0 100644 --- a/spec/helpers/react_component_helper_spec.rb +++ b/spec/helpers/react_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactComponentHelper do +RSpec.describe ReactComponentHelper do describe 'react_component' do context 'with no block passed in' do let(:result) { helper.react_component('name', { one: :two }) } diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb index ca447d8ce12633..ecff2edbfa159d 100644 --- a/spec/helpers/settings_helper_spec.rb +++ b/spec/helpers/settings_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SettingsHelper do +RSpec.describe SettingsHelper do describe 'session_device_icon' do context 'with a mobile device' do let(:session) { SessionActivation.new(user_agent: 'Mozilla/5.0 (iPhone)') } diff --git a/spec/helpers/statuses_helper_spec.rb b/spec/helpers/statuses_helper_spec.rb index 66eb996f996704..8809d0afaeb303 100644 --- a/spec/helpers/statuses_helper_spec.rb +++ b/spec/helpers/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesHelper do +RSpec.describe StatusesHelper do describe 'status_text_summary' do context 'with blank text' do let(:status) { Status.new(spoiler_text: '') } diff --git a/spec/helpers/theme_helper_spec.rb b/spec/helpers/theme_helper_spec.rb index c0b6380a1f2b91..7663e59436d9a4 100644 --- a/spec/helpers/theme_helper_spec.rb +++ b/spec/helpers/theme_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ThemeHelper do +RSpec.describe ThemeHelper do describe 'theme_style_tags' do let(:result) { helper.theme_style_tags(theme) } diff --git a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb index 2b14e6956c8d6c..c8683afda9e222 100644 --- a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceAccountsDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceAccountsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb index e4e9fbe2b7b0a8..c633041f9d40d8 100644 --- a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb index 9d8097069390cc..801b3d84dfc8cc 100644 --- a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::LanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::LanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb index 5661441d5d0c0f..d86ccd099a1af9 100644 --- a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::ServersDimension do +RSpec.describe Admin::Metrics::Dimension::ServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb index 5d31121ab3bd10..5b0fb902e015a9 100644 --- a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SoftwareVersionsDimension do +RSpec.describe Admin::Metrics::Dimension::SoftwareVersionsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb index 5fa5aa8af51730..ca7f716afd3e92 100644 --- a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SourcesDimension do +RSpec.describe Admin::Metrics::Dimension::SourcesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb index 96ff9c66dc7f55..4be5ed30ee1663 100644 --- a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SpaceUsageDimension do +RSpec.describe Admin::Metrics::Dimension::SpaceUsageDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb index c1dfd0eaf4eb2e..166edf92b0aac4 100644 --- a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::TagLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb index 025cf1b7ec7870..7391b5545624b5 100644 --- a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagServersDimension do +RSpec.describe Admin::Metrics::Dimension::TagServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension_spec.rb b/spec/lib/admin/metrics/dimension_spec.rb index 109250b72b73ff..0a52d442be92f2 100644 --- a/spec/lib/admin/metrics/dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension do +RSpec.describe Admin::Metrics::Dimension do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, 5, params) } diff --git a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb index 38ee14075b3e38..653e677354b8be 100644 --- a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ActiveUsersMeasure do +RSpec.describe Admin::Metrics::Measure::ActiveUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb index 0d2ad31c399a45..f974f2ca462d25 100644 --- a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb index 27bf30d17d5f49..643249fa4e23d2 100644 --- a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowersMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowersMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb index 9961ea56c42b1d..70f5004fefc277 100644 --- a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb index 3634450930656b..11f13b85bc17fa 100644 --- a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb index ca64049d9265bd..62c9dec464434c 100644 --- a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceReportsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb index ac28658ea07b67..0fc903a2a81cde 100644 --- a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceStatusesMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceStatusesMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb index ed333380cfbe9d..edbec2eabff630 100644 --- a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InteractionsMeasure do +RSpec.describe Admin::Metrics::Measure::InteractionsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb index 085acbcede811b..5c03b67a18c5d4 100644 --- a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::NewUsersMeasure do +RSpec.describe Admin::Metrics::Measure::NewUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb index d5ba78527ea2ac..f4d3a66454a297 100644 --- a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::OpenedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::OpenedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb index f7b497590d3df9..432dbbe79635de 100644 --- a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ResolvedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::ResolvedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb index b33ae7bb7106f3..577b1260ff044a 100644 --- a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::TagAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb index e1e2ced43a5802..42715e5adc78e0 100644 --- a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagServersMeasure do +RSpec.describe Admin::Metrics::Measure::TagServersMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb index dd66f00de05694..b258455dabbb21 100644 --- a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagUsesMeasure do +RSpec.describe Admin::Metrics::Measure::TagUsesMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure_spec.rb b/spec/lib/admin/metrics/measure_spec.rb index c9809b0f792d30..49a5aecc611cc4 100644 --- a/spec/lib/admin/metrics/measure_spec.rb +++ b/spec/lib/admin/metrics/measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure do +RSpec.describe Admin::Metrics::Measure do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, params) } diff --git a/spec/lib/admin/system_check/base_check_spec.rb b/spec/lib/admin/system_check/base_check_spec.rb index fdd9f6b6c44d5c..769e0e1d180ebe 100644 --- a/spec/lib/admin/system_check/base_check_spec.rb +++ b/spec/lib/admin/system_check/base_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::BaseCheck do +RSpec.describe Admin::SystemCheck::BaseCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/database_schema_check_spec.rb b/spec/lib/admin/system_check/database_schema_check_spec.rb index db1dcb52fa43e2..311d5249563ea2 100644 --- a/spec/lib/admin/system_check/database_schema_check_spec.rb +++ b/spec/lib/admin/system_check/database_schema_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::DatabaseSchemaCheck do +RSpec.describe Admin::SystemCheck::DatabaseSchemaCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/elasticsearch_check_spec.rb b/spec/lib/admin/system_check/elasticsearch_check_spec.rb index 8f210579d000ac..05d204c4530698 100644 --- a/spec/lib/admin/system_check/elasticsearch_check_spec.rb +++ b/spec/lib/admin/system_check/elasticsearch_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::ElasticsearchCheck do +RSpec.describe Admin::SystemCheck::ElasticsearchCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/media_privacy_check_spec.rb b/spec/lib/admin/system_check/media_privacy_check_spec.rb index 316bf121561f10..0d5bcdb3e87a6b 100644 --- a/spec/lib/admin/system_check/media_privacy_check_spec.rb +++ b/spec/lib/admin/system_check/media_privacy_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::MediaPrivacyCheck do +RSpec.describe Admin::SystemCheck::MediaPrivacyCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/message_spec.rb b/spec/lib/admin/system_check/message_spec.rb index c0671f34525ff5..81ef4f2f09d40f 100644 --- a/spec/lib/admin/system_check/message_spec.rb +++ b/spec/lib/admin/system_check/message_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::Message do +RSpec.describe Admin::SystemCheck::Message do subject(:check) { described_class.new(:key_value, :value_value, :action_value, :critical_value) } it 'providers readers when initialized' do diff --git a/spec/lib/admin/system_check/rules_check_spec.rb b/spec/lib/admin/system_check/rules_check_spec.rb index fb3293fb2d0615..32650d9cd8a410 100644 --- a/spec/lib/admin/system_check/rules_check_spec.rb +++ b/spec/lib/admin/system_check/rules_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::RulesCheck do +RSpec.describe Admin::SystemCheck::RulesCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb index 9bd9daddf6722f..992fd7aee0f378 100644 --- a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb +++ b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SidekiqProcessCheck do +RSpec.describe Admin::SystemCheck::SidekiqProcessCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/software_version_check_spec.rb b/spec/lib/admin/system_check/software_version_check_spec.rb index de4335fc519fc2..1affaa3a969d82 100644 --- a/spec/lib/admin/system_check/software_version_check_spec.rb +++ b/spec/lib/admin/system_check/software_version_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SoftwareVersionCheck do +RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do include RoutingHelper subject(:check) { described_class.new(user) } diff --git a/spec/lib/admin/system_check_spec.rb b/spec/lib/admin/system_check_spec.rb index 30048fd3ade0e0..92852ab025baa8 100644 --- a/spec/lib/admin/system_check_spec.rb +++ b/spec/lib/admin/system_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck do +RSpec.describe Admin::SystemCheck do let(:user) { Fabricate(:user) } describe 'perform' do diff --git a/spec/lib/annual_report_spec.rb b/spec/lib/annual_report_spec.rb index ffb742697b3f09..bd4d0f33876a06 100644 --- a/spec/lib/annual_report_spec.rb +++ b/spec/lib/annual_report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AnnualReport do +RSpec.describe AnnualReport do describe '#generate' do subject { described_class.new(account, Time.zone.now.year) } diff --git a/spec/lib/cache_buster_spec.rb b/spec/lib/cache_buster_spec.rb index 84085608e8544e..f7cff9c1c36050 100644 --- a/spec/lib/cache_buster_spec.rb +++ b/spec/lib/cache_buster_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBuster do +RSpec.describe CacheBuster do subject { described_class.new(secret_header: secret_header, secret: secret, http_method: http_method) } let(:secret_header) { nil } diff --git a/spec/lib/connection_pool/shared_connection_pool_spec.rb b/spec/lib/connection_pool/shared_connection_pool_spec.rb index a2fe75f742a78b..2352703b5a376c 100644 --- a/spec/lib/connection_pool/shared_connection_pool_spec.rb +++ b/spec/lib/connection_pool/shared_connection_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedConnectionPool do +RSpec.describe ConnectionPool::SharedConnectionPool do subject { described_class.new(size: 5, timeout: 5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/connection_pool/shared_timed_stack_spec.rb b/spec/lib/connection_pool/shared_timed_stack_spec.rb index 04d550eec57156..7469664ea0acb1 100644 --- a/spec/lib/connection_pool/shared_timed_stack_spec.rb +++ b/spec/lib/connection_pool/shared_timed_stack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedTimedStack do +RSpec.describe ConnectionPool::SharedTimedStack do subject { described_class.new(5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/content_security_policy_spec.rb b/spec/lib/content_security_policy_spec.rb index 27a3e8025731a3..5ecea6054310da 100644 --- a/spec/lib/content_security_policy_spec.rb +++ b/spec/lib/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ContentSecurityPolicy do +RSpec.describe ContentSecurityPolicy do subject { described_class.new } around do |example| diff --git a/spec/lib/delivery_failure_tracker_spec.rb b/spec/lib/delivery_failure_tracker_spec.rb index c8179ebd91cdea..40c8adc4c80620 100644 --- a/spec/lib/delivery_failure_tracker_spec.rb +++ b/spec/lib/delivery_failure_tracker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeliveryFailureTracker do +RSpec.describe DeliveryFailureTracker do subject { described_class.new('http://example.com/inbox') } describe '#track_success!' do diff --git a/spec/lib/extractor_spec.rb b/spec/lib/extractor_spec.rb index af5c62d4c8a3a9..bc3ee8ac496a2b 100644 --- a/spec/lib/extractor_spec.rb +++ b/spec/lib/extractor_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Extractor do +RSpec.describe Extractor do describe 'extract_mentions_or_lists_with_indices' do it 'returns an empty array if the given string does not have at signs' do text = 'a string without at signs' diff --git a/spec/lib/fast_ip_map_spec.rb b/spec/lib/fast_ip_map_spec.rb index 78b3ddb054258e..a3a647e3e3a35b 100644 --- a/spec/lib/fast_ip_map_spec.rb +++ b/spec/lib/fast_ip_map_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FastIpMap do +RSpec.describe FastIpMap do describe '#include?' do subject { described_class.new([IPAddr.new('20.4.0.0/16'), IPAddr.new('145.22.30.0/24'), IPAddr.new('189.45.86.3')]) } diff --git a/spec/lib/hashtag_normalizer_spec.rb b/spec/lib/hashtag_normalizer_spec.rb index fbb9f37c07076b..796445043a3b1f 100644 --- a/spec/lib/hashtag_normalizer_spec.rb +++ b/spec/lib/hashtag_normalizer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe HashtagNormalizer do +RSpec.describe HashtagNormalizer do subject { described_class.new } describe '#normalize' do diff --git a/spec/lib/importer/accounts_index_importer_spec.rb b/spec/lib/importer/accounts_index_importer_spec.rb index 73f9bce39914d9..a5d11c747ad256 100644 --- a/spec/lib/importer/accounts_index_importer_spec.rb +++ b/spec/lib/importer/accounts_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::AccountsIndexImporter do +RSpec.describe Importer::AccountsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/base_importer_spec.rb b/spec/lib/importer/base_importer_spec.rb index 78e9a869b8beed..0d12f975aa21c9 100644 --- a/spec/lib/importer/base_importer_spec.rb +++ b/spec/lib/importer/base_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::BaseImporter do +RSpec.describe Importer::BaseImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/public_statuses_index_importer_spec.rb b/spec/lib/importer/public_statuses_index_importer_spec.rb index bc7c038a97c5a8..2407717409bdfe 100644 --- a/spec/lib/importer/public_statuses_index_importer_spec.rb +++ b/spec/lib/importer/public_statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::PublicStatusesIndexImporter do +RSpec.describe Importer::PublicStatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/statuses_index_importer_spec.rb b/spec/lib/importer/statuses_index_importer_spec.rb index d5e1c9f2cb9a0f..f6fac3bd678fc5 100644 --- a/spec/lib/importer/statuses_index_importer_spec.rb +++ b/spec/lib/importer/statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::StatusesIndexImporter do +RSpec.describe Importer::StatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/tags_index_importer_spec.rb b/spec/lib/importer/tags_index_importer_spec.rb index 348990c01e8235..44de9e7c3459ad 100644 --- a/spec/lib/importer/tags_index_importer_spec.rb +++ b/spec/lib/importer/tags_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::TagsIndexImporter do +RSpec.describe Importer::TagsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb index 3988e0b0271836..f6cc28297a94cd 100644 --- a/spec/lib/mastodon/cli/accounts_spec.rb +++ b/spec/lib/mastodon/cli/accounts_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/accounts' -describe Mastodon::CLI::Accounts do +RSpec.describe Mastodon::CLI::Accounts do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/cache_spec.rb b/spec/lib/mastodon/cli/cache_spec.rb index 247a14f9e2713f..dc571238d21f33 100644 --- a/spec/lib/mastodon/cli/cache_spec.rb +++ b/spec/lib/mastodon/cli/cache_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/cache' -describe Mastodon::CLI::Cache do +RSpec.describe Mastodon::CLI::Cache do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb index 1745ea01bf3311..faa5ec7cb83f72 100644 --- a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb +++ b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/canonical_email_blocks' -describe Mastodon::CLI::CanonicalEmailBlocks do +RSpec.describe Mastodon::CLI::CanonicalEmailBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb index 448e6fe42b34e7..d1c26546f04dd9 100644 --- a/spec/lib/mastodon/cli/domains_spec.rb +++ b/spec/lib/mastodon/cli/domains_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/domains' -describe Mastodon::CLI::Domains do +RSpec.describe Mastodon::CLI::Domains do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb index 55e3da0bb89be7..a5fbd23e652a63 100644 --- a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb +++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/email_domain_blocks' -describe Mastodon::CLI::EmailDomainBlocks do +RSpec.describe Mastodon::CLI::EmailDomainBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb index d05e972e77c15a..4336db17d37472 100644 --- a/spec/lib/mastodon/cli/emoji_spec.rb +++ b/spec/lib/mastodon/cli/emoji_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/emoji' -describe Mastodon::CLI::Emoji do +RSpec.describe Mastodon::CLI::Emoji do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/feeds_spec.rb b/spec/lib/mastodon/cli/feeds_spec.rb index 420cb3d5872893..75a8cb3ebc6f56 100644 --- a/spec/lib/mastodon/cli/feeds_spec.rb +++ b/spec/lib/mastodon/cli/feeds_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/feeds' -describe Mastodon::CLI::Feeds do +RSpec.describe Mastodon::CLI::Feeds do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/ip_blocks_spec.rb b/spec/lib/mastodon/cli/ip_blocks_spec.rb index d44b1b9fe44e3e..68d6b198593c61 100644 --- a/spec/lib/mastodon/cli/ip_blocks_spec.rb +++ b/spec/lib/mastodon/cli/ip_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/ip_blocks' -describe Mastodon::CLI::IpBlocks do +RSpec.describe Mastodon::CLI::IpBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/main_spec.rb b/spec/lib/mastodon/cli/main_spec.rb index 99d770a81dd188..a63b798683c4d1 100644 --- a/spec/lib/mastodon/cli/main_spec.rb +++ b/spec/lib/mastodon/cli/main_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/main' -describe Mastodon::CLI::Main do +RSpec.describe Mastodon::CLI::Main do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/maintenance_spec.rb b/spec/lib/mastodon/cli/maintenance_spec.rb index cde25d39eda357..6a15677f43ab91 100644 --- a/spec/lib/mastodon/cli/maintenance_spec.rb +++ b/spec/lib/mastodon/cli/maintenance_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/maintenance' -describe Mastodon::CLI::Maintenance do +RSpec.describe Mastodon::CLI::Maintenance do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index ecc7101b6cf8c8..fa7a3161d09945 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/media' -describe Mastodon::CLI::Media do +RSpec.describe Mastodon::CLI::Media do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/preview_cards_spec.rb b/spec/lib/mastodon/cli/preview_cards_spec.rb index 951ae3758f0642..949787a7590fab 100644 --- a/spec/lib/mastodon/cli/preview_cards_spec.rb +++ b/spec/lib/mastodon/cli/preview_cards_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/preview_cards' -describe Mastodon::CLI::PreviewCards do +RSpec.describe Mastodon::CLI::PreviewCards do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/search_spec.rb b/spec/lib/mastodon/cli/search_spec.rb index ed3789c3e7d282..8a6c2492aa43d0 100644 --- a/spec/lib/mastodon/cli/search_spec.rb +++ b/spec/lib/mastodon/cli/search_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/search' -describe Mastodon::CLI::Search do +RSpec.describe Mastodon::CLI::Search do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/settings_spec.rb b/spec/lib/mastodon/cli/settings_spec.rb index e1b353eb90296d..5565b798ef9cd1 100644 --- a/spec/lib/mastodon/cli/settings_spec.rb +++ b/spec/lib/mastodon/cli/settings_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/settings' -describe Mastodon::CLI::Settings do +RSpec.describe Mastodon::CLI::Settings do it_behaves_like 'CLI Command' describe 'subcommand "registrations"' do diff --git a/spec/lib/mastodon/cli/statuses_spec.rb b/spec/lib/mastodon/cli/statuses_spec.rb index 161b7c02bbf64a..2597ad7f2741eb 100644 --- a/spec/lib/mastodon/cli/statuses_spec.rb +++ b/spec/lib/mastodon/cli/statuses_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/statuses' -describe Mastodon::CLI::Statuses do +RSpec.describe Mastodon::CLI::Statuses do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb index 6861e04887655f..6861e1a06854d1 100644 --- a/spec/lib/mastodon/cli/upgrade_spec.rb +++ b/spec/lib/mastodon/cli/upgrade_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/upgrade' -describe Mastodon::CLI::Upgrade do +RSpec.describe Mastodon::CLI::Upgrade do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/migration_warning_spec.rb b/spec/lib/mastodon/migration_warning_spec.rb index 4adf0837ab23d7..d796d1e90210ea 100644 --- a/spec/lib/mastodon/migration_warning_spec.rb +++ b/spec/lib/mastodon/migration_warning_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/migration_warning' -describe Mastodon::MigrationWarning do +RSpec.describe Mastodon::MigrationWarning do describe 'migration_duration_warning' do before do allow(migration).to receive(:valid_environment?).and_return(true) diff --git a/spec/lib/ostatus/tag_manager_spec.rb b/spec/lib/ostatus/tag_manager_spec.rb index 0e20f26c7c335a..f808b96289d436 100644 --- a/spec/lib/ostatus/tag_manager_spec.rb +++ b/spec/lib/ostatus/tag_manager_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OStatus::TagManager do +RSpec.describe OStatus::TagManager do describe '#unique_tag' do it 'returns a unique tag' do expect(described_class.instance.unique_tag(Time.utc(2000), 12, 'Status')).to eq 'tag:cb6e6126.ngrok.io,2000-01-01:objectId=12:objectType=Status' diff --git a/spec/lib/paperclip/response_with_limit_adapter_spec.rb b/spec/lib/paperclip/response_with_limit_adapter_spec.rb index baf8bf5bb72b59..3db52ffa0d85ad 100644 --- a/spec/lib/paperclip/response_with_limit_adapter_spec.rb +++ b/spec/lib/paperclip/response_with_limit_adapter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Paperclip::ResponseWithLimitAdapter do +RSpec.describe Paperclip::ResponseWithLimitAdapter do subject { described_class.new(response_with_limit) } before { stub_request(:get, url).to_return(headers: headers, body: body) } diff --git a/spec/lib/permalink_redirector_spec.rb b/spec/lib/permalink_redirector_spec.rb index a0091365616f67..3f77d7665a23d2 100644 --- a/spec/lib/permalink_redirector_spec.rb +++ b/spec/lib/permalink_redirector_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PermalinkRedirector do +RSpec.describe PermalinkRedirector do let(:remote_account) { Fabricate(:account, username: 'alice', domain: 'example.com', url: 'https://example.com/@alice', id: 2) } describe '#redirect_url' do diff --git a/spec/lib/request_pool_spec.rb b/spec/lib/request_pool_spec.rb index a82eb5a188c0d9..2e8c785de8b3e6 100644 --- a/spec/lib/request_pool_spec.rb +++ b/spec/lib/request_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RequestPool do +RSpec.describe RequestPool do subject { described_class.new } describe '#with' do diff --git a/spec/lib/request_spec.rb b/spec/lib/request_spec.rb index c99f18838ba432..c600a48ee24e3a 100644 --- a/spec/lib/request_spec.rb +++ b/spec/lib/request_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'securerandom' -describe Request do +RSpec.describe Request do subject { described_class.new(:get, 'http://example.com') } describe '#headers' do diff --git a/spec/lib/sanitize/config_spec.rb b/spec/lib/sanitize/config_spec.rb index fe0b272c0a22ee..17b78a95f6d7a6 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 7bc226e94f7a0e..09a31e04c57f32 100644 --- a/spec/lib/scope_transformer_spec.rb +++ b/spec/lib/scope_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ScopeTransformer do +RSpec.describe ScopeTransformer do describe '#apply' do subject { described_class.new.apply(ScopeParser.new.parse(input)) } diff --git a/spec/lib/search_query_parser_spec.rb b/spec/lib/search_query_parser_spec.rb index 66b0e8f9e2367b..22149b34028842 100644 --- a/spec/lib/search_query_parser_spec.rb +++ b/spec/lib/search_query_parser_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'parslet/rig/rspec' -describe SearchQueryParser do +RSpec.describe SearchQueryParser do let(:parser) { described_class.new } context 'with term' do diff --git a/spec/lib/search_query_transformer_spec.rb b/spec/lib/search_query_transformer_spec.rb index 5817e3d1d2015c..00220f84fd2225 100644 --- a/spec/lib/search_query_transformer_spec.rb +++ b/spec/lib/search_query_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchQueryTransformer do +RSpec.describe SearchQueryTransformer do subject { described_class.new.apply(parser, current_account: account) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_cache_hydrator_spec.rb b/spec/lib/status_cache_hydrator_spec.rb index 5b80ccb97080fa..958e2f62d74ede 100644 --- a/spec/lib/status_cache_hydrator_spec.rb +++ b/spec/lib/status_cache_hydrator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusCacheHydrator do +RSpec.describe StatusCacheHydrator do let(:status) { Fabricate(:status) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_filter_spec.rb b/spec/lib/status_filter_spec.rb index cf6f3c79592c40..16c2e84f229006 100644 --- a/spec/lib/status_filter_spec.rb +++ b/spec/lib/status_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFilter do +RSpec.describe StatusFilter do describe '#filtered?' do let(:status) { Fabricate(:status) } diff --git a/spec/lib/status_finder_spec.rb b/spec/lib/status_finder_spec.rb index 53f5039af97838..4d1c27afff8f11 100644 --- a/spec/lib/status_finder_spec.rb +++ b/spec/lib/status_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFinder do +RSpec.describe StatusFinder do include RoutingHelper describe '#status' do diff --git a/spec/lib/status_reach_finder_spec.rb b/spec/lib/status_reach_finder_spec.rb index 7181717dc11e58..c045980ea9db80 100644 --- a/spec/lib/status_reach_finder_spec.rb +++ b/spec/lib/status_reach_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusReachFinder do +RSpec.describe StatusReachFinder do describe '#inboxes' do context 'with a local status' do subject { described_class.new(status) } diff --git a/spec/lib/webfinger_resource_spec.rb b/spec/lib/webfinger_resource_spec.rb index 442f91aad02095..0b86b41c481db3 100644 --- a/spec/lib/webfinger_resource_spec.rb +++ b/spec/lib/webfinger_resource_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe WebfingerResource do +RSpec.describe WebfingerResource do around do |example| before_local = Rails.configuration.x.local_domain before_web = Rails.configuration.x.web_domain diff --git a/spec/lib/webhooks/payload_renderer_spec.rb b/spec/lib/webhooks/payload_renderer_spec.rb index 074847c74c569b..0623edd25475d4 100644 --- a/spec/lib/webhooks/payload_renderer_spec.rb +++ b/spec/lib/webhooks/payload_renderer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::PayloadRenderer do +RSpec.describe Webhooks::PayloadRenderer do subject(:renderer) { described_class.new(json) } let(:event) { Webhooks::EventPresenter.new(type, object) } diff --git a/spec/locales/i18n_spec.rb b/spec/locales/i18n_spec.rb index cfce8e2234b4ef..8facf6612c07d1 100644 --- a/spec/locales/i18n_spec.rb +++ b/spec/locales/i18n_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'I18n' do +RSpec.describe 'I18n' do describe 'Pluralizing locale translations' do subject { I18n.t('generic.validation_errors', count: 1) } diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 5a8c293740bdbd..0257465817418e 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserMailer do +RSpec.describe UserMailer do let(:receiver) { Fabricate(:user) } describe '#confirmation_instructions' do diff --git a/spec/models/account_filter_spec.rb b/spec/models/account_filter_spec.rb index fa47b5954a8e31..5cb7fa92d44b4d 100644 --- a/spec/models/account_filter_spec.rb +++ b/spec/models/account_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountFilter do +RSpec.describe AccountFilter do describe 'with empty params' do it 'excludes instance actor by default' do filter = described_class.new({}) diff --git a/spec/models/account_warning_preset_spec.rb b/spec/models/account_warning_preset_spec.rb index f171df7c974ea6..e7a98551751373 100644 --- a/spec/models/account_warning_preset_spec.rb +++ b/spec/models/account_warning_preset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountWarningPreset do +RSpec.describe AccountWarningPreset do describe 'alphabetical' do let(:first) { Fabricate(:account_warning_preset, title: 'aaa', text: 'aaa') } let(:second) { Fabricate(:account_warning_preset, title: 'bbb', text: 'aaa') } diff --git a/spec/models/admin/appeal_filter_spec.rb b/spec/models/admin/appeal_filter_spec.rb index e840bc3bc12575..8303e58ad6311c 100644 --- a/spec/models/admin/appeal_filter_spec.rb +++ b/spec/models/admin/appeal_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AppealFilter do +RSpec.describe Admin::AppealFilter do describe '#results' do let(:approved_appeal) { Fabricate(:appeal, approved_at: 10.days.ago) } let(:not_approved_appeal) { Fabricate(:appeal, approved_at: nil) } diff --git a/spec/models/admin/tag_filter_spec.rb b/spec/models/admin/tag_filter_spec.rb index 21dc28affb3209..1baae117b87701 100644 --- a/spec/models/admin/tag_filter_spec.rb +++ b/spec/models/admin/tag_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::TagFilter do +RSpec.describe Admin::TagFilter do describe 'with invalid params' do it 'raises with key error' do filter = described_class.new(wrong: true) diff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rb index 1e7283ca77090f..e3865e6fc7ff50 100644 --- a/spec/models/announcement_spec.rb +++ b/spec/models/announcement_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Announcement do +RSpec.describe Announcement do describe 'Scopes' do context 'with published and unpublished records' do let!(:published) { Fabricate(:announcement, published: true) } diff --git a/spec/models/appeal_spec.rb b/spec/models/appeal_spec.rb index 13ca3a2d901ae5..7e324582ed5d37 100644 --- a/spec/models/appeal_spec.rb +++ b/spec/models/appeal_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Appeal do +RSpec.describe Appeal do describe 'Validations' do it 'validates text length is under limit' do appeal = Fabricate.build( diff --git a/spec/models/concerns/account/counters_spec.rb b/spec/models/concerns/account/counters_spec.rb index ccac9e95de6712..bbbaa7d06c9402 100644 --- a/spec/models/concerns/account/counters_spec.rb +++ b/spec/models/concerns/account/counters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Counters do +RSpec.describe Account::Counters do let!(:account) { Fabricate(:account) } describe '#increment_count!' do diff --git a/spec/models/concerns/account/finder_concern_spec.rb b/spec/models/concerns/account/finder_concern_spec.rb index ab5149e987ff15..b3fae56dfc51e8 100644 --- a/spec/models/concerns/account/finder_concern_spec.rb +++ b/spec/models/concerns/account/finder_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::FinderConcern do +RSpec.describe Account::FinderConcern do describe 'local finders' do let!(:account) { Fabricate(:account, username: 'Alice') } diff --git a/spec/models/concerns/account/interactions_spec.rb b/spec/models/concerns/account/interactions_spec.rb index 3f2c601f387694..4868054df7e7cb 100644 --- a/spec/models/concerns/account/interactions_spec.rb +++ b/spec/models/concerns/account/interactions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Interactions do +RSpec.describe Account::Interactions do let(:account) { Fabricate(:account, username: 'account') } let(:account_id) { account.id } let(:account_ids) { [account_id] } diff --git a/spec/models/concerns/account/statuses_search_spec.rb b/spec/models/concerns/account/statuses_search_spec.rb index ab249d62d0756a..9488d42021c882 100644 --- a/spec/models/concerns/account/statuses_search_spec.rb +++ b/spec/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch do +RSpec.describe Account::StatusesSearch do let(:account) { Fabricate(:account, indexable: indexable) } before do diff --git a/spec/models/concerns/status/threading_concern_spec.rb b/spec/models/concerns/status/threading_concern_spec.rb index 09fb21856618a1..a13487c10a3514 100644 --- a/spec/models/concerns/status/threading_concern_spec.rb +++ b/spec/models/concerns/status/threading_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Status::ThreadingConcern do +RSpec.describe Status::ThreadingConcern do describe '#ancestors' do let!(:alice) { Fabricate(:account, username: 'alice') } let!(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com') } diff --git a/spec/models/custom_emoji_category_spec.rb b/spec/models/custom_emoji_category_spec.rb index 30de07bd81c7fb..3da77344e26721 100644 --- a/spec/models/custom_emoji_category_spec.rb +++ b/spec/models/custom_emoji_category_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CustomEmojiCategory do +RSpec.describe CustomEmojiCategory do describe 'validations' do it 'validates name presence' do record = described_class.new(name: nil) diff --git a/spec/models/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 12504211a1f19d..92f1ef8ccf3308 100644 --- a/spec/models/domain_allow_spec.rb +++ b/spec/models/domain_allow_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainAllow do +RSpec.describe DomainAllow do describe 'Validations' do it 'is invalid without a domain' do domain_allow = Fabricate.build(:domain_allow, domain: nil) diff --git a/spec/models/export_spec.rb b/spec/models/export_spec.rb index 75468898d2739c..06bf07ed78a314 100644 --- a/spec/models/export_spec.rb +++ b/spec/models/export_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Export do +RSpec.describe Export do let(:account) { Fabricate(:account) } let(:target_accounts) do [{}, { username: 'one', domain: 'local.host' }].map(&method(:Fabricate).curry(2).call(:account)) diff --git a/spec/models/extended_description_spec.rb b/spec/models/extended_description_spec.rb index ecc27c0f6dd2a3..368ca33f5b1290 100644 --- a/spec/models/extended_description_spec.rb +++ b/spec/models/extended_description_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExtendedDescription do +RSpec.describe ExtendedDescription do describe '.current' do context 'with the default values' do it 'makes a new instance' do diff --git a/spec/models/form/admin_settings_spec.rb b/spec/models/form/admin_settings_spec.rb index 0dc2d881ad2fce..6080b9e081d39e 100644 --- a/spec/models/form/admin_settings_spec.rb +++ b/spec/models/form/admin_settings_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::AdminSettings do +RSpec.describe Form::AdminSettings do describe 'validations' do describe 'site_contact_username' do context 'with no accounts' do diff --git a/spec/models/form/custom_emoji_batch_spec.rb b/spec/models/form/custom_emoji_batch_spec.rb index abeada5d507984..180c6abd23c353 100644 --- a/spec/models/form/custom_emoji_batch_spec.rb +++ b/spec/models/form/custom_emoji_batch_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::CustomEmojiBatch do +RSpec.describe Form::CustomEmojiBatch do describe '#save' do subject { described_class.new({ current_account: account }.merge(options)) } diff --git a/spec/models/form/status_filter_batch_action_spec.rb b/spec/models/form/status_filter_batch_action_spec.rb index f06a11cc8b0320..8ea9d7545e8c2f 100644 --- a/spec/models/form/status_filter_batch_action_spec.rb +++ b/spec/models/form/status_filter_batch_action_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::StatusFilterBatchAction do +RSpec.describe Form::StatusFilterBatchAction do describe '#save!' do it 'does nothing if status_filter_ids is empty' do batch_action = described_class.new(status_filter_ids: []) diff --git a/spec/models/ip_block_spec.rb b/spec/models/ip_block_spec.rb index 290b99b28842b6..6f1eb38425c7d4 100644 --- a/spec/models/ip_block_spec.rb +++ b/spec/models/ip_block_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe IpBlock do +RSpec.describe IpBlock do describe 'validations' do it 'validates ip presence', :aggregate_failures do ip_block = described_class.new(ip: nil, severity: :no_access) diff --git a/spec/models/marker_spec.rb b/spec/models/marker_spec.rb index 51dd584388dfca..8339f8e259b150 100644 --- a/spec/models/marker_spec.rb +++ b/spec/models/marker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Marker do +RSpec.describe Marker do describe 'validations' do describe 'timeline' do it 'must be included in valid list' do diff --git a/spec/models/one_time_key_spec.rb b/spec/models/one_time_key_spec.rb index 6ff7ffc5c148e3..17fcdf37883987 100644 --- a/spec/models/one_time_key_spec.rb +++ b/spec/models/one_time_key_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OneTimeKey do +RSpec.describe OneTimeKey do describe 'validations' do context 'with an invalid signature' do let(:one_time_key) { Fabricate.build(:one_time_key, signature: 'wrong!') } diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb index ebcc459078b88c..740ef63d81aaf0 100644 --- a/spec/models/poll_spec.rb +++ b/spec/models/poll_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Poll do +RSpec.describe Poll do describe 'scopes' do let(:status) { Fabricate(:status) } let(:attached_poll) { Fabricate(:poll, status: status) } diff --git a/spec/models/preview_card_provider_spec.rb b/spec/models/preview_card_provider_spec.rb index 8b18b3d2b71237..12bca83440f126 100644 --- a/spec/models/preview_card_provider_spec.rb +++ b/spec/models/preview_card_provider_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCardProvider do +RSpec.describe PreviewCardProvider do include_examples 'Reviewable' describe 'scopes' do diff --git a/spec/models/preview_card_spec.rb b/spec/models/preview_card_spec.rb index a17c7532e9eeb3..2f0ea38ee450ef 100644 --- a/spec/models/preview_card_spec.rb +++ b/spec/models/preview_card_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCard do +RSpec.describe PreviewCard do describe 'validations' do describe 'urls' do it 'allows http schemes' do diff --git a/spec/models/privacy_policy_spec.rb b/spec/models/privacy_policy_spec.rb index 03bbe7264b6ee9..742cac8e185691 100644 --- a/spec/models/privacy_policy_spec.rb +++ b/spec/models/privacy_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PrivacyPolicy do +RSpec.describe PrivacyPolicy do describe '.current' do context 'with the default values' do it 'has the privacy text' do diff --git a/spec/models/relationship_filter_spec.rb b/spec/models/relationship_filter_spec.rb index fccd42aaad0622..b56da91f8d6acc 100644 --- a/spec/models/relationship_filter_spec.rb +++ b/spec/models/relationship_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipFilter do +RSpec.describe RelationshipFilter do let(:account) { Fabricate(:account) } describe '#results' do diff --git a/spec/models/report_filter_spec.rb b/spec/models/report_filter_spec.rb index 6baf0ea421c54e..8668eb3d1085e8 100644 --- a/spec/models/report_filter_spec.rb +++ b/spec/models/report_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReportFilter do +RSpec.describe ReportFilter do describe 'with empty params' do it 'defaults to unresolved reports list' do filter = described_class.new({}) diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index d01d37bd8bba0e..a0e4f6fafd5e71 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Report do +RSpec.describe Report do describe 'statuses' do it 'returns the statuses for the report' do status = Fabricate(:status) diff --git a/spec/models/rule_spec.rb b/spec/models/rule_spec.rb index c9b9c55028f366..375483e0dbbafb 100644 --- a/spec/models/rule_spec.rb +++ b/spec/models/rule_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rule do +RSpec.describe Rule do describe 'scopes' do describe 'ordered' do let(:deleted_rule) { Fabricate(:rule, deleted_at: 10.days.ago) } diff --git a/spec/models/status_edit_spec.rb b/spec/models/status_edit_spec.rb index 2d3351452258bc..7a469b44dc80b7 100644 --- a/spec/models/status_edit_spec.rb +++ b/spec/models/status_edit_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusEdit do +RSpec.describe StatusEdit do describe '#reblog?' do it 'returns false' do record = described_class.new diff --git a/spec/models/tag_feed_spec.rb b/spec/models/tag_feed_spec.rb index 61b8d8d824ec46..578fc78238b317 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 63bf33de249948..53e224f19f7f00 100644 --- a/spec/policies/account_warning_preset_policy_spec.rb +++ b/spec/policies/account_warning_preset_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AccountWarningPresetPolicy do +RSpec.describe AccountWarningPresetPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/admin/status_policy_spec.rb b/spec/policies/admin/status_policy_spec.rb index af9f7716be382c..07af425516d93b 100644 --- a/spec/policies/admin/status_policy_spec.rb +++ b/spec/policies/admin/status_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe Admin::StatusPolicy do +RSpec.describe Admin::StatusPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/announcement_policy_spec.rb b/spec/policies/announcement_policy_spec.rb index 3d230b3cb46179..503ffca6dca518 100644 --- a/spec/policies/announcement_policy_spec.rb +++ b/spec/policies/announcement_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AnnouncementPolicy do +RSpec.describe AnnouncementPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/appeal_policy_spec.rb b/spec/policies/appeal_policy_spec.rb index d7498eb9f09eae..1bf8ce0a0da0e6 100644 --- a/spec/policies/appeal_policy_spec.rb +++ b/spec/policies/appeal_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AppealPolicy do +RSpec.describe AppealPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/canonical_email_block_policy_spec.rb b/spec/policies/canonical_email_block_policy_spec.rb index 0e55febfa90fa4..f5029d9e6b60e8 100644 --- a/spec/policies/canonical_email_block_policy_spec.rb +++ b/spec/policies/canonical_email_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe CanonicalEmailBlockPolicy do +RSpec.describe CanonicalEmailBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/delivery_policy_spec.rb b/spec/policies/delivery_policy_spec.rb index fbcbf390d73312..bb82389eec8a47 100644 --- a/spec/policies/delivery_policy_spec.rb +++ b/spec/policies/delivery_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe DeliveryPolicy do +RSpec.describe DeliveryPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/follow_recommendation_policy_spec.rb b/spec/policies/follow_recommendation_policy_spec.rb index 01f4da0be2929e..ae74d5c3a862ab 100644 --- a/spec/policies/follow_recommendation_policy_spec.rb +++ b/spec/policies/follow_recommendation_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe FollowRecommendationPolicy do +RSpec.describe FollowRecommendationPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/ip_block_policy_spec.rb b/spec/policies/ip_block_policy_spec.rb index 3cfa85863ca7fe..97bc239e9ac91e 100644 --- a/spec/policies/ip_block_policy_spec.rb +++ b/spec/policies/ip_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe IpBlockPolicy do +RSpec.describe IpBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_policy_spec.rb b/spec/policies/preview_card_policy_spec.rb index d6675c5b341ad2..a1944303e17ffc 100644 --- a/spec/policies/preview_card_policy_spec.rb +++ b/spec/policies/preview_card_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardPolicy do +RSpec.describe PreviewCardPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_provider_policy_spec.rb b/spec/policies/preview_card_provider_policy_spec.rb index 8d3715de9552ff..676039a1b79a97 100644 --- a/spec/policies/preview_card_provider_policy_spec.rb +++ b/spec/policies/preview_card_provider_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardProviderPolicy do +RSpec.describe PreviewCardProviderPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/rule_policy_spec.rb b/spec/policies/rule_policy_spec.rb index 0e45f6df02f9da..5d435e38c1fe33 100644 --- a/spec/policies/rule_policy_spec.rb +++ b/spec/policies/rule_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe RulePolicy do +RSpec.describe RulePolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/webhook_policy_spec.rb b/spec/policies/webhook_policy_spec.rb index 909311461a842f..96aaae2c306726 100644 --- a/spec/policies/webhook_policy_spec.rb +++ b/spec/policies/webhook_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe WebhookPolicy do +RSpec.describe WebhookPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/presenters/instance_presenter_spec.rb b/spec/presenters/instance_presenter_spec.rb index 516c7e9896a7e3..42f5200f3af4c5 100644 --- a/spec/presenters/instance_presenter_spec.rb +++ b/spec/presenters/instance_presenter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstancePresenter do +RSpec.describe InstancePresenter do let(:instance_presenter) { described_class.new } describe '#description' do diff --git a/spec/requests/account_show_page_spec.rb b/spec/requests/account_show_page_spec.rb index bdcec12fdb5a59..d0857c8980ec3e 100644 --- a/spec/requests/account_show_page_spec.rb +++ b/spec/requests/account_show_page_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The account show page' do +RSpec.describe 'The account show page' do it 'has valid opengraph tags' do alice = Fabricate(:account, username: 'alice', display_name: 'Alice') _status = Fabricate(:status, account: alice, text: 'Hello World') diff --git a/spec/requests/accounts_spec.rb b/spec/requests/accounts_spec.rb index 238524c75c7ec1..d53816eff0632d 100644 --- a/spec/requests/accounts_spec.rb +++ b/spec/requests/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts show response' do +RSpec.describe 'Accounts show response' do let(:account) { Fabricate(:account) } context 'with an unapproved account' do diff --git a/spec/requests/anonymous_cookies_spec.rb b/spec/requests/anonymous_cookies_spec.rb index 337ed4ec31cd28..235dd46a63dcd7 100644 --- a/spec/requests/anonymous_cookies_spec.rb +++ b/spec/requests/anonymous_cookies_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Anonymous visits' do +RSpec.describe 'Anonymous visits' do around do |example| old = ActionController::Base.allow_forgery_protection ActionController::Base.allow_forgery_protection = true diff --git a/spec/requests/api/v1/accounts/familiar_followers_spec.rb b/spec/requests/api/v1/accounts/familiar_followers_spec.rb index fdc0a3a9323e1a..475f1b17e4add0 100644 --- a/spec/requests/api/v1/accounts/familiar_followers_spec.rb +++ b/spec/requests/api/v1/accounts/familiar_followers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Familiar Followers API' do +RSpec.describe 'Accounts Familiar Followers API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/accounts/follower_accounts_spec.rb b/spec/requests/api/v1/accounts/follower_accounts_spec.rb index 7ff92d6a4809c5..400b1c7aff1c85 100644 --- a/spec/requests/api/v1/accounts/follower_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/follower_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowerAccounts' do +RSpec.describe 'API V1 Accounts FollowerAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/following_accounts_spec.rb b/spec/requests/api/v1/accounts/following_accounts_spec.rb index b343a48654cd22..b0bb5141ca2799 100644 --- a/spec/requests/api/v1/accounts/following_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowingAccounts' do +RSpec.describe 'API V1 Accounts FollowingAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/identity_proofs_spec.rb b/spec/requests/api/v1/accounts/identity_proofs_spec.rb index 3727af7e8931bb..d1d9db8e737973 100644 --- a/spec/requests/api/v1/accounts/identity_proofs_spec.rb +++ b/spec/requests/api/v1/accounts/identity_proofs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Identity Proofs API' do +RSpec.describe 'Accounts Identity Proofs API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/lists_spec.rb b/spec/requests/api/v1/accounts/lists_spec.rb index 48c0337e5497cf..8b04f07f652519 100644 --- a/spec/requests/api/v1/accounts/lists_spec.rb +++ b/spec/requests/api/v1/accounts/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lists API' do +RSpec.describe 'Accounts Lists API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:lists' } diff --git a/spec/requests/api/v1/accounts/lookup_spec.rb b/spec/requests/api/v1/accounts/lookup_spec.rb index 4c022c7c1316fe..dfd9fad49d8a96 100644 --- a/spec/requests/api/v1/accounts/lookup_spec.rb +++ b/spec/requests/api/v1/accounts/lookup_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lookup API' do +RSpec.describe 'Accounts Lookup API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/notes_spec.rb b/spec/requests/api/v1/accounts/notes_spec.rb index 4f3ac68c7479c8..b8c493abcc96d0 100644 --- a/spec/requests/api/v1/accounts/notes_spec.rb +++ b/spec/requests/api/v1/accounts/notes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Notes API' do +RSpec.describe 'Accounts Notes API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/pins_spec.rb b/spec/requests/api/v1/accounts/pins_spec.rb index c293715f7ed237..c66b80c7fd98d5 100644 --- a/spec/requests/api/v1/accounts/pins_spec.rb +++ b/spec/requests/api/v1/accounts/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Pins API' do +RSpec.describe 'Accounts Pins API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/relationships_spec.rb b/spec/requests/api/v1/accounts/relationships_spec.rb index b06ce0509df366..76b1830bbe0ac2 100644 --- a/spec/requests/api/v1/accounts/relationships_spec.rb +++ b/spec/requests/api/v1/accounts/relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'GET /api/v1/accounts/relationships' do +RSpec.describe 'GET /api/v1/accounts/relationships' do subject do get '/api/v1/accounts/relationships', headers: headers, params: params end diff --git a/spec/requests/api/v1/accounts/search_spec.rb b/spec/requests/api/v1/accounts/search_spec.rb index 76b32e7b2ca3af..f6ab7a85319da1 100644 --- a/spec/requests/api/v1/accounts/search_spec.rb +++ b/spec/requests/api/v1/accounts/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Search API' do +RSpec.describe 'Accounts Search API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/statuses_spec.rb b/spec/requests/api/v1/accounts/statuses_spec.rb index 97cdbe0156f7b0..4a4d9383db31bb 100644 --- a/spec/requests/api/v1/accounts/statuses_spec.rb +++ b/spec/requests/api/v1/accounts/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts Statuses' do +RSpec.describe 'API V1 Accounts Statuses' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/accounts_spec.rb b/spec/requests/api/v1/accounts_spec.rb index 3432106a469f54..e31644352b7eac 100644 --- a/spec/requests/api/v1/accounts_spec.rb +++ b/spec/requests/api/v1/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/accounts' do +RSpec.describe '/api/v1/accounts' do let(:user) { Fabricate(:user) } let(:scopes) { '' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/admin/dimensions_spec.rb b/spec/requests/api/v1/admin/dimensions_spec.rb index 87534a74b85c5b..43e2db00c5c2d5 100644 --- a/spec/requests/api/v1/admin/dimensions_spec.rb +++ b/spec/requests/api/v1/admin/dimensions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Dimensions' do +RSpec.describe 'Admin Dimensions' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/measures_spec.rb b/spec/requests/api/v1/admin/measures_spec.rb index 80fed79d9a6720..56a2c1eaee38fb 100644 --- a/spec/requests/api/v1/admin/measures_spec.rb +++ b/spec/requests/api/v1/admin/measures_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Measures' do +RSpec.describe 'Admin Measures' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/retention_spec.rb b/spec/requests/api/v1/admin/retention_spec.rb index 9178335ba5f55b..138959a0ab7015 100644 --- a/spec/requests/api/v1/admin/retention_spec.rb +++ b/spec/requests/api/v1/admin/retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Retention' do +RSpec.describe 'Admin Retention' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/trends/links/links_spec.rb b/spec/requests/api/v1/admin/trends/links/links_spec.rb index 48842828b32b0f..082af785ab0e37 100644 --- a/spec/requests/api/v1/admin/trends/links/links_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Links' do +RSpec.describe 'Links' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb index 384a305d4a0551..193906ab057b6d 100644 --- a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Links Preview Card Providers' do +RSpec.describe 'API V1 Admin Trends Links Preview Card Providers' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/statuses_spec.rb b/spec/requests/api/v1/admin/trends/statuses_spec.rb index 04aa0465f2809e..e33a9658a9ff1e 100644 --- a/spec/requests/api/v1/admin/trends/statuses_spec.rb +++ b/spec/requests/api/v1/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Statuses' do +RSpec.describe 'API V1 Admin Trends Statuses' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/tags_spec.rb b/spec/requests/api/v1/admin/trends/tags_spec.rb index b1437dad8dbd0e..748a27283c14b7 100644 --- a/spec/requests/api/v1/admin/trends/tags_spec.rb +++ b/spec/requests/api/v1/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Tags' do +RSpec.describe 'API V1 Admin Trends Tags' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/annual_reports_spec.rb b/spec/requests/api/v1/annual_reports_spec.rb index 60cd8ed5262eeb..bab184787f3e4a 100644 --- a/spec/requests/api/v1/annual_reports_spec.rb +++ b/spec/requests/api/v1/annual_reports_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Annual Reports' do +RSpec.describe 'API V1 Annual Reports' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/apps/credentials_spec.rb b/spec/requests/api/v1/apps/credentials_spec.rb index 6e6970ce53f03d..b899999640bff0 100644 --- a/spec/requests/api/v1/apps/credentials_spec.rb +++ b/spec/requests/api/v1/apps/credentials_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Credentials' do +RSpec.describe 'Credentials' do describe 'GET /api/v1/apps/verify_credentials' do subject do get '/api/v1/apps/verify_credentials', headers: headers diff --git a/spec/requests/api/v1/csp_spec.rb b/spec/requests/api/v1/csp_spec.rb index 2db52ac72502fd..5d61d7f3f54712 100644 --- a/spec/requests/api/v1/csp_spec.rb +++ b/spec/requests/api/v1/csp_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API namespace minimal Content-Security-Policy' do +RSpec.describe 'API namespace minimal Content-Security-Policy' do before { stub_tests_controller } after { Rails.application.reload_routes! } diff --git a/spec/requests/api/v1/custom_emojis_spec.rb b/spec/requests/api/v1/custom_emojis_spec.rb index 2f0dc729449c51..798d8e29ed0b71 100644 --- a/spec/requests/api/v1/custom_emojis_spec.rb +++ b/spec/requests/api/v1/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom Emojis' do +RSpec.describe 'Custom Emojis' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/directories_spec.rb b/spec/requests/api/v1/directories_spec.rb index 0a1864d136cc5e..94306c06ec32fe 100644 --- a/spec/requests/api/v1/directories_spec.rb +++ b/spec/requests/api/v1/directories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Directories API' do +RSpec.describe 'Directories API' do let(:user) { Fabricate(:user, confirmed_at: nil) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/endorsements_spec.rb b/spec/requests/api/v1/endorsements_spec.rb index e267f2abd26f14..255211a4041848 100644 --- a/spec/requests/api/v1/endorsements_spec.rb +++ b/spec/requests/api/v1/endorsements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Endorsements' do +RSpec.describe 'Endorsements' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/featured_tags/suggestions_spec.rb b/spec/requests/api/v1/featured_tags/suggestions_spec.rb index 00451540cac0ea..0a7bfe5cda9f78 100644 --- a/spec/requests/api/v1/featured_tags/suggestions_spec.rb +++ b/spec/requests/api/v1/featured_tags/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Featured Tags Suggestions API' do +RSpec.describe 'Featured Tags Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/instance_spec.rb b/spec/requests/api/v1/instance_spec.rb index 9cac280c4df0c3..f0a4ceadb8964a 100644 --- a/spec/requests/api/v1/instance_spec.rb +++ b/spec/requests/api/v1/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/instances/translation_languages_spec.rb b/spec/requests/api/v1/instances/translation_languages_spec.rb index 7cfb24e86fbe34..e5a480c17515cd 100644 --- a/spec/requests/api/v1/instances/translation_languages_spec.rb +++ b/spec/requests/api/v1/instances/translation_languages_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Translation Languages' do +RSpec.describe 'Translation Languages' do describe 'GET /api/v1/instances/translation_languages' do context 'when no translation service is configured' do it 'returns empty language matrix', :aggregate_failures do diff --git a/spec/requests/api/v1/peers/search_spec.rb b/spec/requests/api/v1/peers/search_spec.rb index dcdea387a5b455..87b0dc4f642c2f 100644 --- a/spec/requests/api/v1/peers/search_spec.rb +++ b/spec/requests/api/v1/peers/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API Peers Search' do +RSpec.describe 'API Peers Search' do describe 'GET /api/v1/peers/search' do context 'when peers api is disabled' do before do diff --git a/spec/requests/api/v1/preferences_spec.rb b/spec/requests/api/v1/preferences_spec.rb index 6f4188c35a1e1f..6508b51c04e6d9 100644 --- a/spec/requests/api/v1/preferences_spec.rb +++ b/spec/requests/api/v1/preferences_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Preferences' do +RSpec.describe 'Preferences' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/push/subscriptions_spec.rb b/spec/requests/api/v1/push/subscriptions_spec.rb index 54ef5a13ade6b8..6674b048e854b2 100644 --- a/spec/requests/api/v1/push/subscriptions_spec.rb +++ b/spec/requests/api/v1/push/subscriptions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Push Subscriptions' do +RSpec.describe 'API V1 Push Subscriptions' do let(:user) { Fabricate(:user) } let(:endpoint) { 'https://fcm.googleapis.com/fcm/send/fiuH06a27qE:APA91bHnSiGcLwdaxdyqVXNDR9w1NlztsHb6lyt5WDKOC_Z_Q8BlFxQoR8tWFSXUIDdkyw0EdvxTu63iqamSaqVSevW5LfoFwojws8XYDXv_NRRLH6vo2CdgiN4jgHv5VLt2A8ah6lUX' } let(:keys) do diff --git a/spec/requests/api/v1/scheduled_status_spec.rb b/spec/requests/api/v1/scheduled_status_spec.rb index f4612410bf38cc..b35d297a60ee95 100644 --- a/spec/requests/api/v1/scheduled_status_spec.rb +++ b/spec/requests/api/v1/scheduled_status_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Scheduled Statuses' do +RSpec.describe 'Scheduled Statuses' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/statuses/histories_spec.rb b/spec/requests/api/v1/statuses/histories_spec.rb index b3761ca6882a44..f13bf798670f9e 100644 --- a/spec/requests/api/v1/statuses/histories_spec.rb +++ b/spec/requests/api/v1/statuses/histories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Histories' do +RSpec.describe 'API V1 Statuses Histories' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses/mutes_spec.rb b/spec/requests/api/v1/statuses/mutes_spec.rb index 72fd7d9d11503d..69ae948852888a 100644 --- a/spec/requests/api/v1/statuses/mutes_spec.rb +++ b/spec/requests/api/v1/statuses/mutes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Mutes' do +RSpec.describe 'API V1 Statuses Mutes' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:mutes' } diff --git a/spec/requests/api/v1/statuses/pins_spec.rb b/spec/requests/api/v1/statuses/pins_spec.rb index db07fa424f7a61..3be1a16ee19a82 100644 --- a/spec/requests/api/v1/statuses/pins_spec.rb +++ b/spec/requests/api/v1/statuses/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Pins' do +RSpec.describe 'Pins' do let(:user) { Fabricate(:user) } let(:scopes) { 'write:accounts' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/statuses/reblogs_spec.rb b/spec/requests/api/v1/statuses/reblogs_spec.rb index 77542d294e3187..0978c890a4bf81 100644 --- a/spec/requests/api/v1/statuses/reblogs_spec.rb +++ b/spec/requests/api/v1/statuses/reblogs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Reblogs' do +RSpec.describe 'API V1 Statuses Reblogs' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:statuses' } diff --git a/spec/requests/api/v1/statuses/translations_spec.rb b/spec/requests/api/v1/statuses/translations_spec.rb index e2ab5d0b806825..047b2f0485548e 100644 --- a/spec/requests/api/v1/statuses/translations_spec.rb +++ b/spec/requests/api/v1/statuses/translations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Translations' do +RSpec.describe 'API V1 Statuses Translations' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses_spec.rb b/spec/requests/api/v1/statuses_spec.rb index 3e91fcdd98ed7d..1a211d14d87f6c 100644 --- a/spec/requests/api/v1/statuses_spec.rb +++ b/spec/requests/api/v1/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/statuses' do +RSpec.describe '/api/v1/statuses' do context 'with an oauth token' do let(:user) { Fabricate(:user) } let(:client_app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } diff --git a/spec/requests/api/v1/streaming_spec.rb b/spec/requests/api/v1/streaming_spec.rb index 6ce35c2fe60f14..a1f64846cf7d6a 100644 --- a/spec/requests/api/v1/streaming_spec.rb +++ b/spec/requests/api/v1/streaming_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Streaming' do +RSpec.describe 'API V1 Streaming' do around do |example| before = Rails.configuration.x.streaming_api_base_url Rails.configuration.x.streaming_api_base_url = "wss://#{Rails.configuration.x.web_domain}" diff --git a/spec/requests/api/v1/timelines/home_spec.rb b/spec/requests/api/v1/timelines/home_spec.rb index 96bd153affe5a4..d158e0801c1e6d 100644 --- a/spec/requests/api/v1/timelines/home_spec.rb +++ b/spec/requests/api/v1/timelines/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home', :inline_jobs do +RSpec.describe 'Home', :inline_jobs do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/link_spec.rb b/spec/requests/api/v1/timelines/link_spec.rb index e1c914ab81a4ac..67d8bca0229bfd 100644 --- a/spec/requests/api/v1/timelines/link_spec.rb +++ b/spec/requests/api/v1/timelines/link_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link' do +RSpec.describe 'Link' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/list_spec.rb b/spec/requests/api/v1/timelines/list_spec.rb index 98d24567459c51..753c784866519f 100644 --- a/spec/requests/api/v1/timelines/list_spec.rb +++ b/spec/requests/api/v1/timelines/list_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Timelines List' do +RSpec.describe 'API V1 Timelines List' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/public_spec.rb b/spec/requests/api/v1/timelines/public_spec.rb index 100f6c1bfc17ec..1fc62b393268ac 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 2636970d6e5a36..2f01db500345d8 100644 --- a/spec/requests/api/v2/instance_spec.rb +++ b/spec/requests/api/v2/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v2/search_spec.rb b/spec/requests/api/v2/search_spec.rb index 13bcf17984b11b..039e7513cdfeca 100644 --- a/spec/requests/api/v2/search_spec.rb +++ b/spec/requests/api/v2/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Search API' do +RSpec.describe 'Search API' do context 'with token' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v2/suggestions_spec.rb b/spec/requests/api/v2/suggestions_spec.rb index a7d6a0864f542e..8895efd23de9e0 100644 --- a/spec/requests/api/v2/suggestions_spec.rb +++ b/spec/requests/api/v2/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Suggestions API' do +RSpec.describe 'Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read' } diff --git a/spec/requests/backups_spec.rb b/spec/requests/backups_spec.rb index a6c2efe0db02f1..a8c1124ed2611b 100644 --- a/spec/requests/backups_spec.rb +++ b/spec/requests/backups_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Backups' do +RSpec.describe 'Backups' do include RoutingHelper describe 'GET backups#download' do diff --git a/spec/requests/cache_spec.rb b/spec/requests/cache_spec.rb index 91e5b022e3951a..9cce241b38b66c 100644 --- a/spec/requests/cache_spec.rb +++ b/spec/requests/cache_spec.rb @@ -118,7 +118,7 @@ module DisabledAnonymousAPI end end -describe 'Caching behavior' do +RSpec.describe 'Caching behavior' do shared_examples 'cachable response' do |http_success: false| it 'does not set cookies or set public cache control', :aggregate_failures do expect(response.cookies).to be_empty diff --git a/spec/requests/catch_all_route_request_spec.rb b/spec/requests/catch_all_route_request_spec.rb index e600bedfe07eb9..e7ea21524c5994 100644 --- a/spec/requests/catch_all_route_request_spec.rb +++ b/spec/requests/catch_all_route_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The catch all route' do +RSpec.describe 'The catch all route' do describe 'with a simple value' do it 'returns a 404 page as html' do get '/test' diff --git a/spec/requests/content_security_policy_spec.rb b/spec/requests/content_security_policy_spec.rb index ba6fe47741665b..7520ecb0db4cd0 100644 --- a/spec/requests/content_security_policy_spec.rb +++ b/spec/requests/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Content-Security-Policy' do +RSpec.describe 'Content-Security-Policy' do before { allow(SecureRandom).to receive(:base64).with(16).and_return('ZbA+JmE7+bK8F5qvADZHuQ==') } it 'sets the expected CSP headers' do diff --git a/spec/requests/custom_css_spec.rb b/spec/requests/custom_css_spec.rb index 5271ed4a5a6d53..a46ebd7281f930 100644 --- a/spec/requests/custom_css_spec.rb +++ b/spec/requests/custom_css_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom CSS' do +RSpec.describe 'Custom CSS' do include RoutingHelper describe 'GET /custom.css' do diff --git a/spec/requests/custom_stylesheets_spec.rb b/spec/requests/custom_stylesheets_spec.rb index 128d173f3abb8a..9c5c058344e0b1 100644 --- a/spec/requests/custom_stylesheets_spec.rb +++ b/spec/requests/custom_stylesheets_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom stylesheets' do +RSpec.describe 'Custom stylesheets' do describe 'GET /custom.css' do before { get '/custom.css' } diff --git a/spec/requests/disabled_oauth_endpoints_spec.rb b/spec/requests/disabled_oauth_endpoints_spec.rb index 7c2c09f3804bf3..279d2576a35795 100644 --- a/spec/requests/disabled_oauth_endpoints_spec.rb +++ b/spec/requests/disabled_oauth_endpoints_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Disabled OAuth routes' do +RSpec.describe 'Disabled OAuth routes' do # These routes are disabled via the doorkeeper configuration for # `admin_authenticator`, as these routes should only be accessible by server # administrators. For now, these routes are not properly designed and diff --git a/spec/requests/emojis_spec.rb b/spec/requests/emojis_spec.rb index 458d500762c837..b2e4702f2dc95c 100644 --- a/spec/requests/emojis_spec.rb +++ b/spec/requests/emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Emojis' do +RSpec.describe 'Emojis' do describe 'GET /emojis/:id' do let(:emoji) { Fabricate(:custom_emoji, shortcode: 'coolcat') } diff --git a/spec/requests/health_spec.rb b/spec/requests/health_spec.rb index 03317f9723986c..1d2f96bb3d5a80 100644 --- a/spec/requests/health_spec.rb +++ b/spec/requests/health_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Health check endpoint' do +RSpec.describe 'Health check endpoint' do describe 'GET /health' do it 'returns http success when server is functioning' do get '/health' diff --git a/spec/requests/invite_spec.rb b/spec/requests/invite_spec.rb index c44ef2419c0c20..4ce6c78e940aba 100644 --- a/spec/requests/invite_spec.rb +++ b/spec/requests/invite_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'invites' do +RSpec.describe 'invites' do let(:invite) { Fabricate(:invite) } context 'when requesting a JSON document' do diff --git a/spec/requests/link_headers_spec.rb b/spec/requests/link_headers_spec.rb index 522cff46427f0a..3116a54d6a41c4 100644 --- a/spec/requests/link_headers_spec.rb +++ b/spec/requests/link_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link headers' do +RSpec.describe 'Link headers' do describe 'on the account show page' do let(:account) { Fabricate(:account, username: 'test') } diff --git a/spec/requests/localization_spec.rb b/spec/requests/localization_spec.rb index b7fb53ed8d7374..26fc204ea4f609 100644 --- a/spec/requests/localization_spec.rb +++ b/spec/requests/localization_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Localization' do +RSpec.describe 'Localization' do around do |example| I18n.with_locale(I18n.locale) do example.run diff --git a/spec/requests/log_out_spec.rb b/spec/requests/log_out_spec.rb index 62ca1ac54728b3..62ede0c1060aea 100644 --- a/spec/requests/log_out_spec.rb +++ b/spec/requests/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log Out' do +RSpec.describe 'Log Out' do include RoutingHelper describe 'DELETE /auth/sign_out' do diff --git a/spec/requests/manifest_spec.rb b/spec/requests/manifest_spec.rb index 55b8147d7eebaa..69e308e3ce9209 100644 --- a/spec/requests/manifest_spec.rb +++ b/spec/requests/manifest_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Manifest' do +RSpec.describe 'Manifest' do describe 'GET /manifest' do before { get '/manifest' } diff --git a/spec/requests/media_proxy_spec.rb b/spec/requests/media_proxy_spec.rb index 814d4c11664bcb..fb4801ee67a866 100644 --- a/spec/requests/media_proxy_spec.rb +++ b/spec/requests/media_proxy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Media Proxy' do +RSpec.describe 'Media Proxy' do describe 'GET /media_proxy/:id' do before { stub_attachment_request } diff --git a/spec/requests/omniauth_callbacks_spec.rb b/spec/requests/omniauth_callbacks_spec.rb index 095535e48598e0..e13a49ec622782 100644 --- a/spec/requests/omniauth_callbacks_spec.rb +++ b/spec/requests/omniauth_callbacks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OmniAuth callbacks' do +RSpec.describe 'OmniAuth callbacks' do shared_examples 'omniauth provider callbacks' do |provider| subject { post send :"user_#{provider}_omniauth_callback_path" } diff --git a/spec/requests/remote_interaction_helper_spec.rb b/spec/requests/remote_interaction_helper_spec.rb index e6364fe8ce83e9..942f70b9a411a2 100644 --- a/spec/requests/remote_interaction_helper_spec.rb +++ b/spec/requests/remote_interaction_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Remote Interaction Helper' do +RSpec.describe 'Remote Interaction Helper' do describe 'GET /remote_interaction_helper' do it 'returns http success' do get remote_interaction_helper_path diff --git a/spec/requests/self_destruct_spec.rb b/spec/requests/self_destruct_spec.rb index f71a2325e2a897..651a894c89b9d5 100644 --- a/spec/requests/self_destruct_spec.rb +++ b/spec/requests/self_destruct_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Self-destruct mode' do +RSpec.describe 'Self-destruct mode' do before do allow(SelfDestructHelper).to receive(:self_destruct?).and_return(true) end diff --git a/spec/requests/settings/exports/blocked_accounts_spec.rb b/spec/requests/settings/exports/blocked_accounts_spec.rb index f335ba18c05281..9d0768a1e333ec 100644 --- a/spec/requests/settings/exports/blocked_accounts_spec.rb +++ b/spec/requests/settings/exports/blocked_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Accounts' do +RSpec.describe 'Settings / Exports / Blocked Accounts' do describe 'GET /settings/exports/blocks' do context 'with a signed in user who has blocked accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/blocked_domains_spec.rb b/spec/requests/settings/exports/blocked_domains_spec.rb index 762907585f3a2b..838baf8cdb2fcd 100644 --- a/spec/requests/settings/exports/blocked_domains_spec.rb +++ b/spec/requests/settings/exports/blocked_domains_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Domains' do +RSpec.describe 'Settings / Exports / Blocked Domains' do describe 'GET /settings/exports/domain_blocks' do context 'with a signed in user who has blocked domains' do let(:account) { Fabricate :account, domain: 'example.com' } diff --git a/spec/requests/settings/exports/bookmarks_spec.rb b/spec/requests/settings/exports/bookmarks_spec.rb index f200e70383eef3..e97f4a84d2b06c 100644 --- a/spec/requests/settings/exports/bookmarks_spec.rb +++ b/spec/requests/settings/exports/bookmarks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Bookmarks' do +RSpec.describe 'Settings / Exports / Bookmarks' do describe 'GET /settings/exports/bookmarks' do context 'with a signed in user who has bookmarks' do let(:account) { Fabricate(:account, domain: 'foo.bar') } diff --git a/spec/requests/settings/exports/following_accounts_spec.rb b/spec/requests/settings/exports/following_accounts_spec.rb index 268b72c4128160..c34ec261a696db 100644 --- a/spec/requests/settings/exports/following_accounts_spec.rb +++ b/spec/requests/settings/exports/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Following Accounts' do +RSpec.describe 'Settings / Exports / Following Accounts' do describe 'GET /settings/exports/follows' do context 'with a signed in user who is following accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/lists_spec.rb b/spec/requests/settings/exports/lists_spec.rb index b868f8dfda359f..4c13225bb99fd2 100644 --- a/spec/requests/settings/exports/lists_spec.rb +++ b/spec/requests/settings/exports/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Lists' do +RSpec.describe 'Settings / Exports / Lists' do describe 'GET /settings/exports/lists' do context 'with a signed in user who has lists' do let(:account) { Fabricate(:account, username: 'test', domain: 'example.com') } diff --git a/spec/requests/settings/exports/muted_accounts_spec.rb b/spec/requests/settings/exports/muted_accounts_spec.rb index efdb0d8221f012..98ccb3e4a2be5c 100644 --- a/spec/requests/settings/exports/muted_accounts_spec.rb +++ b/spec/requests/settings/exports/muted_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Muted Accounts' do +RSpec.describe 'Settings / Exports / Muted Accounts' do describe 'GET /settings/exports/mutes' do context 'with a signed in user who has muted accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/signature_verification_spec.rb b/spec/requests/signature_verification_spec.rb index 401828c4a3c5d1..580d0283389b65 100644 --- a/spec/requests/signature_verification_spec.rb +++ b/spec/requests/signature_verification_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'signature verification concern' do +RSpec.describe 'signature verification concern' do before do stub_tests_controller diff --git a/spec/requests/well_known/change_password_spec.rb b/spec/requests/well_known/change_password_spec.rb index 04134b71ff5e68..77fec154127902 100644 --- a/spec/requests/well_known/change_password_spec.rb +++ b/spec/requests/well_known/change_password_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/change-password request' do +RSpec.describe 'The /.well-known/change-password request' do it 'redirects to the change password page' do get '/.well-known/change-password' diff --git a/spec/requests/well_known/host_meta_spec.rb b/spec/requests/well_known/host_meta_spec.rb index ca10a51a01b26f..09f17baa894d64 100644 --- a/spec/requests/well_known/host_meta_spec.rb +++ b/spec/requests/well_known/host_meta_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/host-meta request' do +RSpec.describe 'The /.well-known/host-meta request' do it 'returns http success with valid XML response' do get '/.well-known/host-meta' diff --git a/spec/requests/well_known/node_info_spec.rb b/spec/requests/well_known/node_info_spec.rb index 0934b0fde6fed8..d02732c32bb231 100644 --- a/spec/requests/well_known/node_info_spec.rb +++ b/spec/requests/well_known/node_info_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The well-known node-info endpoints' do +RSpec.describe 'The well-known node-info endpoints' do describe 'The /.well-known/node-info endpoint' do it 'returns JSON document pointing to node info' do get '/.well-known/nodeinfo' diff --git a/spec/requests/well_known/oauth_metadata_spec.rb b/spec/requests/well_known/oauth_metadata_spec.rb index 9d2d20228677e4..378295b5a356ec 100644 --- a/spec/requests/well_known/oauth_metadata_spec.rb +++ b/spec/requests/well_known/oauth_metadata_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/oauth-authorization-server request' do +RSpec.describe 'The /.well-known/oauth-authorization-server request' do let(:protocol) { ENV.fetch('LOCAL_HTTPS', true) ? :https : :http } before do diff --git a/spec/requests/well_known/webfinger_spec.rb b/spec/requests/well_known/webfinger_spec.rb index cd8a35c7023d05..e5ce352d50791f 100644 --- a/spec/requests/well_known/webfinger_spec.rb +++ b/spec/requests/well_known/webfinger_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/webfinger endpoint' do +RSpec.describe 'The /.well-known/webfinger endpoint' do subject(:perform_request!) { get webfinger_url(resource: resource) } let(:alternate_domains) { [] } diff --git a/spec/routing/accounts_routing_spec.rb b/spec/routing/accounts_routing_spec.rb index 588855943e64be..8ff711a681e082 100644 --- a/spec/routing/accounts_routing_spec.rb +++ b/spec/routing/accounts_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Routes under accounts/' do +RSpec.describe 'Routes under accounts/' do context 'with local username' do let(:username) { 'alice' } diff --git a/spec/routing/api_routing_spec.rb b/spec/routing/api_routing_spec.rb index a822fba4c55c7d..c46fa75d1fdeba 100644 --- a/spec/routing/api_routing_spec.rb +++ b/spec/routing/api_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API routes' do +RSpec.describe 'API routes' do describe 'Credentials routes' do it 'routes to verify credentials' do expect(get('/api/v1/accounts/verify_credentials')) diff --git a/spec/routing/well_known_routes_spec.rb b/spec/routing/well_known_routes_spec.rb index 8cf08c13c127ed..6578e939ae1e14 100644 --- a/spec/routing/well_known_routes_spec.rb +++ b/spec/routing/well_known_routes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Well Known routes' do +RSpec.describe 'Well Known routes' do describe 'the host-meta route' do it 'routes to correct place with xml format' do expect(get('/.well-known/host-meta')) diff --git a/spec/search/models/concerns/account/search_spec.rb b/spec/search/models/concerns/account/search_spec.rb index d8d7f355dd4bf3..de12161ef9f3a6 100644 --- a/spec/search/models/concerns/account/search_spec.rb +++ b/spec/search/models/concerns/account/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Search do +RSpec.describe Account::Search do describe 'a non-discoverable account becoming discoverable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/search/models/concerns/account/statuses_search_spec.rb b/spec/search/models/concerns/account/statuses_search_spec.rb index b1bf4968ca9abd..bce1aecd7505f3 100644 --- a/spec/search/models/concerns/account/statuses_search_spec.rb +++ b/spec/search/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch, :inline_jobs do +RSpec.describe Account::StatusesSearch, :inline_jobs do describe 'a non-indexable account becoming indexable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/serializers/activitypub/device_serializer_spec.rb b/spec/serializers/activitypub/device_serializer_spec.rb index 23f0b24c4eabf5..226e1364465407 100644 --- a/spec/serializers/activitypub/device_serializer_spec.rb +++ b/spec/serializers/activitypub/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeviceSerializer do +RSpec.describe ActivityPub::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:device) } diff --git a/spec/serializers/activitypub/note_serializer_spec.rb b/spec/serializers/activitypub/note_serializer_spec.rb index 338d66b308ebaa..285b241ee237e3 100644 --- a/spec/serializers/activitypub/note_serializer_spec.rb +++ b/spec/serializers/activitypub/note_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::NoteSerializer do +RSpec.describe ActivityPub::NoteSerializer do subject { serialized_record_json(parent, described_class, adapter: ActivityPub::Adapter) } let!(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/one_time_key_serializer_spec.rb b/spec/serializers/activitypub/one_time_key_serializer_spec.rb index 89efe95c8c2e3e..b9792ebae35445 100644 --- a/spec/serializers/activitypub/one_time_key_serializer_spec.rb +++ b/spec/serializers/activitypub/one_time_key_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::OneTimeKeySerializer do +RSpec.describe ActivityPub::OneTimeKeySerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:one_time_key) } diff --git a/spec/serializers/activitypub/undo_like_serializer_spec.rb b/spec/serializers/activitypub/undo_like_serializer_spec.rb index 3d61e8675195ea..c7190adc1aa4f6 100644 --- a/spec/serializers/activitypub/undo_like_serializer_spec.rb +++ b/spec/serializers/activitypub/undo_like_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UndoLikeSerializer do +RSpec.describe ActivityPub::UndoLikeSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:favourite) } diff --git a/spec/serializers/activitypub/update_poll_serializer_spec.rb b/spec/serializers/activitypub/update_poll_serializer_spec.rb index 8ff4fd27013467..6a4d8177fcc32d 100644 --- a/spec/serializers/activitypub/update_poll_serializer_spec.rb +++ b/spec/serializers/activitypub/update_poll_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdatePollSerializer do +RSpec.describe ActivityPub::UpdatePollSerializer do subject { serialized_record_json(status, described_class, adapter: ActivityPub::Adapter) } let(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/vote_serializer_spec.rb b/spec/serializers/activitypub/vote_serializer_spec.rb index b7c0b8928b862b..4e8a2beca38aa3 100644 --- a/spec/serializers/activitypub/vote_serializer_spec.rb +++ b/spec/serializers/activitypub/vote_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::VoteSerializer do +RSpec.describe ActivityPub::VoteSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:poll_vote) } diff --git a/spec/serializers/rest/account_serializer_spec.rb b/spec/serializers/rest/account_serializer_spec.rb index 15939e484d86e5..7daa0796a9c964 100644 --- a/spec/serializers/rest/account_serializer_spec.rb +++ b/spec/serializers/rest/account_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::AccountSerializer do +RSpec.describe REST::AccountSerializer do subject { serialized_record_json(account, described_class) } let(:role) { Fabricate(:user_role, name: 'Role', highlighted: true) } diff --git a/spec/serializers/rest/encrypted_message_serializer_spec.rb b/spec/serializers/rest/encrypted_message_serializer_spec.rb index 01db1149af52e9..a4b8ee83b2a1e9 100644 --- a/spec/serializers/rest/encrypted_message_serializer_spec.rb +++ b/spec/serializers/rest/encrypted_message_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::EncryptedMessageSerializer do +RSpec.describe REST::EncryptedMessageSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:encrypted_message) } diff --git a/spec/serializers/rest/instance_serializer_spec.rb b/spec/serializers/rest/instance_serializer_spec.rb index 39e6b3820b7049..2d8d14e39a81e8 100644 --- a/spec/serializers/rest/instance_serializer_spec.rb +++ b/spec/serializers/rest/instance_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::InstanceSerializer do +RSpec.describe REST::InstanceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { InstancePresenter.new } diff --git a/spec/serializers/rest/keys/claim_result_serializer_spec.rb b/spec/serializers/rest/keys/claim_result_serializer_spec.rb index 7f7fb850cdacaa..e45112705b70cd 100644 --- a/spec/serializers/rest/keys/claim_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/claim_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::ClaimResultSerializer do +RSpec.describe REST::Keys::ClaimResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::ClaimService::Result.new(Account.new(id: 123), 456) } diff --git a/spec/serializers/rest/keys/device_serializer_spec.rb b/spec/serializers/rest/keys/device_serializer_spec.rb index 28177a3db5a212..b8370beac706f6 100644 --- a/spec/serializers/rest/keys/device_serializer_spec.rb +++ b/spec/serializers/rest/keys/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::DeviceSerializer do +RSpec.describe REST::Keys::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Device.new(name: 'Device name') } diff --git a/spec/serializers/rest/keys/query_result_serializer_spec.rb b/spec/serializers/rest/keys/query_result_serializer_spec.rb index ef67d706750ffb..41492f5e78f265 100644 --- a/spec/serializers/rest/keys/query_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/query_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::QueryResultSerializer do +RSpec.describe REST::Keys::QueryResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::QueryService::Result.new(Account.new(id: 123), []) } diff --git a/spec/serializers/rest/suggestion_serializer_spec.rb b/spec/serializers/rest/suggestion_serializer_spec.rb index b5efba082defa0..288d1daa230e10 100644 --- a/spec/serializers/rest/suggestion_serializer_spec.rb +++ b/spec/serializers/rest/suggestion_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::SuggestionSerializer do +RSpec.describe REST::SuggestionSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) do AccountSuggestions::Suggestion.new( diff --git a/spec/services/account_search_service_spec.rb b/spec/services/account_search_service_spec.rb index 5ec08859031759..7d251641ee45db 100644 --- a/spec/services/account_search_service_spec.rb +++ b/spec/services/account_search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountSearchService do +RSpec.describe AccountSearchService do describe '#call' do context 'with a query to ignore' do it 'returns empty array for missing query' do diff --git a/spec/services/account_statuses_cleanup_service_spec.rb b/spec/services/account_statuses_cleanup_service_spec.rb index 403c4632d74303..857bd4fda499af 100644 --- a/spec/services/account_statuses_cleanup_service_spec.rb +++ b/spec/services/account_statuses_cleanup_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountStatusesCleanupService do +RSpec.describe AccountStatusesCleanupService do let(:account) { Fabricate(:account, username: 'alice', domain: nil) } let(:account_policy) { Fabricate(:account_statuses_cleanup_policy, account: account) } let!(:unrelated_status) { Fabricate(:status, created_at: 3.years.ago) } diff --git a/spec/services/fetch_oembed_service_spec.rb b/spec/services/fetch_oembed_service_spec.rb index c9f84048b615f4..52d2b9cf2283ad 100644 --- a/spec/services/fetch_oembed_service_spec.rb +++ b/spec/services/fetch_oembed_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FetchOEmbedService do +RSpec.describe FetchOEmbedService do subject { described_class.new } before do diff --git a/spec/services/resolve_url_service_spec.rb b/spec/services/resolve_url_service_spec.rb index 3d59a55f105855..80f2a5a4baf55d 100644 --- a/spec/services/resolve_url_service_spec.rb +++ b/spec/services/resolve_url_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveURLService do +RSpec.describe ResolveURLService do subject { described_class.new } describe '#call' do diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index 394ee7c3a660e7..cd4c42463012f3 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchService do +RSpec.describe SearchService do subject { described_class.new } describe '#call' do diff --git a/spec/services/unblock_domain_service_spec.rb b/spec/services/unblock_domain_service_spec.rb index 289ddfc218bcaa..405fe1cfd2f8a3 100644 --- a/spec/services/unblock_domain_service_spec.rb +++ b/spec/services/unblock_domain_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnblockDomainService do +RSpec.describe UnblockDomainService do subject { described_class.new } describe 'call' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2d20239b27749d..60bec918ea4100 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,8 @@ expectations.include_chain_clauses_in_custom_matcher_descriptions = true end + config.disable_monkey_patching! + config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end diff --git a/spec/support/examples/api.rb b/spec/support/examples/api.rb index d531860abfddfe..ddc61fcbe08b6d 100644 --- a/spec/support/examples/api.rb +++ b/spec/support/examples/api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'forbidden for wrong scope' do |wrong_scope| +RSpec.shared_examples 'forbidden for wrong scope' do |wrong_scope| let(:scopes) { wrong_scope } it 'returns http forbidden' do @@ -11,7 +11,7 @@ end end -shared_examples 'forbidden for wrong role' do |wrong_role| +RSpec.shared_examples 'forbidden for wrong role' do |wrong_role| let(:role) { UserRole.find_by(name: wrong_role) } it 'returns http forbidden' do diff --git a/spec/support/examples/cli.rb b/spec/support/examples/cli.rb index 091c842bd1aaec..5f357fc915466a 100644 --- a/spec/support/examples/cli.rb +++ b/spec/support/examples/cli.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'CLI Command' do +RSpec.shared_examples 'CLI Command' do it 'configures Thor to exit on failure' do expect(described_class.exit_on_failure?).to be true end diff --git a/spec/support/examples/lib/admin/checks.rb b/spec/support/examples/lib/admin/checks.rb index b50faa77ba00ab..e8c1336c5f9fb6 100644 --- a/spec/support/examples/lib/admin/checks.rb +++ b/spec/support/examples/lib/admin/checks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'a check available to devops users' do +RSpec.shared_examples 'a check available to devops users' do describe 'skip?' do context 'when user can view devops' do before { allow(user).to receive(:can?).with(:view_devops).and_return(true) } diff --git a/spec/support/examples/mailers.rb b/spec/support/examples/mailers.rb index 213e873b4e18e7..a8469f196490ac 100644 --- a/spec/support/examples/mailers.rb +++ b/spec/support/examples/mailers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'localized subject' do |*args, **kwrest| +RSpec.shared_examples 'localized subject' do |*args, **kwrest| it 'renders subject localized for the locale of the receiver' do locale = :de receiver.update!(locale: locale) diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index ab6020d834a8f7..232f51fa3c7bd4 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountAvatar' do |fabricator| +RSpec.shared_examples 'AccountAvatar' do |fabricator| describe 'static avatars', :attachment_processing do describe 'when GIF' do it 'creates a png static style' do diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index 43bbdaacf425d9..af8d22d633089e 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountHeader' do |fabricator| +RSpec.shared_examples 'AccountHeader' do |fabricator| describe 'base64-encoded files', :attachment_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, header: base64_attachment) } diff --git a/spec/support/examples/models/concerns/reviewable.rb b/spec/support/examples/models/concerns/reviewable.rb index 562183d1ccbe6b..b63e44b43f9853 100644 --- a/spec/support/examples/models/concerns/reviewable.rb +++ b/spec/support/examples/models/concerns/reviewable.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'Reviewable' do +RSpec.shared_examples 'Reviewable' do subject { described_class.new(reviewed_at: reviewed_at, requested_review_at: requested_review_at) } let(:reviewed_at) { nil } diff --git a/spec/system/about_spec.rb b/spec/system/about_spec.rb index dc976b91e07b53..f832802f91dc3c 100644 --- a/spec/system/about_spec.rb +++ b/spec/system/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'About page' do +RSpec.describe 'About page' do it 'visits the about page and renders the web app' do visit about_path diff --git a/spec/system/admin/accounts_spec.rb b/spec/system/admin/accounts_spec.rb index 20813f6be42505..c21e01e4f3da05 100644 --- a/spec/system/admin/accounts_spec.rb +++ b/spec/system/admin/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Accounts' do +RSpec.describe 'Admin::Accounts' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/announcements_spec.rb b/spec/system/admin/announcements_spec.rb index 5c4e5d3e6ab429..1da5699656a20f 100644 --- a/spec/system/admin/announcements_spec.rb +++ b/spec/system/admin/announcements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Announcements' do +RSpec.describe 'Admin::Announcements' do include ActionView::RecordIdentifier describe 'Viewing announcements' do diff --git a/spec/system/admin/custom_emojis_spec.rb b/spec/system/admin/custom_emojis_spec.rb index 8a8b6efcd119fb..e47f21f8a93881 100644 --- a/spec/system/admin/custom_emojis_spec.rb +++ b/spec/system/admin/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::CustomEmojis' do +RSpec.describe 'Admin::CustomEmojis' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/domain_blocks_spec.rb b/spec/system/admin/domain_blocks_spec.rb index 99aa7cf1a760fa..9a39e290623cd3 100644 --- a/spec/system/admin/domain_blocks_spec.rb +++ b/spec/system/admin/domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'blocking domains through the moderation interface' do +RSpec.describe 'blocking domains through the moderation interface' do before do allow(DomainBlockWorker).to receive(:perform_async).and_return(true) sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user diff --git a/spec/system/admin/email_domain_blocks_spec.rb b/spec/system/admin/email_domain_blocks_spec.rb index 14959cbe74b0dd..a90bede827e33e 100644 --- a/spec/system/admin/email_domain_blocks_spec.rb +++ b/spec/system/admin/email_domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::EmailDomainBlocks' do +RSpec.describe 'Admin::EmailDomainBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/ip_blocks_spec.rb b/spec/system/admin/ip_blocks_spec.rb index c9b16f6f78fb1d..9c03520277534c 100644 --- a/spec/system/admin/ip_blocks_spec.rb +++ b/spec/system/admin/ip_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::IpBlocks' do +RSpec.describe 'Admin::IpBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/reset_spec.rb b/spec/system/admin/reset_spec.rb index 50fb4b46dfaf2d..1e787ea110f2d4 100644 --- a/spec/system/admin/reset_spec.rb +++ b/spec/system/admin/reset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Reset' do +RSpec.describe 'Admin::Reset' do it 'Resets password for account user' do account = Fabricate :account sign_in admin_user diff --git a/spec/system/admin/settings/about_spec.rb b/spec/system/admin/settings/about_spec.rb index 0f8ae5605cec0c..c7405a8d5aab56 100644 --- a/spec/system/admin/settings/about_spec.rb +++ b/spec/system/admin/settings/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::About' do +RSpec.describe 'Admin::Settings::About' do it 'Saves changes to about settings' do sign_in admin_user visit admin_settings_about_path diff --git a/spec/system/admin/settings/appearance_spec.rb b/spec/system/admin/settings/appearance_spec.rb index 99e97ea4d128dc..56af58c81267ee 100644 --- a/spec/system/admin/settings/appearance_spec.rb +++ b/spec/system/admin/settings/appearance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Appearance' do +RSpec.describe 'Admin::Settings::Appearance' do it 'Saves changes to appearance settings' do sign_in admin_user visit admin_settings_appearance_path diff --git a/spec/system/admin/settings/branding_spec.rb b/spec/system/admin/settings/branding_spec.rb index ac47e04d53442a..5cd9319ce0308f 100644 --- a/spec/system/admin/settings/branding_spec.rb +++ b/spec/system/admin/settings/branding_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Branding' do +RSpec.describe 'Admin::Settings::Branding' do it 'Saves changes to branding settings' do sign_in admin_user visit admin_settings_branding_path diff --git a/spec/system/admin/settings/content_retention_spec.rb b/spec/system/admin/settings/content_retention_spec.rb index 9867122675a280..f788f8eea0f51b 100644 --- a/spec/system/admin/settings/content_retention_spec.rb +++ b/spec/system/admin/settings/content_retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::ContentRetention' do +RSpec.describe 'Admin::Settings::ContentRetention' do it 'Saves changes to content retention settings' do sign_in admin_user visit admin_settings_content_retention_path diff --git a/spec/system/admin/settings/discovery_spec.rb b/spec/system/admin/settings/discovery_spec.rb index bdab91107d0334..f000d183709099 100644 --- a/spec/system/admin/settings/discovery_spec.rb +++ b/spec/system/admin/settings/discovery_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Discovery' do +RSpec.describe 'Admin::Settings::Discovery' do it 'Saves changes to discovery settings' do sign_in admin_user visit admin_settings_discovery_path diff --git a/spec/system/admin/settings/registrations_spec.rb b/spec/system/admin/settings/registrations_spec.rb index 88c750e8ee1b7a..d026b07c85f16b 100644 --- a/spec/system/admin/settings/registrations_spec.rb +++ b/spec/system/admin/settings/registrations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Registrations' do +RSpec.describe 'Admin::Settings::Registrations' do it 'Saves changes to registrations settings' do sign_in admin_user visit admin_settings_registrations_path diff --git a/spec/system/admin/software_updates_spec.rb b/spec/system/admin/software_updates_spec.rb index 4a635d1a794f8f..77e9f166842d02 100644 --- a/spec/system/admin/software_updates_spec.rb +++ b/spec/system/admin/software_updates_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'finding software updates through the admin interface' do +RSpec.describe 'finding software updates through the admin interface' do before do Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99') diff --git a/spec/system/admin/statuses_spec.rb b/spec/system/admin/statuses_spec.rb index 531d0de9538b21..bb76a2963d0d07 100644 --- a/spec/system/admin/statuses_spec.rb +++ b/spec/system/admin/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Statuses' do +RSpec.describe 'Admin::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links/preview_card_providers_spec.rb b/spec/system/admin/trends/links/preview_card_providers_spec.rb index dca89117b1079a..16343a68917c44 100644 --- a/spec/system/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/system/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links::PreviewCardProviders' do +RSpec.describe 'Admin::Trends::Links::PreviewCardProviders' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links_spec.rb b/spec/system/admin/trends/links_spec.rb index 99638bc069ffbe..7a51c337c9f04b 100644 --- a/spec/system/admin/trends/links_spec.rb +++ b/spec/system/admin/trends/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links' do +RSpec.describe 'Admin::Trends::Links' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/statuses_spec.rb b/spec/system/admin/trends/statuses_spec.rb index 779a15d38fbec3..13fc966dfd17af 100644 --- a/spec/system/admin/trends/statuses_spec.rb +++ b/spec/system/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Statuses' do +RSpec.describe 'Admin::Trends::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/tags_spec.rb b/spec/system/admin/trends/tags_spec.rb index 52e49c3a5d92b6..d914badbd4c443 100644 --- a/spec/system/admin/trends/tags_spec.rb +++ b/spec/system/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Tags' do +RSpec.describe 'Admin::Trends::Tags' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/captcha_spec.rb b/spec/system/captcha_spec.rb index 06c823adf258eb..4c0ce02d1be970 100644 --- a/spec/system/captcha_spec.rb +++ b/spec/system/captcha_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'email confirmation flow when captcha is enabled' do +RSpec.describe 'email confirmation flow when captcha is enabled' do let(:user) { Fabricate(:user, confirmed_at: nil, confirmation_token: 'foobar', created_by_application: client_app) } let(:client_app) { nil } diff --git a/spec/system/filters_spec.rb b/spec/system/filters_spec.rb index a0cb965a61b100..052b5e17306543 100644 --- a/spec/system/filters_spec.rb +++ b/spec/system/filters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Filters' do +RSpec.describe 'Filters' do let(:user) { Fabricate(:user) } let(:filter_title) { 'Filter of fun and games' } diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb index 08b9737d6b6d8a..c1ce4e17261b3e 100644 --- a/spec/system/home_spec.rb +++ b/spec/system/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home page' do +RSpec.describe 'Home page' do context 'when signed in' do before { sign_in Fabricate(:user) } diff --git a/spec/system/log_in_spec.rb b/spec/system/log_in_spec.rb index 8a73c42d2edf00..f8765e8e1cbd52 100644 --- a/spec/system/log_in_spec.rb +++ b/spec/system/log_in_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log in' do +RSpec.describe 'Log in' do include ProfileStories subject { page } diff --git a/spec/system/log_out_spec.rb b/spec/system/log_out_spec.rb index f50f7c2d18d91f..2e52254ca03bb3 100644 --- a/spec/system/log_out_spec.rb +++ b/spec/system/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log out' do +RSpec.describe 'Log out' do include ProfileStories before do diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index 2f2fcf22485ee4..317508a0bb4192 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'NewStatuses', :inline_jobs, :js, :streaming do +RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do include ProfileStories subject { page } diff --git a/spec/system/oauth_spec.rb b/spec/system/oauth_spec.rb index 5d06f6111cee79..0f96a59675803b 100644 --- a/spec/system/oauth_spec.rb +++ b/spec/system/oauth_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Using OAuth from an external app' do +RSpec.describe 'Using OAuth from an external app' do include ProfileStories subject { visit "/oauth/authorize?#{params.to_query}" } diff --git a/spec/system/ocr_spec.rb b/spec/system/ocr_spec.rb index 17d18af1586ed7..fc816b6dbafa13 100644 --- a/spec/system/ocr_spec.rb +++ b/spec/system/ocr_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do +RSpec.describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/privacy_spec.rb b/spec/system/privacy_spec.rb index f2ab1310cc40fd..631440ebb2c72f 100644 --- a/spec/system/privacy_spec.rb +++ b/spec/system/privacy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Privacy policy page' do +RSpec.describe 'Privacy policy page' do it 'visits the privacy policy page and renders the web app' do visit privacy_policy_path diff --git a/spec/system/profile_spec.rb b/spec/system/profile_spec.rb index 2517e823b50c5f..7e3cbfd334ea44 100644 --- a/spec/system/profile_spec.rb +++ b/spec/system/profile_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Profile' do +RSpec.describe 'Profile' do include ProfileStories subject { page } diff --git a/spec/system/redirections_spec.rb b/spec/system/redirections_spec.rb index f73ab58470194c..860bbdd6b72c12 100644 --- a/spec/system/redirections_spec.rb +++ b/spec/system/redirections_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'redirection confirmations' do +RSpec.describe 'redirection confirmations' do let(:account) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/users/foo', url: 'https://example.com/@foo') } let(:status) { Fabricate(:status, account: account, uri: 'https://example.com/users/foo/statuses/1', url: 'https://example.com/@foo/1') } diff --git a/spec/system/report_interface_spec.rb b/spec/system/report_interface_spec.rb index e6cc3b1b68870f..257a1cd6fd371c 100644 --- a/spec/system/report_interface_spec.rb +++ b/spec/system/report_interface_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'report interface', :attachment_processing, :js, :streaming do +RSpec.describe 'report interface', :attachment_processing, :js, :streaming do include ProfileStories let(:email) { 'admin@example.com' } diff --git a/spec/system/severed_relationships_spec.rb b/spec/system/severed_relationships_spec.rb index b933398a083888..4a7bf3e280faaa 100644 --- a/spec/system/severed_relationships_spec.rb +++ b/spec/system/severed_relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Severed relationships page' do +RSpec.describe 'Severed relationships page' do include ProfileStories describe 'GET severed_relationships#index' do diff --git a/spec/system/share_entrypoint_spec.rb b/spec/system/share_entrypoint_spec.rb index 5e27781f2ae5df..7ccfee599ac97f 100644 --- a/spec/system/share_entrypoint_spec.rb +++ b/spec/system/share_entrypoint_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Share page', :js, :streaming do +RSpec.describe 'Share page', :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/unlogged_spec.rb b/spec/system/unlogged_spec.rb index 417ccdaeb65668..26d1bd4542604b 100644 --- a/spec/system/unlogged_spec.rb +++ b/spec/system/unlogged_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'UnloggedBrowsing', :js, :streaming do +RSpec.describe 'UnloggedBrowsing', :js, :streaming do subject { page } before do diff --git a/spec/validators/email_mx_validator_spec.rb b/spec/validators/email_mx_validator_spec.rb index 23a5f768efc8b6..7109c9f4e23b01 100644 --- a/spec/validators/email_mx_validator_spec.rb +++ b/spec/validators/email_mx_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe EmailMxValidator do +RSpec.describe EmailMxValidator do describe '#validate' do let(:user) { instance_double(User, email: 'foo@example.com', sign_up_ip: '1.2.3.4', errors: instance_double(ActiveModel::Errors, add: nil)) } let(:resolv_dns_double) { instance_double(Resolv::DNS) } diff --git a/spec/validators/existing_username_validator_spec.rb b/spec/validators/existing_username_validator_spec.rb index 4f1dd55a17bb07..25ecb1fbcdedaa 100644 --- a/spec/validators/existing_username_validator_spec.rb +++ b/spec/validators/existing_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExistingUsernameValidator do +RSpec.describe ExistingUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/language_validator_spec.rb b/spec/validators/language_validator_spec.rb index cb693dcd81fc5e..19e55f34672f6c 100644 --- a/spec/validators/language_validator_spec.rb +++ b/spec/validators/language_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguageValidator do +RSpec.describe LanguageValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/note_length_validator_spec.rb b/spec/validators/note_length_validator_spec.rb index 3bca93a283da2f..3fdb4ae8b9000e 100644 --- a/spec/validators/note_length_validator_spec.rb +++ b/spec/validators/note_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe NoteLengthValidator do +RSpec.describe NoteLengthValidator do subject { described_class.new(attributes: { note: true }, maximum: 500) } describe '#validate' do diff --git a/spec/validators/reaction_validator_spec.rb b/spec/validators/reaction_validator_spec.rb index f99c1cb5f93ddf..c4d4a517799bc0 100644 --- a/spec/validators/reaction_validator_spec.rb +++ b/spec/validators/reaction_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactionValidator do +RSpec.describe ReactionValidator do let(:announcement) { Fabricate(:announcement) } describe '#validate' do diff --git a/spec/validators/status_length_validator_spec.rb b/spec/validators/status_length_validator_spec.rb index 249b90f4904e3d..ecbfd4ba37fb50 100644 --- a/spec/validators/status_length_validator_spec.rb +++ b/spec/validators/status_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusLengthValidator do +RSpec.describe StatusLengthValidator do describe '#validate' do before { stub_const("#{described_class}::MAX_CHARS", 500) } # Example values below are relative to this baseline diff --git a/spec/validators/unique_username_validator_spec.rb b/spec/validators/unique_username_validator_spec.rb index 0d172c8408959d..037ddadb9f70f7 100644 --- a/spec/validators/unique_username_validator_spec.rb +++ b/spec/validators/unique_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UniqueUsernameValidator do +RSpec.describe UniqueUsernameValidator do describe '#validate' do context 'when local account' do it 'does not add errors if username is nil' do diff --git a/spec/validators/unreserved_username_validator_spec.rb b/spec/validators/unreserved_username_validator_spec.rb index 0eb5f83683df4f..ad1092109db7bb 100644 --- a/spec/validators/unreserved_username_validator_spec.rb +++ b/spec/validators/unreserved_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnreservedUsernameValidator do +RSpec.describe UnreservedUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/url_validator_spec.rb b/spec/validators/url_validator_spec.rb index 4f32b7b39957ac..2297dddaa01b7b 100644 --- a/spec/validators/url_validator_spec.rb +++ b/spec/validators/url_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe URLValidator do +RSpec.describe URLValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb index 82a1dee6d72feb..47a8564eff406d 100644 --- a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb +++ b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'admin/trends/links/_preview_card.html.haml' do +RSpec.describe 'admin/trends/links/_preview_card.html.haml' do it 'correctly escapes user supplied url values' do form = instance_double(ActionView::Helpers::FormHelper, check_box: nil) trend = PreviewCardTrend.new(allowed: false) diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb index fd08f2772d6086..1afcb046d4f4c9 100644 --- a/spec/views/statuses/show.html.haml_spec.rb +++ b/spec/views/statuses/show.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'statuses/show.html.haml' do +RSpec.describe 'statuses/show.html.haml' do let(:alice) { Fabricate(:account, username: 'alice', display_name: 'Alice') } let(:status) { Fabricate(:status, account: alice, text: 'Hello World') } diff --git a/spec/workers/account_refresh_worker_spec.rb b/spec/workers/account_refresh_worker_spec.rb index 361d69aa0a5940..3e88e8db28be7f 100644 --- a/spec/workers/account_refresh_worker_spec.rb +++ b/spec/workers/account_refresh_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountRefreshWorker do +RSpec.describe AccountRefreshWorker do let(:worker) { described_class.new } let(:service) { instance_double(ResolveAccountService, call: true) } diff --git a/spec/workers/activitypub/delivery_worker_spec.rb b/spec/workers/activitypub/delivery_worker_spec.rb index efce610ae4ecd4..3dfbef31a43594 100644 --- a/spec/workers/activitypub/delivery_worker_spec.rb +++ b/spec/workers/activitypub/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeliveryWorker do +RSpec.describe ActivityPub::DeliveryWorker do include RoutingHelper subject { described_class.new } diff --git a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb index 4427cfdf95988f..9ff4731f96aa3c 100644 --- a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb +++ b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributePollUpdateWorker do +RSpec.describe ActivityPub::DistributePollUpdateWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/distribution_worker_spec.rb b/spec/workers/activitypub/distribution_worker_spec.rb index 0eb6227859d758..9e5db53185fbdb 100644 --- a/spec/workers/activitypub/distribution_worker_spec.rb +++ b/spec/workers/activitypub/distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributionWorker do +RSpec.describe ActivityPub::DistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status) } diff --git a/spec/workers/activitypub/fetch_replies_worker_spec.rb b/spec/workers/activitypub/fetch_replies_worker_spec.rb index 2d080e286ecc98..56d19705a4d034 100644 --- a/spec/workers/activitypub/fetch_replies_worker_spec.rb +++ b/spec/workers/activitypub/fetch_replies_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::FetchRepliesWorker do +RSpec.describe ActivityPub::FetchRepliesWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.com') } diff --git a/spec/workers/activitypub/move_distribution_worker_spec.rb b/spec/workers/activitypub/move_distribution_worker_spec.rb index c810b33c23a644..63396834de01db 100644 --- a/spec/workers/activitypub/move_distribution_worker_spec.rb +++ b/spec/workers/activitypub/move_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::MoveDistributionWorker do +RSpec.describe ActivityPub::MoveDistributionWorker do subject { described_class.new } let(:migration) { Fabricate(:account_migration) } diff --git a/spec/workers/activitypub/post_upgrade_worker_spec.rb b/spec/workers/activitypub/post_upgrade_worker_spec.rb index 08de150ad960e8..fe1c5e895eda51 100644 --- a/spec/workers/activitypub/post_upgrade_worker_spec.rb +++ b/spec/workers/activitypub/post_upgrade_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::PostUpgradeWorker do +RSpec.describe ActivityPub::PostUpgradeWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/activitypub/processing_worker_spec.rb b/spec/workers/activitypub/processing_worker_spec.rb index 66d1cf48904b9e..c06ba63d39b8e1 100644 --- a/spec/workers/activitypub/processing_worker_spec.rb +++ b/spec/workers/activitypub/processing_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ProcessingWorker do +RSpec.describe ActivityPub::ProcessingWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/status_update_distribution_worker_spec.rb b/spec/workers/activitypub/status_update_distribution_worker_spec.rb index 66e52c4f288281..e9a70d11d19f81 100644 --- a/spec/workers/activitypub/status_update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/status_update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::StatusUpdateDistributionWorker do +RSpec.describe ActivityPub::StatusUpdateDistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status, text: 'foo') } diff --git a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb index 8cf13cb9001c85..d10ea8a75e088a 100644 --- a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb +++ b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do +RSpec.describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do let(:worker) { described_class.new } let(:service) { instance_double(ActivityPub::FetchFeaturedTagsCollectionService, call: true) } diff --git a/spec/workers/activitypub/update_distribution_worker_spec.rb b/spec/workers/activitypub/update_distribution_worker_spec.rb index b183a58dfd074c..7d786063988b59 100644 --- a/spec/workers/activitypub/update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdateDistributionWorker do +RSpec.describe ActivityPub::UpdateDistributionWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/add_to_public_statuses_index_worker_spec.rb b/spec/workers/add_to_public_statuses_index_worker_spec.rb index fa150722419bd4..edaec1dd3a6ce1 100644 --- a/spec/workers/add_to_public_statuses_index_worker_spec.rb +++ b/spec/workers/add_to_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AddToPublicStatusesIndexWorker do +RSpec.describe AddToPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/admin/account_deletion_worker_spec.rb b/spec/workers/admin/account_deletion_worker_spec.rb index 631cab6648ef5f..e41b734f214711 100644 --- a/spec/workers/admin/account_deletion_worker_spec.rb +++ b/spec/workers/admin/account_deletion_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountDeletionWorker do +RSpec.describe Admin::AccountDeletionWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/domain_purge_worker_spec.rb b/spec/workers/admin/domain_purge_worker_spec.rb index 861fd71a7f91d5..32bdd0868bc2b5 100644 --- a/spec/workers/admin/domain_purge_worker_spec.rb +++ b/spec/workers/admin/domain_purge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DomainPurgeWorker do +RSpec.describe Admin::DomainPurgeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/suspension_worker_spec.rb b/spec/workers/admin/suspension_worker_spec.rb index da12037edcb987..445e0b635ec516 100644 --- a/spec/workers/admin/suspension_worker_spec.rb +++ b/spec/workers/admin/suspension_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SuspensionWorker do +RSpec.describe Admin::SuspensionWorker do let(:worker) { described_class.new } let(:service) { instance_double(SuspendAccountService, call: true) } diff --git a/spec/workers/after_account_domain_block_worker_spec.rb b/spec/workers/after_account_domain_block_worker_spec.rb index 54a113a2b318f8..56f5957ea23736 100644 --- a/spec/workers/after_account_domain_block_worker_spec.rb +++ b/spec/workers/after_account_domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AfterAccountDomainBlockWorker do +RSpec.describe AfterAccountDomainBlockWorker do let(:worker) { described_class.new } let(:service) { instance_double(AfterBlockDomainFromAccountService, call: true) } diff --git a/spec/workers/backup_worker_spec.rb b/spec/workers/backup_worker_spec.rb index db1b50140b6790..5d1d91267a52bf 100644 --- a/spec/workers/backup_worker_spec.rb +++ b/spec/workers/backup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BackupWorker do +RSpec.describe BackupWorker do let(:worker) { described_class.new } let(:service) { instance_double(BackupService, call: true) } diff --git a/spec/workers/bulk_import_worker_spec.rb b/spec/workers/bulk_import_worker_spec.rb index 91f51fbb425428..2d429c880b0848 100644 --- a/spec/workers/bulk_import_worker_spec.rb +++ b/spec/workers/bulk_import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BulkImportWorker do +RSpec.describe BulkImportWorker do subject { described_class.new } let(:import) { Fabricate(:bulk_import, state: :scheduled) } diff --git a/spec/workers/cache_buster_worker_spec.rb b/spec/workers/cache_buster_worker_spec.rb index adeb287fa37246..b6948395b88fa2 100644 --- a/spec/workers/cache_buster_worker_spec.rb +++ b/spec/workers/cache_buster_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBusterWorker do +RSpec.describe CacheBusterWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/delete_mute_worker_spec.rb b/spec/workers/delete_mute_worker_spec.rb index 1fc84491c3bfa3..a5d1fe343d19c2 100644 --- a/spec/workers/delete_mute_worker_spec.rb +++ b/spec/workers/delete_mute_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeleteMuteWorker do +RSpec.describe DeleteMuteWorker do let(:worker) { described_class.new } let(:service) { instance_double(UnmuteService, call: true) } diff --git a/spec/workers/domain_block_worker_spec.rb b/spec/workers/domain_block_worker_spec.rb index 33c3ca009ac32a..c55aa2c0c337f6 100644 --- a/spec/workers/domain_block_worker_spec.rb +++ b/spec/workers/domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainBlockWorker do +RSpec.describe DomainBlockWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/domain_clear_media_worker_spec.rb b/spec/workers/domain_clear_media_worker_spec.rb index 21f8f87b2f615c..20911007b0f3d1 100644 --- a/spec/workers/domain_clear_media_worker_spec.rb +++ b/spec/workers/domain_clear_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainClearMediaWorker do +RSpec.describe DomainClearMediaWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/feed_insert_worker_spec.rb b/spec/workers/feed_insert_worker_spec.rb index e9484879ff4190..92ae304d0e84cf 100644 --- a/spec/workers/feed_insert_worker_spec.rb +++ b/spec/workers/feed_insert_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FeedInsertWorker do +RSpec.describe FeedInsertWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/filtered_notification_cleanup_worker_spec.rb b/spec/workers/filtered_notification_cleanup_worker_spec.rb index 2636b70ad4aec1..5ecd4291af900b 100644 --- a/spec/workers/filtered_notification_cleanup_worker_spec.rb +++ b/spec/workers/filtered_notification_cleanup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FilteredNotificationCleanupWorker do +RSpec.describe FilteredNotificationCleanupWorker do describe '#perform' do let(:sender) { Fabricate(:account) } let(:recipient) { Fabricate(:account) } diff --git a/spec/workers/import/row_worker_spec.rb b/spec/workers/import/row_worker_spec.rb index 0a71a838fcc573..edb02cb3914227 100644 --- a/spec/workers/import/row_worker_spec.rb +++ b/spec/workers/import/row_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Import::RowWorker do +RSpec.describe Import::RowWorker do subject { described_class.new } let(:row) { Fabricate(:bulk_import_row, bulk_import: import) } diff --git a/spec/workers/import_worker_spec.rb b/spec/workers/import_worker_spec.rb index 4095a5d354b9a9..1d34aafe861656 100644 --- a/spec/workers/import_worker_spec.rb +++ b/spec/workers/import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ImportWorker do +RSpec.describe ImportWorker do let(:worker) { described_class.new } let(:service) { instance_double(ImportService, call: true) } diff --git a/spec/workers/move_worker_spec.rb b/spec/workers/move_worker_spec.rb index b25992e44bd615..a24de57e274a6e 100644 --- a/spec/workers/move_worker_spec.rb +++ b/spec/workers/move_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MoveWorker do +RSpec.describe MoveWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account, domain: nil) } diff --git a/spec/workers/poll_expiration_notify_worker_spec.rb b/spec/workers/poll_expiration_notify_worker_spec.rb index 4bd90270d89b79..b3ccdd3d7775af 100644 --- a/spec/workers/poll_expiration_notify_worker_spec.rb +++ b/spec/workers/poll_expiration_notify_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PollExpirationNotifyWorker do +RSpec.describe PollExpirationNotifyWorker do let(:worker) { described_class.new } let(:account) { Fabricate(:account, domain: remote? ? 'example.com' : nil) } let(:status) { Fabricate(:status, account: account) } diff --git a/spec/workers/post_process_media_worker_spec.rb b/spec/workers/post_process_media_worker_spec.rb index 1a274623d73fba..f4b441a9202384 100644 --- a/spec/workers/post_process_media_worker_spec.rb +++ b/spec/workers/post_process_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PostProcessMediaWorker, :attachment_processing do +RSpec.describe PostProcessMediaWorker, :attachment_processing do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_announcement_reaction_worker_spec.rb b/spec/workers/publish_announcement_reaction_worker_spec.rb index 91668b5ada6992..37687ca1a8ab94 100644 --- a/spec/workers/publish_announcement_reaction_worker_spec.rb +++ b/spec/workers/publish_announcement_reaction_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishAnnouncementReactionWorker do +RSpec.describe PublishAnnouncementReactionWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_scheduled_announcement_worker_spec.rb b/spec/workers/publish_scheduled_announcement_worker_spec.rb index 2e50d4a50da398..c4e17903a94a0e 100644 --- a/spec/workers/publish_scheduled_announcement_worker_spec.rb +++ b/spec/workers/publish_scheduled_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledAnnouncementWorker do +RSpec.describe PublishScheduledAnnouncementWorker do subject { described_class.new } let!(:remote_account) { Fabricate(:account, domain: 'domain.com', username: 'foo', uri: 'https://domain.com/users/foo') } diff --git a/spec/workers/publish_scheduled_status_worker_spec.rb b/spec/workers/publish_scheduled_status_worker_spec.rb index f8547e6fe2a685..35e510d2539cf0 100644 --- a/spec/workers/publish_scheduled_status_worker_spec.rb +++ b/spec/workers/publish_scheduled_status_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledStatusWorker do +RSpec.describe PublishScheduledStatusWorker do subject { described_class.new } let(:scheduled_status) { Fabricate(:scheduled_status, params: { text: 'Hello world, future!' }) } diff --git a/spec/workers/push_conversation_worker_spec.rb b/spec/workers/push_conversation_worker_spec.rb index 5fbb4c6853b4a9..d651059c9a6ed8 100644 --- a/spec/workers/push_conversation_worker_spec.rb +++ b/spec/workers/push_conversation_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushConversationWorker do +RSpec.describe PushConversationWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_encrypted_message_worker_spec.rb b/spec/workers/push_encrypted_message_worker_spec.rb index 3cd04ce7b4c60f..311545cf562297 100644 --- a/spec/workers/push_encrypted_message_worker_spec.rb +++ b/spec/workers/push_encrypted_message_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushEncryptedMessageWorker do +RSpec.describe PushEncryptedMessageWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_update_worker_spec.rb b/spec/workers/push_update_worker_spec.rb index c8f94fa82a81d1..6206ab59867a27 100644 --- a/spec/workers/push_update_worker_spec.rb +++ b/spec/workers/push_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushUpdateWorker do +RSpec.describe PushUpdateWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/redownload_avatar_worker_spec.rb b/spec/workers/redownload_avatar_worker_spec.rb index 6ef320bc4fd2ad..6712ce8f4029f5 100644 --- a/spec/workers/redownload_avatar_worker_spec.rb +++ b/spec/workers/redownload_avatar_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadAvatarWorker do +RSpec.describe RedownloadAvatarWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_header_worker_spec.rb b/spec/workers/redownload_header_worker_spec.rb index 746c1a63ffbb76..a57ed3179235d9 100644 --- a/spec/workers/redownload_header_worker_spec.rb +++ b/spec/workers/redownload_header_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadHeaderWorker do +RSpec.describe RedownloadHeaderWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_media_worker_spec.rb b/spec/workers/redownload_media_worker_spec.rb index cd561d148b11f0..adf9a7171c37ca 100644 --- a/spec/workers/redownload_media_worker_spec.rb +++ b/spec/workers/redownload_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadMediaWorker do +RSpec.describe RedownloadMediaWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/refollow_worker_spec.rb b/spec/workers/refollow_worker_spec.rb index 5718d4db497652..30d53279473ec0 100644 --- a/spec/workers/refollow_worker_spec.rb +++ b/spec/workers/refollow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RefollowWorker do +RSpec.describe RefollowWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.org', protocol: :activitypub) } diff --git a/spec/workers/regeneration_worker_spec.rb b/spec/workers/regeneration_worker_spec.rb index 37b0a04c49fb5b..980f1d81db71b0 100644 --- a/spec/workers/regeneration_worker_spec.rb +++ b/spec/workers/regeneration_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RegenerationWorker do +RSpec.describe RegenerationWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/removal_worker_spec.rb b/spec/workers/removal_worker_spec.rb index 5071e882b6ad97..784e72441cd83d 100644 --- a/spec/workers/removal_worker_spec.rb +++ b/spec/workers/removal_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemovalWorker do +RSpec.describe RemovalWorker do let(:worker) { described_class.new } let(:service) { instance_double(RemoveStatusService, call: true) } diff --git a/spec/workers/remove_featured_tag_worker_spec.rb b/spec/workers/remove_featured_tag_worker_spec.rb index a64bd0605f3db0..7866824ee751fc 100644 --- a/spec/workers/remove_featured_tag_worker_spec.rb +++ b/spec/workers/remove_featured_tag_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFeaturedTagWorker do +RSpec.describe RemoveFeaturedTagWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/remove_from_public_statuses_index_worker_spec.rb b/spec/workers/remove_from_public_statuses_index_worker_spec.rb index 43ff211eaa772a..90f05d6a26793a 100644 --- a/spec/workers/remove_from_public_statuses_index_worker_spec.rb +++ b/spec/workers/remove_from_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFromPublicStatusesIndexWorker do +RSpec.describe RemoveFromPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/resolve_account_worker_spec.rb b/spec/workers/resolve_account_worker_spec.rb index 6f3cff099f16c4..de349adacb6f39 100644 --- a/spec/workers/resolve_account_worker_spec.rb +++ b/spec/workers/resolve_account_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveAccountWorker do +RSpec.describe ResolveAccountWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb index 08ebf82785f6d9..28a41761931d02 100644 --- a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AccountsStatusesCleanupScheduler do +RSpec.describe Scheduler::AccountsStatusesCleanupScheduler do subject { described_class.new } let!(:account_alice) { Fabricate(:account, domain: nil, username: 'alice') } diff --git a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb index c0c50b128d8f47..d9355248ba8389 100644 --- a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb +++ b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AutoCloseRegistrationsScheduler do +RSpec.describe Scheduler::AutoCloseRegistrationsScheduler do subject { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb index 246012e128c9ce..eb9d88e59a485d 100644 --- a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb +++ b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::FollowRecommendationsScheduler do +RSpec.describe Scheduler::FollowRecommendationsScheduler do let!(:target_accounts) do Fabricate.times(3, :account) do statuses(count: 6) diff --git a/spec/workers/scheduler/indexing_scheduler_spec.rb b/spec/workers/scheduler/indexing_scheduler_spec.rb index 568f0fc84dbd06..39a88e80637c6c 100644 --- a/spec/workers/scheduler/indexing_scheduler_spec.rb +++ b/spec/workers/scheduler/indexing_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IndexingScheduler do +RSpec.describe Scheduler::IndexingScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb index 8f686a69988c79..37682ebb8f1a4f 100644 --- a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::InstanceRefreshScheduler do +RSpec.describe Scheduler::InstanceRefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb index 50af0301174d1a..7071fa6e984e2f 100644 --- a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IpCleanupScheduler do +RSpec.describe Scheduler::IpCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/pghero_scheduler_spec.rb b/spec/workers/scheduler/pghero_scheduler_spec.rb index e404e5fe4726a7..c99e5bb164c58f 100644 --- a/spec/workers/scheduler/pghero_scheduler_spec.rb +++ b/spec/workers/scheduler/pghero_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::PgheroScheduler do +RSpec.describe Scheduler::PgheroScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb index 13c853c62ac9f7..2eeaeffe376de2 100644 --- a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb +++ b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::ScheduledStatusesScheduler do +RSpec.describe Scheduler::ScheduledStatusesScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/self_destruct_scheduler_spec.rb b/spec/workers/scheduler/self_destruct_scheduler_spec.rb index 2bf578357197ae..a79559efddd571 100644 --- a/spec/workers/scheduler/self_destruct_scheduler_spec.rb +++ b/spec/workers/scheduler/self_destruct_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SelfDestructScheduler do +RSpec.describe Scheduler::SelfDestructScheduler do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/software_update_check_scheduler_spec.rb b/spec/workers/scheduler/software_update_check_scheduler_spec.rb index f596c0a1eca5a7..c88dbfe0af2ec2 100644 --- a/spec/workers/scheduler/software_update_check_scheduler_spec.rb +++ b/spec/workers/scheduler/software_update_check_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SoftwareUpdateCheckScheduler do +RSpec.describe Scheduler::SoftwareUpdateCheckScheduler do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb index 25f0e1fce4793e..2782848e76d9e8 100644 --- a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SuspendedUserCleanupScheduler do +RSpec.describe Scheduler::SuspendedUserCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb index c0c5f032bfcc8e..34bcd8fdd8266c 100644 --- a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::RefreshScheduler do +RSpec.describe Scheduler::Trends::RefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb index cc971c24b40978..ec35236172ffe9 100644 --- a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::ReviewNotificationsScheduler do +RSpec.describe Scheduler::Trends::ReviewNotificationsScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb index 7952f2c146309c..b1be7c46117203 100644 --- a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::UserCleanupScheduler do +RSpec.describe Scheduler::UserCleanupScheduler do subject { described_class.new } let!(:new_unconfirmed_user) { Fabricate(:user) } diff --git a/spec/workers/scheduler/vacuum_scheduler_spec.rb b/spec/workers/scheduler/vacuum_scheduler_spec.rb index 36ecc93d8e4aac..29a7eeac40a8e7 100644 --- a/spec/workers/scheduler/vacuum_scheduler_spec.rb +++ b/spec/workers/scheduler/vacuum_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::VacuumScheduler do +RSpec.describe Scheduler::VacuumScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/tag_unmerge_worker_spec.rb b/spec/workers/tag_unmerge_worker_spec.rb index 5d3a12c4492af6..a0e53e36d936e7 100644 --- a/spec/workers/tag_unmerge_worker_spec.rb +++ b/spec/workers/tag_unmerge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagUnmergeWorker do +RSpec.describe TagUnmergeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/unfilter_notifications_worker_spec.rb b/spec/workers/unfilter_notifications_worker_spec.rb index 629eb644e4f2bb..464a4520ffd535 100644 --- a/spec/workers/unfilter_notifications_worker_spec.rb +++ b/spec/workers/unfilter_notifications_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfilterNotificationsWorker do +RSpec.describe UnfilterNotificationsWorker do let(:recipient) { Fabricate(:account) } let(:sender) { Fabricate(:account) } diff --git a/spec/workers/unfollow_follow_worker_spec.rb b/spec/workers/unfollow_follow_worker_spec.rb index 8025b88c0c366c..7b9d49b902dbe3 100644 --- a/spec/workers/unfollow_follow_worker_spec.rb +++ b/spec/workers/unfollow_follow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfollowFollowWorker do +RSpec.describe UnfollowFollowWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account) } diff --git a/spec/workers/unpublish_announcement_worker_spec.rb b/spec/workers/unpublish_announcement_worker_spec.rb index c742c30bcea4a2..f4838ac2487a14 100644 --- a/spec/workers/unpublish_announcement_worker_spec.rb +++ b/spec/workers/unpublish_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnpublishAnnouncementWorker do +RSpec.describe UnpublishAnnouncementWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/verify_account_links_worker_spec.rb b/spec/workers/verify_account_links_worker_spec.rb index 227591392c5bc1..3f600b8c979199 100644 --- a/spec/workers/verify_account_links_worker_spec.rb +++ b/spec/workers/verify_account_links_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe VerifyAccountLinksWorker do +RSpec.describe VerifyAccountLinksWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/web/push_notification_worker_spec.rb b/spec/workers/web/push_notification_worker_spec.rb index 637206a40939ab..ced21d5bf799b4 100644 --- a/spec/workers/web/push_notification_worker_spec.rb +++ b/spec/workers/web/push_notification_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Web::PushNotificationWorker do +RSpec.describe Web::PushNotificationWorker do subject { described_class.new } let(:p256dh) { 'BN4GvZtEZiZuqFxSKVZfSfluwKBD7UxHNBmWkfiZfCtgDE8Bwh-_MtLXbBxTBAWH9r7IPKL0lhdcaqtL1dfxU5E=' } diff --git a/spec/workers/webhooks/delivery_worker_spec.rb b/spec/workers/webhooks/delivery_worker_spec.rb index 6a5483d1d46e0a..48fcfc607bff7a 100644 --- a/spec/workers/webhooks/delivery_worker_spec.rb +++ b/spec/workers/webhooks/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::DeliveryWorker do +RSpec.describe Webhooks::DeliveryWorker do let(:worker) { described_class.new } describe '#perform' do From 9ed1aab9b7a96076e949d5c47b391376af23d9c8 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:35 -0400 Subject: [PATCH 02/47] 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 da8570c8c5a6a1..e48eb28cc15aca 100644 --- a/spec/support/matchers/cacheable_response.rb +++ b/spec/support/matchers/cacheable_response.rb @@ -27,8 +27,6 @@ end def check_vary - puts @expected_vary - pp @response.headers "Response `Vary` header does not contain `#{@expected_vary}`" unless @response.headers['Vary'].include?(@expected_vary) end From 14af5b47ac2230937e9244bec41390301c7b0067 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 01:12:40 -0400 Subject: [PATCH 03/47] 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 00000000000000..fc8c6bd250efde --- /dev/null +++ b/spec/models/account_alias_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe AccountAlias do + describe 'Normalizations' do + describe 'acct' do + it { is_expected.to normalize(:acct).from(' @username@domain ').to('username@domain') } + end + end +end diff --git a/spec/models/account_migration_spec.rb b/spec/models/account_migration_spec.rb index 1f32c6082ef00b..d658915ce3c4e6 100644 --- a/spec/models/account_migration_spec.rb +++ b/spec/models/account_migration_spec.rb @@ -3,6 +3,12 @@ require 'rails_helper' RSpec.describe AccountMigration do + describe 'Normalizations' do + describe 'acct' do + it { is_expected.to normalize(:acct).from(' @username@domain ').to('username@domain') } + end + end + describe 'validations' do subject { described_class.new(account: source_account, acct: target_acct) } diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 83f1585b612f2d..27707fa897e3d1 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -723,14 +723,15 @@ end end + describe 'Normalizations' do + describe 'username' do + it { is_expected.to normalize(:username).from(" \u3000bob \t \u00a0 \n ").to('bob') } + end + end + describe 'validations' do it { is_expected.to validate_presence_of(:username) } - it 'squishes the username before validation' do - account = Fabricate(:account, domain: nil, username: " \u3000bob \t \u00a0 \n ") - expect(account.username).to eq 'bob' - end - context 'when is local' do it 'is invalid if the username is not unique in case-insensitive comparison among local accounts' do _account = Fabricate(:account, username: 'the_doctor') diff --git a/spec/models/account_warning_spec.rb b/spec/models/account_warning_spec.rb new file mode 100644 index 00000000000000..37866ce3da95f6 --- /dev/null +++ b/spec/models/account_warning_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe AccountWarning do + describe 'Normalizations' do + describe 'text' do + it { is_expected.to normalize(:text).from(nil).to('') } + end + end +end diff --git a/spec/models/custom_emoji_spec.rb b/spec/models/custom_emoji_spec.rb index cb8cb5c11bd67e..87b111441a1df3 100644 --- a/spec/models/custom_emoji_spec.rb +++ b/spec/models/custom_emoji_spec.rb @@ -79,22 +79,9 @@ end describe 'Normalizations' do - describe 'downcase domain value' do - context 'with a mixed case domain value' do - it 'normalizes the value to downcased' do - custom_emoji = Fabricate.build(:custom_emoji, domain: 'wWw.MaStOdOn.CoM') - - expect(custom_emoji.domain).to eq('www.mastodon.com') - end - end - - context 'with a nil domain value' do - it 'leaves the value as nil' do - custom_emoji = Fabricate.build(:custom_emoji, domain: nil) - - expect(custom_emoji.domain).to be_nil - end - end + describe 'domain' do + it { is_expected.to normalize(:domain).from('wWw.MaStOdOn.CoM').to('www.mastodon.com') } + it { is_expected.to normalize(:domain).from(nil).to(nil) } end end end diff --git a/spec/models/custom_filter_spec.rb b/spec/models/custom_filter_spec.rb index 8ac9dbb896434e..5bb615bb37f68e 100644 --- a/spec/models/custom_filter_spec.rb +++ b/spec/models/custom_filter_spec.rb @@ -34,10 +34,8 @@ end describe 'Normalizations' do - it 'cleans up context values' do - record = described_class.new(context: ['home', 'notifications', 'public ', '']) - - expect(record.context).to eq(%w(home notifications public)) + describe 'context' do + it { is_expected.to normalize(:context).from(['home', 'notifications', 'public ', '']).to(%w(home notifications public)) } end end end diff --git a/spec/models/featured_tag_spec.rb b/spec/models/featured_tag_spec.rb new file mode 100644 index 00000000000000..6056e645e05b2b --- /dev/null +++ b/spec/models/featured_tag_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe FeaturedTag do + describe 'Normalizations' do + describe 'name' do + it { is_expected.to normalize(:name).from(' #hashtag ').to('hashtag') } + end + end +end diff --git a/spec/models/relay_spec.rb b/spec/models/relay_spec.rb new file mode 100644 index 00000000000000..4b95c596e4566b --- /dev/null +++ b/spec/models/relay_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Relay do + describe 'Normalizations' do + describe 'inbox_url' do + it { is_expected.to normalize(:inbox_url).from(' http://host.example ').to('http://host.example') } + end + end +end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0f3e25576ee688..5c2af4dc396902 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -59,45 +59,18 @@ describe 'Normalizations' do describe 'locale' do - it 'preserves valid locale' do - user = Fabricate.build(:user, locale: 'en') - - expect(user.locale).to eq('en') - end - - it 'cleans out invalid locale' do - user = Fabricate.build(:user, locale: 'toto') - - expect(user.locale).to be_nil - end + it { is_expected.to_not normalize(:locale).from('en') } + it { is_expected.to normalize(:locale).from('toto').to(nil) } end describe 'time_zone' do - it 'preserves valid timezone' do - user = Fabricate.build(:user, time_zone: 'UTC') - - expect(user.time_zone).to eq('UTC') - end - - it 'cleans out invalid timezone' do - user = Fabricate.build(:user, time_zone: 'toto') - - expect(user.time_zone).to be_nil - end + it { is_expected.to_not normalize(:time_zone).from('UTC') } + it { is_expected.to normalize(:time_zone).from('toto').to(nil) } end - describe 'languages' do - it 'preserves valid options for languages' do - user = Fabricate.build(:user, chosen_languages: ['en', 'fr', '']) - - expect(user.chosen_languages).to eq(['en', 'fr']) - end - - it 'cleans out empty string from languages' do - user = Fabricate.build(:user, chosen_languages: ['']) - - expect(user.chosen_languages).to be_nil - end + describe 'chosen_languages' do + it { is_expected.to normalize(:chosen_languages).from(['en', 'fr', '']).to(%w(en fr)) } + it { is_expected.to normalize(:chosen_languages).from(['']).to(nil) } end end diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb index 864baf2e1aebfb..1b2d803bd75ed0 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -29,10 +29,8 @@ end describe 'Normalizations' do - it 'cleans up events values' do - record = described_class.new(events: ['account.approved', 'account.created ', '']) - - expect(record.events).to eq(%w(account.approved account.created)) + describe 'events' do + it { is_expected.to normalize(:events).from(['account.approved', 'account.created ', '']).to(%w(account.approved account.created)) } end end From a24049db306a97dc5b29da4d794751b4757529bf Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Wed, 4 Sep 2024 03:20:46 -0500 Subject: [PATCH 04/47] 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 c6dcc4d46a37d6..3aa0bbf7da4ec3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -11,5 +11,8 @@ RUN apt-get update && \ export DEBIAN_FRONTEND=noninteractive && \ apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev +# Disable download prompt for Corepack +ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 + # Move welcome message to where VS Code expects it COPY .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt diff --git a/.devcontainer/codespaces/devcontainer.json b/.devcontainer/codespaces/devcontainer.json index 8acffec8259867..d2358657f6d664 100644 --- a/.devcontainer/codespaces/devcontainer.json +++ b/.devcontainer/codespaces/devcontainer.json @@ -39,7 +39,7 @@ }, "onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", - "postCreateCommand": "COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/setup", + "postCreateCommand": "bin/setup", "waitFor": "postCreateCommand", "customizations": { 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/47] 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 57e928c4de40cc..727dfacd92b2ab 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/47] 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 461a2d43a23550..dcd82b273ab8f8 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/47] 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 dcd82b273ab8f8..09be3e6921f23c 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/47] 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 a0891f563f38b0..fa7adc7ac72a28 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/47] 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 e925246bf75954..aeff65485e0494 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -524,7 +524,9 @@ "notification.moderation_warning.action_silence": "Sua conta foi limitada.", "notification.moderation_warning.action_suspend": "Sua conta foi suspensa.", "notification.own_poll": "Sua enquete terminou", + "notification.poll": "Uma enquete que você votou terminou", "notification.reblog": "{name} deu boost no teu toot", + "notification.reblog.name_and_others_with_link": "{name} e {count, plural, one {# outra} other {# outras}} impulsionaram a publicação", "notification.relationships_severance_event": "Conexões perdidas com {name}", "notification.relationships_severance_event.account_suspension": "Um administrador de {from} suspendeu {target}, o que significa que você não pode mais receber atualizações deles ou interagir com eles.", "notification.relationships_severance_event.domain_block": "An admin from {from} has blocked {target}, including {followersCount} of your followers and {followingCount, plural, one {# account} other {# accounts}} you follow.", @@ -533,16 +535,32 @@ "notification.status": "{name} acabou de tootar", "notification.update": "{name} editou uma publicação", "notification_requests.accept": "Aceitar", + "notification_requests.accept_multiple": "{count, plural, one {Aceite # pedido…} other {Aceite # pedidos…}}", + "notification_requests.confirm_accept_multiple.button": "{count, plural, one {Aceite # pedido} other {Aceite # pedidos}}", + "notification_requests.confirm_accept_multiple.message": "Você está prestes a aceitar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Tem certeza de que deseja continuar?", + "notification_requests.confirm_accept_multiple.title": "Aceitar solicitações de notificação?", + "notification_requests.confirm_dismiss_multiple.button": "{count, plural, one {Dispensar pedido} other {Dispensar pedidos}}", + "notification_requests.confirm_dismiss_multiple.message": "Você está prestes a descartar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Você não será capaz de acessar facilmente{count, plural, one {} other {}} novamente. Tem certeza de que deseja continuar?", + "notification_requests.confirm_dismiss_multiple.title": "Descartar solicitações de notificação?", "notification_requests.dismiss": "Rejeitar", + "notification_requests.dismiss_multiple": "{count, plural, one {Dispensar # pedido…} other {Dispensar # pedidos…}}", + "notification_requests.edit_selection": "Editar", + "notification_requests.exit_selection": "Concluído", + "notification_requests.explainer_for_limited_account": "As notificações desta conta foram filtradas porque a conta foi limitada por um moderador.", + "notification_requests.explainer_for_limited_remote_account": "As notificações desta conta foram filtradas porque a conta ou o seu servidor foi limitado por um moderador.", "notification_requests.maximize": "Maximizar", + "notification_requests.minimize_banner": "Minimizar banner de notificações filtradas", "notification_requests.notifications_from": "Notificações de {name}", "notification_requests.title": "Notificações filtradas", + "notification_requests.view": "Ver notificações", "notifications.clear": "Limpar notificações", "notifications.clear_confirmation": "Você tem certeza de que deseja limpar todas as suas notificações?", "notifications.clear_title": "Limpar notificações?", "notifications.column_settings.admin.report": "Novas denúncias:", "notifications.column_settings.admin.sign_up": "Novas inscrições:", "notifications.column_settings.alert": "Notificações no computador", + "notifications.column_settings.beta.category": "Recursos experimentais", + "notifications.column_settings.beta.grouping": "Agrupar notificações", "notifications.column_settings.favourite": "Favoritos:", "notifications.column_settings.filter_bar.advanced": "Exibir todas as categorias", "notifications.column_settings.filter_bar.category": "Barra de filtro rápido", @@ -574,6 +592,11 @@ "notifications.policy.accept": "Aceitar", "notifications.policy.accept_hint": "Mostrar nas notificações", "notifications.policy.drop": "Ignorar", + "notifications.policy.drop_hint": "Envie para o void, para nunca mais ser visto novamente", + "notifications.policy.filter": "Filtrar", + "notifications.policy.filter_hint": "Enviar para caixa de notificações filtradas", + "notifications.policy.filter_limited_accounts_hint": "Limitado pelos moderadores do servidor", + "notifications.policy.filter_limited_accounts_title": "Contas moderadas", "notifications.policy.filter_new_accounts.hint": "Created within the past {days, plural, one {one day} other {# days}}", "notifications.policy.filter_new_accounts_title": "Novas contas", "notifications.policy.filter_not_followers_hint": "Including people who have been following you fewer than {days, plural, one {one day} other {# days}}", @@ -582,6 +605,7 @@ "notifications.policy.filter_not_following_title": "Pessoas que você não segue", "notifications.policy.filter_private_mentions_hint": "Filtrado, a menos que respondido em sua própria menção ou se você segue o remetente", "notifications.policy.filter_private_mentions_title": "Menções privadas não solicitadas", + "notifications.policy.title": "Gerenciar notificações de…", "notifications_permission_banner.enable": "Ativar notificações no computador", "notifications_permission_banner.how_to_control": "Para receber notificações quando o Mastodon não estiver aberto, ative as notificações no computador. Você pode controlar precisamente quais tipos de interações geram notificações no computador através do botão {icon}.", "notifications_permission_banner.title": "Nunca perca nada", @@ -708,9 +732,13 @@ "report.unfollow_explanation": "Você está seguindo esta conta. Para não ver as publicações dela em sua página inicial, deixe de segui-la.", "report_notification.attached_statuses": "{count, plural, one {{count} publicação anexada} other {{count} publicações anexadas}}", "report_notification.categories.legal": "Legal", + "report_notification.categories.legal_sentence": "conteúdo ilegal", "report_notification.categories.other": "Outro", + "report_notification.categories.other_sentence": "outro", "report_notification.categories.spam": "Spam", + "report_notification.categories.spam_sentence": "spam", "report_notification.categories.violation": "Violação de regra", + "report_notification.categories.violation_sentence": "violação de regra", "report_notification.open": "Abrir denúncia", "search.no_recent_searches": "Nenhuma busca recente", "search.placeholder": "Pesquisar", diff --git a/config/locales/activerecord.pt-BR.yml b/config/locales/activerecord.pt-BR.yml index ae78026629025a..3199eb8e2d2e7d 100644 --- a/config/locales/activerecord.pt-BR.yml +++ b/config/locales/activerecord.pt-BR.yml @@ -32,7 +32,7 @@ pt-BR: import: attributes: data: - malformed: está incorreto + malformed: está malformado status: attributes: reblog: @@ -43,16 +43,16 @@ pt-BR: blocked: usa provedor de e-mail não permitido unreachable: parece não existir role_id: - elevated: não pode ser maior que seu cargo atual + elevated: não pode maior que sua função atual user_role: attributes: permissions_as_keys: - dangerous: incluir permissões que não são seguras para o cargo base - elevated: não pode incluir permissões que o seu cargo atual não possui - own_role: não pode ser alterado com seu cargo atual + dangerous: incluir permissões que não são seguras para a função base + elevated: não pode incluir permissões que a sua função atual não possui + own_role: não pode ser alterado com sua função atual position: - elevated: não pode ser maior do que seu cargo atual - own_role: não pode ser alterado com seu cargo atual + elevated: não pode ser maior do que sua função atual + own_role: não pode ser alterado com sua função atual webhook: attributes: events: diff --git a/config/locales/devise.pt-BR.yml b/config/locales/devise.pt-BR.yml index 4a7f346fabcf85..8f504362defe3e 100644 --- a/config/locales/devise.pt-BR.yml +++ b/config/locales/devise.pt-BR.yml @@ -14,7 +14,7 @@ pt-BR: not_found_in_database: "%{authentication_keys} ou senha inválida." omniauth_user_creation_failure: Erro ao criar uma conta para esta identidade. pending: Sua conta está sendo revisada. - timeout: Sua sessão expirou. Por favor, entre novamente para continuar. + timeout: Sua sessão expirou. Faça ‘login’ novamente para continuar. unauthenticated: Você precisa entrar ou criar uma conta antes de continuar. unconfirmed: Você precisa confirmar o seu endereço de e-mail antes de continuar. mailer: @@ -48,12 +48,12 @@ pt-BR: subject: 'Mastodon: Instruções para alterar senha' title: Redefinir senha two_factor_disabled: - explanation: O ‘login’ agora é possível usando apenas o endereço de e-mail e senha. + explanation: O ‘login’ agora é possível usando apenas o endereço eletrônico e senha. subject: 'Mastodon: Autenticação de dois fatores desativada' subtitle: A autenticação de dois fatores foi desativada. title: 2FA desativada two_factor_enabled: - explanation: Será necessário um código gerado pelo aplicativo de autenticação para fazer login. + explanation: Será necessário um código gerado pelo aplicativo de autenticação TOTP para fazer login. subject: 'Mastodon: Autenticação de dois fatores ativada' subtitle: A autenticação de dois fatores foi ativada para sua conta. title: 2FA ativada @@ -75,11 +75,11 @@ pt-BR: title: Uma das suas chaves de segurança foi excluída webauthn_disabled: explanation: A autenticação por chaves de segurança foi desativada para sua conta. - extra: O login agora é possível usando o código gerado por um aplicativo de autenticação de dois fatores. + extra: Agora você pode fazer login usando apenas o código gerado pelo aplicativo de autenticação TOTP. subject: 'Mastodon: Autenticação por chaves de segurança desativada' title: Chaves de segurança desativadas webauthn_enabled: - explanation: Autenticação por chave de segurança foi ativada para sua conta. + explanation: A autenticação por chave de segurança foi ativada para sua conta. extra: Sua chave de segurança agora pode ser usada para ‘login’. subject: 'Mastodon: Autenticação por chaves de segurança ativada' title: Chaves de segurança ativadas diff --git a/config/locales/doorkeeper.pt-BR.yml b/config/locales/doorkeeper.pt-BR.yml index 6b076e9081c7a6..c991850c68cc7a 100644 --- a/config/locales/doorkeeper.pt-BR.yml +++ b/config/locales/doorkeeper.pt-BR.yml @@ -60,8 +60,8 @@ pt-BR: error: title: Ocorreu um erro new: - prompt_html: O %{client_name} gostaria de ter permissão para acessar sua conta. É uma aplicação de terceiros. Se você não confia, então você não deve autorizá-lo. - review_permissions: Revisar permissões + prompt_html: O %{client_name} gostaria de ter permissão para acessar sua conta. Trata-se de uma aplicação de terceiros. Se você não confia nesta aplicação, então você não deve autorizá-la. + review_permissions: Rever permissões title: Autorização necessária show: title: Copie este código de autorização e cole no aplicativo. @@ -72,8 +72,8 @@ pt-BR: revoke: Você tem certeza? index: authorized_at: Autorizado em %{date} - description_html: Estas são as aplicações que podem acessar sua conta usando a API. Se houver aplicativos que você não reconhece ou com mau funcionamento, você pode revogar seu acesso. - last_used_at: Última vez usado em %{date} + description_html: Estas são as aplicações que podem acessar sua conta usando a API. Se houver aplicações que você não reconhece ou que não funcionem corretamente, você pode revogar os acessos. + last_used_at: Usado pela última vez em %{date} never_used: Nunca usado scopes: Permissões superapp: Interno @@ -83,6 +83,7 @@ pt-BR: access_denied: O proprietário do recurso ou servidor de autorização recusou a solicitação. credential_flow_not_configured: Fluxo das Credenciais de Senha do Proprietário do Recurso falhou porque Doorkeeper.configure.resource_owner_from_credentials não foi configurado. invalid_client: Autenticação do cliente falhou por causa de um cliente desconhecido, nenhum cliente de autenticação foi incluído ou o método de autenticação não é suportado. + invalid_code_challenge_method: O método de desafio de código deve ser S256; o método 'plain' não é suportado. invalid_grant: A garantia de autorização está inválida, expirou ou foi revogada, não é equivalente ao link de redirecionamento usado na solicitação de autorização ou foi emitido por outro cliente. invalid_redirect_uri: O link de redirecionamento é inválido. invalid_request: @@ -114,23 +115,23 @@ pt-BR: notice: Aplicativo revogado. grouped_scopes: access: - read: Acesso somente para leitura + read: Acesso somente leitura read/write: Acesso de leitura e escrita - write: Acesso somente para escrita + write: Acesso somente escrita title: accounts: Contas admin/accounts: Administração de contas admin/all: Todas as funções administrativas - admin/reports: Controle de denúncias + admin/reports: Administração de denúncias all: Acesso total à sua conta Mastodon blocks: Bloqueios bookmarks: Salvos conversations: Conversas crypto: Criptografia de ponta a ponta - favourites: Favoritas + favourites: Favoritos filters: Filtros - follow: Seguidores, Silenciados e Bloqueados - follows: Seguidores + follow: Seguimentos, Silenciamentos e Bloqueios + follows: Seguidos lists: Listas media: Mídias anexadas mutes: Silenciados @@ -151,17 +152,17 @@ pt-BR: admin:read: ler todos os dados no servidor admin:read:accounts: ler informações sensíveis de todas as contas admin:read:canonical_email_blocks: ler informações sensíveis de todos os blocos de e-mail canônicos - admin:read:domain_allows: ler informações sensíveis de todos os domínios (URL) permitidos - admin:read:domain_blocks: ler informações sensíveis de todos os domínios (URL) bloqueados - admin:read:email_domain_blocks: ler informações sensíveis de todos os e-mails de domínios bloqueados + admin:read:domain_allows: ler informações sensíveis de todos os domínios permitidos + admin:read:domain_blocks: ler informações sensíveis de todos os domínios bloqueados + admin:read:email_domain_blocks: ler informações sensíveis de todos os domínios de e-mail bloqueados admin:read:ip_blocks: ler informações sensíveis de todos os endereços de IP bloqueados admin:read:reports: ler informações sensíveis de todas as denúncias e contas denunciadas admin:write: alterar todos os dados no servidor admin:write:accounts: executar ações de moderação em contas admin:write:canonical_email_blocks: executar ações de moderação em blocos canônicos de e-mail - admin:write:domain_allows: executar ações de moderação em domínios (URL) permitidos - admin:write:domain_blocks: executar ações de moderação em domínios (URL) bloqueados - admin:write:email_domain_blocks: executar ações de moderação em blocos de e-mail bloqueados + admin:write:domain_allows: executar ações de moderação em domínios permitidos + admin:write:domain_blocks: executar ações de moderação em domínios bloqueados + admin:write:email_domain_blocks: executar ações de moderação em domínios de e-mail bloqueados admin:write:ip_blocks: executar ações de moderação em IPs bloqueados admin:write:reports: executar ações de moderação em denúncias crypto: usar criptografia de ponta-a-ponta @@ -172,7 +173,7 @@ pt-BR: read:accounts: ver informações das contas read:blocks: ver seus bloqueados read:bookmarks: ver seus salvos - read:favourites: veja suas favoritas + read:favourites: veja seus favoritos read:filters: ver seus filtros read:follows: ver quem você segue read:lists: ver suas listas diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 012d0d91ee6128..bcde9956c2b4aa 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -182,14 +182,17 @@ en-GB: create_custom_emoji: Create Custom Emoji create_domain_allow: Create Domain Allow create_domain_block: Create Domain Block + create_email_domain_block: Create Email Domain Block create_ip_block: Create IP rule create_unavailable_domain: Create Unavailable Domain create_user_role: Create Role demote_user: Demote User destroy_announcement: Delete Announcement + destroy_canonical_email_block: Delete Email Block destroy_custom_emoji: Delete Custom Emoji destroy_domain_allow: Delete Domain Allow destroy_domain_block: Delete Domain Block + destroy_email_domain_block: Delete Email Domain Block destroy_instance: Purge Domain destroy_ip_block: Delete IP rule destroy_status: Delete Post @@ -197,8 +200,10 @@ en-GB: destroy_user_role: Destroy Role disable_2fa_user: Disable 2FA disable_custom_emoji: Disable Custom Emoji + disable_sign_in_token_auth_user: Disable Email Token Authentication for User disable_user: Disable User enable_custom_emoji: Enable Custom Emoji + enable_sign_in_token_auth_user: Enable Email Token Authentication for User enable_user: Enable User memorialize_account: Memorialise Account promote_user: Promote User @@ -228,20 +233,26 @@ en-GB: approve_appeal_html: "%{name} approved moderation decision appeal from %{target}" approve_user_html: "%{name} approved sign-up from %{target}" assigned_to_self_report_html: "%{name} assigned report %{target} to themselves" + change_email_user_html: "%{name} changed the email address of user %{target}" change_role_user_html: "%{name} changed role of %{target}" + confirm_user_html: "%{name} confirmed email address of user %{target}" create_account_warning_html: "%{name} sent a warning to %{target}" create_announcement_html: "%{name} created new announcement %{target}" + create_canonical_email_block_html: "%{name} blocked email with the hash %{target}" create_custom_emoji_html: "%{name} uploaded new emoji %{target}" create_domain_allow_html: "%{name} allowed federation with domain %{target}" create_domain_block_html: "%{name} blocked domain %{target}" + create_email_domain_block_html: "%{name} blocked email domain %{target}" create_ip_block_html: "%{name} created rule for IP %{target}" create_unavailable_domain_html: "%{name} stopped delivery to domain %{target}" create_user_role_html: "%{name} created %{target} role" demote_user_html: "%{name} demoted user %{target}" destroy_announcement_html: "%{name} deleted announcement %{target}" + destroy_canonical_email_block_html: "%{name} unblocked email with the hash %{target}" destroy_custom_emoji_html: "%{name} deleted emoji %{target}" destroy_domain_allow_html: "%{name} disallowed federation with domain %{target}" destroy_domain_block_html: "%{name} unblocked domain %{target}" + destroy_email_domain_block_html: "%{name} unblocked email domain %{target}" destroy_instance_html: "%{name} purged domain %{target}" destroy_ip_block_html: "%{name} deleted rule for IP %{target}" destroy_status_html: "%{name} removed post by %{target}" @@ -249,8 +260,10 @@ en-GB: destroy_user_role_html: "%{name} deleted %{target} role" disable_2fa_user_html: "%{name} disabled two factor requirement for user %{target}" disable_custom_emoji_html: "%{name} disabled emoji %{target}" + disable_sign_in_token_auth_user_html: "%{name} disabled email token authentication for %{target}" disable_user_html: "%{name} disabled login for user %{target}" enable_custom_emoji_html: "%{name} enabled emoji %{target}" + enable_sign_in_token_auth_user_html: "%{name} enabled email token authentication for %{target}" enable_user_html: "%{name} enabled login for user %{target}" memorialize_account_html: "%{name} turned %{target}'s account into a memoriam page" promote_user_html: "%{name} promoted user %{target}" @@ -258,6 +271,7 @@ en-GB: reject_user_html: "%{name} rejected sign-up from %{target}" remove_avatar_user_html: "%{name} removed %{target}'s avatar" reopen_report_html: "%{name} reopened report %{target}" + resend_user_html: "%{name} resent confirmation email for %{target}" reset_password_user_html: "%{name} reset password of user %{target}" resolve_report_html: "%{name} resolved report %{target}" sensitive_account_html: "%{name} marked %{target}'s media as sensitive" @@ -418,6 +432,7 @@ en-GB: attempts_over_week: one: "%{count} attempt over the last week" other: "%{count} sign-up attempts over the last week" + created_msg: Successfully blocked email domain delete: Delete dns: types: @@ -426,8 +441,12 @@ en-GB: new: create: Add domain resolve: Resolve domain + title: Block new email domain + no_email_domain_block_selected: No email domain blocks were changed as none were selected not_permitted: Not permitted + resolved_dns_records_hint_html: The domain name resolves to the following MX domains, which are ultimately responsible for accepting email. Blocking an MX domain will block sign-ups from any email address which uses the same MX domain, even if the visible domain name is different. Be careful not to block major email providers. resolved_through_html: Resolved through %{domain} + title: Blocked email domains export_domain_allows: new: title: Import domain allows @@ -581,6 +600,7 @@ en-GB: resolve_description_html: No action will be taken against the reported account, no strike recorded, and the report will be closed. silence_description_html: The account will be visible only to those who already follow it or manually look it up, severely limiting its reach. Can always be reverted. Closes all reports against this account. suspend_description_html: The account and all its contents will be inaccessible and eventually deleted, and interacting with it will be impossible. Reversible within 30 days. Closes all reports against this account. + actions_description_html: Decide which action to take to resolve this report. If you take a punitive action against the reported account, an email notification will be sent to them, except when the Spam category is selected. actions_description_remote_html: Decide which action to take to resolve this report. This will only affect how your server communicates with this remote account and handle its content. add_to_report: Add more to report already_suspended_badges: @@ -645,6 +665,7 @@ en-GB: delete_data_html: Delete @%{acct}'s profile and contents 30 days from now unless they get unsuspended in the meantime preview_preamble_html: "@%{acct} will receive a warning with the following contents:" record_strike_html: Record a strike against @%{acct} to help you escalate on future violations from this account + send_email_html: Send @%{acct} a warning email warning_placeholder: Optional additional reasoning for the moderation action. target_origin: Origin of reported account title: Reports @@ -684,6 +705,7 @@ en-GB: manage_appeals: Manage Appeals manage_appeals_description: Allows users to review appeals against moderation actions manage_blocks: Manage Blocks + manage_blocks_description: Allows users to block email providers and IP addresses manage_custom_emojis: Manage Custom Emojis manage_custom_emojis_description: Allows users to manage custom emojis on the server manage_federation: Manage Federation diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index c38435c7fb523b..45c6baece912ba 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -58,6 +58,7 @@ fr-CA: demote: Rétrograder destroyed_msg: Les données de %{username} sont maintenant en file d’attente pour être supprimées imminemment disable: Geler + disable_sign_in_token_auth: Désactiver le jeton d'authentification par e-mail disable_two_factor_authentication: Désactiver l’authentification à deux facteurs disabled: Gelé display_name: Nom affiché @@ -66,6 +67,7 @@ fr-CA: email: Courriel email_status: État du courriel enable: Dégeler + enable_sign_in_token_auth: Activer le jeton d'authentification par e-mail enabled: Activé enabled_msg: Le compte de %{username} a été dégelé avec succès followers: Abonné·e·s @@ -195,8 +197,10 @@ fr-CA: destroy_user_role: Détruire le rôle disable_2fa_user: Désactiver l’A2F disable_custom_emoji: Désactiver les émojis personnalisés + disable_sign_in_token_auth_user: Désactiver le jeton d'authentification par e-mail pour l'utilisateur disable_user: Désactiver le compte enable_custom_emoji: Activer les émojis personnalisées + enable_sign_in_token_auth_user: Activer le jeton d'authentification par e-mail pour l'utilisateur enable_user: Activer l’utilisateur memorialize_account: Ériger en mémorial promote_user: Promouvoir l’utilisateur @@ -219,18 +223,22 @@ fr-CA: update_custom_emoji: Mettre à jour les émojis personnalisés update_domain_block: Mettre à jour le blocage de domaine update_ip_block: Mettre à jour la règle IP + update_report: Mettre à jour le rapport update_status: Mettre à jour le message update_user_role: Mettre à jour le rôle actions: approve_appeal_html: "%{name} a approuvé l'appel de la décision de modération émis par %{target}" approve_user_html: "%{name} a approuvé l’inscription de %{target}" assigned_to_self_report_html: "%{name} s’est assigné·e le signalement de %{target}" + change_email_user_html: "%{name} a changé l'adresse e-mail de l'utilisateur \n%{target}" change_role_user_html: "%{name} a changé le rôle de %{target}" + confirm_user_html: "%{name} a confirmé l'adresse e-mail de l'utilisateur %{target}" create_account_warning_html: "%{name} a envoyé un avertissement à %{target}" create_announcement_html: "%{name} a créé une nouvelle annonce %{target}" create_custom_emoji_html: "%{name} a téléversé un nouvel émoji %{target}" create_domain_allow_html: "%{name} a autorisé la fédération avec le domaine %{target}" create_domain_block_html: "%{name} a bloqué le domaine %{target}" + create_email_domain_block_html: "%{name} a bloqué le domaine d'e-mail %{target}" create_ip_block_html: "%{name} a créé une règle pour l'IP %{target}" create_unavailable_domain_html: "%{name} a arrêté la livraison vers le domaine %{target}" create_user_role_html: "%{name} a créé le rôle %{target}" @@ -239,6 +247,7 @@ fr-CA: destroy_custom_emoji_html: "%{name} a supprimé l'émoji %{target}" destroy_domain_allow_html: "%{name} a rejeté la fédération avec le domaine %{target}" destroy_domain_block_html: "%{name} a débloqué le domaine %{target}" + destroy_email_domain_block_html: "%{name} a débloqué le domaine d'e-mail %{target}" destroy_instance_html: "%{name} a purgé le domaine %{target}" destroy_ip_block_html: "%{name} a supprimé la règle pour l'IP %{target}" destroy_status_html: "%{name} a supprimé le message de %{target}" @@ -276,6 +285,7 @@ fr-CA: filter_by_action: Filtrer par action filter_by_user: Filtrer par utilisateur·ice title: Journal d’audit + unavailable_instance: "(nom de domaine indisponible)" announcements: destroyed_msg: Annonce supprimée avec succès ! edit: @@ -413,6 +423,7 @@ fr-CA: attempts_over_week: one: "%{count} tentative au cours de la dernière semaine" other: "%{count} tentatives au cours de la dernière semaine" + created_msg: Domaine d'e-mail bloqué avec succès delete: Supprimer dns: types: @@ -914,6 +925,10 @@ fr-CA: statuses: allow: Autoriser le message allow_account: Autoriser l'auteur·rice + confirm_allow: Êtes-vous sûr de vouloir autoriser les statuts sélectionnés ? + confirm_allow_account: Êtes-vous sûr de vouloir autoriser les comptes sélectionnés ? + confirm_disallow: Êtes-vous sûr de vouloir rejeter les statuts sélectionnés ? + confirm_disallow_account: Êtes-vous sûr de vouloir rejeter les comptes sélectionnés ? description_html: Voici les messages dont votre serveur a connaissance qui sont beaucoup partagés et mis en favoris en ce moment. Cela peut aider vos utilisateur⋅rice⋅s, néophytes comme aguerri⋅e⋅s, à trouver plus de comptes à suivre. Aucun message n'est publiquement affiché tant que vous n'en avez pas approuvé l'auteur⋅rice, et seulement si icellui permet que son compte soit suggéré aux autres. Vous pouvez également autoriser ou rejeter les messages individuellement. disallow: Proscrire le message disallow_account: Proscrire l'auteur·rice @@ -1896,6 +1911,7 @@ fr-CA: invalid_otp_token: Le code d’authentification à deux facteurs est invalide otp_lost_help_html: Si vous perdez accès aux deux, vous pouvez contacter %{email} rate_limited: Trop de tentatives d'authentification, réessayez plus tard. + seamless_external_login: Vous êtes connectés sur un service externe, de fait les paramètres de mot de passe et d'e-mail ne sont pas disponibles. signed_in_as: 'Connecté·e en tant que :' verification: extra_instructions_html: Astuce: Le lien sur votre site Web peut être invisible. La partie importante est rel="me" qui évite d’autres liens provenant de contenu générés par des utilisateurs tiers d'être pris en compte. Vous pouvez même utiliser une balise link dans l’en-tête de la page au lieu de a, mais le HTML doit être accessible sans avoir besoin d’exécuter du JavaScript. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c3fa237759f1a1..4434a165317f18 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -58,6 +58,7 @@ fr: demote: Rétrograder destroyed_msg: Les données de %{username} sont maintenant en file d’attente pour être supprimées imminemment disable: Geler + disable_sign_in_token_auth: Désactiver le jeton d'authentification par e-mail disable_two_factor_authentication: Désactiver l’authentification à deux facteurs disabled: Gelé display_name: Nom affiché @@ -66,6 +67,7 @@ fr: email: Adresse de courriel email_status: État du courriel enable: Dégeler + enable_sign_in_token_auth: Activer le jeton d'authentification par e-mail enabled: Activé enabled_msg: Le compte de %{username} a été dégelé avec succès followers: Abonné·e·s @@ -195,8 +197,10 @@ fr: destroy_user_role: Détruire le rôle disable_2fa_user: Désactiver l’A2F disable_custom_emoji: Désactiver les émojis personnalisés + disable_sign_in_token_auth_user: Désactiver le jeton d'authentification par e-mail pour l'utilisateur disable_user: Désactiver le compte enable_custom_emoji: Activer les émojis personnalisées + enable_sign_in_token_auth_user: Activer le jeton d'authentification par e-mail pour l'utilisateur enable_user: Activer le compte memorialize_account: Ériger en mémorial promote_user: Promouvoir le compte @@ -219,18 +223,22 @@ fr: update_custom_emoji: Mettre à jour les émojis personnalisés update_domain_block: Mettre à jour le blocage de domaine update_ip_block: Mettre à jour la règle IP + update_report: Mettre à jour le rapport update_status: Mettre à jour le message update_user_role: Mettre à jour le rôle actions: approve_appeal_html: "%{name} a approuvé l'appel de la décision de modération émis par %{target}" approve_user_html: "%{name} a approuvé l’inscription de %{target}" assigned_to_self_report_html: "%{name} s’est assigné·e le signalement de %{target}" + change_email_user_html: "%{name} a changé l'adresse e-mail de l'utilisateur \n%{target}" change_role_user_html: "%{name} a changé le rôle de %{target}" + confirm_user_html: "%{name} a confirmé l'adresse e-mail de l'utilisateur %{target}" create_account_warning_html: "%{name} a envoyé un avertissement à %{target}" create_announcement_html: "%{name} a créé une nouvelle annonce %{target}" create_custom_emoji_html: "%{name} a téléversé un nouvel émoji %{target}" create_domain_allow_html: "%{name} a autorisé la fédération avec le domaine %{target}" create_domain_block_html: "%{name} a bloqué le domaine %{target}" + create_email_domain_block_html: "%{name} a bloqué le domaine d'e-mail %{target}" create_ip_block_html: "%{name} a créé une règle pour l'IP %{target}" create_unavailable_domain_html: "%{name} a arrêté la livraison vers le domaine %{target}" create_user_role_html: "%{name} a créé le rôle %{target}" @@ -239,6 +247,7 @@ fr: destroy_custom_emoji_html: "%{name} a supprimé l'émoji %{target}" destroy_domain_allow_html: "%{name} a rejeté la fédération avec le domaine %{target}" destroy_domain_block_html: "%{name} a débloqué le domaine %{target}" + destroy_email_domain_block_html: "%{name} a débloqué le domaine d'e-mail %{target}" destroy_instance_html: "%{name} a purgé le domaine %{target}" destroy_ip_block_html: "%{name} a supprimé la règle pour l'IP %{target}" destroy_status_html: "%{name} a supprimé le message de %{target}" @@ -276,6 +285,7 @@ fr: filter_by_action: Filtrer par action filter_by_user: Filtrer par utilisateur·ice title: Journal d’audit + unavailable_instance: "(nom de domaine indisponible)" announcements: destroyed_msg: Annonce supprimée avec succès ! edit: @@ -413,6 +423,7 @@ fr: attempts_over_week: one: "%{count} tentative au cours de la dernière semaine" other: "%{count} tentatives au cours de la dernière semaine" + created_msg: Domaine d'e-mail bloqué avec succès delete: Supprimer dns: types: @@ -914,6 +925,10 @@ fr: statuses: allow: Autoriser le message allow_account: Autoriser l'auteur·rice + confirm_allow: Êtes-vous sûr de vouloir autoriser les statuts sélectionnés ? + confirm_allow_account: Êtes-vous sûr de vouloir autoriser les comptes sélectionnés ? + confirm_disallow: Êtes-vous sûr de vouloir rejeter les statuts sélectionnés ? + confirm_disallow_account: Êtes-vous sûr de vouloir rejeter les comptes sélectionnés ? description_html: Voici les messages dont votre serveur a connaissance qui sont beaucoup partagés et mis en favoris en ce moment. Cela peut aider vos utilisateur⋅rice⋅s, néophytes comme aguerri⋅e⋅s, à trouver plus de comptes à suivre. Aucun message n'est publiquement affiché tant que vous n'en avez pas approuvé l'auteur⋅rice, et seulement si icellui permet que son compte soit suggéré aux autres. Vous pouvez également autoriser ou rejeter les messages individuellement. disallow: Proscrire le message disallow_account: Proscrire l'auteur·rice @@ -1896,6 +1911,7 @@ fr: invalid_otp_token: Le code d’authentification à deux facteurs est invalide otp_lost_help_html: Si vous perdez accès aux deux, vous pouvez contacter %{email} rate_limited: Trop de tentatives d'authentification, réessayez plus tard. + seamless_external_login: Vous êtes connectés sur un service externe, de fait les paramètres de mot de passe et d'e-mail ne sont pas disponibles. signed_in_as: 'Connecté·e en tant que :' verification: extra_instructions_html: Astuce : Le lien sur votre site Web peut être invisible. La partie importante est rel="me" qui évite que soient pris en compte d’autres liens provenant de contenu générés par des utilisateurs tiers. Vous pouvez même utiliser une balise link dans l’en-tête de la page au lieu de a, mais le HTML doit être accessible sans avoir besoin d’exécuter du JavaScript. diff --git a/config/locales/he.yml b/config/locales/he.yml index 72b4156dbf0500..47ec5cafbe29dc 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1506,6 +1506,7 @@ he: media_attachments: validations: images_and_video: לא ניתן להוסיף וידאו להודעה שכבר מכילה תמונות + not_found: קובץ %{ids} לא נמצא, או שהוצמד כבר להודעה אחרת not_ready: לא ניתן להצמיד קבצים שהעלאתם לא הסתיימה. נסה/י שוב בעוד רגע! too_many: לא ניתן להוסיף יותר מארבעה קבצים migrations: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index cdddc79b0e9e5e..2bf138d9be10ad 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1454,6 +1454,7 @@ hu: media_attachments: validations: images_and_video: Nem csatolhatsz videót olyan bejegyzéshez, amelyhez már csatoltál képet + not_found: A(z) %{ids} média nem található, vagy már egy másik bejegyzéshez lett csatolva not_ready: Nem lehet olyan fájlt csatolni, melynek még nem fejeződött be a feldolgozása. Próbáld kicsit később! too_many: Maximum négy fájlt csatolhatsz migrations: diff --git a/config/locales/is.yml b/config/locales/is.yml index 41347d44bbf97c..2c73dbae744520 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -1458,6 +1458,7 @@ is: media_attachments: validations: images_and_video: Ekki er hægt að hengja myndskeið við færslu sem þegar inniheldur myndir + not_found: Myndefnið %{ids} fannst ekki eða er þegar hengt við aðra færslu not_ready: Ekki er hægt að hengja við skrár sem ekki er búið að vinna til fulls. Prófaðu aftur eftir augnablik! too_many: Ekki er hægt að hengja við fleiri en 4 skrár migrations: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 9632a3027bfbaa..ef3775d4df7197 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -830,7 +830,7 @@ ko: sensitive: "%{name} 님이 %{target}의 계정을 민감함으로 표시했습니다" silence: "%{name} 님이 %{target}의 계정을 제한시켰습니다" suspend: "%{name} 님이 %{target}의 계정을 정지시켰습니다" - appeal_approved: 이의제기됨 + appeal_approved: 이의 받아들여짐 appeal_pending: 이의제기 대기중 appeal_rejected: 이의 제기 거절됨 system_checks: diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 90b3d216c3bae6..f301b8ca98cc56 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -1454,6 +1454,7 @@ nn: media_attachments: validations: images_and_video: Kan ikkje leggja ved video til status som allereie inneheld bilete + not_found: Media %{ids} vart ikkje funne eller er allereie kopla til eit anna innlegg not_ready: Kan ikke legge til filer som ikke er ferdigbehandlet. Prøv igjen om et øyeblikk! too_many: Kan ikkje leggja til meir enn 4 filer migrations: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 418d3d059e0e44..579dbd967fbacd 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -4,7 +4,7 @@ pt-BR: about_mastodon_html: 'A rede social do futuro: Sem anúncios, sem vigilância corporativa, com design ético e muita descentralização! Possua seus próprios dados com o Mastodon!' contact_missing: Não definido contact_unavailable: Não disponível - hosted_on: Servidor Mastodon em %{domain} + hosted_on: Mastodon hospedado em %{domain} title: Sobre accounts: follow: Seguir @@ -31,6 +31,7 @@ pt-BR: created_msg: Nota de moderação criada! destroyed_msg: Nota de moderação excluída! accounts: + add_email_domain_block: Bloquear domínio de email approve: Aprovar approved_msg: O registro de %{username} foi aprovado are_you_sure: Você tem certeza? @@ -44,10 +45,10 @@ pt-BR: submit: Alterar e-mail title: Alterar e-mail para %{username} change_role: - changed_msg: Cargo alterado! - label: Alterar cargo - no_role: Sem cargo - title: Alterar cargo para %{username} + changed_msg: Função alterada com sucesso! + label: Alterar função + no_role: Nenhuma função + title: Alterar função para %{username} confirm: Confirmar confirmed: Confirmado confirming: Confirmando @@ -57,6 +58,7 @@ pt-BR: demote: Rebaixar destroyed_msg: Os dados de %{username} estão na fila para serem excluídos em breve disable: Congelar + disable_sign_in_token_auth: Desativar autenticação via token por email disable_two_factor_authentication: Desativar autenticação de dois fatores disabled: Congelada display_name: Nome de exibição @@ -65,6 +67,7 @@ pt-BR: email: E-mail email_status: Estado do e-mail enable: Descongelar + enable_sign_in_token_auth: Ativar autenticação via token por email enabled: Ativada enabled_msg: A conta de %{username} foi descongelada followers: Seguidores @@ -129,6 +132,7 @@ pt-BR: resubscribe: Reinscrever-se role: Cargo search: Buscar + search_same_email_domain: Outros usuários com o mesmo domínio de e-mail search_same_ip: Outros usuários com o mesmo IP security: Segurança security_measures: @@ -169,21 +173,26 @@ pt-BR: approve_appeal: Aprovar revisão approve_user: Aprovar usuário assigned_to_self_report: Atribuir denúncia + change_email_user: Alterar o Email para o usuário change_role_user: Alterar cargo do usuário confirm_user: Confirmar usuário create_account_warning: Criar aviso create_announcement: Criar anúncio + create_canonical_email_block: Criar bloqueio de Email create_custom_emoji: Criar emoji personalizado create_domain_allow: Permitir domínio create_domain_block: Bloquear domínio + create_email_domain_block: Criar Bloqueio de Domínio de Email create_ip_block: Criar regra de IP create_unavailable_domain: Criar domínio indisponível create_user_role: Criar cargo demote_user: Rebaixar usuário destroy_announcement: Excluir anúncio + destroy_canonical_email_block: Deletar bloqueio de Email destroy_custom_emoji: Excluir emoji personalizado destroy_domain_allow: Excluir domínio permitido destroy_domain_block: Desbloquear domínio + destroy_email_domain_block: Deletar bloqueio de domínio Email destroy_instance: Limpar domínio destroy_ip_block: Excluir regra de IP destroy_status: Excluir publicação @@ -191,8 +200,10 @@ pt-BR: destroy_user_role: Destruir cargo disable_2fa_user: Desativar autenticação de dois fatores disable_custom_emoji: Desativar emoji personalizado + disable_sign_in_token_auth_user: Desativar autenticação via Token de Email para Usuário disable_user: Desativar usuário enable_custom_emoji: Ativar emoji personalizado + enable_sign_in_token_auth_user: Desativar autenticação via token por e-mail para o usuário enable_user: Ativar usuário memorialize_account: Converter conta em memorial promote_user: Promover usuário @@ -215,6 +226,7 @@ pt-BR: update_custom_emoji: Editar Emoji Personalizado update_domain_block: Atualizar bloqueio de domínio update_ip_block: Atualizar regra de IP + update_report: Atualizar Relatório update_status: Editar Status update_user_role: Atualizar cargo actions: @@ -223,19 +235,24 @@ pt-BR: assigned_to_self_report_html: "%{name} atribuiu a denúncia %{target} para si" change_email_user_html: "%{name} alterou o endereço de e-mail do usuário %{target}" change_role_user_html: "%{name} alterou o cargo de %{target}" + confirm_user_html: "%{name} confirmou o endereço de e-mail do usuário %{target}" create_account_warning_html: "%{name} enviou um aviso para %{target}" create_announcement_html: "%{name} criou o novo anúncio %{target}" + create_canonical_email_block_html: "%{name} bloqueou o endereço de e-mail com o hash %{target}" create_custom_emoji_html: "%{name} enviou o novo emoji %{target}" create_domain_allow_html: "%{name} permitiu federação com domínio %{target}" create_domain_block_html: "%{name} bloqueou o domínio %{target}" + create_email_domain_block_html: "%{name} bloqueou o domínio de e-mail %{target}" create_ip_block_html: "%{name} criou a regra para o IP %{target}" create_unavailable_domain_html: "%{name} parou a entrega ao domínio %{target}" create_user_role_html: "%{name} criou o cargo %{target}" demote_user_html: "%{name} rebaixou o usuário %{target}" destroy_announcement_html: "%{name} excluiu o anúncio %{target}" + destroy_canonical_email_block_html: "%{name} desbloqueou o endereço e-mail com o hash %{target}" destroy_custom_emoji_html: "%{name} apagou o emoji %{target}" destroy_domain_allow_html: "%{name} bloqueou federação com domínio %{target}" destroy_domain_block_html: "%{name} desbloqueou o domínio %{target}" + destroy_email_domain_block_html: "%{name} desbloqueou o domínio de e-mail %{target}" destroy_instance_html: "%{name} limpou o domínio %{target}" destroy_ip_block_html: "%{name} excluiu a regra para o IP %{target}" destroy_status_html: "%{name} removeu a publicação de %{target}" @@ -243,8 +260,10 @@ pt-BR: destroy_user_role_html: "%{name} excluiu o cargo %{target}" disable_2fa_user_html: "%{name} desativou a exigência da autenticação de dois fatores para o usuário %{target}" disable_custom_emoji_html: "%{name} desativou o emoji %{target}" + disable_sign_in_token_auth_user_html: "%{name} desativou a autenticação via token por e-mail para %{target}" disable_user_html: "%{name} desativou o login para %{target}" enable_custom_emoji_html: "%{name} ativou o emoji %{target}" + enable_sign_in_token_auth_user_html: "%{name} ativou a autenticação via token por e-mail para %{target}" enable_user_html: "%{name} ativou o login para %{target}" memorialize_account_html: "%{name} transformou a conta de %{target} em um memorial" promote_user_html: "%{name} promoveu o usuário %{target}" @@ -252,6 +271,7 @@ pt-BR: reject_user_html: "%{name} rejeitou a inscrição de %{target}" remove_avatar_user_html: "%{name} removeu a imagem de perfil de %{target}" reopen_report_html: "%{name} reabriu a denúncia %{target}" + resend_user_html: "%{name} reenviou um e-mail de confirmação para %{target}" reset_password_user_html: "%{name} redefiniu a senha de %{target}" resolve_report_html: "%{name} resolveu a denúncia %{target}" sensitive_account_html: "%{name} marcou a mídia de %{target} como sensível" @@ -412,6 +432,7 @@ pt-BR: attempts_over_week: one: "%{count} tentativa na última semana" other: "%{count} tentativas de inscrição na última semana" + created_msg: Domínio de e-mail bloqueado com sucesso delete: Excluir dns: types: @@ -420,8 +441,11 @@ pt-BR: new: create: Adicionar domínio resolve: Resolver domínio + title: Bloquear novo domínio de e-mail not_permitted: Não permitido + resolved_dns_records_hint_html: O nome de domínio é associado aos seguintes domínios MX, que são responsáveis por aceitar e-mails. Ao bloquear um domínio MX, você bloqueará as inscrições de qualquer endereço de e-mail que use o mesmo domínio MX, mesmo que o nome de domínio visível seja diferente. Tenha cuidado para não bloquear os principais provedores de e-mail. resolved_through_html: Resolvido através de %{domain} + title: Domínios de e-mail bloqueados export_domain_allows: new: title: Importar domínios permitidos @@ -446,6 +470,9 @@ pt-BR: title: Recomendações de contas unsuppress: Restaurar recomendação de contas instances: + audit_log: + title: Logs de auditoria recentes + view_all: Ver todos os logs de auditoria availability: description_html: one: Se a entrega ao domínio falhar em %{count} dia sem sucesso, nenhuma tentativa de entrega será feita a menos que uma entrega do domínio seja recebida. @@ -572,6 +599,7 @@ pt-BR: resolve_description_html: Nenhuma ação será tomada contra a conta denunciada, nenhuma violação será guardada e a denúncia será encerrada. silence_description_html: A conta ficará visível apenas para aqueles que já a seguem ou que a procuram manualmente, limitando severamente seu alcance. Pode ser revertido a qualquer momento. Fecha todas as denúncias desta conta. suspend_description_html: A conta e todo o seu conteúdo ficará inacessível e, eventualmente, excluído e interagir com ela será impossível. Reversível dentro de 30 dias. Encerra todas as denúncias contra esta conta. + actions_description_html: Decida qual ação tomar para responder a essa denúncia. Se você tomar uma ação punitiva contra a conta denunciada, uma notificação por e-mail será enviada ao usuário, exceto quando a categoria Spam for selecionada. actions_description_remote_html: Decida quais medidas tomará para resolver esta denúncia. Isso só afetará como seu servidor se comunica com esta conta remota e manipula seu conteúdo. add_to_report: Adicionar mais à denúncia already_suspended_badges: @@ -613,6 +641,7 @@ pt-BR: report: 'Denúncia #%{id}' reported_account: Conta denunciada reported_by: Denunciada por + reported_with_application: Denunciado pelo aplicativo resolved: Resolvido resolved_msg: Denúncia resolvida! skip_to_actions: Pular para ações @@ -635,6 +664,7 @@ pt-BR: delete_data_html: Exclua o perfil e o conteúdo de @%{acct} daqui a 30 dias, a menos que a suspensão seja desfeita nesse meio tempo preview_preamble_html: "@%{acct} receberá um aviso com o seguinte conteúdo:" record_strike_html: Registre uma ação contra @%{acct} para te ajudar em futuras violações desta conta + send_email_html: Enviar @%{acct} um e-mail de alerta warning_placeholder: Argumentos adicionais para a ação de moderação. target_origin: Origem da conta denunciada title: Denúncias @@ -674,6 +704,7 @@ pt-BR: manage_appeals: Gerenciar revisões manage_appeals_description: Permite aos usuários visualizar as revisões das decisões da moderação manage_blocks: Gerenciar Bloqueios + manage_blocks_description: Permite aos usuários bloquear provedores de e-mail e endereços IP manage_custom_emojis: Gerenciar Emojis Personalizados manage_custom_emojis_description: Permite aos usuários gerenciar emojis personalizados no servidor manage_federation: Gerenciar Federação @@ -691,6 +722,7 @@ pt-BR: manage_taxonomies: Gerenciar taxonomias manage_taxonomies_description: Permite aos usuários rever o conteúdo em alta e atualizar as configurações de hashtag manage_user_access: Gerenciar Acesso de Usuário + manage_user_access_description: Permite aos usuários desativar a autenticação de dois fatores de outros usuários, alterar seu endereço de e-mail e redefinir sua senha manage_users: Gerenciar usuários manage_users_description: Permite aos usuários ver os detalhes de outros usuários e executar ações de moderação contra eles manage_webhooks: Gerenciar Webhooks @@ -765,6 +797,7 @@ pt-BR: destroyed_msg: Upload do site excluído com sucesso! software_updates: critical_update: Crítico — por favor, atualize rapidamente + description: É recomendável que você mantenha a instalação do Mastodon atualizada para se beneficiar das correções e das novas funcionalidades. Além disso, às vezes é imprescindível atualizar o Mastodon rapidamente para evitar problemas de segurança. Por esses motivos, o Mastodon verifica se há atualizações a cada 30 minutos e notificará você de acordo com as suas preferências de notificação por e-mail. documentation_link: Saiba mais release_notes: Notas de lançamento title: Atualizações disponíveis @@ -851,16 +884,39 @@ pt-BR: action: Confira aqui para mais informações message_html: "Seu armazenamento de objetos está mal configurado. A privacidade de seus usuários está em risco." tags: + moderation: + not_trendable: Fora de moda + not_usable: Não utilizável + pending_review: Revisão pendente + review_requested: Revisão solicitada + reviewed: Revisado + title: Status + trendable: Tendências + unreviewed: Não revisado + usable: Utilizável + name: Nome + newest: Mais recente + oldest: Mais antigos + open: Visualizar Publicamente + reset: Reinicializar review: Status da revisão + search: Buscar + title: Hashtags updated_msg: Configurações de hashtag atualizadas title: Administração trends: allow: Permitir approved: Aprovado + confirm_allow: Você tem certeza que deseja permitir as tags selecionadas? + confirm_disallow: Você tem certeza de que deseja vetar as tags selecionadas? disallow: Impedir links: allow: Permitir link allow_provider: Permitir editor + confirm_allow: Tem certeza que deseja permitir os links selecionados? + confirm_allow_provider: Tem certeza que deseja permitir os provedores selecionados? + confirm_disallow: Tem certeza que deseja vetar os links selecionados? + confirm_disallow_provider: Tem certeza que deseja vetar os provedores selecionados? description_html: Estes são links que estão sendo compartilhados por contas que seu servidor vê. Você pode ajudar seus usuários a descobrir o que está acontecendo no mundo. Nenhum link é exibido publicamente até que você aprove o editor. Você também pode permitir ou rejeitar links individuais. disallow: Proibir link disallow_provider: Proibir autor @@ -884,6 +940,10 @@ pt-BR: statuses: allow: Permitir publicação allow_account: Permitir autor + confirm_allow: Tem certeza que deseja permitir os status selecionados? + confirm_allow_account: Tem certeza que deseja permitir as contas selecionadas? + confirm_disallow: Tem certeza que deseja vetar os status selecionados? + confirm_disallow_account: Tem certeza que deseja vetar as contas selecionadas? description_html: Estes são as publicações que seu servidor sabe que estão sendo muito compartilhadas e favorecidas no momento. Isso pode ajudar seus usuários, novos e atuais, a encontrar mais pessoas para seguir. Nenhuma publicação é exibida publicamente até que você aprove o autor e o autor permitir que sua conta seja sugerida a outros. Você também pode permitir ou rejeitar publicações individuais. disallow: Proibir publicação disallow_account: Proibir autor @@ -916,6 +976,7 @@ pt-BR: used_by_over_week: one: Usado por uma pessoa na última semana other: Usado por %{count} pessoas na última semana + title: Recomendações e tendências trending: Em alta warning_presets: add_new: Adicionar novo @@ -1000,7 +1061,9 @@ pt-BR: guide_link_text: Todos podem contribuir. sensitive_content: Conteúdo sensível application_mailer: + notification_preferences: Alterar preferências de e-mail salutation: "%{name}," + settings: 'Alterar preferências de e-mail: %{link}' unsubscribe: Desinscrever view: 'Ver:' view_profile: Ver perfil @@ -1020,6 +1083,7 @@ pt-BR: hint_html: Só mais uma coisa! Precisamos confirmar que você é um humano (isso é para que possamos evitar o spam!). Resolva o CAPTCHA abaixo e clique em "Continuar". title: Verificação de segurança confirmations: + awaiting_review: Seu endereço de e-mail está confirmado! A equipe %{domain} está agora revisando a sua inscrição. Você receberá um e-mail se a sua conta for aprovada! awaiting_review_title: Seu cadastro está sendo analisado clicking_this_link: clicar este link login_link: entrar @@ -1027,6 +1091,7 @@ pt-BR: redirect_to_app_html: Você deveria ter sido redirecionado para o aplicativo %{app_name}. Se isso não aconteceu, tente %{clicking_this_link} ou volte manualmente para o aplicativo. registration_complete: Seu cadastro no %{domain} foi concluído! welcome_title: Boas vindas, %{name}! + wrong_email_hint: Se esse endereço de e-mail não estiver correto, você pode alterá-lo nas configurações da conta. delete_account: Excluir conta delete_account_html: Se você deseja excluir sua conta, você pode fazer isso aqui. Uma confirmação será solicitada. description: @@ -1047,6 +1112,7 @@ pt-BR: or_log_in_with: Ou entre com privacy_policy_agreement_html: Eu li e concordo com a política de privacidade progress: + confirm: Confirmar e-mail details: Suas informações review: Nossa avaliação rules: Aceitar regras @@ -1068,8 +1134,10 @@ pt-BR: security: Segurança set_new_password: Definir uma nova senha setup: + email_below_hint_html: Verifique a sua pasta de spam, ou solicite outra. Você pode corrigir o seu endereço de e-mail se estiver errado. email_settings_hint_html: Clique no link que te enviamos para verificar %{email}. Esperaremos aqui. link_not_received: Não recebeu um link? + new_confirmation_instructions_sent: Você receberá um novo e-mail com o link de confirmação em alguns minutos! title: Verifique sua caixa de entrada sign_in: preamble_html: Entre com suas credenciais de domínios ( %{domain} ) . Se sua conta estiver hospedada em um servidor diferente, você não deve conseguir acessar este conteúdo. @@ -1080,7 +1148,9 @@ pt-BR: title: Então vamos lá criar uma conta em %{domain}. status: account_status: Status da conta + confirming: Confirmação por e-mail pendente. functional: Sua conta está totalmente operacional. + pending: Sua inscrição está aguardando revisão pela nossa equipe. Isto pode levar algum tempo. Você receberá um e-mail se sua inscrição for aprovada. redirecting_to: Sua conta está inativa porque atualmente está redirecionando para %{acct}. self_destruct: Como %{domain} está se encerrando, você só terá acesso limitado à sua conta. view_strikes: Veja os avisos anteriores em relação à sua conta @@ -1123,6 +1193,9 @@ pt-BR: before: 'Antes de prosseguir, leia com cuidado:' caches: Conteúdo que foi armazenado em cache por outros servidores pode continuar a existir data_removal: Suas publicações e outros dados serão removidos permanentemente + email_change_html: Você pode alterar seu endereço de e-mail sem excluir sua conta + email_contact_html: Se ainda não chegar, você pode enviar um e-mail para %{email} para obter ajuda + email_reconfirmation_html: Se você não recebeu o e-mail de confirmação, você pode solicitá-lo novamente irreversible: Você não conseguirá restaurar ou reativar a sua conta more_details_html: Para mais detalhes, consulte a Política de Privacidade. username_available: Seu nome de usuário ficará disponível novamente @@ -1355,6 +1428,7 @@ pt-BR: authentication_methods: otp: autenticação de dois fatores password: senha + sign_in_token: código de segurança do e-mail webauthn: chaves de segurança description_html: Se você vir atividades suspeitas ou não reconhecidas, considere alterar sua senha e ativar a autenticação de dois fatores. empty: Sem histórico de autenticação disponível @@ -1365,10 +1439,14 @@ pt-BR: unsubscribe: action: Sim, cancelar subscrição complete: Desinscrito + confirmation_html: Tem certeza que deseja cancelar a assinatura de %{type} para Mastodon no %{domain} para o seu endereço de e-mail %{email}? Você sempre pode se inscrever novamente nas configurações de notificação de email. + resubscribe_html: Se você cancelou sua inscrição por engano, você pode se inscrever novamente em suas configurações de notificações por e-mail. + success_html: Você não mais receberá %{type} no Mastodon em %{domain} ao seu endereço de e-mail %{email}. title: Cancelar inscrição media_attachments: validations: images_and_video: Não foi possível anexar um vídeo a uma publicação que já contém imagens + not_found: Mídia %{ids} não encontrada ou já anexada a outra publicação not_ready: Não é possível anexar arquivos que não terminaram de ser processados. Tente novamente daqui a pouco! too_many: Não foi possível anexar mais de 4 imagens migrations: @@ -1445,6 +1523,8 @@ pt-BR: update: subject: "%{name} editou uma publicação" notifications: + administration_emails: Notificações de e-mail do administrador + email_events: Eventos para notificações por e-mail email_events_hint: 'Selecione os eventos que deseja receber notificações:' number: human: @@ -1603,6 +1683,7 @@ pt-BR: import: Importar import_and_export: Importar e exportar migrate: Migração de conta + notifications: Notificações por e-mail preferences: Preferências profile: Perfil relationships: Seguindo e seguidores @@ -1849,6 +1930,7 @@ pt-BR: invalid_otp_token: Código de dois fatores inválido otp_lost_help_html: Se você perder o acesso à ambos, você pode entrar em contato com %{email} rate_limited: Muitas tentativas de autenticação; tente novamente mais tarde. + seamless_external_login: Você está logado através de um serviço externo, portanto as configurações de senha e e-mail não estão disponíveis. signed_in_as: 'Entrou como:' verification: extra_instructions_html: Dica: O link do seu site não precisa ser visível. O importante é a parte rel="me", que impede a personificação em sites com conteúdo gerado pelo usuário. Você pode até usar uma tag link no cabeçalho da página ao invés de uma tag a, mas é importante que o HTML esteja acessível sem executar JavaScript. diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index fc3c09cf1d09d0..65d3883690112c 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -211,6 +211,7 @@ pt-BR: setting_default_privacy: Privacidade dos toots setting_default_sensitive: Sempre marcar mídia como sensível setting_delete_modal: Solicitar confirmação antes de excluir toot + setting_disable_hover_cards: Desativar visualização de perfil ao passar o mouse por cima setting_disable_swiping: Desabilitar movimentos deslizantes setting_display_media: Exibição das mídias setting_display_media_default: Padrão @@ -242,11 +243,13 @@ pt-BR: warn: Ocultar com um aviso form_admin_settings: activity_api_enabled: Publicar estatísticas agregadas sobre atividade de usuários na API + app_icon: Ícone do aplicativo backups_retention_period: Período de retenção do arquivo de usuário bootstrap_timeline_accounts: Sempre recomendar essas contas para novos usuários closed_registrations_message: Mensagem personalizada quando inscrições não estão disponíveis content_cache_retention_period: Período de retenção de conteúdo remoto custom_css: CSS personalizável + favicon: Favicon mascot: Mascote personalizado (legado) media_cache_retention_period: Período de retenção do cachê de mídia peers_api_enabled: Publicar lista de instâncias de servidor descobertas na API @@ -311,6 +314,7 @@ pt-BR: listable: Permitir que esta hashtag apareça em pesquisas e sugestões name: Hashtag trendable: Permitir que esta hashtag fique em alta + usable: Permitir que as publicações usem esta hashtag localmente user: role: Cargo time_zone: Fuso horário diff --git a/config/locales/tr.yml b/config/locales/tr.yml index fc9fde36154daa..4318f4eac48c18 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1454,6 +1454,7 @@ tr: media_attachments: validations: images_and_video: Zaten resim içeren bir duruma video eklenemez + not_found: "%{ids} medya dosyaları bulunamadı veya başka bir gönderiye zaten eklenmiş" not_ready: İşlemi tamamlanmamış dosyalar eklenemez. Birazdan tekrar deneyin! too_many: 4'ten fazla dosya eklenemiyor migrations: From 58df00f04d39cf25e7d4d4cbb111bc4cfe1875c4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 04:52:37 -0400 Subject: [PATCH 10/47] 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 a102795446d465..e2c035284be24f 100644 --- a/app/models/account_statuses_cleanup_policy.rb +++ b/app/models/account_statuses_cleanup_policy.rb @@ -145,15 +145,15 @@ def old_enough_scope(max_id = nil) end def without_self_fav_scope - Status.where('NOT EXISTS (SELECT 1 FROM favourites fav WHERE fav.account_id = statuses.account_id AND fav.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(Favourite)) end def without_self_bookmark_scope - Status.where('NOT EXISTS (SELECT 1 FROM bookmarks bookmark WHERE bookmark.account_id = statuses.account_id AND bookmark.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(Bookmark)) end def without_pinned_scope - Status.where('NOT EXISTS (SELECT 1 FROM status_pins pin WHERE pin.account_id = statuses.account_id AND pin.status_id = statuses.id)') + Status.where.not(self_status_reference_exists(StatusPin)) end def without_media_scope @@ -174,4 +174,13 @@ def without_popular_scope def account_statuses Status.where(account_id: account_id) end + + def self_status_reference_exists(model) + model + .where(model.arel_table[:account_id].eq Status.arel_table[:account_id]) + .where(model.arel_table[:status_id].eq Status.arel_table[:id]) + .select(1) + .arel + .exists + end end 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/47] 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 09be3e6921f23c..a533b662411414 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/47] 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 a6f86dfd4c8b08..ddf7ee75a2343b 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 727dfacd92b2ab..e9ab694ffe0264 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/47] 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 e9ab694ffe0264..74d545d587e632 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/47] 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 74d545d587e632..9825260d6bf451 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/47] 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 9825260d6bf451..c77ebfa4444f19 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/47] 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 37a818bf467bf9..c530693a3f3a41 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -22,6 +22,7 @@ expose: %w(Link X-RateLimit-Reset X-RateLimit-Limit X-RateLimit-Remaining X-Request-Id), methods: %i(post put delete get patch options) resource '/oauth/token', methods: [:post] + resource '/oauth/revoke', methods: [:post] end end end From 1fcffa573cf1ca9373ac1b65b2f7e805cc691927 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 14:54:15 +0200 Subject: [PATCH 17/47] 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 bd6979955aa38c..e8aa0b9e498777 100644 --- a/app/controllers/api/v2_alpha/notifications_controller.rb +++ b/app/controllers/api/v2_alpha/notifications_controller.rb @@ -77,6 +77,8 @@ def load_notifications end def load_grouped_notifications + return [] if @notifications.empty? + MastodonOTELTracer.in_span('Api::V2Alpha::NotificationsController#load_grouped_notifications') do NotificationGroup.from_notifications(@notifications, pagination_range: (@notifications.last.id)..(@notifications.first.id), grouped_types: params[:grouped_types]) end diff --git a/spec/requests/api/v2_alpha/notifications_spec.rb b/spec/requests/api/v2_alpha/notifications_spec.rb index 7663d215ebf96f..8009e7edce798a 100644 --- a/spec/requests/api/v2_alpha/notifications_spec.rb +++ b/spec/requests/api/v2_alpha/notifications_spec.rb @@ -116,6 +116,19 @@ it_behaves_like 'forbidden for wrong scope', 'write write:notifications' + context 'when there are no notifications' do + before do + user.account.notifications.destroy_all + end + + it 'returns 0 notifications' do + subject + + expect(response).to have_http_status(200) + expect(body_as_json[:notification_groups]).to eq [] + end + end + context 'with no options' do it 'returns expected notification types', :aggregate_failures do subject From fab29ebbe864f0aec84857fc3d87f0d56f4f6b9b Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:28:16 +0200 Subject: [PATCH 18/47] 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 51f83f1d241a4a..2ee46500ab8035 100644 --- a/app/javascript/mastodon/actions/notification_groups.ts +++ b/app/javascript/mastodon/actions/notification_groups.ts @@ -18,7 +18,7 @@ import { selectSettingsNotificationsQuickFilterActive, selectSettingsNotificationsShows, } from 'mastodon/selectors/settings'; -import type { AppDispatch } from 'mastodon/store'; +import type { AppDispatch, RootState } from 'mastodon/store'; import { createAppAsyncThunk, createDataLoadingThunk, @@ -32,6 +32,14 @@ function excludeAllTypesExcept(filter: string) { return allNotificationTypes.filter((item) => item !== filter); } +function getExcludedTypes(state: RootState) { + const activeFilter = selectSettingsNotificationsQuickFilterActive(state); + + return activeFilter === 'all' + ? selectSettingsNotificationsExcludedTypes(state) + : excludeAllTypesExcept(activeFilter); +} + function dispatchAssociatedRecords( dispatch: AppDispatch, notifications: ApiNotificationGroupJSON[] | ApiNotificationJSON[], @@ -62,17 +70,8 @@ function dispatchAssociatedRecords( export const fetchNotifications = createDataLoadingThunk( 'notificationGroups/fetch', - async (_params, { getState }) => { - const activeFilter = - selectSettingsNotificationsQuickFilterActive(getState()); - - return apiFetchNotifications({ - exclude_types: - activeFilter === 'all' - ? selectSettingsNotificationsExcludedTypes(getState()) - : excludeAllTypesExcept(activeFilter), - }); - }, + async (_params, { getState }) => + apiFetchNotifications({ exclude_types: getExcludedTypes(getState()) }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -92,9 +91,11 @@ export const fetchNotifications = createDataLoadingThunk( export const fetchNotificationsGap = createDataLoadingThunk( 'notificationGroups/fetchGap', - async (params: { gap: NotificationGap }) => - apiFetchNotifications({ max_id: params.gap.maxId }), - + async (params: { gap: NotificationGap }, { getState }) => + apiFetchNotifications({ + max_id: params.gap.maxId, + exclude_types: getExcludedTypes(getState()), + }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -109,6 +110,7 @@ export const pollRecentNotifications = createDataLoadingThunk( async (_params, { getState }) => { return apiFetchNotifications({ max_id: undefined, + exclude_types: getExcludedTypes(getState()), // In slow mode, we don't want to include notifications that duplicate the already-displayed ones since_id: usePendingItems ? getState().notificationGroups.groups.find( @@ -183,7 +185,6 @@ export const setNotificationsFilter = createAppAsyncThunk( path: ['notifications', 'quickFilter', 'active'], value: filterType, }); - // dispatch(expandNotifications({ forceLoad: true })); void dispatch(fetchNotifications()); dispatch(saveSettings()); }, From 585e369e0bb0e17ff5e025385dfefde1e9e81fa3 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:43:08 +0200 Subject: [PATCH 19/47] 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 fda5798ae98b49..e41a6b2736c3c4 100644 --- a/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx +++ b/app/javascript/mastodon/features/notifications_v2/components/notification_admin_report.tsx @@ -42,19 +42,11 @@ export const NotificationAdminReport: React.FC<{ if (!account || !targetAccount) return null; + const domain = account.acct.split('@')[1]; + const values = { - name: ( - - ), - target: ( - - ), + name: {domain ?? `@${account.acct}`}, + target: @{targetAccount.acct}, category: intl.formatMessage(messages[report.category]), count: report.status_ids.length, }; From 9ba81eae3e526724dda1c693117aae5c0c235fe9 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Wed, 4 Sep 2024 16:10:26 +0200 Subject: [PATCH 20/47] 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 5ef1f6f319f3e6..b302565a4e0521 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 208d6ae0784b76..2a36b89dc553a3 100644 --- a/streaming/redis.js +++ b/streaming/redis.js @@ -4,44 +4,114 @@ import { parseIntFromEnvValue } from './utils.js'; /** * @typedef RedisConfiguration - * @property {import('ioredis').RedisOptions} redisParams - * @property {string} redisPrefix - * @property {string|undefined} redisUrl + * @property {string|undefined} namespace + * @property {string|undefined} url + * @property {import('ioredis').RedisOptions} options */ +/** + * + * @param {NodeJS.ProcessEnv} env + * @returns {boolean} + */ +function hasSentinelConfiguration(env) { + return ( + typeof env.REDIS_SENTINELS === 'string' && + env.REDIS_SENTINELS.length > 0 && + typeof env.REDIS_SENTINEL_MASTER === 'string' && + env.REDIS_SENTINEL_MASTER.length > 0 + ); +} + +/** + * + * @param {NodeJS.ProcessEnv} env + * @param {import('ioredis').SentinelConnectionOptions} commonOptions + * @returns {import('ioredis').SentinelConnectionOptions} + */ +function getSentinelConfiguration(env, commonOptions) { + const redisDatabase = parseIntFromEnvValue(env.REDIS_DB, 0, 'REDIS_DB'); + const sentinelPort = parseIntFromEnvValue(env.REDIS_SENTINEL_PORT, 26379, 'REDIS_SENTINEL_PORT'); + + const sentinels = env.REDIS_SENTINELS.split(',').map((sentinel) => { + const [host, port] = sentinel.split(':', 2); + + /** @type {import('ioredis').SentinelAddress} */ + return { + host: host, + port: port ?? sentinelPort, + // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, + // only allowing IPv4 connections: + // https://github.com/redis/ioredis/issues/1576 + family: 0 + }; + }); + + return { + db: redisDatabase, + name: env.REDIS_SENTINEL_MASTER, + username: env.REDIS_USERNAME, + password: env.REDIS_PASSWORD, + sentinelUsername: env.REDIS_SENTINEL_USERNAME ?? env.REDIS_USERNAME, + sentinelPassword: env.REDIS_SENTINEL_PASSWORD ?? env.REDIS_PASSWORD, + sentinels, + ...commonOptions, + }; +} + /** * @param {NodeJS.ProcessEnv} env the `process.env` value to read configuration from * @returns {RedisConfiguration} configuration for the Redis connection */ export function configFromEnv(env) { - // ioredis *can* transparently add prefixes for us, but it doesn't *in some cases*, - // which means we can't use it. But this is something that should be looked into. - const redisPrefix = env.REDIS_NAMESPACE ? `${env.REDIS_NAMESPACE}:` : ''; + const redisNamespace = env.REDIS_NAMESPACE; + // These options apply for both REDIS_URL based connections and connections + // using the other REDIS_* environment variables: + const commonOptions = { + // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, + // only allowing IPv4 connections: + // https://github.com/redis/ioredis/issues/1576 + family: 0 + // Note: we don't use auto-prefixing of keys since this doesn't apply to + // subscribe/unsubscribe which have "channel" instead of "key" arguments + }; + + // If we receive REDIS_URL, don't continue parsing any other REDIS_* + // environment variables: + if (typeof env.REDIS_URL === 'string' && env.REDIS_URL.length > 0) { + return { + url: env.REDIS_URL, + options: commonOptions, + namespace: redisNamespace + }; + } + + // If we have configuration for Redis Sentinel mode, prefer that: + if (hasSentinelConfiguration(env)) { + return { + options: getSentinelConfiguration(env, commonOptions), + namespace: redisNamespace + }; + } + + // Finally, handle all the other REDIS_* environment variables: let redisPort = parseIntFromEnvValue(env.REDIS_PORT, 6379, 'REDIS_PORT'); let redisDatabase = parseIntFromEnvValue(env.REDIS_DB, 0, 'REDIS_DB'); /** @type {import('ioredis').RedisOptions} */ - const redisParams = { - host: env.REDIS_HOST || '127.0.0.1', + const options = { + host: env.REDIS_HOST ?? '127.0.0.1', port: redisPort, - // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, - // only allowing IPv4 connections: - // https://github.com/redis/ioredis/issues/1576 - family: 0, db: redisDatabase, - password: env.REDIS_PASSWORD || undefined, + username: env.REDIS_USERNAME, + password: env.REDIS_PASSWORD, + ...commonOptions, }; - // redisParams.path takes precedence over host and port. - if (env.REDIS_URL && env.REDIS_URL.startsWith('unix://')) { - redisParams.path = env.REDIS_URL.slice(7); - } - return { - redisParams, - redisPrefix, - redisUrl: typeof env.REDIS_URL === 'string' ? env.REDIS_URL : undefined, + options, + namespace: redisNamespace }; } @@ -50,13 +120,13 @@ export function configFromEnv(env) { * @param {import('pino').Logger} logger * @returns {Redis} */ -export function createClient({ redisParams, redisUrl }, logger) { +export function createClient({ url, options }, logger) { let client; - if (typeof redisUrl === 'string') { - client = new Redis(redisUrl, redisParams); + if (typeof url === 'string') { + client = new Redis(url, options); } else { - client = new Redis(redisParams); + client = new Redis(options); } client.on('error', (err) => logger.error({ err }, 'Redis Client Error!')); From ef2bc8ea261838cf31fe4fe11b2954a19c864295 Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Wed, 4 Sep 2024 16:10:45 +0200 Subject: [PATCH 21/47] Add redis sentinel support to ruby part of code (#31744) --- lib/mastodon/redis_configuration.rb | 98 ++++++++++--------- spec/lib/mastodon/redis_configuration_spec.rb | 56 +++++++++++ 2 files changed, 110 insertions(+), 44 deletions(-) diff --git a/lib/mastodon/redis_configuration.rb b/lib/mastodon/redis_configuration.rb index 3cd121e4ac2762..9139d87583e33f 100644 --- a/lib/mastodon/redis_configuration.rb +++ b/lib/mastodon/redis_configuration.rb @@ -1,34 +1,33 @@ # frozen_string_literal: true class Mastodon::RedisConfiguration + DEFAULTS = { + host: 'localhost', + port: 6379, + db: 0, + }.freeze + def base - @base ||= { - url: setup_base_redis_url, - driver: driver, - namespace: base_namespace, - } + @base ||= setup_config(prefix: nil, defaults: DEFAULTS) + .merge(namespace: base_namespace) end def sidekiq - @sidekiq ||= { - url: setup_prefixed_redis_url(:sidekiq), - driver: driver, - namespace: sidekiq_namespace, - } + @sidekiq ||= setup_config(prefix: 'SIDEKIQ_') + .merge(namespace: sidekiq_namespace) end def cache - @cache ||= { - url: setup_prefixed_redis_url(:cache), - driver: driver, - namespace: cache_namespace, - expires_in: 10.minutes, - connect_timeout: 5, - pool: { - size: Sidekiq.server? ? Sidekiq[:concurrency] : Integer(ENV['MAX_THREADS'] || 5), - timeout: 5, - }, - } + @cache ||= setup_config(prefix: 'CACHE_') + .merge({ + namespace: cache_namespace, + expires_in: 10.minutes, + connect_timeout: 5, + pool: { + size: Sidekiq.server? ? Sidekiq[:concurrency] : Integer(ENV['MAX_THREADS'] || 5), + timeout: 5, + }, + }) end private @@ -55,42 +54,53 @@ def cache_namespace namespace ? "#{namespace}_cache" : 'cache' end - def setup_base_redis_url - url = ENV.fetch('REDIS_URL', nil) - return url if url.present? - - user = ENV.fetch('REDIS_USER', '') - password = ENV.fetch('REDIS_PASSWORD', '') - host = ENV.fetch('REDIS_HOST', 'localhost') - port = ENV.fetch('REDIS_PORT', 6379) - db = ENV.fetch('REDIS_DB', 0) + def setup_config(prefix: nil, defaults: {}) + prefix = "#{prefix}REDIS_" - construct_uri(host, port, db, user, password) - end + url = ENV.fetch("#{prefix}URL", nil) + user = ENV.fetch("#{prefix}USER", nil) + password = ENV.fetch("#{prefix}PASSWORD", nil) + host = ENV.fetch("#{prefix}HOST", defaults[:host]) + port = ENV.fetch("#{prefix}PORT", defaults[:port]) + db = ENV.fetch("#{prefix}DB", defaults[:db]) + name = ENV.fetch("#{prefix}SENTINEL_MASTER", nil) + sentinels = parse_sentinels(ENV.fetch("#{prefix}SENTINELS", nil)) - def setup_prefixed_redis_url(prefix) - prefix = "#{prefix.to_s.upcase}_" - url = ENV.fetch("#{prefix}REDIS_URL", nil) + return { url:, driver: } if url - return url if url.present? + if name.present? && sentinels.present? + host = name + port = nil + db ||= 0 + else + sentinels = nil + end - user = ENV.fetch("#{prefix}REDIS_USER", nil) - password = ENV.fetch("#{prefix}REDIS_PASSWORD", nil) - host = ENV.fetch("#{prefix}REDIS_HOST", nil) - port = ENV.fetch("#{prefix}REDIS_PORT", nil) - db = ENV.fetch("#{prefix}REDIS_DB", nil) + url = construct_uri(host, port, db, user, password) - if host.nil? - base[:url] + if url.present? + { url:, driver:, name:, sentinels: } else - construct_uri(host, port, db, user, password) + # Fall back to base config. This has defaults for the URL + # so this cannot lead to an endless loop. + base end end def construct_uri(host, port, db, user, password) + return nil if host.blank? + Addressable::URI.parse("redis://#{host}:#{port}/#{db}").tap do |uri| uri.user = user if user.present? uri.password = password if password.present? end.normalize.to_str end + + def parse_sentinels(sentinels_string) + (sentinels_string || '').split(',').map do |sentinel| + host, port = sentinel.split(':') + port = port.present? ? port.to_i : 26_379 + { host: host, port: port } + end.presence + end end diff --git a/spec/lib/mastodon/redis_configuration_spec.rb b/spec/lib/mastodon/redis_configuration_spec.rb index c7326fd41175a4..a48ffc80e6c743 100644 --- a/spec/lib/mastodon/redis_configuration_spec.rb +++ b/spec/lib/mastodon/redis_configuration_spec.rb @@ -45,6 +45,20 @@ it 'uses the url from the base config' do expect(subject[:url]).to eq 'redis://localhost:6379/0' end + + context 'when the base config uses sentinel' do + around do |example| + ClimateControl.modify REDIS_SENTINELS: '192.168.0.1:3000,192.168.0.2:4000', REDIS_SENTINEL_MASTER: 'mainsentinel' do + example.run + end + end + + it 'uses the sentinel configuration from base config' do + expect(subject[:url]).to eq 'redis://mainsentinel/0' + expect(subject[:name]).to eq 'mainsentinel' + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 3000 }, { host: '192.168.0.2', port: 4000 }) + end + end end context "when the `#{prefix}_REDIS_URL` environment variable is present" do @@ -72,6 +86,39 @@ end end + shared_examples 'sentinel support' do |prefix = nil| + prefix = prefix ? "#{prefix}_" : '' + + context 'when configuring sentinel support' do + around do |example| + ClimateControl.modify "#{prefix}REDIS_PASSWORD": 'testpass1', "#{prefix}REDIS_HOST": 'redis2.example.com', "#{prefix}REDIS_SENTINELS": '192.168.0.1:3000,192.168.0.2:4000', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'constructs the url using the sentinel master name' do + expect(subject[:url]).to eq 'redis://:testpass1@mainsentinel/0' + end + + it 'includes the sentinel master name and list of sentinels' do + expect(subject[:name]).to eq 'mainsentinel' + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 3000 }, { host: '192.168.0.2', port: 4000 }) + end + end + + context 'when giving sentinels without port numbers' do + around do |example| + ClimateControl.modify "#{prefix}REDIS_SENTINELS": '192.168.0.1,192.168.0.2', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'uses the default sentinel port' do + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 26_379 }, { host: '192.168.0.2', port: 26_379 }) + end + end + end + describe '#base' do subject { redis_environment.base } @@ -81,6 +128,8 @@ url: 'redis://localhost:6379/0', driver: :hiredis, namespace: nil, + name: nil, + sentinels: nil, }) end end @@ -113,12 +162,15 @@ url: 'redis://:testpass@redis.example.com:3333/3', driver: :hiredis, namespace: nil, + name: nil, + sentinels: nil, }) end end include_examples 'setting a different driver' include_examples 'setting a namespace' + include_examples 'sentinel support' end describe '#sidekiq' do @@ -127,6 +179,7 @@ include_examples 'secondary configuration', 'SIDEKIQ' include_examples 'setting a different driver' include_examples 'setting a namespace' + include_examples 'sentinel support', 'SIDEKIQ' end describe '#cache' do @@ -139,6 +192,8 @@ namespace: 'cache', expires_in: 10.minutes, connect_timeout: 5, + name: nil, + sentinels: nil, pool: { size: 5, timeout: 5, @@ -166,5 +221,6 @@ include_examples 'secondary configuration', 'CACHE' include_examples 'setting a different driver' + include_examples 'sentinel support', 'CACHE' end end From fe04291af46d7cb9d3439fa73739b2ffb2b53d72 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 13:19:53 -0400 Subject: [PATCH 22/47] 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 1ccb622676faf4..d56a1fcccf697f 100644 --- a/app/lib/annual_report/source.rb +++ b/app/lib/annual_report/source.rb @@ -11,6 +11,16 @@ def initialize(account, year) protected def year_as_snowflake_range - (Mastodon::Snowflake.id_at(DateTime.new(year, 1, 1))..Mastodon::Snowflake.id_at(DateTime.new(year, 12, 31))) + (beginning_snowflake_id..ending_snowflake_id) + end + + private + + def beginning_snowflake_id + Mastodon::Snowflake.id_at DateTime.new(year).beginning_of_year + end + + def ending_snowflake_id + Mastodon::Snowflake.id_at DateTime.new(year).end_of_year end end From e1b5f3fc6f1bb6e77a7cad725a963d008c7ce983 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 13:29:05 -0400 Subject: [PATCH 23/47] Use `response.parsed_body` for html response checks (#31750) --- spec/controllers/admin/accounts_controller_spec.rb | 2 +- .../admin/export_domain_blocks_controller_spec.rb | 2 +- .../controllers/admin/instances_controller_spec.rb | 2 +- .../auth/registrations_controller_spec.rb | 2 +- spec/requests/account_show_page_spec.rb | 14 ++++++++------ 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb index 89a7239f53f45d..ca399fbd9bba03 100644 --- a/spec/controllers/admin/accounts_controller_spec.rb +++ b/spec/controllers/admin/accounts_controller_spec.rb @@ -48,7 +48,7 @@ end def accounts_table_rows - Nokogiri::Slop(response.body).css('table.accounts-table tr') + response.parsed_body.css('table.accounts-table tr') end end diff --git a/spec/controllers/admin/export_domain_blocks_controller_spec.rb b/spec/controllers/admin/export_domain_blocks_controller_spec.rb index 39195716c5c684..564f5a88c51027 100644 --- a/spec/controllers/admin/export_domain_blocks_controller_spec.rb +++ b/spec/controllers/admin/export_domain_blocks_controller_spec.rb @@ -64,7 +64,7 @@ def mapped_batch_table_rows end def batch_table_rows - Nokogiri::Slop(response.body).css('body div.batch-table__row') + response.parsed_body.css('body div.batch-table__row') end end diff --git a/spec/controllers/admin/instances_controller_spec.rb b/spec/controllers/admin/instances_controller_spec.rb index a64bbb2c9f7911..1e65373e1f5365 100644 --- a/spec/controllers/admin/instances_controller_spec.rb +++ b/spec/controllers/admin/instances_controller_spec.rb @@ -35,7 +35,7 @@ end def instance_directory_links - Nokogiri::Slop(response.body).css('div.directory__tag a') + response.parsed_body.css('div.directory__tag a') end end diff --git a/spec/controllers/auth/registrations_controller_spec.rb b/spec/controllers/auth/registrations_controller_spec.rb index 75ab2876523ea7..6118edf4e34331 100644 --- a/spec/controllers/auth/registrations_controller_spec.rb +++ b/spec/controllers/auth/registrations_controller_spec.rb @@ -342,7 +342,7 @@ end def username_error_text - Nokogiri::Slop(response.body).css('.user_account_username .error').text + response.parsed_body.css('.user_account_username .error').text end end diff --git a/spec/requests/account_show_page_spec.rb b/spec/requests/account_show_page_spec.rb index d0857c8980ec3e..7f3ea2595f8eef 100644 --- a/spec/requests/account_show_page_spec.rb +++ b/spec/requests/account_show_page_spec.rb @@ -18,14 +18,16 @@ end def head_link_icons - head_section.css('link[rel=icon]') + response + .parsed_body + .search('html head link[rel=icon]') end def head_meta_content(property) - head_section.meta("[@property='#{property}']")[:content] - end - - def head_section - Nokogiri::Slop(response.body).html.head + response + .parsed_body + .search("html head meta[property='#{property}']") + .attr('content') + .text end end From 559958f8c540a28c9f41da040fa23a228fadad0b Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 19:35:40 +0200 Subject: [PATCH 24/47] Fix email language when recipient has no selected locale (#31747) --- app/mailers/application_mailer.rb | 2 +- app/mailers/user_mailer.rb | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 3312183d47db66..35f0b5fee18a9a 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -12,7 +12,7 @@ class ApplicationMailer < ActionMailer::Base protected def locale_for_account(account, &block) - I18n.with_locale(account.user_locale || I18n.locale || I18n.default_locale, &block) + I18n.with_locale(account.user_locale || I18n.default_locale, &block) end def set_autoreply_headers! diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 81a2c0c6d04bbc..5c9e5c96d91589 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -33,7 +33,7 @@ def reset_password_instructions(user, token, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -43,7 +43,7 @@ def password_change(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -53,7 +53,7 @@ def email_changed(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -63,7 +63,7 @@ def two_factor_enabled(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -73,7 +73,7 @@ def two_factor_disabled(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -83,7 +83,7 @@ def two_factor_recovery_codes_changed(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -93,7 +93,7 @@ def webauthn_enabled(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -103,7 +103,7 @@ def webauthn_disabled(user, *, **) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: default_devise_subject end end @@ -114,7 +114,7 @@ def webauthn_credential_added(user, webauthn_credential) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: I18n.t('devise.mailer.webauthn_credential.added.subject') end end @@ -125,7 +125,7 @@ def webauthn_credential_deleted(user, webauthn_credential) return unless @resource.active_for_authentication? - I18n.with_locale(locale) do + I18n.with_locale(locale(use_current_locale: true)) do mail subject: I18n.t('devise.mailer.webauthn_credential.deleted.subject') end end @@ -219,7 +219,7 @@ def set_instance @instance = Rails.configuration.x.local_domain end - def locale - @resource.locale.presence || I18n.locale || I18n.default_locale + def locale(use_current_locale: false) + @resource.locale.presence || (use_current_locale && I18n.locale) || I18n.default_locale end end From 1d86377ba90c640763cb61ae3a6d79544a92e8df Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:28:16 +0200 Subject: [PATCH 25/47] [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 ba93ab776b65b5..b0a54ad5b45a69 100644 --- a/app/javascript/flavours/glitch/actions/notification_groups.ts +++ b/app/javascript/flavours/glitch/actions/notification_groups.ts @@ -18,7 +18,7 @@ import { selectSettingsNotificationsQuickFilterActive, selectSettingsNotificationsShows, } from 'flavours/glitch/selectors/settings'; -import type { AppDispatch } from 'flavours/glitch/store'; +import type { AppDispatch, RootState } from 'flavours/glitch/store'; import { createAppAsyncThunk, createDataLoadingThunk, @@ -32,6 +32,14 @@ function excludeAllTypesExcept(filter: string) { return allNotificationTypes.filter((item) => item !== filter); } +function getExcludedTypes(state: RootState) { + const activeFilter = selectSettingsNotificationsQuickFilterActive(state); + + return activeFilter === 'all' + ? selectSettingsNotificationsExcludedTypes(state) + : excludeAllTypesExcept(activeFilter); +} + function dispatchAssociatedRecords( dispatch: AppDispatch, notifications: ApiNotificationGroupJSON[] | ApiNotificationJSON[], @@ -62,17 +70,8 @@ function dispatchAssociatedRecords( export const fetchNotifications = createDataLoadingThunk( 'notificationGroups/fetch', - async (_params, { getState }) => { - const activeFilter = - selectSettingsNotificationsQuickFilterActive(getState()); - - return apiFetchNotifications({ - exclude_types: - activeFilter === 'all' - ? selectSettingsNotificationsExcludedTypes(getState()) - : excludeAllTypesExcept(activeFilter), - }); - }, + async (_params, { getState }) => + apiFetchNotifications({ exclude_types: getExcludedTypes(getState()) }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -92,9 +91,11 @@ export const fetchNotifications = createDataLoadingThunk( export const fetchNotificationsGap = createDataLoadingThunk( 'notificationGroups/fetchGap', - async (params: { gap: NotificationGap }) => - apiFetchNotifications({ max_id: params.gap.maxId }), - + async (params: { gap: NotificationGap }, { getState }) => + apiFetchNotifications({ + max_id: params.gap.maxId, + exclude_types: getExcludedTypes(getState()), + }), ({ notifications, accounts, statuses }, { dispatch }) => { dispatch(importFetchedAccounts(accounts)); dispatch(importFetchedStatuses(statuses)); @@ -109,6 +110,7 @@ export const pollRecentNotifications = createDataLoadingThunk( async (_params, { getState }) => { return apiFetchNotifications({ max_id: undefined, + exclude_types: getExcludedTypes(getState()), // In slow mode, we don't want to include notifications that duplicate the already-displayed ones since_id: usePendingItems ? getState().notificationGroups.groups.find( @@ -183,7 +185,6 @@ export const setNotificationsFilter = createAppAsyncThunk( path: ['notifications', 'quickFilter', 'active'], value: filterType, }); - // dispatch(expandNotifications({ forceLoad: true })); void dispatch(fetchNotifications()); dispatch(saveSettings()); }, From 1fb31ad9b1be6d7c629300657d773b803c943ff1 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 15:43:08 +0200 Subject: [PATCH 26/47] [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 fc2d3149b3006f..3ab87291637286 100644 --- a/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx +++ b/app/javascript/flavours/glitch/features/notifications_v2/components/notification_admin_report.tsx @@ -42,19 +42,11 @@ export const NotificationAdminReport: React.FC<{ if (!account || !targetAccount) return null; + const domain = account.acct.split('@')[1]; + const values = { - name: ( - - ), - target: ( - - ), + name: {domain ?? `@${account.acct}`}, + target: @{targetAccount.acct}, category: intl.formatMessage(messages[report.category]), count: report.status_ids.length, }; From cb1eaa10f21ae0524a0ea909c6271be2621dfade Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 4 Sep 2024 20:07:23 +0200 Subject: [PATCH 27/47] 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 f882e4ccc59406..2551060fa99323 100644 --- a/spec/requests/api/v1/timelines/direct_spec.rb +++ b/spec/requests/api/v1/timelines/direct_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Direct Timeline' do +RSpec.describe 'API V1 Direct Timeline' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } From 4678473e54de33200919ad39f08162aed9350e8a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 15:50:33 -0400 Subject: [PATCH 28/47] Add `AnnualReport::Source#report_statuses` method for subclasses to use (#31753) --- app/lib/annual_report/archetype.rb | 12 ++++-------- .../commonly_interacted_with_accounts.rb | 2 +- app/lib/annual_report/most_reblogged_accounts.rb | 2 +- app/lib/annual_report/most_used_apps.rb | 2 +- app/lib/annual_report/percentiles.rb | 2 +- app/lib/annual_report/source.rb | 7 +++++++ app/lib/annual_report/time_series.rb | 2 +- app/lib/annual_report/top_hashtags.rb | 2 +- app/lib/annual_report/top_statuses.rb | 2 +- app/lib/annual_report/type_distribution.rb | 14 ++++---------- 10 files changed, 22 insertions(+), 25 deletions(-) diff --git a/app/lib/annual_report/archetype.rb b/app/lib/annual_report/archetype.rb index ea9ef366df7e09..c02b28dfda239f 100644 --- a/app/lib/annual_report/archetype.rb +++ b/app/lib/annual_report/archetype.rb @@ -28,22 +28,18 @@ def archetype end def polls_count - @polls_count ||= base_scope.where.not(poll_id: nil).count + @polls_count ||= report_statuses.where.not(poll_id: nil).count end def reblogs_count - @reblogs_count ||= base_scope.where.not(reblog_of_id: nil).count + @reblogs_count ||= report_statuses.where.not(reblog_of_id: nil).count end def replies_count - @replies_count ||= base_scope.where.not(in_reply_to_id: nil).where.not(in_reply_to_account_id: @account.id).count + @replies_count ||= report_statuses.where.not(in_reply_to_id: nil).where.not(in_reply_to_account_id: @account.id).count end def standalone_count - @standalone_count ||= base_scope.without_replies.without_reblogs.count - end - - def base_scope - @account.statuses.where(id: year_as_snowflake_range) + @standalone_count ||= report_statuses.without_replies.without_reblogs.count end end diff --git a/app/lib/annual_report/commonly_interacted_with_accounts.rb b/app/lib/annual_report/commonly_interacted_with_accounts.rb index af5e854c222f78..e7482f0d52a792 100644 --- a/app/lib/annual_report/commonly_interacted_with_accounts.rb +++ b/app/lib/annual_report/commonly_interacted_with_accounts.rb @@ -17,6 +17,6 @@ def generate private def commonly_interacted_with_accounts - @account.statuses.reorder(nil).where(id: year_as_snowflake_range).where.not(in_reply_to_account_id: @account.id).group(:in_reply_to_account_id).having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('in_reply_to_account_id, count(*) AS total')) + report_statuses.where.not(in_reply_to_account_id: @account.id).group(:in_reply_to_account_id).having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('in_reply_to_account_id, count(*) AS total')) end end diff --git a/app/lib/annual_report/most_reblogged_accounts.rb b/app/lib/annual_report/most_reblogged_accounts.rb index e3e8a7c90b1246..39ed3868ea06ad 100644 --- a/app/lib/annual_report/most_reblogged_accounts.rb +++ b/app/lib/annual_report/most_reblogged_accounts.rb @@ -17,6 +17,6 @@ def generate private def most_reblogged_accounts - @account.statuses.reorder(nil).where(id: year_as_snowflake_range).where.not(reblog_of_id: nil).joins(reblog: :account).group('accounts.id').having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('accounts.id, count(*) as total')) + report_statuses.where.not(reblog_of_id: nil).joins(reblog: :account).group('accounts.id').having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('accounts.id, count(*) as total')) end end diff --git a/app/lib/annual_report/most_used_apps.rb b/app/lib/annual_report/most_used_apps.rb index 85ff1ff86e10c2..fb1ca1d16705c6 100644 --- a/app/lib/annual_report/most_used_apps.rb +++ b/app/lib/annual_report/most_used_apps.rb @@ -17,6 +17,6 @@ def generate private def most_used_apps - @account.statuses.reorder(nil).where(id: year_as_snowflake_range).joins(:application).group('oauth_applications.name').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('oauth_applications.name, count(*) as total')) + report_statuses.joins(:application).group('oauth_applications.name').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('oauth_applications.name, count(*) as total')) end end diff --git a/app/lib/annual_report/percentiles.rb b/app/lib/annual_report/percentiles.rb index 9fe4698ee5df52..0251cb66ad27e9 100644 --- a/app/lib/annual_report/percentiles.rb +++ b/app/lib/annual_report/percentiles.rb @@ -17,7 +17,7 @@ def followers_gained end def statuses_created - @statuses_created ||= @account.statuses.where(id: year_as_snowflake_range).count + @statuses_created ||= report_statuses.count end def total_with_fewer_followers diff --git a/app/lib/annual_report/source.rb b/app/lib/annual_report/source.rb index d56a1fcccf697f..cb9f7b16e32a10 100644 --- a/app/lib/annual_report/source.rb +++ b/app/lib/annual_report/source.rb @@ -10,6 +10,13 @@ def initialize(account, year) protected + def report_statuses + @account + .statuses + .where(id: year_as_snowflake_range) + .reorder(nil) + end + def year_as_snowflake_range (beginning_snowflake_id..ending_snowflake_id) end diff --git a/app/lib/annual_report/time_series.rb b/app/lib/annual_report/time_series.rb index a144bac0d1587a..65a188eda7b299 100644 --- a/app/lib/annual_report/time_series.rb +++ b/app/lib/annual_report/time_series.rb @@ -17,7 +17,7 @@ def generate private def statuses_per_month - @statuses_per_month ||= @account.statuses.reorder(nil).where(id: year_as_snowflake_range).group(:period).pluck(Arel.sql("date_part('month', created_at)::int AS period, count(*)")).to_h + @statuses_per_month ||= report_statuses.group(:period).pluck(Arel.sql("date_part('month', created_at)::int AS period, count(*)")).to_h end def following_per_month diff --git a/app/lib/annual_report/top_hashtags.rb b/app/lib/annual_report/top_hashtags.rb index 488dacb1b45b2c..32bd10d6989b48 100644 --- a/app/lib/annual_report/top_hashtags.rb +++ b/app/lib/annual_report/top_hashtags.rb @@ -17,6 +17,6 @@ def generate private def top_hashtags - Tag.joins(:statuses).where(statuses: { id: @account.statuses.where(id: year_as_snowflake_range).reorder(nil).select(:id) }).group(:id).having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('COALESCE(tags.display_name, tags.name), count(*) AS total')) + Tag.joins(:statuses).where(statuses: { id: report_statuses.select(:id) }).group(:id).having('count(*) > 1').order(total: :desc).limit(SET_SIZE).pluck(Arel.sql('COALESCE(tags.display_name, tags.name), count(*) AS total')) end end diff --git a/app/lib/annual_report/top_statuses.rb b/app/lib/annual_report/top_statuses.rb index 1ab1709523b7de..c5abeaa58d81d2 100644 --- a/app/lib/annual_report/top_statuses.rb +++ b/app/lib/annual_report/top_statuses.rb @@ -16,6 +16,6 @@ def generate end def base_scope - @account.statuses.public_visibility.joins(:status_stat).where(id: year_as_snowflake_range).reorder(nil) + report_statuses.public_visibility.joins(:status_stat) end end diff --git a/app/lib/annual_report/type_distribution.rb b/app/lib/annual_report/type_distribution.rb index fc12a6f1f4b665..fe38d8a8a2d254 100644 --- a/app/lib/annual_report/type_distribution.rb +++ b/app/lib/annual_report/type_distribution.rb @@ -4,17 +4,11 @@ class AnnualReport::TypeDistribution < AnnualReport::Source def generate { type_distribution: { - total: base_scope.count, - reblogs: base_scope.where.not(reblog_of_id: nil).count, - replies: base_scope.where.not(in_reply_to_id: nil).where.not(in_reply_to_account_id: @account.id).count, - standalone: base_scope.without_replies.without_reblogs.count, + total: report_statuses.count, + reblogs: report_statuses.where.not(reblog_of_id: nil).count, + replies: report_statuses.where.not(in_reply_to_id: nil).where.not(in_reply_to_account_id: @account.id).count, + standalone: report_statuses.without_replies.without_reblogs.count, }, } end - - private - - def base_scope - @account.statuses.where(id: year_as_snowflake_range) - end end From 4d5c91e99a3897addd737b12b8b6e3baded6d2d9 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 4 Sep 2024 15:51:40 -0400 Subject: [PATCH 29/47] Remove `before` block in spec with TODOs which have been TO-DONE already (#31754) --- spec/requests/instance_actor_spec.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/requests/instance_actor_spec.rb b/spec/requests/instance_actor_spec.rb index 7e4784203f0cd3..bb294b04a44133 100644 --- a/spec/requests/instance_actor_spec.rb +++ b/spec/requests/instance_actor_spec.rb @@ -4,11 +4,6 @@ RSpec.describe 'Instance actor endpoint' do describe 'GET /actor' do - before do - integration_session.https! # TODO: Move to global rails_helper for all request specs? - host! Rails.configuration.x.local_domain # TODO: Move to global rails_helper for all request specs? - end - let!(:original_federation_mode) { Rails.configuration.x.limited_federation_mode } shared_examples 'instance actor endpoint' do From 7d91723f052f42a2b5fed365b007767e5717a9bb Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Thu, 5 Sep 2024 11:26:49 +0200 Subject: [PATCH 30/47] Support `REDIS_SENTINEL_PORT` variables (#31767) --- lib/mastodon/redis_configuration.rb | 23 ++++++------ spec/lib/mastodon/redis_configuration_spec.rb | 36 ++++++++++++++++--- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/lib/mastodon/redis_configuration.rb b/lib/mastodon/redis_configuration.rb index 9139d87583e33f..5a096a1bf2210f 100644 --- a/lib/mastodon/redis_configuration.rb +++ b/lib/mastodon/redis_configuration.rb @@ -57,17 +57,20 @@ def cache_namespace def setup_config(prefix: nil, defaults: {}) prefix = "#{prefix}REDIS_" - 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)) + 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) + sentinel_port = ENV.fetch("#{prefix}SENTINEL_PORT", 26_379) + sentinel_list = ENV.fetch("#{prefix}SENTINELS", nil) return { url:, driver: } if url + sentinels = parse_sentinels(sentinel_list, default_port: sentinel_port) + if name.present? && sentinels.present? host = name port = nil @@ -96,10 +99,10 @@ def construct_uri(host, port, db, user, password) end.normalize.to_str end - def parse_sentinels(sentinels_string) + def parse_sentinels(sentinels_string, default_port: 26_379) (sentinels_string || '').split(',').map do |sentinel| host, port = sentinel.split(':') - port = port.present? ? port.to_i : 26_379 + port = (port || default_port).to_i { host: host, port: port } end.presence end diff --git a/spec/lib/mastodon/redis_configuration_spec.rb b/spec/lib/mastodon/redis_configuration_spec.rb index a48ffc80e6c743..d14adf95182dc9 100644 --- a/spec/lib/mastodon/redis_configuration_spec.rb +++ b/spec/lib/mastodon/redis_configuration_spec.rb @@ -107,14 +107,40 @@ 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 + context "when no default port is given via `#{prefix}REDIS_SENTINEL_PORT`" 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 - 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 }) + context 'when adding port numbers to some, but not all sentinels' do + around do |example| + ClimateControl.modify "#{prefix}REDIS_SENTINELS": '192.168.0.1:5678,192.168.0.2', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'uses the given port number when available and the default otherwise' do + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 5678 }, { host: '192.168.0.2', port: 26_379 }) + end + end + + context "when a default port is given via `#{prefix}REDIS_SENTINEL_PORT`" do + around do |example| + ClimateControl.modify "#{prefix}REDIS_SENTINEL_PORT": '1234', "#{prefix}REDIS_SENTINELS": '192.168.0.1,192.168.0.2', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do + example.run + end + end + + it 'uses the given port number' do + expect(subject[:sentinels]).to contain_exactly({ host: '192.168.0.1', port: 1234 }, { host: '192.168.0.2', port: 1234 }) + end end end end From ec4c49082edb5f4941bd4e129900628c6b30101e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 5 Sep 2024 11:39:59 +0200 Subject: [PATCH 31/47] Change design of unread conversations in web UI (#31763) --- .../components/conversation.jsx | 2 +- .../styles/mastodon/components.scss | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx index 6588c8b763aee6..0d154db1e16d8e 100644 --- a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx +++ b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx @@ -170,7 +170,7 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown }) return ( -
+
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index c1e5075702dc1c..d892c008bc23b6 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -8522,22 +8522,6 @@ noscript { word-break: break-word; } } - - &--unread { - background: lighten($ui-base-color, 2%); - - &:focus { - background: lighten($ui-base-color, 4%); - } - - .conversation__content__info { - font-weight: 700; - } - - .conversation__content__relative-time { - color: $primary-text-color; - } - } } .announcements { @@ -8732,7 +8716,8 @@ noscript { } .notification, -.status__wrapper { +.status__wrapper, +.conversation { position: relative; &.unread { From eb23d9f0f6d8415551e31d264418de733f71d83d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:40:38 +0000 Subject: [PATCH 32/47] New Crowdin Translations (automated) (#31765) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/ar.json | 22 ++- app/javascript/mastodon/locales/fr-CA.json | 1 + app/javascript/mastodon/locales/fr.json | 1 + app/javascript/mastodon/locales/pt-PT.json | 78 ++++----- config/locales/activerecord.pt-PT.yml | 10 +- config/locales/ar.yml | 23 ++- config/locales/devise.pt-PT.yml | 106 ++++++------- config/locales/doorkeeper.pt-PT.yml | 72 ++++----- config/locales/gl.yml | 4 +- config/locales/pt-PT.yml | 175 +++++++++++---------- config/locales/simple_form.ar.yml | 2 +- config/locales/simple_form.pt-PT.yml | 24 +-- 12 files changed, 272 insertions(+), 246 deletions(-) diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json index c1cb734a6301ec..d83a42a6c7620e 100644 --- a/app/javascript/mastodon/locales/ar.json +++ b/app/javascript/mastodon/locales/ar.json @@ -95,6 +95,8 @@ "block_modal.title": "أتريد حظر هذا المستخدم؟", "block_modal.you_wont_see_mentions": "لن تر المنشورات التي يُشار فيهم إليه.", "boost_modal.combo": "يُمكنك الضّغط على {combo} لتخطي هذا في المرة المُقبلة", + "boost_modal.reblog": "أتريد إعادة نشر المنشور؟", + "boost_modal.undo_reblog": "أتريد إلغاء إعادة نشر المنشور؟", "bundle_column_error.copy_stacktrace": "انسخ تقرير الخطأ", "bundle_column_error.error.body": "لا يمكن تقديم الصفحة المطلوبة. قد يكون بسبب خطأ في التعليمات البرمجية، أو مشكلة توافق المتصفح.", "bundle_column_error.error.title": "أوه لا!", @@ -230,7 +232,7 @@ "domain_pill.who_they_are": "بما أن المعرفات تقول من هو الشخص ومكان وجوده، يمكنك التفاعل مع الناس عبر الويب الاجتماعي لل .", "domain_pill.who_you_are": "بما أن معرفك يقول من أنت ومكان وجوده، يمكن للناس التفاعل معك عبر الويب الاجتماعي لل .", "domain_pill.your_handle": "عنوانك الكامل:", - "domain_pill.your_server": "منزلك الرقمي، حيث تعيش جميع مشاركاتك. لا تحب هذا؟ إنقل الخوادم في أي وقت واخضر متابعينك أيضًا.", + "domain_pill.your_server": "موطِنك الرقمي، حيث توجد فيه كافة منشوراتك. ألا يعجبك المكان؟ يمكنك الانتقال بين الخوادم في أي وقت واصطحاب متابعيك أيضاً.", "domain_pill.your_username": "معرفك الفريد على هذا الخادم. من الممكن العثور على مستخدمين بنفس إسم المستخدم على خوادم مختلفة.", "embed.instructions": "يمكنكم إدماج هذا المنشور على موقعكم الإلكتروني عن طريق نسخ الشفرة أدناه.", "embed.preview": "إليك ما سيبدو عليه:", @@ -290,7 +292,7 @@ "filter_modal.added.review_and_configure": "لمراجعة وزيادة تكوين فئة عوامل التصفية هذه، انتقل إلى {settings_link}.", "filter_modal.added.review_and_configure_title": "إعدادات التصفية", "filter_modal.added.settings_link": "صفحة الإعدادات", - "filter_modal.added.short_explanation": "تمت إضافة هذه المشاركة إلى فئة الفلاتر التالية: {title}.", + "filter_modal.added.short_explanation": "تمت إضافة هذا المنشور إلى فئة عوامل التصفية التالية: {title}.", "filter_modal.added.title": "تمت إضافة عامل التصفية!", "filter_modal.select_filter.context_mismatch": "لا ينطبق على هذا السياق", "filter_modal.select_filter.expired": "منتهية الصلاحيّة", @@ -348,6 +350,9 @@ "hashtag.follow": "اتبع الوسم", "hashtag.unfollow": "ألغِ متابعة الوسم", "hashtags.and_other": "…و {count, plural, zero {} one {# واحد آخر} two {# اثنان آخران} few {# آخرون} many {# آخَرًا}other {# آخرون}}", + "hints.profiles.see_more_followers": "عرض المزيد من المتابعين على {domain}", + "hints.profiles.see_more_posts": "عرض المزيد من المنشورات من {domain}", + "hints.threads.see_more": "اطلع على المزيد من الردود على {domain}", "home.column_settings.show_reblogs": "اعرض المعاد نشرها", "home.column_settings.show_replies": "اعرض الردود", "home.hide_announcements": "إخفاء الإعلانات", @@ -356,8 +361,10 @@ "home.pending_critical_update.title": "تحديث أمان حرج متوفر!", "home.show_announcements": "إظهار الإعلانات", "ignore_notifications_modal.disclaimer": "لا يمكن لـ Mastodon إبلاغ المستخدمين بأنك قد تجاهلت إشعاراتهم. تجاهل الإشعارات لن يمنع إرسال الرسائل نفسها.", + "ignore_notifications_modal.filter_instead": "تصفيتها بدلا من ذلك", "ignore_notifications_modal.ignore": "تجاهل الإشعارات", "ignore_notifications_modal.limited_accounts_title": "تجاهل الإشعارات من الحسابات التي هي تحت الإشراف؟", + "ignore_notifications_modal.new_accounts_title": "تجاهل الإشعارات الصادرة من الحسابات الجديدة؟", "interaction_modal.description.favourite": "بفضل حساب على ماستدون، يمكنك إضافة هذا المنشور إلى مفضلتك لإبلاغ الناشر عن تقديرك وكذا للاحتفاظ بالمنشور إلى وقت لاحق.", "interaction_modal.description.follow": "بفضل حساب في ماستدون، يمكنك متابعة {name} وتلقي منشوراته في موجزات خيطك الرئيس.", "interaction_modal.description.reblog": "مع حساب في ماستدون، يمكنك تعزيز هذا المنشور ومشاركته مع مُتابِعيك.", @@ -447,6 +454,7 @@ "mute_modal.you_wont_see_mentions": "لن تر المنشورات التي يُشار فيها إليه.", "mute_modal.you_wont_see_posts": "سيكون بإمكانه رؤية منشوراتك، لكنك لن ترى منشوراته.", "navigation_bar.about": "عن", + "navigation_bar.administration": "الإدارة", "navigation_bar.advanced_interface": "افتحه في واجهة الويب المتقدمة", "navigation_bar.blocks": "الحسابات المحجوبة", "navigation_bar.bookmarks": "الفواصل المرجعية", @@ -463,6 +471,7 @@ "navigation_bar.follows_and_followers": "المتابِعون والمتابَعون", "navigation_bar.lists": "القوائم", "navigation_bar.logout": "خروج", + "navigation_bar.moderation": "الإشراف", "navigation_bar.mutes": "الحسابات المكتومة", "navigation_bar.opened_in_classic_interface": "تُفتَح المنشورات والحسابات وغيرها من الصفحات الخاصة بشكل مبدئي على واجهة الويب التقليدية.", "navigation_bar.personal": "شخصي", @@ -484,7 +493,7 @@ "notification.mention": "إشارة", "notification.moderation-warning.learn_more": "اعرف المزيد", "notification.moderation_warning": "لقد تلقيت تحذيرًا بالإشراف", - "notification.moderation_warning.action_delete_statuses": "تم إزالة بعض مشاركاتك.", + "notification.moderation_warning.action_delete_statuses": "تم حذف بعض من منشوراتك.", "notification.moderation_warning.action_disable": "تم تعطيل حسابك.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "بعض من منشوراتك تم تصنيفها على أنها حساسة.", "notification.moderation_warning.action_none": "لقد تلقى حسابك تحذيرا بالإشراف.", @@ -502,12 +511,15 @@ "notification.status": "{name} نشر للتو", "notification.update": "عدّلَ {name} منشورًا", "notification_requests.accept": "موافقة", + "notification_requests.confirm_accept_multiple.title": "قبول طلبات الإشعار؟", + "notification_requests.confirm_dismiss_multiple.title": "تجاهل طلبات الإشعار؟", "notification_requests.dismiss": "تخطي", "notification_requests.edit_selection": "تعديل", "notification_requests.exit_selection": "تمّ", "notification_requests.explainer_for_limited_account": "تم تصفية الإشعارات من هذا الحساب لأن الحساب تم تقييده من قبل مشرف.", "notification_requests.notifications_from": "إشعارات من {name}", "notification_requests.title": "الإشعارات المصفاة", + "notification_requests.view": "عرض الإشعارات", "notifications.clear": "مسح الإشعارات", "notifications.clear_confirmation": "متأكد من أنك تود مسح جميع الإشعارات الخاصة بك و المتلقاة إلى حد الآن ؟", "notifications.clear_title": "أترغب في مسح الإشعارات؟", @@ -520,7 +532,7 @@ "notifications.column_settings.filter_bar.advanced": "عرض جميع الفئات", "notifications.column_settings.filter_bar.category": "شريط التصفية السريعة", "notifications.column_settings.follow": "متابعُون جُدُد:", - "notifications.column_settings.follow_request": "الطلبات الجديد لِمتابَعتك:", + "notifications.column_settings.follow_request": "الطلبات الجديدة لِمتابَعتك:", "notifications.column_settings.mention": "الإشارات:", "notifications.column_settings.poll": "نتائج استطلاع الرأي:", "notifications.column_settings.push": "الإشعارات", @@ -747,7 +759,7 @@ "status.history.edited": "عدله {name} {date}", "status.load_more": "حمّل المزيد", "status.media.open": "اضغط للفتح", - "status.media.show": "اضغط للإظهار", + "status.media.show": "اضغط لإظهاره", "status.media_hidden": "وسائط مخفية", "status.mention": "أذكُر @{name}", "status.more": "المزيد", diff --git a/app/javascript/mastodon/locales/fr-CA.json b/app/javascript/mastodon/locales/fr-CA.json index 983f737a797b50..a1d4061ebab448 100644 --- a/app/javascript/mastodon/locales/fr-CA.json +++ b/app/javascript/mastodon/locales/fr-CA.json @@ -356,6 +356,7 @@ "hints.profiles.follows_may_be_missing": "Les abonnements pour ce profil peuvent être manquants.", "hints.profiles.posts_may_be_missing": "Certains messages de ce profil peuvent être manquants.", "hints.profiles.see_more_followers": "Afficher plus d'abonné·e·s sur {domain}", + "hints.profiles.see_more_follows": "Afficher plus d'abonné·e·s sur {domain}", "hints.profiles.see_more_posts": "Voir plus de messages sur {domain}", "hints.threads.replies_may_be_missing": "Les réponses provenant des autres serveurs pourraient être manquantes.", "hints.threads.see_more": "Afficher plus de réponses sur {domain}", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 2b22f4ba32b353..9f55634b290845 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -356,6 +356,7 @@ "hints.profiles.follows_may_be_missing": "Les abonnements pour ce profil peuvent être manquants.", "hints.profiles.posts_may_be_missing": "Certains messages de ce profil peuvent être manquants.", "hints.profiles.see_more_followers": "Afficher plus d'abonné·e·s sur {domain}", + "hints.profiles.see_more_follows": "Afficher plus d'abonné·e·s sur {domain}", "hints.profiles.see_more_posts": "Voir plus de messages sur {domain}", "hints.threads.replies_may_be_missing": "Les réponses provenant des autres serveurs pourraient être manquantes.", "hints.threads.see_more": "Afficher plus de réponses sur {domain}", diff --git a/app/javascript/mastodon/locales/pt-PT.json b/app/javascript/mastodon/locales/pt-PT.json index c5d84b9ac6f092..2d0013d607ba0e 100644 --- a/app/javascript/mastodon/locales/pt-PT.json +++ b/app/javascript/mastodon/locales/pt-PT.json @@ -43,7 +43,7 @@ "account.in_memoriam": "Em Memória.", "account.joined_short": "Juntou-se a", "account.languages": "Alterar línguas subscritas", - "account.link_verified_on": "A posse desta ligação foi verificada em {date}", + "account.link_verified_on": "O proprietário desta hiperligação foi verificado em {date}", "account.locked_info": "Esta conta é privada. O proprietário revê manualmente quem o pode seguir.", "account.media": "Média", "account.mention": "Mencionar @{name}", @@ -154,15 +154,15 @@ "compose_form.lock_disclaimer": "A sua conta não é {locked}. Qualquer pessoa pode segui-lo e ver as publicações direcionadas apenas a seguidores.", "compose_form.lock_disclaimer.lock": "fechada", "compose_form.placeholder": "Em que está a pensar?", - "compose_form.poll.duration": "Duração do inquérito", + "compose_form.poll.duration": "Duração da sondagem", "compose_form.poll.multiple": "Escolha múltipla", "compose_form.poll.option_placeholder": "Opção {number}", "compose_form.poll.single": "Escolha uma", - "compose_form.poll.switch_to_multiple": "Alterar o inquérito para permitir várias respostas", - "compose_form.poll.switch_to_single": "Alterar o inquérito para permitir uma única resposta", + "compose_form.poll.switch_to_multiple": "Alterar a sondagem para permitir várias respostas", + "compose_form.poll.switch_to_single": "Alterar a sondagem para permitir uma única resposta", "compose_form.poll.type": "Estilo", "compose_form.publish": "Publicar", - "compose_form.publish_form": "Publicar", + "compose_form.publish_form": "Nova publicação", "compose_form.reply": "Responder", "compose_form.save_changes": "Atualizar", "compose_form.spoiler.marked": "Texto escondido atrás de aviso", @@ -189,7 +189,7 @@ "confirmations.redraft.message": "Tem a certeza de que quer eliminar e reescrever esta publicação? Os favoritos e partilhas perder-se-ão e as respostas à publicação original ficarão órfãs.", "confirmations.redraft.title": "Eliminar e reescrever publicação?", "confirmations.reply.confirm": "Responder", - "confirmations.reply.message": "Responder agora irá reescrever a mensagem que está a compor actualmente. Tem a certeza que quer continuar?", + "confirmations.reply.message": "Se responder agora, a mensagem que está a escrever será substituída. Tem a certeza que pretende continuar?", "confirmations.reply.title": "Sobrescrever publicação?", "confirmations.unfollow.confirm": "Deixar de seguir", "confirmations.unfollow.message": "De certeza que queres deixar de seguir {name}?", @@ -206,14 +206,14 @@ "directory.federated": "Do fediverso conhecido", "directory.local": "Apenas de {domain}", "directory.new_arrivals": "Recém chegados", - "directory.recently_active": "Com actividade recente", + "directory.recently_active": "Recentemente ativo", "disabled_account_banner.account_settings": "Definições da conta", "disabled_account_banner.text": "A sua conta {disabledAccount} está presentemente desativada.", "dismissable_banner.community_timeline": "Estas são as publicações públicas mais recentes de pessoas cujas contas são hospedadas por {domain}.", "dismissable_banner.dismiss": "Descartar", "dismissable_banner.explore_links": "Essas histórias de notícias estão, no momento, a ser faladas por pessoas neste e noutros servidores da rede descentralizada.", "dismissable_banner.explore_statuses": "Estas são publicações de toda a rede social que estão a ganhar popularidade atualmente. As mensagens mais recentes com mais partilhas e favoritos obtêm uma classificação mais elevada.", - "dismissable_banner.explore_tags": "Estas #etiquetas estão presentemente a ganhar atenção entre as pessoas neste e noutros servidores da rede descentralizada.", + "dismissable_banner.explore_tags": "Estas são hashtags que estão a ganhar força na rede social atualmente. As hashtags que são utilizadas por mais pessoas diferentes têm uma classificação mais elevada.", "dismissable_banner.public_timeline": "Estas são as publicações públicas mais recentes de pessoas na rede social que as pessoas em {domain} seguem.", "domain_block_modal.block": "Bloquear servidor", "domain_block_modal.block_account_instead": "Bloquear @{name} em alternativa", @@ -238,7 +238,7 @@ "domain_pill.your_username": "O seu identificador único neste servidor. É possível encontrar utilizadores com o mesmo nome de utilizador em diferentes servidores.", "embed.instructions": "Incorpore esta publicação no seu site copiando o código abaixo.", "embed.preview": "Podes ver aqui como irá ficar:", - "emoji_button.activity": "Actividade", + "emoji_button.activity": "Atividade", "emoji_button.clear": "Limpar", "emoji_button.custom": "Personalizar", "emoji_button.flags": "Bandeiras", @@ -246,7 +246,7 @@ "emoji_button.label": "Inserir Emoji", "emoji_button.nature": "Natureza", "emoji_button.not_found": "Nenhum emoji correspondente encontrado", - "emoji_button.objects": "Objectos", + "emoji_button.objects": "Objetos", "emoji_button.people": "Pessoas", "emoji_button.recent": "Utilizados regularmente", "emoji_button.search": "Pesquisar...", @@ -258,24 +258,24 @@ "empty_column.account_timeline": "Sem publicações por aqui!", "empty_column.account_unavailable": "Perfil indisponível", "empty_column.blocks": "Ainda não bloqueaste qualquer utilizador.", - "empty_column.bookmarked_statuses": "Ainda não adicionou nenhuma publicação aos itens salvos. Quando adicionar, eles serão exibidos aqui.", + "empty_column.bookmarked_statuses": "Ainda não tem nenhuma publicação marcada. Quando marcar uma, ela aparecerá aqui.", "empty_column.community": "A cronologia local está vazia. Escreve algo público para começar!", "empty_column.direct": "Ainda não tem qualquer menção privada. Quando enviar ou receber uma, ela irá aparecer aqui.", "empty_column.domain_blocks": "Ainda não há qualquer domínio escondido.", - "empty_column.explore_statuses": "Nada está em alta no momento. Volte mais tarde!", + "empty_column.explore_statuses": "Nada é tendência neste momento. Volte mais tarde!", "empty_column.favourited_statuses": "Ainda não assinalou qualquer publicação como favorita. Quando o fizer, aparecerá aqui.", "empty_column.favourites": "Ainda ninguém assinalou esta publicação como favorita. Quando alguém o fizer, aparecerá aqui.", "empty_column.follow_requests": "Ainda não tens nenhum pedido de seguidor. Quando receberes algum, ele irá aparecer aqui.", "empty_column.followed_tags": "Ainda não segue nenhuma hashtag. Quando o fizer, ela aparecerá aqui.", "empty_column.hashtag": "Não foram encontradas publicações com essa #etiqueta.", - "empty_column.home": "Ainda não segues qualquer utilizador. Visita {public} ou utiliza a pesquisa para procurar outros utilizadores.", + "empty_column.home": "A sua linha cronológica inicial está vazia! Siga mais pessoas para a preencher.", "empty_column.list": "Ainda não existem publicações nesta lista. Quando membros desta lista fizerem novas publicações, elas aparecerão aqui.", "empty_column.lists": "Ainda não tem qualquer lista. Quando criar uma, ela irá aparecer aqui.", "empty_column.mutes": "Ainda não silenciaste qualquer utilizador.", "empty_column.notification_requests": "Tudo limpo! Não há nada aqui. Quando você receber novas notificações, elas aparecerão aqui conforme as suas configurações.", "empty_column.notifications": "Não tens notificações. Interage com outros utilizadores para iniciar uma conversa.", "empty_column.public": "Não há nada aqui! Escreve algo publicamente ou segue outros utilizadores para veres aqui os conteúdos públicos", - "error.unexpected_crash.explanation": "Devido a um erro no nosso código ou a uma compatilidade com o seu navegador, esta página não pôde ser apresentada correctamente.", + "error.unexpected_crash.explanation": "Devido a um erro no nosso código ou a um problema de compatibilidade do navegador, esta página não pôde ser apresentada corretamente.", "error.unexpected_crash.explanation_addons": "Esta página não pôde ser exibida corretamente. Este erro provavelmente é causado por um complemento do navegador ou ferramentas de tradução automática.", "error.unexpected_crash.next_steps": "Tente atualizar a página. Se isso não ajudar, pode usar o Mastodon através de um navegador diferente ou uma aplicação nativa.", "error.unexpected_crash.next_steps_addons": "Tente desabilitá-los e atualizar a página. Se isso não ajudar, você ainda poderá usar o Mastodon por meio de um navegador diferente ou de um aplicativo nativo.", @@ -355,10 +355,10 @@ "hashtags.and_other": "…e {count, plural, other {mais #}}", "hints.profiles.followers_may_be_missing": "Podem faltar seguidores neste perfil.", "hints.profiles.follows_may_be_missing": "O número de perfis seguidos por este perfil pode faltar.", - "hints.profiles.posts_may_be_missing": "Podem faltar alguns posts deste perfil.", + "hints.profiles.posts_may_be_missing": "Podem faltar algumas publicações deste perfil.", "hints.profiles.see_more_followers": "Ver mais seguidores no {domain}", "hints.profiles.see_more_follows": "Veja mais perfis seguidos em {domain}", - "hints.profiles.see_more_posts": "Ver mais posts em {domain}", + "hints.profiles.see_more_posts": "Ver mais publicações em {domain}", "home.column_settings.show_reblogs": "Mostrar impulsos", "home.column_settings.show_replies": "Mostrar respostas", "home.hide_announcements": "Ocultar comunicações", @@ -406,7 +406,7 @@ "keyboard_shortcuts.my_profile": "para abrir o teu perfil", "keyboard_shortcuts.notifications": "para abrir a coluna das notificações", "keyboard_shortcuts.open_media": "para abrir media", - "keyboard_shortcuts.pinned": "para abrir a lista dos toots fixados", + "keyboard_shortcuts.pinned": "Abrir lista de publicações fixadas", "keyboard_shortcuts.profile": "para abrir o perfil do autor", "keyboard_shortcuts.reply": "para responder", "keyboard_shortcuts.requests": "para abrir a lista dos pedidos de seguidor", @@ -475,7 +475,7 @@ "navigation_bar.mutes": "Utilizadores silenciados", "navigation_bar.opened_in_classic_interface": "Por norma, publicações, contas, e outras páginas específicas são abertas na interface web clássica.", "navigation_bar.personal": "Pessoal", - "navigation_bar.pins": "Toots afixados", + "navigation_bar.pins": "Publicações fixadas", "navigation_bar.preferences": "Preferências", "navigation_bar.public_timeline": "Cronologia federada", "navigation_bar.search": "Pesquisar", @@ -504,8 +504,8 @@ "notification.moderation_warning.action_sensitive": "As suas publicações serão, a partir de agora, assinaladas como sensíveis.", "notification.moderation_warning.action_silence": "A sua conta foi limitada.", "notification.moderation_warning.action_suspend": "A sua conta foi suspensa.", - "notification.own_poll": "A sua votação terminou", - "notification.poll": "Uma votação em que participaste chegou ao fim", + "notification.own_poll": "A sua sondagem terminou", + "notification.poll": "Terminou uma sondagem em que votou", "notification.reblog": "{name} reforçou a tua publicação", "notification.relationships_severance_event": "Perdeu as ligações com {name}", "notification.relationships_severance_event.account_suspension": "Um administrador de {from} suspendeu {target}, o que significa que já não pode receber atualizações dele ou interagir com ele.", @@ -536,7 +536,7 @@ "notifications.column_settings.follow": "Novos seguidores:", "notifications.column_settings.follow_request": "Novos pedidos de seguidor:", "notifications.column_settings.mention": "Menções:", - "notifications.column_settings.poll": "Resultados do inquérito:", + "notifications.column_settings.poll": "Resultados da sondagem:", "notifications.column_settings.push": "Notificações Push", "notifications.column_settings.reblog": "Reforços:", "notifications.column_settings.show": "Mostrar na coluna", @@ -550,7 +550,7 @@ "notifications.filter.favourites": "Favoritos", "notifications.filter.follows": "Seguidores", "notifications.filter.mentions": "Menções", - "notifications.filter.polls": "Resultados do inquérito", + "notifications.filter.polls": "Resultados da sondagem", "notifications.filter.statuses": "Atualizações de pessoas que você segue", "notifications.grant_permission": "Conceder permissão.", "notifications.group": "{count} notificações", @@ -573,7 +573,7 @@ "notifications_permission_banner.title": "Nunca perca nada", "onboarding.action.back": "Voltar atrás", "onboarding.actions.back": "Voltar atrás", - "onboarding.actions.go_to_explore": "Veja as tendências atuais", + "onboarding.actions.go_to_explore": "Ver tendências atuais", "onboarding.actions.go_to_home": "Ir para a sua página inicial", "onboarding.compose.template": "Olá #Mastodon!", "onboarding.follows.empty": "Infelizmente, não é possível mostrar resultados neste momento. Pode tentar utilizar a pesquisa ou navegar na página \"Explorar\" para encontrar pessoas para seguir ou tentar novamente mais tarde.", @@ -599,7 +599,7 @@ "onboarding.start.title": "Conseguiu!", "onboarding.steps.follow_people.body": "Seguir pessoas interessantes é o propósito do Mastodon. ", "onboarding.steps.follow_people.title": "Personalize o seu feed", - "onboarding.steps.publish_status.body": "Diga olá ao mundo com texto, fotos, vídeos ou votos {emoji}", + "onboarding.steps.publish_status.body": "Diga olá ao mundo com texto, fotos, vídeos ou sondagens {emoji}", "onboarding.steps.publish_status.title": "Faça a sua primeira publicação", "onboarding.steps.setup_profile.body": "Promova as suas interações para ter um perfil preenchido. ", "onboarding.steps.setup_profile.title": "Personalize o seu perfil", @@ -608,19 +608,19 @@ "onboarding.tips.2fa": "Sabia? Pode proteger a sua conta ativando a autenticação em duas etapas nas configurações de conta. Funciona com qualquer aplicativo TOTP à sua escolha, sem necessitar de um número de telefone!", "onboarding.tips.accounts_from_other_servers": "Sabia? Como o Mastodon é descentralizado, alguns perfis que encontra estarão hospedados noutros servidores que não os seus. E ainda assim pode interagir com eles perfeitamente! O servidor deles está na segunda metade do nome de utilizador!", "onboarding.tips.migration": "Sabia? Se sentir que o {domain} não é um bom servidor para si, no futuro pode mudar para outro servidor Mastodon sem perder os seus seguidores. Pode até mesmo hospedar o seu próprio servidor!", - "onboarding.tips.verification": "Sabia que? Pode fazer a verificação do seu site, adicionando o link do seu perfil à primeira página do seu site, como também pode adicionar o seu site ao seu perfil? Sem taxas ou documentos!", + "onboarding.tips.verification": "Sabia que? Pode verificar a sua conta colocando uma hiperligação para o seu perfil Mastodon no seu próprio site e adicionando o site ao seu perfil. Sem taxas ou documentos!", "password_confirmation.exceeds_maxlength": "A confirmação da palavra-passe excedeu o tamanho máximo ", "password_confirmation.mismatching": "A confirmação da palavra-passe não corresponde", "picture_in_picture.restore": "Colocá-lo de volta", "poll.closed": "Fechado", - "poll.refresh": "Recarregar", + "poll.refresh": "Atualizar", "poll.reveal": "Ver resultados", "poll.total_people": "{count, plural, one {# pessoa} other {# pessoas}}", "poll.total_votes": "{count, plural, one {# voto} other {# votos}}", "poll.vote": "Votar", - "poll.voted": "Votaste nesta resposta", + "poll.voted": "Votou nesta resposta", "poll.votes": "{votes, plural, one {# voto } other {# votos}}", - "poll_button.add_poll": "Adicionar votação", + "poll_button.add_poll": "Adicionar uma sondagem", "poll_button.remove_poll": "Remover sondagem", "privacy.change": "Ajustar a privacidade da publicação", "privacy.direct.long": "Todos os mencionados na publicação", @@ -635,7 +635,7 @@ "privacy_policy.last_updated": "Última atualização em {date}", "privacy_policy.title": "Política de privacidade", "recommended": "Recomendado", - "refresh": "Actualizar", + "refresh": "Atualizar", "regeneration_indicator.label": "A carregar…", "regeneration_indicator.sublabel": "A tua página inicial está a ser preparada!", "relative_time.days": "{number}d", @@ -677,7 +677,7 @@ "report.reasons.other": "É outra coisa", "report.reasons.other_description": "O problema não se encaixa nas outras categorias", "report.reasons.spam": "É spam", - "report.reasons.spam_description": "Hiperligações maliciosas, contactos falsos, ou respostas repetitivas", + "report.reasons.spam_description": "Hiperligações maliciosas, contactos falsos ou respostas repetitivas", "report.reasons.violation": "Viola as regras do servidor", "report.reasons.violation_description": "Está ciente de que infringe regras específicas", "report.rules.subtitle": "Selecione tudo o que se aplicar", @@ -733,8 +733,8 @@ "sign_in_banner.create_account": "Criar conta", "sign_in_banner.follow_anyone": "Siga alguém no fediverso e veja tudo em ordem cronológica. Sem algoritmos, anúncios ou clickbait à vista.", "sign_in_banner.mastodon_is": "O Mastodon é a melhor maneira de acompanhar o que está a acontecer.", - "sign_in_banner.sign_in": "Iniciar Sessão", - "sign_in_banner.sso_redirect": "Inicie Sessão ou Registe-se", + "sign_in_banner.sign_in": "Iniciar sessão", + "sign_in_banner.sso_redirect": "Inicie sessão ou registe-se", "status.admin_account": "Abrir a interface de moderação para @{name}", "status.admin_domain": "Abrir interface de moderação para {domain}", "status.admin_status": "Abrir esta publicação na interface de moderação", @@ -742,7 +742,7 @@ "status.bookmark": "Guardar nos marcadores", "status.cancel_reblog_private": "Deixar de reforçar", "status.cannot_reblog": "Não é possível partilhar esta publicação", - "status.copy": "Copiar ligação para a publicação", + "status.copy": "Copiar hiperligação para a publicação", "status.delete": "Eliminar", "status.detailed_status": "Vista pormenorizada da conversa", "status.direct": "Mencionar @{name} em privado", @@ -801,15 +801,15 @@ "time_remaining.moments": "Momentos restantes", "time_remaining.seconds": "{número, plural, um {# second} outro {# seconds}} faltam", "trends.counter_by_accounts": "{count, plural, one {{counter} pessoa} other {{counter} pessoas}} {days, plural, one {no último dia} other {nos últimos {days} dias}}", - "trends.trending_now": "Em alta neste momento", + "trends.trending_now": "Tendências atuais", "ui.beforeunload": "O teu rascunho será perdido se abandonares o Mastodon.", "units.short.billion": "{count}MM", "units.short.million": "{count}M", "units.short.thousand": "{count}m", - "upload_area.title": "Arraste e solte para enviar", - "upload_button.label": "Juntar imagens, um vídeo, ou um ficheiro de som", - "upload_error.limit": "Limite máximo do ficheiro a carregar excedido.", - "upload_error.poll": "O carregamento de ficheiros não é permitido em sondagens.", + "upload_area.title": "Arrastar e largar para enviar", + "upload_button.label": "Adicionar imagens, um vídeo ou um ficheiro de som", + "upload_error.limit": "Limite de envio de ficheiros excedido.", + "upload_error.poll": "Não é permitido o envio de ficheiros em sondagens.", "upload_form.audio_description": "Descreva para pessoas com diminuição da acuidade auditiva", "upload_form.description": "Descreva para pessoas com diminuição da acuidade visual", "upload_form.edit": "Editar", @@ -820,7 +820,7 @@ "upload_modal.applying": "A aplicar…", "upload_modal.choose_image": "Escolher imagem", "upload_modal.description_placeholder": "Grave e cabisbaixo, o filho justo zelava pela querida mãe doente", - "upload_modal.detect_text": "Detectar texto na imagem", + "upload_modal.detect_text": "Detetar texto na imagem", "upload_modal.edit_media": "Editar media", "upload_modal.hint": "Clique ou arraste o círculo na pré-visualização para escolher o ponto focal que será sempre visível em todas as miniaturas.", "upload_modal.preparing_ocr": "A preparar o reconhecimento de caracteres (OCR)…", diff --git a/config/locales/activerecord.pt-PT.yml b/config/locales/activerecord.pt-PT.yml index ba738741f86776..60f3def5d325a7 100644 --- a/config/locales/activerecord.pt-PT.yml +++ b/config/locales/activerecord.pt-PT.yml @@ -6,7 +6,7 @@ pt-PT: expires_at: Prazo options: Escolhas user: - agreement: Acordo de serviço + agreement: Contrato de prestação de serviço email: Endereço de correio electrónico locale: Região password: Palavra-passe @@ -19,7 +19,7 @@ pt-PT: account: attributes: username: - invalid: apenas letras, números e underscores + invalid: deve conter apenas letras, números e traços inferiores reserved: está reservado admin/webhook: attributes: @@ -43,15 +43,15 @@ pt-PT: blocked: usa um fornecedor de e-mail que não é permitido unreachable: não parece existir role_id: - elevated: não pode ser maior que o da sua função atual + elevated: não pode ser superior à sua função atual user_role: attributes: permissions_as_keys: 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 + elevated: não pode incluir permissões que a sua função atual não possua own_role: não pode ser alterado com a sua função atual position: - elevated: não pode ser maior que o da sua função atual + elevated: não pode ser superior à sua função atual own_role: não pode ser alterado com a sua função atual webhook: attributes: diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 027d80215d18a0..7ab1b4f075f321 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -906,6 +906,7 @@ ar: moderation: title: الحالة newest: الأحدث + reset: إعادة التعيين review: حالة المراجعة search: البحث title: الوسوم @@ -985,6 +986,7 @@ ar: other: مستخدَم من قِبل %{count} شخص خلال الأسبوع الماضي two: مستخدَم من قِبل %{count} شخصين خلال الأسبوع الماضي zero: مستخدَم من قِبل %{count} شخص خلال الأسبوع الماضي + title: التوصيات والرائجة trending: المتداولة warning_presets: add_new: إضافة واحد جديد @@ -1141,8 +1143,10 @@ ar: security: الأمان set_new_password: إدخال كلمة مرور جديدة setup: + email_below_hint_html: قم بفحص مجلد البريد المزعج الخاص بك، أو قم بطلب آخر. يمكنك تصحيح عنوان بريدك الإلكتروني إن كان خاطئا. email_settings_hint_html: انقر على الرابط الذي أرسلناه لك للتحقق من %{email}. سننتظر هنا. link_not_received: ألم تحصل على رابط؟ + new_confirmation_instructions_sent: سوف تتلقى رسالة بريد إلكتروني جديدة مع رابط التأكيد في غضون بضع دقائق! title: تحقَّق من بريدك الوارِد sign_in: preamble_html: قم بتسجيل الدخول باستخدام بيانات الاعتماد الخاصة بك على %{domain}. إن استُضيف حسابك على خادم مختلف عن هذا الخادم، لن تتمكن من الولوج هنا. @@ -1153,7 +1157,9 @@ ar: title: دعنا نجهّز %{domain}. status: account_status: حالة الحساب + confirming: في انتظار اكتمال تأكيد البريد الإلكتروني. functional: حسابك يعمل بشكل كامل. + pending: إن طلبك قيد المراجعة من قبل فريقنا. قد يستغرق هذا بعض الوقت. سوف تتلقى بريدا إلكترونيا إذا تمت الموافقة على طلبك. redirecting_to: حسابك غير نشط لأنه تم تحويله حاليا إلى %{acct}. self_destruct: نظرًا لإغلاق %{domain}، ستحصل فقط على وصول محدود إلى حسابك. view_strikes: عرض العقوبات السابقة المُطَبَّقة ضد حسابك @@ -1196,6 +1202,9 @@ ar: before: 'يرجى قراءة هذه الملاحظات بتأنّي قبل المواصلة:' caches: قد يبقى المحتوى الذي تم تخزينه مؤقتًا مِن طرف الخوادم الأخرى data_removal: سوف تُحذَف منشوراتك والبيانات الأخرى نهائيا + email_change_html: بإمكانك تغيير عنوان بريدك الإلكتروني دون أن يُحذف حسابك + email_contact_html: إن لم تتلقّ أي شيء ، يمكنك مراسلة %{email} لطلب المساعدة + email_reconfirmation_html: إن لم تتلقّ الرسالة الإلكترونية للتأكيد ، بإمكانك إعادة طلبها ثانيةً irreversible: لن يكون بإمكانك استرجاع أو إعادة تنشيط حسابك more_details_html: للمزيد مِن التفاصيل ، يرجى الإطلاع على سياسة الخصوصية. username_available: سيصبح اسم مستخدمك متوفرا ثانية @@ -1448,7 +1457,7 @@ ar: two: "%{count} استخدامات" zero: "%{count} استخدامات" max_uses_prompt: بلا حدود - prompt: توليد و مشاركة روابط للسماح للآخَرين بالنفاذ إلى مثيل الخادم هذا + prompt: توليد و مشاركة روابط للسماح للآخَرين النفاذ إلى هذا الخادم table: expires_at: تنتهي مدة صلاحيتها في uses: عدد الاستخدامات @@ -1460,6 +1469,7 @@ ar: authentication_methods: otp: تطبيق المصادقة الثنائية password: كلمة المرور + sign_in_token: رمز الأمان للبريد الإلكتروني webauthn: مفاتيح الأمان description_html: إذا رأيت النشاط الذي لا تتعرف عليه، فكر في تغيير كلمة المرور الخاصة بك وتفعيل المصادقة ذات العاملين. empty: لا يوجد سجل مصادقة متاح @@ -1553,6 +1563,7 @@ ar: update: subject: قام %{name} بتحرير منشور notifications: + administration_emails: إشعارات البريد الإلكتروني الإدارية email_events_hint: 'اختر الأحداث التي تريد أن تصِلَك اشعارات عنها:' number: human: @@ -1811,13 +1822,13 @@ ar: keep_media: الاحتفاظ بالمنشورات ذات وسائط مرفقة keep_media_hint: لن تُحذف أي من منشوراتك التي تحتوي على وسائط مرفقة keep_pinned: الاحتفاظ بالمنشورات المثبتة - keep_pinned_hint: لم تقوم بحذف أي من مشاركتك المثبتة + keep_pinned_hint: لن تحذف أي من منشوراتك المثبتة keep_polls: الاحتفاظ باستطلاعات الرأي keep_polls_hint: لم تقم بحذف أي من استطلاعاتك keep_self_bookmark: احتفظ بالمنشورات التي أدرجتها في الفواصل المرجعية - keep_self_bookmark_hint: لم تقم بحذف مشاركاتك الخاصة إذا قمت بوضع علامة مرجعية عليها + keep_self_bookmark_hint: لن تحذف منشوراتك الخاصة إذا قمت بوضع علامة مرجعية عليها keep_self_fav: احتفظ بالمنشورات التي أدرجتها في المفضلة - keep_self_fav_hint: لم تقم بحذف مشاركاتك الخاصة إذا كنت قد فضلتهم + keep_self_fav_hint: لن تحذف منشوراتك الخاصة إذا كنت قد فضلتها min_age: '1209600': أسبوعان '15778476': 6 أشهر @@ -1828,9 +1839,9 @@ ar: '63113904': سنتان '7889238': 3 أشهر min_age_label: عتبة العمر - min_favs: إبقاء المشاركات المفضلة أكثر من + min_favs: إبقاء المنشورات المفضلة على الأقل min_favs_hint: لن تُحذف أي من منشوراتك التي تلقّت على الأقل هذا العدد من المفضلات. اتركه فارغاً لحذف المنشورات مهما كان عدد المفضلات التي تلقتها - min_reblogs: إبقاء المنشورات المعاد نشرها أكثر من + min_reblogs: إبقاء المنشورات المعاد نشرها على الأقل min_reblogs_hint: لن تُحذف أي من منشوراتك التي أعيد مشاركتها أكثر من هذا العدد من المرات. اتركه فارغاً لحذف المنشورات بغض النظر عن عدد إعادات النشر stream_entries: sensitive_content: محتوى حساس diff --git a/config/locales/devise.pt-PT.yml b/config/locales/devise.pt-PT.yml index c66181fc5b8e3b..edfb798509a622 100644 --- a/config/locales/devise.pt-PT.yml +++ b/config/locales/devise.pt-PT.yml @@ -2,117 +2,117 @@ pt-PT: devise: confirmations: - confirmed: O seu endereço correio electrónico foi correctamente confirmado. - send_instructions: Vais receber um e-mail com as instruções para confirmar o teu endereço de e-mail dentro de alguns minutos. Por favor, verifica a caixa de spam se não recebeu o e-mail. - send_paranoid_instructions: Se o teu endereço de e-mail já existir na nossa base de dados, vais receber um e-mail com as instruções de confirmação dentro de alguns minutos. Por favor, verifica a caixa de spam se não recebeu o e-mail. + confirmed: O seu endereço de e-mail foi corretamente confirmado. + send_instructions: Irá receber um e-mail com instruções sobre como confirmar o seu endereço de e-mail dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu este e-mail. + send_paranoid_instructions: Se o seu endereço de e-mail existir na nossa base de dados, receberá um e-mail com instruções sobre como confirmar o seu endereço de e-mail dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu este e-mail. failure: - already_authenticated: A tua sessão já está aberta. - inactive: A tua conta ainda não está ativada. + already_authenticated: Já tem sessão iniciada. + inactive: A sua conta ainda não está ativada. invalid: "%{authentication_keys} ou palavra-passe inválida." last_attempt: Tem só mais uma tentativa antes da sua conta ser bloqueada. - locked: A tua conta está bloqueada. + locked: A sua conta está bloqueada. not_found_in_database: "%{authentication_keys} ou palavra-passe inválida." omniauth_user_creation_failure: Erro ao criar uma conta para esta identidade. pending: A sua conta está ainda a aguardar revisão. - timeout: A tua sessão expirou. Por favor, entra de novo para continuares. - unauthenticated: Precisas de entrar na tua conta ou de te registares antes de continuar. - unconfirmed: Tens de confirmar o teu endereço de e-mail antes de continuar. + timeout: A sua sessão expirou. Inicie sessão novamente para continuar. + unauthenticated: É necessário iniciar sessão ou registar-se antes de continuar. + unconfirmed: Tem de confirmar o seu endereço de e-mail antes de continuar. mailer: confirmation_instructions: action: Verificar o endereço de e-mail action_with_app: Confirmar e regressar a %{app} - explanation: Criou uma conta em %{host} com este endereço de e-mail. Está a um clique de ativá-la. Se não foi você que fez este registo, por favor ignore esta mensagem. + explanation: Foi criada uma conta em %{host} com este endereço de e-mail. Está a um clique de ativá-la. Se não foi você que fez este registo, por favor ignore esta mensagem. explanation_when_pending: Candidatou-se com um convite para %{host} com este endereço de e-mail. Logo que confirme o seu endereço de e-mail, iremos rever a sua candidatura. Pode iniciar sessão para alterar os seus dados ou eliminar a sua conta, mas não poderá aceder à maioria das funções até que a sua conta seja aprovada. Se a sua inscrição for indeferida, os seus dados serão eliminados, pelo que não será necessária qualquer ação adicional da sua parte. Se não solicitou este convite, queira ignorar este e-mail. - extra_html: Por favor leia as regras da instância e os nossos termos de serviço. - subject: 'Mastodon: Instruções de confirmação %{instance}' + extra_html: Por favor leia as regras do servidor e os nossos termos de serviço. + subject: 'Mastodon: instruções de confirmação para %{instance}' title: Verificar o endereço de e-mail email_changed: explanation: 'O e-mail associado à sua conta será alterado para:' - extra: Se não alterou o seu e-mail, é possível que alguém tenha conseguido aceder à sua conta. Por favor altere a sua palavra-passe imediatamente ou entra em contacto com um administrador da instância se tiver ficado sem acesso à sua conta. - subject: 'Mastodon: E-mail alterado' + extra: Se não alterou o seu e-mail, é possível que alguém tenha conseguido aceder à sua conta. Por favor altere a sua palavra-passe imediatamente ou entre em contacto com um administrador do servidor se tiver ficado sem acesso à sua conta. + subject: 'Mastodon: e-mail alterado' title: Novo endereço de e-mail password_change: - explanation: A palavra-passe da tua conta foi alterada. - extra: Se não alterou a sua palavra-passe, é possível que alguém tenha conseguido aceder à sua conta. Por favor altere a sua palavra-passe imediatamente ou entre em contacto com um administrador da instância se tiver ficado sem acesso à sua conta. + explanation: A palavra-passe da sua conta foi alterada. + extra: Se não alterou a sua palavra-passe, é possível que alguém tenha conseguido aceder à sua conta. Por favor altere a sua palavra-passe imediatamente ou entre em contacto com um administrador do servidor se tiver ficado sem acesso à sua conta. subject: 'Mastodon: palavra-passe alterada' title: Palavra-passe alterada reconfirmation_instructions: explanation: Confirme o seu novo endereço para alterar o e-mail. - extra: Se esta mudança não foi iniciada por si, queira ignorar este e-mail. O endereço de correio electrónico da sua conta do Mastodon não irá mudar enquanto não aceder à hiperligação acima. - subject: 'Mastodon: Confirmação de e-mail %{instance}' + extra: Se esta alteração não foi iniciada por si, ignore este e-mail. O endereço de e-mail da conta Mastodon não será alterado até aceder à hiperligação acima. + subject: 'Mastodon: confirmação de e-mail para %{instance}' title: Validar o endereço de e-mail reset_password_instructions: action: Alterar palavra-passe - explanation: Pediste a alteração da palavra-passe da tua conta. - extra: Se não fez este pedido, queira ignorar este e-mail. A sua palavra-passe não irá mudar se não aceder à hiperligação acima e criar uma nova. - subject: 'Mastodon: Instruções para redefinir a palavra-passe' + explanation: Solicitou uma nova palavra-passe para a sua conta. + extra: Se não solicitou esta alteração, ignore este e-mail. A sua palavra-passe não será alterada até aceder à hiperligação acima e criar uma nova. + subject: 'Mastodon: instruções para redefinir a palavra-passe' title: Solicitar nova palavra-passe two_factor_disabled: - explanation: O acesso agora é possível usando apenas o endereço de correio eletrónico e palavra-passe. - subject: 'Mastodon: Autenticação de duas etapas desativada' + explanation: O início de sessão é agora possível utilizando apenas o endereço de e-mail e a palavra-passe. + subject: 'Mastodon: autenticação de duas etapas desativada' subtitle: A autenticação de dois fatores foi desativada para a sua conta. title: 2FA desativado two_factor_enabled: - explanation: Um token gerado pelo aplicativo TOTP emparelhado será necessário para login. - subject: 'Mastodon: Autenticação em duas etapas ativada' - subtitle: A autenticação de dois fatores foi habilitada para sua conta. + explanation: Para iniciar sessão, será necessário um token gerado pela aplicação TOTP emparelhada. + subject: 'Mastodon: autenticação em duas etapas ativada' + subtitle: A autenticação de dois fatores foi ativada para a sua conta. title: 2FA ativado two_factor_recovery_codes_changed: - explanation: Os códigos de recuperação anteriores foram invalidados e novos foram gerados. - subject: 'Mastodon: Gerados novos códigos de recuperação em duas etapas' - subtitle: Os códigos de recuperação anteriores foram invalidados e novos foram gerados. + explanation: Os códigos de recuperação anteriores foram invalidados e foram gerados novos códigos. + subject: 'Mastodon: gerados novos códigos de recuperação em duas etapas' + subtitle: Os códigos de recuperação anteriores foram invalidados e foram gerados novos códigos. title: Códigos de recuperação 2FA alterados unlock_instructions: - subject: 'Mastodon: Instruções para desbloquear a tua conta' + subject: 'Mastodon: instruções para desbloquear' webauthn_credential: added: explanation: A seguinte chave de segurança foi adicionada à sua conta - subject: 'Mastodon: Nova chave de segurança' + subject: 'Mastodon: nova chave de segurança' title: Foi adicionada uma nova chave de segurança deleted: explanation: A seguinte chave de segurança foi eliminada da sua conta - subject: 'Mastodon: Chave de segurança eliminada' + subject: 'Mastodon: chave de segurança eliminada' title: Uma das suas chaves de segurança foi eliminada webauthn_disabled: explanation: A autenticação com chaves de segurança foi desativada para sua conta. - extra: O login agora é possível usando apenas o token gerado pelo aplicativo TOTP emparelhado. - subject: 'Mastodon: Autenticação com chave de segurança desativada' + extra: O início de sessão é agora possível utilizando apenas o token gerado pela aplicação TOTP emparelhada. + subject: 'Mastodon: autenticação com chave de segurança desativada' title: Chaves de segurança desativadas webauthn_enabled: - explanation: A autenticação da chave de segurança foi habilitada para sua conta. - extra: Sua chave de segurança agora pode ser usada para login. - subject: 'Mastodon: Autenticação com chave de segurança ativada' + explanation: A autenticação por chave de segurança foi ativada para a sua conta. + extra: A sua chave de segurança pode agora ser utilizada para iniciar sessão. + subject: 'Mastodon: autenticação com chave de segurança ativada' title: Chaves de segurança ativadas omniauth_callbacks: failure: Não foi possível autenticar %{kind} porque "%{reason}". success: Autenticado correctamente na conta %{kind}. passwords: - no_token: Não pode aceder a esta página se não vier através da ligação enviada por e-mail para alteração da sua palavra-passe. Se de facto usou essa ligação para chegar até aqui, queira garantir de que usou o endereço URL completo. - send_instructions: Vai receber um e-mail com instruções para alterar a palavra-passe dentro de alguns minutos. - send_paranoid_instructions: Se o seu endereço de e-mail existir na nossa base de dados, dentro de alguns minutos irá receber uma ligação para recuperar a palavra-passe. - updated: A tua palavra-passe foi alterada. Estás agora autenticado na tua conta. + no_token: Não pode aceder a esta página se não vier através da hiperligação enviada por e-mail para alteração da sua palavra-passe. Se de facto usou essa hiperligação para chegar até aqui, verifique se usou o endereço URL completo. + send_instructions: Se o seu endereço de e-mail existir na nossa base de dados, receberá uma hiperligação de recuperação da palavra-passe no seu endereço de e-mail dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu esta mensagem de correio eletrónico. + send_paranoid_instructions: Se o seu endereço de e-mail existir na nossa base de dados, receberá uma hiperligação de recuperação da palavra-passe no seu endereço de e-mail dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu esta mensagem de correio eletrónico. + updated: A sua palavra-passe foi alterada com sucesso. Está agora autenticado. updated_not_active: A tua palavra-passe foi alterada. registrations: - destroyed: Adeus! A tua conta foi cancelada. Esperamos ver-te em breve. - signed_up: Seja bem-vindo! A sua conta foi correctamente registada. - signed_up_but_inactive: A tua conta foi registada. No entanto ainda não está activa. - signed_up_but_locked: A sua conta foi correctamente registada. Contudo, não pudemos iniciar sessão porque a sua conta está bloqueada. - signed_up_but_pending: Foi enviada uma hiperligação de confirmação para o seu correio electrónico. Só depois de clicar na hiperligação avaliaremos a sua inscrição. Será notificado caso a sua conta seja aprovada. - signed_up_but_unconfirmed: Foi enviada uma hiperligação de confirmação para o seu correio electrónico. Queira usar essa hiperligação para activar a sua conta. - update_needs_confirmation: Solicitou uma alteração da informação da sua conta, mas para tal é necessário confirmá-la. Queira ver o seu correio electrónico e seguir a hiperligação para a confirmar. Se não encontrar essa mensagem, veja se está na pasta de lixo electrónico. - updated: A sua conta foi correctamente actualizada. + destroyed: Adeus! A sua conta foi cancelada com sucesso. Esperamos voltar a vê-lo em breve. + signed_up: Bem-vindo! A sua conta foi registada com sucesso. + signed_up_but_inactive: Registou-se com sucesso. No entanto, não foi possível iniciar sessão porque a sua conta ainda não está ativada. + signed_up_but_locked: Registou-se com sucesso. No entanto, não foi possível iniciar sessão porque a sua conta está bloqueada. + signed_up_but_pending: Foi enviada uma mensagem com uma hiperligação de confirmação para o seu endereço de e-mail. Depois de clicar na hiperligação, analisaremos a sua candidatura. Será notificado se for aprovado. + signed_up_but_unconfirmed: Foi enviada para o seu endereço de e-mail uma mensagem com uma hiperligação de confirmação. Siga a hiperligação para ativar a sua conta. Verifique a sua pasta de spam se não recebeu esta mensagem de e-mail. + update_needs_confirmation: Atualizou a sua conta com sucesso, mas temos de verificar o seu novo endereço de e-mail. Verifique o seu e-mail e siga a hiperligação de confirmação para confirmar o seu novo endereço de e-mail. Verifique a sua pasta de spam se não recebeu esta mensagem de correio eletrónico. + updated: A sua conta foi corretamente atualizada. sessions: already_signed_out: Sessão encerrada. signed_in: Sessão iniciada. signed_out: Sessão encerrada. unlocks: - send_instructions: Dentro de alguns momentos, irá receber um e-mail com instruções para desbloquear a sua conta. Consulte a sua pasta de lixo electrónico se não o encontrar. - send_paranoid_instructions: Se a sua conta existir, dentro de momentos irá receber um e-mail com instruções para a desbloquear. Consulte a sua pasta de lixo electrónico se não o encontrar. - unlocked: A sua conta foi correctamente desbloqueada. Queira iniciar uma nova sessão para continuar. + send_instructions: Receberá um e-mail com instruções sobre como desbloquear a sua conta dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu este e-mail. + send_paranoid_instructions: Se a sua conta existir, receberá um e-mail com instruções sobre como a desbloquear dentro de alguns minutos. Verifique a sua pasta de spam se não recebeu este e-mail. + unlocked: A sua conta foi desbloqueada com sucesso. Inicie sessão para continuar. errors: messages: already_confirmed: já confirmado, por favor tente iniciar sessão - confirmation_period_expired: tem de ser confirmado durante %{period}, por favor tenta outra vez + confirmation_period_expired: tem de ser confirmado dentro de %{period}, por favor tente outra vez expired: expirou, por favor tente outra vez not_found: não encontrado not_locked: não estava bloqueada diff --git a/config/locales/doorkeeper.pt-PT.yml b/config/locales/doorkeeper.pt-PT.yml index 30ea62d9eb5562..3b4439584b01c1 100644 --- a/config/locales/doorkeeper.pt-PT.yml +++ b/config/locales/doorkeeper.pt-PT.yml @@ -4,9 +4,9 @@ pt-PT: attributes: doorkeeper/application: name: Nome da aplicação - redirect_uri: URI de redireccionamento + redirect_uri: URI de redirecionamento scopes: Âmbitos - website: Página na teia da aplicação + website: Site da aplicação errors: models: doorkeeper/application: @@ -31,11 +31,11 @@ pt-PT: form: error: Ups! Verifique que o formulário não tem erros help: - native_redirect_uri: Usa %{native_redirect_uri} para testes locais - redirect_uri: Utiliza uma linha por URI - scopes: Separe as esferas de acção com espaços. Deixe em branco para usar autorizações predefinidas. + native_redirect_uri: Usar %{native_redirect_uri} para testes locais + redirect_uri: Usar uma linha por URI + scopes: Separe os âmbitos de aplicação com espaços. Deixe em branco para utilizar os âmbitos de aplicação predefinidos. index: - application: Aplicações + application: Aplicação callback_url: URL de retorno delete: Eliminar empty: Não tem aplicações. @@ -48,31 +48,31 @@ pt-PT: title: Nova aplicação show: actions: Ações - application_id: Id de Aplicação - callback_urls: Callback urls - scopes: Autorizações + application_id: Chave da aplicação + callback_urls: URLs de retorno + scopes: Âmbitos secret: Segredo title: 'Aplicação: %{name}' authorizations: buttons: - authorize: Autorize - deny: Não autorize + authorize: Autorizar + deny: Negar error: title: Ocorreu um erro new: prompt_html: "%{client_name} pretende ter permissão para aceder à sua conta. É uma aplicação de terceiros. Se não confia nesta aplicação, então não deve autorizá-la." review_permissions: Rever permissões - title: Autorização é necessária + title: Autorização necessária show: - title: Copiar o código desta autorização e colar na aplicação. + title: Copie este código de autorização e cole-o na aplicação. authorized_applications: buttons: revoke: Revogar confirmations: - revoke: Tens a certeza? + revoke: Tem a certeza? index: authorized_at: Autorizado em %{date} - description_html: Estas são aplicações que podem aceder à sua conta utilizando a API. Se encontrar aqui aplicativos que não reconhece, ou um aplicativo está com mau funcionamento, pode revogar o seu acesso. + description_html: Estas são as aplicações que podem aceder à sua conta utilizando a API. Se houver aplicações que não reconhece aqui, ou se uma aplicação estiver a comportar-se mal, pode revogar o seu acesso. last_used_at: Última utilização em %{date} never_used: Nunca utilizado scopes: Permissões @@ -81,15 +81,15 @@ pt-PT: errors: messages: access_denied: O proprietário do recurso ou servidor de autorização negou o pedido. - credential_flow_not_configured: As credenciais da palavra-passe do proprietário do recurso falhou devido a que Doorkeeper.configure.resource_owner_from_credentials não foram configuradas. - invalid_client: Autenticação do cliente falhou por causa de um cliente desconhecido, nenhum cliente de autenticação incluído ou método de autenticação não suportado. + credential_flow_not_configured: Falha no fluxo de credenciais da palavra-passe do proprietário do recurso porque Doorkeeper.configure.resource_owner_from_credentials não está configurado. + invalid_client: A autenticação do cliente falhou devido a cliente desconhecido, sem autenticação de cliente incluída ou método de autenticação não suportado. invalid_code_challenge_method: O método de validação do código tem de ser S256, o método simples não é suportado. invalid_grant: A concessão de autorização fornecida é inválida, expirou, foi revogada, não corresponde à URI de redirecionamento usada no pedido de autorização ou foi emitida para outro cliente. invalid_redirect_uri: A URI de redirecionamento incluída não é válida. invalid_request: missing_param: 'Parâmetro requerido em falta: %{value}.' - request_not_authorized: O pedido precisa ser autorizado. O parâmetro requerido para autorização da solicitação está ausente ou é inválido. - unknown: A solicitação não possui um parâmetro requerido, inclui um valor de parâmetro não suportado ou tem outro tipo de formato incorreto. + request_not_authorized: O pedido tem de ser autorizado. O parâmetro necessário para autorizar o pedido está em falta ou é inválido. + unknown: O pedido não tem um parâmetro obrigatório, inclui um valor de parâmetro não suportado ou está mal formado. invalid_resource_owner: As credenciais do proprietário do recurso não são válidas ou o proprietário do recurso não pode ser encontrado invalid_scope: O âmbito solicitado é inválido, desconhecido ou tem um formato incorreto. invalid_token: @@ -98,7 +98,7 @@ pt-PT: unknown: O token de acesso é inválido resource_owner_authenticator_not_configured: A procura pelo proprietário do recurso falhou porque Doorkeeper.configure.resource_owner_authenticator não foi configurado. server_error: O servidor de autorização encontrou uma condição inesperada que impediu o cumprimento do pedido . - temporarily_unavailable: O servidor de autorização não é capaz de lidar com o pedido devido a uma sobrecarga ou mantenimento do servidor. + temporarily_unavailable: O servidor de autorização não pode atualmente tratar o pedido devido a uma sobrecarga temporária ou à manutenção do servidor. unauthorized_client: O cliente não está autorizado a realizar esta solicitação usando este método. unsupported_grant_type: O tipo de concessão de autorização não é suportado pelo servidor de autorização. unsupported_response_type: O servidor de autorização não suporta este tipo de resposta. @@ -125,12 +125,12 @@ pt-PT: admin/reports: Administração de denúncias all: Acesso total à sua conta Mastodon blocks: Bloqueios - bookmarks: Itens Salvos + bookmarks: Marcadores conversations: Conversas - crypto: Encriptação ponta-a-ponta + crypto: Encriptação ponta a ponta favourites: Favoritos filters: Filtros - follow: A seguir, a silenciar, e a bloquear + follow: A seguir, a silenciar e a bloquear follows: Seguidores lists: Listas media: Anexos de media @@ -139,7 +139,7 @@ pt-PT: profile: O seu perfil Mastodon push: Notificações push reports: Denúncias - search: Pesquisa + search: Pesquisar statuses: Publicações layouts: admin: @@ -165,14 +165,14 @@ pt-PT: admin:write:email_domain_blocks: executar ações de moderação no bloqueio de domínios de e-mail admin:write:ip_blocks: executar ações de moderação no bloqueio de IPs admin:write:reports: executar ações de moderação em denúncias - crypto: usa encriptação ponta-a-ponta - follow: siga, bloqueie, desbloqueie, e deixa de seguir contas - profile: apenas ler as informações do perfil da sua conta + crypto: usar encriptação ponta a ponta + follow: alterar relações de conta + profile: ler apenas as informações do perfil da sua conta push: receber as suas notificações push - read: tenha acesso aos dados da tua conta + read: ler todos os dados da sua conta read:accounts: ver as informações da conta read:blocks: ver os seus bloqueios - read:bookmarks: ver os seus favoritos + read:bookmarks: ver os seus marcadores read:favourites: ver os seus favoritos read:filters: ver os seus filtros read:follows: ver quem você segue @@ -181,18 +181,18 @@ pt-PT: read:notifications: ver as suas notificações read:reports: ver as suas denúncias read:search: pesquisar em seu nome - read:statuses: ver todos os estados - write: publique por ti - write:accounts: modificar o seu perfil + read:statuses: ver todas as publicações + write: alterar todos os dados da sua conta + write:accounts: alterar o seu perfil write:blocks: bloquear contas e domínios - write:bookmarks: estado dos favoritos + write:bookmarks: marcar publicações write:conversations: silenciar e eliminar conversas - write:favourites: assinalar como favoritas + write:favourites: favoritar publicações write:filters: criar filtros write:follows: seguir pessoas write:lists: criar listas - write:media: carregar arquivos de media + write:media: enviar ficheiros de media write:mutes: silenciar pessoas e conversas write:notifications: limpar as suas notificações write:reports: denunciar outras pessoas - write:statuses: publicar estado + write:statuses: publicar publicações diff --git a/config/locales/gl.yml b/config/locales/gl.yml index b43ec5d17268a4..86010b0665c224 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -343,7 +343,7 @@ gl: title: Emoticonas personalizadas uncategorized: Sen categoría unlist: Non listar - unlisted: Sen listar + unlisted: Fóra das listas update_failed_msg: Non foi posíbel actualizar a emoticona updated_msg: Actualizouse a emoticona de xeito correcto! upload: Subir @@ -1756,7 +1756,7 @@ gl: private_long: Mostrar só as seguidoras public: Público public_long: Visible para calquera - unlisted: Sen listar + unlisted: Fóra das listas unlisted_long: Visible para calquera, pero non en cronoloxías públicas statuses_cleanup: enabled: Borrar automáticamente publicacións antigas diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 262063698b5370..1bd724595d1897 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -12,8 +12,8 @@ pt-PT: one: Seguidor other: Seguidores following: A seguir - instance_actor_flash: Esta conta é um actor virtual usado para representar a própria instância e não um utilizador individual. É usada para motivos de federação e não deve ser suspenso. - last_active: última vez activo + instance_actor_flash: Esta conta é um ator virtual utilizado para representar o servidor em si e não um utilizador individual. É utilizada para efeitos de federação e não deve ser suspensa. + last_active: última atividade link_verified_on: A posse desta hiperligação foi verificada em %{date} nothing_here: Não há nada aqui! pin_errors: @@ -25,19 +25,19 @@ pt-PT: admin: account_actions: action: Executar acção - title: Executar acção de moderação em %{acct} + title: Executar ação de moderação em %{acct} account_moderation_notes: create: Deixar uma nota - created_msg: Nota de moderação correctamente criada! + created_msg: Nota de moderação criada com sucesso! destroyed_msg: Nota de moderação destruída! accounts: approve: Aprovar - approved_msg: Inscrição de %{username} aprovada correctamente + approved_msg: Inscrição de %{username} aprovada com sucesso are_you_sure: Tens a certeza? avatar: Imagem de perfil by_domain: Domínio change_email: - changed_msg: Endereço de correio electrónico alterado! + changed_msg: E-mail alterado com sucesso! current_email: E-mail atual label: Alterar e-mail new_email: Novo e-mail @@ -57,12 +57,12 @@ pt-PT: demote: Despromoveu destroyed_msg: Os dados de %{username} estão agora em fila de espera para serem eliminados de imediato disable: Congelar - disable_two_factor_authentication: Desactivar autenticação por dois factores (2FA) + disable_two_factor_authentication: Desativar autenticação por dois fatores (2FA) disabled: Congelada display_name: Nome a mostrar domain: Domínio edit: Editar - email: Correio electrónico + email: E-mail email_status: Estado do e-mail enable: Descongelar enabled: Ativado @@ -86,7 +86,7 @@ pt-PT: memorialized: Em memória memorialized_msg: Conta %{username} transformada com sucesso em memorial moderation: - active: Activo + active: Ativo all: Todos disabled: Desativado pending: Pendente @@ -94,7 +94,7 @@ pt-PT: suspended: Supensos title: Moderação moderation_notes: Notas de moderação - most_recent_activity: Actividade mais recente + most_recent_activity: Atividade mais recente most_recent_ip: IP mais recente no_account_selected: Nenhuma conta foi alterada porque nenhuma foi selecionada no_limits_imposed: Sem limites impostos @@ -111,9 +111,9 @@ pt-PT: public: Público push_subscription_expires: A Inscrição PuSH expira redownload: Atualizar perfil - redownloaded_msg: Perfil de %{username} correctamente actualizado a partir da origem + redownloaded_msg: Perfil de %{username} atualizado a partir da origem com sucesso reject: Rejeitar - rejected_msg: Inscrição de %{username} correctamente rejeitada + rejected_msg: Inscrição de %{username} rejeitada com sucesso remote_suspension_irreversible: Os dados desta conta foram eliminados irreversivelmente. remote_suspension_reversible_hint_html: A conta foi suspensa no servidor de origem e os seus dados serão totalmente eliminados em %{date}. Até lá, o servidor de origem poderá recuperar esta conta sem quaisquer efeitos negativos. Se desejar eliminar todos os dados desta conta imediatamente, pode fazê-lo em baixo. remove_avatar: Remover a imagem de perfil @@ -152,7 +152,7 @@ pt-PT: title: Contas unblock_email: Desbloquear endereço de e-mail unblocked_email_msg: Endereço de e-mail de %{username} desbloqueado - unconfirmed_email: Correio electrónico por confirmar + unconfirmed_email: E-mail por confirmar undo_sensitized: Desmarcar como problemático undo_silenced: Desfazer silenciar undo_suspension: Desfazer supensão @@ -226,7 +226,7 @@ pt-PT: create_account_warning_html: "%{name} enviou um aviso para %{target}" create_announcement_html: "%{name} criou o novo anúncio %{target}" create_custom_emoji_html: "%{name} carregou o novo emoji %{target}" - create_domain_allow_html: "%{name} habilitou a federação com o domínio %{target}" + create_domain_allow_html: "%{name} permitiu a federação com o domínio %{target}" create_domain_block_html: "%{name} bloqueou o domínio %{target}" create_ip_block_html: "%{name} criou regra para o IP %{target}" create_unavailable_domain_html: "%{name} parou a entrega ao domínio %{target}" @@ -244,7 +244,7 @@ pt-PT: disable_2fa_user_html: "%{name} desativou o requerimento de autenticação em dois passos para o utilizador %{target}" disable_custom_emoji_html: "%{name} desabilitou o emoji %{target}" disable_user_html: "%{name} desativou o acesso para o utilizador %{target}" - enable_custom_emoji_html: "%{name} habilitou o emoji %{target}" + enable_custom_emoji_html: "%{name} ativou o emoji %{target}" enable_user_html: "%{name} ativou o acesso para o utilizador %{target}" memorialize_account_html: "%{name} transformou a conta de %{target} em um memorial" promote_user_html: "%{name} promoveu o utilizador %{target}" @@ -276,22 +276,22 @@ pt-PT: title: Registo de auditoria unavailable_instance: "(nome de domínio indisponível)" announcements: - destroyed_msg: Comunicado correctamente eliminado! + destroyed_msg: Comunicado eliminado com sucesso! edit: title: Editar comunicado empty: Nenhum comunicado encontrado. - live: Em directo + live: Em direto new: create: Criar comunicado title: Novo comunicado publish: Publicar - published_msg: Comunicado correctamente publicado! + published_msg: Comunicado publicado com sucesso! scheduled_for: Agendado para %{time} scheduled_msg: Comunicado agendado para publicação! title: Comunicados unpublish: Anular publicação - unpublished_msg: Comunicado correctamente retirado de publicação! - updated_msg: Comunicado correctamente actualizado! + unpublished_msg: Comunicado corretamente retirado de publicação! + updated_msg: Comunicado atualizado com sucesso! critical_update_pending: Atualização crítica pendente custom_emojis: assign_category: Atribuir categoria @@ -319,16 +319,16 @@ pt-PT: not_permitted: Não está autorizado a executar esta ação overwrite: Escrever por cima shortcode: Código de atalho - shortcode_hint: Pelo menos 2 caracteres, apenas caracteres alfanuméricos e underscores + shortcode_hint: Pelo menos 2 caracteres, apenas caracteres alfanuméricos e traços inferiores title: Emojis personalizados uncategorized: Não categorizados unlist: Não listar unlisted: Não inventariado update_failed_msg: Não foi possível atualizar esse emoji - updated_msg: Emoji correctamente actualizado! + updated_msg: Emoji atualizado com sucesso! upload: Enviar dashboard: - active_users: utilizadores activos + active_users: utilizadores ativos interactions: interações media_storage: Armazenamento de media new_users: novos utilizadores @@ -350,8 +350,8 @@ pt-PT: sources: Origem de inscrições space: Utilização do espaço title: Painel de controlo - top_languages: Principais idiomas activos - top_servers: Servidores mais activos + top_languages: Principais idiomas ativos + top_servers: Servidores mais ativos website: Página na teia disputes: appeals: @@ -359,7 +359,7 @@ pt-PT: title: Recursos domain_allows: add_new: Permitir federação com o domínio - created_msg: Permissão correctamente atribuída para federação + created_msg: O domínio foi autorizado com êxito para a federação destroyed_msg: Revogada a permissão de federação para o domínio export: Exportar import: Importar @@ -385,14 +385,14 @@ pt-PT: import: Importar new: create: Criar bloqueio - hint: O bloqueio por domínio não vai prevenir a criação de contas na base de dados, mas irá retroactiva e automaticamente aplicar certos métodos de moderação nessas contas. + hint: O bloqueio do domínio não impedirá a criação de registos de contas na base de dados, mas aplicará retroativamente e automaticamente métodos de moderação específicos a essas contas. severity: desc_html: "Limitar tornará as mensagens das contas neste domínio invisíveis a qualquer pessoa que não as esteja a seguir. Suspender removerá do seu servidor todo o conteúdo, media, e dados de perfil das contas deste domínio. Utilize Nenhum se apenas quiser rejeitar ficheiros media." noop: Nenhum silence: Limitar suspend: Suspender title: Novo bloqueio de domínio - no_domain_block_selected: Nenhum bloqueio de domínio foi alterado, pois nenhum foi seleccionado + no_domain_block_selected: Nenhum bloqueio de domínio foi alterado pois nenhum foi selecionado not_permitted: Não está autorizado a executar esta ação obfuscate: Ofuscar nome de domínio obfuscate_hint: Ofuscar parcialmente o nome de domínio na lista, caso estejam definidas limitações na publicação da lista de domínios @@ -527,7 +527,7 @@ pt-PT: title: Convites ip_blocks: add_new: Criar regra - created_msg: Nova regra de IP correctamente adicionada + created_msg: Nova regra de IP corretamente adicionada delete: Eliminar expires_in: '1209600': 2 semanas @@ -547,15 +547,15 @@ pt-PT: delete: Eliminar description_html: Um repetidor de federação é um servidor intermediário que troca grandes volumes de publicações públicas entre instâncias que o subscrevem e publicam. Ele pode ajudar pequenas e medias instâncias a descobrir conteúdo do fediverso que, de outro modo, exigiria que os utilizadores locais seguissem manualmente outras pessoas em instâncias remotas. disable: Desativar - disabled: Desactivado - enable: Activar + disabled: Desativado + enable: Ativar enable_hint: Uma vez ativado, a tua instância irá assinar todas as publicações deste repetidor e irá começar a enviar as suas publicações públicas para lá. enabled: Ativado inbox_url: URL do repetidor pending: À espera da aprovação do repetidor save_and_enable: Guardar e ativar setup: Configurar uma ligação ao repetidor - signatures_not_enabled: Os repetidores não funcionarão correctamente enquanto o modo seguro ou o modo de lista branca estiverem activados + signatures_not_enabled: Os repetidores não funcionarão corretamente enquanto o modo seguro ou o modo de lista branca estiverem ativados status: Estado title: Retransmissores report_notes: @@ -618,27 +618,27 @@ pt-PT: reported_by: Denunciado por reported_with_application: Reportado com a aplicação resolved: Resolvido - resolved_msg: Denúncia correctamente resolvida! + resolved_msg: Denúncia resolvida com sucesso! skip_to_actions: Passar para as ações status: Estado statuses: Conteúdo denunciado statuses_description_html: O conteúdo ofensivo será citado na comunicação com a conta denunciada summary: action_preambles: - delete_html: 'Você está prestes a remover algumas das publicações de @%{acct}. Isto irá:' - mark_as_sensitive_html: 'Você está prestes a marcar alguns dos posts de @%{acct}como sensível. Isto irá:' - silence_html: 'Você está prestes a limitar a conta do @%{acct}. Isto irá:' - suspend_html: 'Você está prestes a suspender a conta de @%{acct}. Isto irá:' + delete_html: 'Está prestes a remover algumas das publicações de @%{acct}. Isto irá:' + mark_as_sensitive_html: 'Está prestes a marcar algumas das publicações de @%{acct}como sensível. Isto irá:' + silence_html: 'Está prestes a limitar a conta de @%{acct}. Isto irá:' + suspend_html: 'Está prestes a suspender a conta de @%{acct}. Isto irá:' actions: delete_html: Excluir as publicações ofensivas mark_as_sensitive_html: Marcar a mídia dos posts ofensivos como sensível silence_html: Limitar firmemente o alcance de @%{acct}, tornando seus perfis e conteúdos apenas visíveis para pessoas que já os estão seguindo ou olhando manualmente no perfil - suspend_html: Suspender @%{acct}, tornando seu perfil e conteúdo inacessíveis e impossível de interagir com + suspend_html: Suspender @%{acct}, tornando seu perfil e conteúdo inacessíveis e impossível de interagir close_report: 'Marcar relatório #%{id} como resolvido' - close_reports_html: Marcar todos os relatórios contra @%{acct} como resolvidos - delete_data_html: Excluir @%{acct}perfil e conteúdo 30 dias a menos que sejam dessuspensos + close_reports_html: Marcar todas as denúncias contra @%{acct} como resolvidas + delete_data_html: Eliminar o perfil de @%{acct} e conteúdos daqui a 30 dias, a menos que entretanto sejam suspensos preview_preamble_html: "@%{acct} receberá um aviso com o seguinte conteúdo:" - record_strike_html: Registre um ataque contra @%{acct} para ajudá-lo a escalar futuras violações desta conta + record_strike_html: Registar um ataque contra @%{acct} para ajudar a escalar futuras violações desta conta warning_placeholder: Argumentos adicionais opcionais para a acção de moderação. target_origin: Origem da conta denunciada title: Denúncias @@ -693,7 +693,7 @@ pt-PT: manage_settings: Gerir Configurações manage_settings_description: Permite aos utilizadores alterar as configurações do sítio na teia manage_taxonomies: Gerir Taxonomias - manage_taxonomies_description: 'Permite aos utilizadores avaliar o conteúdo em alta e atualizar as configurações de #etiquetas' + manage_taxonomies_description: Permite aos utilizadores rever o conteúdo em tendência e atualizar as configurações de hashtag manage_user_access: Gerir Acesso de Utilizador manage_users: Gerir Utilizadores manage_users_description: Permite aos utilizadores ver os detalhes de outros utilizadores e executar ações de moderação contra eles @@ -743,13 +743,13 @@ pt-PT: publish_discovered_servers: Publicar servidores descobertos publish_statistics: Publicar estatísticas title: Descobrir - trends: Em alta + trends: Tendências domain_blocks: all: Para toda a gente disabled: Para ninguém users: Para utilizadores locais que se encontrem autenticados registrations: - moderation_recommandation: Por favor, certifique-se de que você tem uma equipe de moderação adequada e reativa antes de abrir os registros para todos! + moderation_recommandation: Certifique-se de que dispõe de uma equipa de moderação adequada e reativa antes de abrir as inscrições a todos! preamble: Controle quem pode criar uma conta no seu servidor. title: Inscrições registrations_mode: @@ -757,7 +757,7 @@ pt-PT: approved: Registo sujeito a aprovação none: Ninguém se pode registar open: Qualquer pessoa se pode registar - warning_hint: Recomendamos o uso de "Aprovação necessária para se cadastrar", a menos que você esteja confiante de que sua equipe de moderação pode lidar com spam e registros maliciosos em tempo hábil. + warning_hint: Recomendamos a utilização de “É necessária aprovação para o registo”, a menos que esteja confiante de que a sua equipa de moderação pode tratar o spam e os registos maliciosos de forma atempada. security: authorized_fetch: Exigir autenticação de servidores federados authorized_fetch_hint: Exigir autenticação de servidores federados permite uma aplicação mais rigorosa de bloqueios tanto ao nível do utilizador como do servidor. No entanto, isso é feito à custa de uma diminuição de desempenho, reduz o alcance das suas respostas e pode introduzir problemas de compatibilidade com alguns serviços federados. Além disso, isso não impede os atores mais empenhados de aceder às suas publicações e contas públicas. @@ -766,7 +766,7 @@ pt-PT: title: Definições do servidor site_uploads: delete: Eliminar arquivo carregado - destroyed_msg: Envio de sítio na teia correctamente eliminado! + destroyed_msg: Envio do site eliminado com sucesso! software_updates: critical_update: Crítico — por favor, atualize rapidamente documentation_link: Saber mais @@ -800,7 +800,7 @@ pt-PT: reblogs: Re-publicacões status_changed: Publicação alterada title: Estado das contas - trending: Em alta + trending: Em tendência visibility: Visibilidade with_media: Com media strikes: @@ -823,7 +823,7 @@ pt-PT: elasticsearch_health_yellow: message_html: O cluster elasticsearch não está de boa saúde (estado amarelo), pode querer investigar o motivo elasticsearch_index_mismatch: - message_html: Os mapeamentos elasticsearch estão desatualizados. Por favor, execute tootctl search deploy --only=%{value} + message_html: Os mapeamentos de índice Elasticsearch estão desatualizados. Execute tootctl search deploy --only=%{value} elasticsearch_preset: action: Ver a documentação message_html: O seu cluster elasticsearch tem mais de um nó, mas o Mastodon não está configurado para os usar. @@ -831,9 +831,9 @@ pt-PT: action: Ver documentação message_html: O seu cluster elasticsearch tem apenas um nó, ES_PRESET deve ser configurado para single_node_cluster. elasticsearch_reset_chewy: - message_html: O seu índice de sistema elasticsearch está desatualizado devido a uma mudança de configuração. Por favor, execute tootctl search deploy --reset-chewy para o atualizar. + message_html: O seu índice de sistema Elasticsearch está desatualizado devido a uma mudança de configuração. Execute tootctl search deploy --reset-chewy para o atualizar. elasticsearch_running_check: - message_html: Não foi possível conectar ao Elasticsearch. Por favor, verifique se está em execução, ou desabilite a pesquisa de texto completo + message_html: Não foi possível conectar ao Elasticsearch. Verifique se está em execução ou desative a pesquisa de texto completo elasticsearch_version_check: message_html: 'Versão de Elasticsearch incompatível: %{value}' version_comparison: A versão de Elasticsearch %{running_version} está em execução. No entanto, é obrigatória a versão %{required_version} @@ -872,14 +872,14 @@ pt-PT: review: Estado da revisão search: Pesquisar title: Hashtags - updated_msg: 'Definições de #etiquetas correctamente actualizadas' + updated_msg: 'Definições de #etiquetas atualizadas com sucesso' title: Administração trends: allow: Permitir approved: Aprovado disallow: Não permitir links: - allow: Permitir ligação + allow: Permitir hiperligação allow_provider: Permitir editor description_html: Estas são as ligações que presentemente estão a ser muito partilhadas por contas visíveis pelo seu servidor. Estas podem ajudar os seus utilizador a descobrir o que está a acontecer no mundo. Nenhuma ligação é exibida publicamente até que o editor a aprove. Também pode permitir ou rejeitar ligações em avulso. disallow: Não permitir ligação @@ -890,15 +890,15 @@ pt-PT: shared_by_over_week: one: Partilhado por uma pessoa na última semana other: Partilhado por %{count} pessoas na última semana - title: Ligações em alta + title: Hiperligações em tendência usage_comparison: Partilhado %{today} vezes hoje, em comparação com %{yesterday} ontem not_allowed_to_trend: Não permitido para tendência only_allowed: Apenas permitidos pending_review: Pendente de revisão preview_card_providers: - allowed: Ligações deste editor poderão vir a ficar em alta + allowed: As hiperligações deste editor podem ser tendência description_html: Estes são os domínios a partir dos quais ligações são frequentemente partilhadas no seu servidor. As suas ligações não serão colocadas em alta a menos que o seu domínio de origem seja aprovado. A sua aprovação (ou rejeição) estende-se a subdomínios. - rejected: Ligações deste editor não serão postas em alta + rejected: As hiperligações deste editor não podem ser tendência title: Editores rejected: Rejeitado statuses: @@ -907,18 +907,18 @@ pt-PT: description_html: Estas são publicações que o seu servidor conhece e que atualmente estão a ser frequentemente partilhadas e adicionadas aos favoritos. Isto pode ajudar os seus utilizadores, novos e retornados, a encontrar mais pessoas para seguir. Nenhuma publicação será exibida publicamente até que aprove o autor, e o autor permita que a sua conta seja sugerida a outros. Você também pode permitir ou rejeitar publicações individualmente. disallow: Não permitir publicação disallow_account: Não permitir autor - no_status_selected: Nenhuma publicação em alta foi alterada, pois nenhuma foi selecionada + no_status_selected: Não foram alteradas quaisquer publicações de tendências, uma vez que nenhuma foi selecionada not_discoverable: O autor optou por não permitir que a sua conta seja sugerida a outros shared_by: one: Partilhado ou adicionado aos marcadores uma vez other: Partilhado e adicionado aos marcadores %{friendly_count} vezes - title: Publicações em alta + title: Publicações em tendência tags: current_score: Pontuação atual %{score} dashboard: tag_accounts_measure: utilizadores únicos tag_languages_dimension: Idiomas mais populares - tag_servers_dimension: Topo de servidores + tag_servers_dimension: Servidores mais populares tag_servers_measure: servidores diferentes tag_uses_measure: utilizações totais description_html: 'Estas são as #etiquetas que aparecem atualmente com frequência em publicações visíveis pelo seu servidor. Isto pode ajudar os seus utilizadores a descobrir o que está ser mais falado no momento. Nenhuma #etiqueta será exibida publicamente até que a aprove.' @@ -928,15 +928,16 @@ pt-PT: not_trendable: Não aparecerá nas tendências not_usable: Não pode ser utilizada peaked_on_and_decaying: Máximo em %{date}, agora a decair - title: Etiquetas em alta - trendable: Pode aparecer em alta - trending_rank: 'Em alta #%{rank}' + title: Etiquetas em tendência + trendable: Pode aparecer nas tendências + trending_rank: 'Tendência #%{rank}' usable: Pode ser utilizada usage_comparison: Utilizada %{today} vezes hoje, em comparação com %{yesterday} ontem used_by_over_week: one: Utilizada por uma pessoa na última semana other: Utilizada por %{count} pessoas na última semana - trending: Em alta + title: Recomendações e tendências + trending: Em tendência warning_presets: add_new: Adicionar novo delete: Eliminar @@ -946,13 +947,13 @@ pt-PT: webhooks: add_new: Adicionar endpoint delete: Eliminar - description_html: Um webhook possibilita que o Mastodon envie notificações em tempo real de eventos seleccionados, para uma aplicação sua, de modo que esta possa espoletar ações automaticamente. + description_html: Um webhook possibilita que o Mastodon envie notificações em tempo real de eventos selecionados, para uma aplicação sua, de modo que esta possa despoletar ações automaticamente. disable: Desativar disabled: Desativado edit: Editar endpoint empty: Não tem ainda qualquer endpoint de webhook configurado. enable: Ativar - enabled: Activo + enabled: Ativo enabled_events: one: 1 evento ativado other: "%{count} eventos ativados" @@ -993,18 +994,18 @@ pt-PT: body: Foram lançadas novas versões do Mastodon, talvez queira atualizar! subject: Estão disponíveis novas versões do Mastodon para %{instance}! new_trends: - body: 'Os seguintes itens precisam ser revistos antes de poderem ser exibidos publicamente:' + body: 'Os seguintes itens necessitam de uma revisão antes de poderem ser apresentados publicamente:' new_trending_links: - title: Ligações em alta + title: Hiperligações em tendência new_trending_statuses: - title: Publicações em alta + title: Publicações em tendência new_trending_tags: - title: Etiquetas em alta + title: Etiquetas em tendência subject: Novas tendências para revisão em %{instance} aliases: add_new: Criar pseudónimo created_msg: Criou com sucesso um novo pseudónimo. Pode agora iniciar a migração da conta antiga. - deleted_msg: O pseudónimo foi correctamente eliminado. Não será mais possível migrar a partir dessa conta. + deleted_msg: O pseudónimo foi removido com êxito. Deixará de ser possível passar dessa conta para esta. empty: Não tem pseudónimos. hint_html: Se quiser mudar de outra conta para esta, pode criar aqui um pseudónimo, que é necessário antes de poder prosseguir com a migração de seguidores da conta antiga para esta. Esta ação por si só é inofensiva e reversível. A migração da conta é iniciada a partir da conta antiga. remove: Desvincular pseudónimo @@ -1026,8 +1027,8 @@ pt-PT: view_profile: Ver perfil view_status: Ver publicação applications: - created: Aplicação correctamente criada - destroyed: Aplicação correctamente eliminada + created: Aplicação criada com sucesso + destroyed: Aplicação eliminada com sucesso logout: Sair regenerate_token: Regenerar token de acesso token_regenerated: Token de acesso regenerado com sucesso @@ -1036,7 +1037,7 @@ pt-PT: auth: apply_for_account: Solicitar uma conta captcha_confirmation: - help_html: Se tiver problemas a resolver o CAPTCHA, pode entrar em contacto conosco através de %{email} e poderemos ajudá-lo. + help_html: Se tiver problemas a resolver o CAPTCHA, pode entrar em contacto connosco através de %{email} e poderemos ajudá-lo. hint_html: Só mais uma coisa! Precisamos confirmar que você é um humano (isto para que possamos evitar spam!). Resolva o CAPTCHA abaixo e clique em "Continuar". title: Verificação de segurança confirmations: @@ -1138,7 +1139,7 @@ pt-PT: confirm_password: Insira sua palavra-passe atual para verificar a sua identidade confirm_username: Insira seu nome de utilizador para confirmar o procedimento proceed: Eliminar conta - success_msg: A sua conta foi correctamente eliminada + success_msg: A sua conta foi eliminada com sucesso warning: before: 'Antes de continuar, por favor leia cuidadosamente estas notas:' caches: O conteúdo que foi armazenado em cache por outras instâncias pode perdurar @@ -1335,11 +1336,11 @@ pt-PT: muting: Importando contas silenciadas type: Tipo de importação type_groups: - constructive: Seguidores e Marcadores + constructive: Seguidores e marcadores destructive: Bloqueios e silenciamentos types: blocking: Lista de bloqueio - bookmarks: Itens salvos + bookmarks: Marcadores domain_blocking: Lista de domínios bloqueados following: Lista de pessoas que estás a seguir lists: Listas @@ -1395,7 +1396,7 @@ pt-PT: acct: Mudou-se para cancel: Cancelar redirecionamento cancel_explanation: Cancelar o redirecionamento irá reativar a sua conta atual, mas não trará de volta os seguidores que foram migrados para essa conta. - cancelled_msg: Cancelou correctamente o redireccionamento. + cancelled_msg: Cancelou corretamente o redirecionamento. errors: already_moved: é a mesma conta para a qual já migrou missing_also_known_as: não é um pseudónimo dessa conta @@ -1405,13 +1406,13 @@ pt-PT: followers_count: Seguidores no momento da migração incoming_migrations: A migrar de uma conta diferente incoming_migrations_html: Para migrar de outra conta para esta, primeiro você precisa criar um pseudónimo. - moved_msg: A sua conta está agora a ser redireccionada para %{acct} e os seus seguidores estão a ser transferidos. + moved_msg: A sua conta está agora a ser redirecionada para %{acct} e os seus seguidores estão a ser transferidos. not_redirecting: A sua conta não está atualmente a ser redirecionada para nenhuma outra conta. on_cooldown: Migrou recentemente a sua conta. Esta função ficará disponível novamente em %{count} dias. past_migrations: Migrações anteriores proceed_with_move: Migrar seguidores - redirected_msg: A sua conta está agora a ser redireccionada para %{acct}. - redirecting_to: A sua conta está a ser redireccionada para %{acct}. + redirected_msg: A sua conta está agora a ser redirecionada para %{acct}. + redirecting_to: A sua conta está a ser redirecionada para %{acct}. set_redirect: Definir redirecionamento warning: backreference_required: A nova conta deve primeiro ser configurada para que esta seja referenciada @@ -1419,7 +1420,7 @@ pt-PT: cooldown: Após a migração, há um período de tempo de espera durante o qual não poderá voltar a migrar disabled_account: Posteriormente, a sua conta atual não será totalmente utilizável. No entanto, continuará a ter acesso à exportação de dados, bem como à reativação. followers: Esta ação irá migrar todos os seguidores da conta atual para a nova conta - only_redirect_html: Em alternativa, pode apenas colocar um redireccionamento no seu perfil. + only_redirect_html: Em alternativa, pode apenas colocar um redirecionamento no seu perfil. other_data: Nenhum outro dado será migrado automaticamente redirect: O perfil da sua conta atual será atualizado com um aviso de redirecionamento e será excluído das pesquisas moderation: @@ -1546,7 +1547,7 @@ pt-PT: remove_selected_follows: Deixar de seguir os utilizadores selecionados status: Estado da conta remote_follow: - missing_resource: Não foi possível encontrar o URL de redireccionamento para a sua conta + missing_resource: Não foi possível encontrar o URL de redirecionamento para a sua conta reports: errors: invalid_rules: não faz referência a regras válidas @@ -1639,7 +1640,7 @@ pt-PT: user_domain_block: Bloqueou %{target_name} lost_followers: Seguidores perdidos lost_follows: Pessoas que segue perdidas - preamble: Pode perder seguidores e pessoas que segue quando bloqueia um domínio ou quando os seus moderadores decidem suspender um servidor remoto. Quando isso acontecer, poderá descarregar listas de relações cessadas, para serem inspeccionadas e possivelmente importadas para outro servidor. + preamble: Pode perder seguidores e pessoas que segue quando bloqueia um domínio ou quando os seus moderadores decidem suspender um servidor remoto. Quando isso acontecer, poderá descarregar listas de relações cortadas, para serem inspecionadas e possivelmente importadas para outro servidor. purged: Informações sobre este servidor foram purgadas pelos administradores do seu servidor. type: Evento statuses: @@ -1706,8 +1707,8 @@ pt-PT: keep_pinned_hint: Não apagar nenhuma das suas publicações afixadas keep_polls: Manter sondagens keep_polls_hint: Não apaga nenhuma das suas sondagens - keep_self_bookmark: Manter as publicações que guardou - keep_self_bookmark_hint: Não apaga as suas próprias publicações se as tiver guardado + keep_self_bookmark: Manter as publicações que marcou + keep_self_bookmark_hint: Não elimina as suas próprias publicações se as tiver nos marcadores keep_self_fav: Manter as publicações que marcou keep_self_fav_hint: Não apaga as suas próprias publicações se as tiver marcado min_age: @@ -1852,8 +1853,8 @@ pt-PT: one: "%{people} pessoa nos últimos 2 dias" other: "%{people} pessoas nos últimos 2 dias" hashtags_subtitle: Explore o que está em tendência desde os últimos 2 dias - hashtags_title: Trending hashtags - hashtags_view_more: Ver mais hashtags em alta + hashtags_title: Etiquetas em tendência + hashtags_view_more: Ver mais etiquetas em tendência post_action: Compor post_step: Diga olá para o mundo com texto, fotos, vídeos ou enquetes. post_title: Faça a sua primeira publicação @@ -1874,7 +1875,7 @@ pt-PT: extra_instructions_html: Dica: A ligação no seu site pode ser invisível. A parte importante é rel="me" que impede a personificação em sites com conteúdo gerado pelo utilizador. Pode até utilizar uma etiqueta link no cabeçalho da página ao invés de a, mas o HTML deve ser acessível sem executar JavaScript. here_is_how: Veja como hint_html: "Verificar a sua identidade no Mastodon é para todos. Baseado em normas públicas da web, agora e para sempre gratuitas. Tudo o que precisa é de um site pessoal pelo qual as pessoas o reconheçam. Quando coloca no seu perfil uma ligação para esse site, vamos verificar que o site tem uma ligação de volta para o seu perfil e mostrar um indicador visual." - instructions_html: Copie e cole o código abaixo no HTML do seu site. Em seguida, adicione o endereço do seu site em um dos campos extras no seu perfil, na aba "Editar perfil" e salve as alterações. + instructions_html: Copie e cole o código abaixo no HTML do seu site. Em seguida, adicione o endereço do seu site num dos campos extras no seu perfil, na aba "Editar perfil" e guarde as alterações. verification: Verificação verified_links: As suas ligações verificadas webauthn_credentials: diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index e552b42b187080..81be19a44e7b8a 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -206,7 +206,7 @@ ar: setting_aggregate_reblogs: جمّع المنشورات المعاد نشرها في الخيوط الزمنية setting_always_send_emails: ارسل إشعارات البريد الإلكتروني دائماً setting_auto_play_gif: تشغيل تلقائي لِوَسائط جيف المتحركة - setting_boost_modal: إظهار مربع حوار التأكيد قبل إعادة مشاركة أي منشور + setting_boost_modal: إظهار مربع حوار التأكيد قبل إعادة نشر أي منشور setting_default_language: لغة النشر setting_default_privacy: خصوصية المنشور setting_default_sensitive: اعتبر الوسائط دائما كمحتوى حساس diff --git a/config/locales/simple_form.pt-PT.yml b/config/locales/simple_form.pt-PT.yml index a76076a5cbc6ee..25348f27701f8f 100644 --- a/config/locales/simple_form.pt-PT.yml +++ b/config/locales/simple_form.pt-PT.yml @@ -52,7 +52,7 @@ pt-PT: locale: O idioma da interface de utilizador, e-mails e notificações push password: Use pelo menos 8 caracteres phrase: Será correspondido independentemente da capitalização ou do aviso de conteúdo duma publicação - scopes: Quais as API a que será concedido acesso. Se escolher uma abrangência de nível superior, não precisará de as seleccionar individualmente. + scopes: Quais as API a que a aplicação terá permissão para aceder. Se selecionar um âmbito de nível superior, não precisa de selecionar âmbitos individuais. setting_aggregate_reblogs: Não mostrar novos reforços de publicações recentemente reforçadas (só afecta publicações acabadas de reforçar) setting_always_send_emails: Normalmente as notificações por e-mail não serão enviadas quando estiver a utilizar ativamente o Mastodon setting_default_sensitive: Media problemática oculta por padrão, pode ser revelada com um clique @@ -81,7 +81,7 @@ pt-PT: backups_retention_period: Os utilizadores têm a possibilidade de gerar arquivos das suas mensagens para descarregar mais tarde. Quando definido para um valor positivo, estes arquivos serão automaticamente eliminados do seu armazenamento após o número de dias especificado. bootstrap_timeline_accounts: Estas contas serão destacadas no topo das recomendações aos novos utilizadores. closed_registrations_message: Apresentado quando as inscrições estiverem encerradas - content_cache_retention_period: Todas as publicações de outros servidores (incluindo boosts e respostas) serão eliminadas após o número de dias especificado, independentemente de qualquer interação do utilizador local com essas publicações. Isto inclui publicações em que um utilizador local as tenha marcado como favoritas ou adicionado aos items salvos. As menções privadas entre utilizadores de instâncias diferentes também se perderão e serão impossíveis de restaurar. A utilização desta definição destina-se a instâncias para fins especiais e quebra muitas expectativas dos utilizadores quando implementada para utilização geral. + content_cache_retention_period: Todas as publicações de outros servidores (incluindo boosts e respostas) serão eliminadas após o número de dias especificado, independentemente de qualquer interação do utilizador local com essas publicações. Isto inclui publicações em que um utilizador local as tenha marcado ou favoritado. As menções privadas entre utilizadores de instâncias diferentes também se perderão e serão impossíveis de restaurar. A utilização desta definição destina-se a instâncias para fins especiais e quebra muitas expectativas dos utilizadores quando implementada para utilização geral. custom_css: Pode aplicar estilos personalizados na versão web do Mastodon. favicon: WEBP, PNG, GIF ou JPG. Substitui o ícone de favorito padrão do Mastodon por um ícone personalizado. mascot: Sobrepõe-se à ilustração na interface web avançada. @@ -99,9 +99,9 @@ pt-PT: theme: Tema que os visitantes e os novos utilizadores veem. thumbnail: Uma imagem de cerca de 2:1, apresentada ao lado da informação do seu servidor. timeline_preview: Os visitantes sem sessão iniciada poderão consultar as publicações públicas mais recentes disponíveis no servidor. - trendable_by_default: Ignorar a revisão manual do conteúdo em alta. Elementos em avulso poderão ainda assim ser retirados das tendências mesmo após a sua apresentação. - trends: As publicações em alta mostram quais as publicações, etiquetas e notícias que estão a ganhar destaque no seu servidor. - trends_as_landing_page: Mostrar conteúdo de tendências para usuários logados e visitantes em vez de uma descrição deste servidor. Requer que as tendências sejam ativadas. + trendable_by_default: Ignorar a revisão manual do conteúdo de tendências. Os itens individuais ainda podem ser removidos das tendências após a apresentação. + trends: As tendências mostram quais as publicações, etiquetas e notícias que estão a ganhar destaque no seu servidor. + trends_as_landing_page: Mostrar conteúdo de tendências a utilizadores e visitantes com sessão terminada em vez de uma descrição deste servidor. Requer que as tendências estejam ativadas. form_challenge: current_password: Está a entrar numa área segura imports: @@ -129,7 +129,7 @@ pt-PT: tag: name: Só pode alterar a capitalização das letras, por exemplo, para torná-las mais legíveis user: - chosen_languages: Quando seleccionado, só serão mostradas nas cronologias públicas as publicações nos idiomas escolhidos + chosen_languages: Quando selecionado, só serão mostradas nas cronologias públicas as publicações nos idiomas escolhidos role: A função controla que permissões o utilizador tem user_role: color: Cor a ser utilizada para a função em toda a interface de utilizador, como RGB no formato hexadecimal @@ -222,7 +222,7 @@ pt-PT: setting_reduce_motion: Reduz movimento em animações setting_system_font_ui: Usar o tipo de letra padrão do sistema setting_theme: Tema do sítio - setting_trends: Mostrar o que está hoje em alta + setting_trends: Mostrar as tendências de hoje setting_unfollow_modal: Solicitar confirmação antes de deixar de seguir alguém setting_use_blurhash: Mostrar gradientes coloridos para medias ocultas setting_use_pending_items: Modo lento @@ -253,7 +253,7 @@ pt-PT: mascot: Mascote personalizada (legado) media_cache_retention_period: Período de retenção de ficheiros de media em cache peers_api_enabled: Publicar lista de servidores descobertos na API - profile_directory: Habilitar diretório de perfis + profile_directory: Ativar o diretório de perfis registrations_mode: Quem se pode inscrever require_invite_text: Requerer uma razão para entrar show_domain_blocks: Mostrar domínios bloqueados @@ -268,8 +268,8 @@ pt-PT: theme: Tema predefinido thumbnail: Miniatura do servidor timeline_preview: Permitir acesso não autenticado às cronologias públicas - trendable_by_default: Permitir publicações em alta sem revisão prévia - trends: Activar publicações em alta + trendable_by_default: Permitir tendências sem revisão prévia + trends: Ativar tendências trends_as_landing_page: Usar tendências como página inicial interactions: must_be_follower: Bloquear notificações de não-seguidores @@ -303,7 +303,7 @@ pt-PT: label: Está disponível uma nova versão do Mastodon none: Nunca notificar atualizações (não recomendado) patch: Notificar sobre atualizações de correções de problemas - trending_tag: Uma nova publicação em alta requer avaliação + trending_tag: Uma nova publicação em tendência requer revisão rule: hint: Informação Adicional text: Regra @@ -313,7 +313,7 @@ pt-PT: tag: listable: Permitir que esta etiqueta apareça em pesquisas e no diretório de perfis name: Etiqueta - trendable: Permitir que esta etiqueta apareça em alta + trendable: Permitir que esta etiqueta apareça nas tendências usable: Permitir que as publicações usem esta hashtag localmente user: role: Cargo From b265a654d74f649b6a58debe39a439cc9b07b730 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 5 Sep 2024 11:46:11 +0200 Subject: [PATCH 33/47] Fix wrong width on content warnings and filters in web UI (#31761) --- app/javascript/styles/mastodon/components.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index d892c008bc23b6..2fc195a3bdc559 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -10916,6 +10916,7 @@ noscript { } .content-warning { + box-sizing: border-box; background: rgba($ui-highlight-color, 0.05); color: $secondary-text-color; border-top: 1px solid; From ba9fd1c32e760582041758105b2844debed640a3 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 05:48:33 -0400 Subject: [PATCH 34/47] Add coverage for `Account#prepare_contents` callback (#31748) --- spec/models/account_spec.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 27707fa897e3d1..1e8e4b1e4d35de 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -723,6 +723,30 @@ end end + describe '#prepare_contents' do + subject { Fabricate.build :account, domain: domain, note: ' padded note ', display_name: ' padded name ' } + + context 'with local account' do + let(:domain) { nil } + + it 'strips values' do + expect { subject.valid? } + .to change(subject, :note).to('padded note') + .and(change(subject, :display_name).to('padded name')) + end + end + + context 'with remote account' do + let(:domain) { 'host.example' } + + it 'preserves values' do + expect { subject.valid? } + .to not_change(subject, :note) + .and(not_change(subject, :display_name)) + end + end + end + describe 'Normalizations' do describe 'username' do it { is_expected.to normalize(:username).from(" \u3000bob \t \u00a0 \n ").to('bob') } From f9712fad1b62e93961280243970c6ccff4d3e3ff Mon Sep 17 00:00:00 2001 From: James May Date: Thu, 5 Sep 2024 19:48:42 +1000 Subject: [PATCH 35/47] Direct link to each authorized_application entry with html anchor (#31677) Co-authored-by: Matt Jankowski --- app/views/oauth/authorized_applications/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/oauth/authorized_applications/index.html.haml b/app/views/oauth/authorized_applications/index.html.haml index b6819bbd72518f..eb544d079b5728 100644 --- a/app/views/oauth/authorized_applications/index.html.haml +++ b/app/views/oauth/authorized_applications/index.html.haml @@ -7,7 +7,7 @@ .applications-list - @applications.each do |application| - .applications-list__item + .applications-list__item{ id: dom_id(application) } - if application.website.present? = link_to application.name, application.website, target: '_blank', rel: 'noopener noreferrer', class: 'announcements-list__item__title' - else From bd8cd0c6e746356eea83ffc4d3185a51e4eeb5dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:50:38 +0000 Subject: [PATCH 36/47] Update dependency cssnano to v7.0.6 (#31757) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 110 +++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/yarn.lock b/yarn.lock index c77ebfa4444f19..1b3a7f1e4072e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6717,26 +6717,26 @@ __metadata: languageName: node linkType: hard -"cssnano-preset-default@npm:^7.0.5": - version: 7.0.5 - resolution: "cssnano-preset-default@npm:7.0.5" +"cssnano-preset-default@npm:^7.0.6": + version: 7.0.6 + resolution: "cssnano-preset-default@npm:7.0.6" dependencies: browserslist: "npm:^4.23.3" css-declaration-sorter: "npm:^7.2.0" cssnano-utils: "npm:^5.0.0" - postcss-calc: "npm:^10.0.1" + postcss-calc: "npm:^10.0.2" postcss-colormin: "npm:^7.0.2" - postcss-convert-values: "npm:^7.0.3" - postcss-discard-comments: "npm:^7.0.2" + postcss-convert-values: "npm:^7.0.4" + postcss-discard-comments: "npm:^7.0.3" postcss-discard-duplicates: "npm:^7.0.1" postcss-discard-empty: "npm:^7.0.0" postcss-discard-overridden: "npm:^7.0.0" - postcss-merge-longhand: "npm:^7.0.3" - postcss-merge-rules: "npm:^7.0.3" + postcss-merge-longhand: "npm:^7.0.4" + postcss-merge-rules: "npm:^7.0.4" postcss-minify-font-values: "npm:^7.0.0" postcss-minify-gradients: "npm:^7.0.0" postcss-minify-params: "npm:^7.0.2" - postcss-minify-selectors: "npm:^7.0.3" + postcss-minify-selectors: "npm:^7.0.4" postcss-normalize-charset: "npm:^7.0.0" postcss-normalize-display-values: "npm:^7.0.0" postcss-normalize-positions: "npm:^7.0.0" @@ -6750,10 +6750,10 @@ __metadata: postcss-reduce-initial: "npm:^7.0.2" postcss-reduce-transforms: "npm:^7.0.0" postcss-svgo: "npm:^7.0.1" - postcss-unique-selectors: "npm:^7.0.2" + postcss-unique-selectors: "npm:^7.0.3" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/ffa7c6fa16c6ad98b7732fc563de74d492e6ad6d243a9f00431c0cbdbc576bcd49226d2695d881465d32dea0a2916add40ac10e7560dd7b5de9fd0fa25ee081b + checksum: 10c0/5c827a9f6b35475267af0512d55f569994b8334eb06565498daa2070ef52f0cdd2013f5efc1cbc0b4664370f491b0080f93c8ee56a7730d38fdf451fb65b030c languageName: node linkType: hard @@ -6767,14 +6767,14 @@ __metadata: linkType: hard "cssnano@npm:^7.0.0": - version: 7.0.5 - resolution: "cssnano@npm:7.0.5" + version: 7.0.6 + resolution: "cssnano@npm:7.0.6" dependencies: - cssnano-preset-default: "npm:^7.0.5" + cssnano-preset-default: "npm:^7.0.6" lilconfig: "npm:^3.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/cb43ed964787dca33efb44d8f4fea8a49c495db44d1d12940493f0dd5d63db78e01c5b140fe42b480b332733602a25f4c85186d00977eb3070b29f7422761985 + checksum: 10c0/19ff09931a1531e7c0c0d8928da554d99213aa0bb1f3b93cc6b4987727d60a8cd5537b113a5cf4f95cc1db65bba3f2b35476bd63bb57e7469d4eab73e07d736d languageName: node linkType: hard @@ -13278,15 +13278,15 @@ __metadata: languageName: node linkType: hard -"postcss-calc@npm:^10.0.1": - version: 10.0.1 - resolution: "postcss-calc@npm:10.0.1" +"postcss-calc@npm:^10.0.2": + version: 10.0.2 + resolution: "postcss-calc@npm:10.0.2" dependencies: - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4.38 - checksum: 10c0/5e38cc6f082f87e82067497b41684410784223ecd3701bf52242ea9f2f467f1fad6b5a561f8aa3be307d89435b4060f58aeb27c4064003586daf653cc4d91fef + checksum: 10c0/f57c9db7a7a2f3a0cdf45990089c051248d995bb2b9d1bd1fcd1634507851e92ea85bbc71a3594e359e9e9287ba0a820c90d6d292126a4b735cda364a86ce9cf languageName: node linkType: hard @@ -13354,15 +13354,15 @@ __metadata: languageName: node linkType: hard -"postcss-convert-values@npm:^7.0.3": - version: 7.0.3 - resolution: "postcss-convert-values@npm:7.0.3" +"postcss-convert-values@npm:^7.0.4": + version: 7.0.4 + resolution: "postcss-convert-values@npm:7.0.4" dependencies: browserslist: "npm:^4.23.3" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/dbb6278bd8d8b11e448933d823426c883bff3f6abeaa23c7530cc4668b9da6f714e073840f280273f8a14022c3a99eb461ec732f7539e062b32f5281e1be6526 + checksum: 10c0/9839b29f7c638672115c9fef5ed7df016aa43ea9dd42a4a2ace16e6a49c75246d2c19f3e03a6409ed3bc7c2fa4de6203bf5789cef8268c76618326b68e3bc591 languageName: node linkType: hard @@ -13420,14 +13420,14 @@ __metadata: languageName: node linkType: hard -"postcss-discard-comments@npm:^7.0.2": - version: 7.0.2 - resolution: "postcss-discard-comments@npm:7.0.2" +"postcss-discard-comments@npm:^7.0.3": + version: 7.0.3 + resolution: "postcss-discard-comments@npm:7.0.3" dependencies: - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/c01632e643b6ec1f61ad59efe06a9e8dfc7fcedeb1551ae48fc33fa801353f6222e31954286cd97171c694f34c2b4c7f7a2213fd0f913e37c34d0353258ed234 + checksum: 10c0/7700c8fb9a83c6ea5cc784267b9afd6e2968fda0358d583af5913baa28dfc91b0f2a4bd0b2bd62a86ebcb8dadb2547e287beae25b5a097e21c1f723367ccf112 languageName: node linkType: hard @@ -13572,29 +13572,29 @@ __metadata: languageName: node linkType: hard -"postcss-merge-longhand@npm:^7.0.3": - version: 7.0.3 - resolution: "postcss-merge-longhand@npm:7.0.3" +"postcss-merge-longhand@npm:^7.0.4": + version: 7.0.4 + resolution: "postcss-merge-longhand@npm:7.0.4" dependencies: postcss-value-parser: "npm:^4.2.0" - stylehacks: "npm:^7.0.3" + stylehacks: "npm:^7.0.4" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/b968c3d16f3edc6075b20219a1165c089dc454a6a42951dcdfc94adb932fb96ef7bcd465c6cd21b0e5b55ac08921355ddbbbc7cdcf87a345e4bef8b3cdd2e7e9 + checksum: 10c0/6f50f7775dd361f83daf1acb3e0001d700ed2b7b9bea02df172143adc7fa196ce9209c9e482010ce36fd704512433b62692c5ab2eef5226db71ea3e694654dc7 languageName: node linkType: hard -"postcss-merge-rules@npm:^7.0.3": - version: 7.0.3 - resolution: "postcss-merge-rules@npm:7.0.3" +"postcss-merge-rules@npm:^7.0.4": + version: 7.0.4 + resolution: "postcss-merge-rules@npm:7.0.4" dependencies: browserslist: "npm:^4.23.3" caniuse-api: "npm:^3.0.0" cssnano-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/3cd20484ab6d15c62eded408248d5eeaba52a573935943f933865680e070a0e75b3a7447802c575bc86e1fae667cf51d9d5766537835d9b8c090337b5adf928e + checksum: 10c0/fffdcef4ada68e92ab8e6dc34a3b9aa2b87188cd4d08f5ba0ff2aff7e3e3c7f086830748ff64db091b5ccb9ac59ac37cfaab1268ed3efb50ab9c4f3714eb5f6d languageName: node linkType: hard @@ -13635,15 +13635,15 @@ __metadata: languageName: node linkType: hard -"postcss-minify-selectors@npm:^7.0.3": - version: 7.0.3 - resolution: "postcss-minify-selectors@npm:7.0.3" +"postcss-minify-selectors@npm:^7.0.4": + version: 7.0.4 + resolution: "postcss-minify-selectors@npm:7.0.4" dependencies: cssesc: "npm:^3.0.0" - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/5211f63a1672f646a1bab57bd8eac0816d42adacb5e286ad5e6e342a795bb0d086bd6044a1b338311ca28f33f2c1833165ee611eaa671287379821ba3c5d68ad + checksum: 10c0/212b8f3d62eb2a27ed57d4e76b75b0886806ddb9e2497c0bb79308fa75dabaaaa4ed2b97734896e87603272d05231fd74aee2c256a48d77aa468b5b64cc7866a languageName: node linkType: hard @@ -14004,7 +14004,7 @@ __metadata: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.13, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.1.0, postcss-selector-parser@npm:^6.1.1, postcss-selector-parser@npm:^6.1.2": +"postcss-selector-parser@npm:^6.0.13, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.1.0, postcss-selector-parser@npm:^6.1.2": version: 6.1.2 resolution: "postcss-selector-parser@npm:6.1.2" dependencies: @@ -14026,14 +14026,14 @@ __metadata: languageName: node linkType: hard -"postcss-unique-selectors@npm:^7.0.2": - version: 7.0.2 - resolution: "postcss-unique-selectors@npm:7.0.2" +"postcss-unique-selectors@npm:^7.0.3": + version: 7.0.3 + resolution: "postcss-unique-selectors@npm:7.0.3" dependencies: - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/cc54c57cd1c5a6e3e166ec63cc036d9e2df80b05e508d9ce754ca4193bf8c1bfcc16b3c6f0d81b8352a3282201d249b90bb87abacfcfb9065c9e3705ea5d110e + checksum: 10c0/2eb90eb0745d1e29d411ea5108f1cd9737de5b8f739cabc717074872bc4015950c9963f870b23b33b9ef45e7887eecfe5560cffee56616d4e0b8d0fac4f7cb10 languageName: node linkType: hard @@ -16551,15 +16551,15 @@ __metadata: languageName: node linkType: hard -"stylehacks@npm:^7.0.3": - version: 7.0.3 - resolution: "stylehacks@npm:7.0.3" +"stylehacks@npm:^7.0.4": + version: 7.0.4 + resolution: "stylehacks@npm:7.0.4" dependencies: browserslist: "npm:^4.23.3" - postcss-selector-parser: "npm:^6.1.1" + postcss-selector-parser: "npm:^6.1.2" peerDependencies: postcss: ^8.4.31 - checksum: 10c0/5030334b06ef705b5700444dab120b540b09159e935e75b60f25bd56db1d85f0d11755f0b0f64ce3f12c5a72ff1b6f57fea49c26d18eb0de2334d6a143b94f8d + checksum: 10c0/b4d0b280ba274503ecc04111cc11c713e0d65db079fbcd8b42d6350be1cca20e28611eddee93b419aa208176a0d3a5fff83d83ef958d1876713809b6a2787c0c languageName: node linkType: hard From 8fd3e37747b6cdde100bae33ac5d84f3255c24ce Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 06:20:27 -0400 Subject: [PATCH 37/47] Update `parser` and `rubocop` gems (#31760) --- .rubocop_todo.yml | 5 +---- Gemfile.lock | 13 +++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 09acb795bf26cb..a6e51d6aee1c7e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.65.0. +# using RuboCop version 1.66.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -35,7 +35,6 @@ Rails/OutputSafety: # Configuration parameters: AllowedVars. Style/FetchEnvVar: Exclude: - - 'app/lib/redis_configuration.rb' - 'app/lib/translation_service.rb' - 'config/environments/production.rb' - 'config/initializers/2_limited_federation_mode.rb' @@ -44,7 +43,6 @@ Style/FetchEnvVar: - 'config/initializers/devise.rb' - 'config/initializers/paperclip.rb' - 'config/initializers/vapid.rb' - - 'lib/mastodon/redis_config.rb' - 'lib/tasks/repo.rake' # This cop supports safe autocorrection (--autocorrect). @@ -93,7 +91,6 @@ Style/OptionalBooleanParameter: - 'app/services/fetch_resource_service.rb' - 'app/workers/domain_block_worker.rb' - 'app/workers/unfollow_follow_worker.rb' - - 'lib/mastodon/redis_config.rb' # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. diff --git a/Gemfile.lock b/Gemfile.lock index a533b662411414..c70823d0513e9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -584,7 +584,7 @@ GEM ostruct (0.6.0) ox (2.14.18) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc parslet (2.0.0) @@ -698,8 +698,7 @@ GEM responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.3.6) - strscan + rexml (3.3.7) rotp (6.3.0) rouge (4.3.0) rpam2 (4.0.2) @@ -735,18 +734,17 @@ GEM rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) rspec-support (3.13.1) - rubocop (1.65.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -826,7 +824,6 @@ GEM stringio (3.1.1) strong_migrations (2.0.0) activerecord (>= 6.1) - strscan (3.1.0) swd (1.3.0) activesupport (>= 3) attr_required (>= 0.0.5) From 5b1ae15a368aa800fd045d6e3b6a7500c7196889 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:06:05 +0200 Subject: [PATCH 38/47] Update docker.io/ruby Docker tag to v3.3.5 (#31758) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd555f7027d018..c7c02d9b467ef9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ARG BUILDPLATFORM=${BUILDPLATFORM} # Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.3.x"] # renovate: datasource=docker depName=docker.io/ruby -ARG RUBY_VERSION="3.3.4" +ARG RUBY_VERSION="3.3.5" # # Node version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="20"] # renovate: datasource=node-version depName=node ARG NODE_MAJOR_VERSION="20" From e820cc30b8798c1d9e30d4e780c511b5ab395345 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 07:54:27 -0400 Subject: [PATCH 39/47] Convert invites controller spec to system/request specs (#31755) --- app/views/invites/_invite.html.haml | 2 +- spec/controllers/invites_controller_spec.rb | 84 ------------------ spec/requests/invites_spec.rb | 31 +++++++ .../support/matchers/private_cache_control.rb | 14 +++ spec/system/invites_spec.rb | 86 +++++++++++++++++++ spec/system/tags_spec.rb | 3 + 6 files changed, 135 insertions(+), 85 deletions(-) delete mode 100644 spec/controllers/invites_controller_spec.rb create mode 100644 spec/requests/invites_spec.rb create mode 100644 spec/support/matchers/private_cache_control.rb create mode 100644 spec/system/invites_spec.rb diff --git a/app/views/invites/_invite.html.haml b/app/views/invites/_invite.html.haml index 94e1a7112561ea..892fdc5a0e38af 100644 --- a/app/views/invites/_invite.html.haml +++ b/app/views/invites/_invite.html.haml @@ -1,4 +1,4 @@ -%tr +%tr{ id: dom_id(invite) } %td .input-copy .input-copy__wrapper diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb deleted file mode 100644 index 192c5b00ba86e7..00000000000000 --- a/spec/controllers/invites_controller_spec.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe InvitesController do - render_views - - let(:user) { Fabricate(:user) } - - before do - sign_in user - end - - describe 'GET #index' do - before do - Fabricate(:invite, user: user) - end - - context 'when everyone can invite' do - before do - UserRole.everyone.update(permissions: UserRole.everyone.permissions | UserRole::FLAGS[:invite_users]) - get :index - end - - it 'returns http success' do - expect(response).to have_http_status(:success) - end - - it 'returns private cache control headers' do - expect(response.headers['Cache-Control']).to include('private, no-store') - end - end - - context 'when not everyone can invite' do - before do - UserRole.everyone.update(permissions: UserRole.everyone.permissions & ~UserRole::FLAGS[:invite_users]) - get :index - end - - it 'returns http forbidden' do - expect(response).to have_http_status(403) - end - end - end - - describe 'POST #create' do - subject { post :create, params: { invite: { max_uses: '10', expires_in: 1800 } } } - - context 'when everyone can invite' do - before do - UserRole.everyone.update(permissions: UserRole.everyone.permissions | UserRole::FLAGS[:invite_users]) - end - - it 'succeeds to create a invite' do - expect { subject }.to change(Invite, :count).by(1) - expect(subject).to redirect_to invites_path - expect(Invite.last).to have_attributes(user_id: user.id, max_uses: 10) - end - end - - context 'when not everyone can invite' do - before do - UserRole.everyone.update(permissions: UserRole.everyone.permissions & ~UserRole::FLAGS[:invite_users]) - end - - it 'returns http forbidden' do - expect(subject).to have_http_status(403) - end - end - end - - describe 'DELETE #destroy' do - subject { delete :destroy, params: { id: invite.id } } - - let(:invite) { Fabricate(:invite, user: user, expires_at: nil) } - - it 'expires invite and redirects' do - expect { subject } - .to(change { invite.reload.expired? }.to(true)) - expect(response) - .to redirect_to invites_path - end - end -end diff --git a/spec/requests/invites_spec.rb b/spec/requests/invites_spec.rb new file mode 100644 index 00000000000000..8a5ad2ccd159e1 --- /dev/null +++ b/spec/requests/invites_spec.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'Invites' do + let(:user) { Fabricate(:user) } + + before { sign_in user } + + context 'when not everyone can invite' do + before { UserRole.everyone.update(permissions: UserRole.everyone.permissions & ~UserRole::FLAGS[:invite_users]) } + + describe 'GET /invites' do + it 'returns http forbidden' do + get invites_path + + expect(response) + .to have_http_status(403) + end + end + + describe 'POST /invites' do + it 'returns http forbidden' do + post invites_path, params: { invite: { max_users: '10', expires_in: 1800 } } + + expect(response) + .to have_http_status(403) + end + end + end +end diff --git a/spec/support/matchers/private_cache_control.rb b/spec/support/matchers/private_cache_control.rb new file mode 100644 index 00000000000000..7fcf56be3e8ec8 --- /dev/null +++ b/spec/support/matchers/private_cache_control.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +RSpec::Matchers.define :have_private_cache_control do + match do |page| + page.response_headers['Cache-Control'] == 'private, no-store' + end + + failure_message do |page| + <<~ERROR + Expected page to have `Cache-Control` header with `private, no-store` but it has: + #{page.response_headers['Cache-Control']} + ERROR + end +end diff --git a/spec/system/invites_spec.rb b/spec/system/invites_spec.rb new file mode 100644 index 00000000000000..648bbea82562a1 --- /dev/null +++ b/spec/system/invites_spec.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'Invites' do + include ActionView::RecordIdentifier + + let(:user) { Fabricate :user } + + before do + host! 'localhost:3000' # TODO: Move into before for all system specs? + sign_in user + end + + describe 'Viewing invites' do + it 'Lists existing user invites' do + invite = Fabricate :invite, user: user + + visit invites_path + + within css_id(invite) do + expect(page) + .to have_content(invite.uses) + .and have_private_cache_control + expect(copyable_field.value) + .to eq(public_invite_url(invite_code: invite.code)) + end + end + end + + describe 'Creating a new invite' do + it 'Saves the invite for the user' do + visit invites_path + + fill_invite_form + + expect { submit_form } + .to change(user.invites, :count).by(1) + end + end + + describe 'Deleting an existing invite' do + it 'Expires the invite' do + invite = Fabricate :invite, user: user + + visit invites_path + + expect { delete_invite(invite) } + .to change { invite.reload.expired? }.to(true) + + within css_id(invite) do + expect(page).to have_content I18n.t('invites.expired') + end + end + end + + private + + def css_id(record) + "##{dom_id(record)}" # TODO: Extract to system spec helper? + end + + def copyable_field + within '.input-copy' do + find(:field, type: :text, readonly: true) + end + end + + def submit_form + click_on I18n.t('invites.generate') + end + + def delete_invite(invite) + within css_id(invite) do + click_on I18n.t('invites.delete') + end + end + + def fill_invite_form + select I18n.t('invites.max_uses', count: 100), + from: I18n.t('simple_form.labels.defaults.max_uses') + select I18n.t("invites.expires_in.#{30.minutes.to_i}"), + from: I18n.t('simple_form.labels.defaults.expires_in') + check I18n.t('simple_form.labels.defaults.autofollow') + end +end diff --git a/spec/system/tags_spec.rb b/spec/system/tags_spec.rb index e9ad970a5435fb..f39c6bf0d8dc24 100644 --- a/spec/system/tags_spec.rb +++ b/spec/system/tags_spec.rb @@ -6,11 +6,14 @@ describe 'Viewing a tag' do let(:tag) { Fabricate(:tag, name: 'test') } + before { sign_in Fabricate(:user) } + it 'visits the tag page and renders the web app' do visit tag_path(tag) expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_private_cache_control end end end From b4b639ee4a059385874f143027b75516c8db17d9 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Thu, 5 Sep 2024 07:34:13 -0500 Subject: [PATCH 40/47] Fix radio checkbox visibility in Report dialogs (#31752) --- app/javascript/styles/mastodon/components.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 2fc195a3bdc559..5936ef8a6490ba 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -6437,7 +6437,7 @@ a.status-card { } .dialog-option .poll__input { - border-color: $inverted-text-color; + border-color: $darker-text-color; color: $ui-secondary-color; display: inline-flex; align-items: center; @@ -6451,13 +6451,13 @@ a.status-card { &:active, &:focus, &:hover { - border-color: lighten($inverted-text-color, 15%); + border-color: $valid-value-color; border-width: 4px; } &.active { - border-color: $inverted-text-color; - background: $inverted-text-color; + border-color: $valid-value-color; + background: $valid-value-color; } } From f85694acfdaf57c113bba49ca2aef949b16d4141 Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Thu, 5 Sep 2024 16:06:58 +0200 Subject: [PATCH 41/47] Add credentials to redis sentinel configuration (#31768) --- lib/mastodon/redis_configuration.rb | 45 ++++++++++++------- spec/lib/mastodon/redis_configuration_spec.rb | 23 +++++++--- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/lib/mastodon/redis_configuration.rb b/lib/mastodon/redis_configuration.rb index 5a096a1bf2210f..3d739a2ac6c533 100644 --- a/lib/mastodon/redis_configuration.rb +++ b/lib/mastodon/redis_configuration.rb @@ -57,39 +57,50 @@ def cache_namespace def setup_config(prefix: nil, defaults: {}) prefix = "#{prefix}REDIS_" - 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) - sentinel_port = ENV.fetch("#{prefix}SENTINEL_PORT", 26_379) - sentinel_list = ENV.fetch("#{prefix}SENTINELS", nil) + 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]) return { url:, driver: } if url - sentinels = parse_sentinels(sentinel_list, default_port: sentinel_port) + sentinel_options = setup_sentinels(prefix, default_user: user, default_password: password) - if name.present? && sentinels.present? - host = name + if sentinel_options.present? + host = sentinel_options[:name] port = nil db ||= 0 - else - sentinels = nil end url = construct_uri(host, port, db, user, password) if url.present? - { url:, driver:, name:, sentinels: } + { url:, driver: }.merge(sentinel_options) else - # Fall back to base config. This has defaults for the URL - # so this cannot lead to an endless loop. + # Fall back to base config, which has defaults for the URL + # so this cannot lead to endless recursion. base end end + def setup_sentinels(prefix, default_user: nil, default_password: nil) + name = ENV.fetch("#{prefix}SENTINEL_MASTER", nil) + sentinel_port = ENV.fetch("#{prefix}SENTINEL_PORT", 26_379) + sentinel_list = ENV.fetch("#{prefix}SENTINELS", nil) + sentinel_username = ENV.fetch("#{prefix}SENTINEL_USERNAME", default_user) + sentinel_password = ENV.fetch("#{prefix}SENTINEL_PASSWORD", default_password) + + sentinels = parse_sentinels(sentinel_list, default_port: sentinel_port) + + if name.present? && sentinels.present? + { name:, sentinels:, sentinel_username:, sentinel_password: } + else + {} + end + end + def construct_uri(host, port, db, user, password) return nil if host.blank? diff --git a/spec/lib/mastodon/redis_configuration_spec.rb b/spec/lib/mastodon/redis_configuration_spec.rb index d14adf95182dc9..e36dcfba0ad698 100644 --- a/spec/lib/mastodon/redis_configuration_spec.rb +++ b/spec/lib/mastodon/redis_configuration_spec.rb @@ -100,10 +100,27 @@ expect(subject[:url]).to eq 'redis://:testpass1@mainsentinel/0' end + it 'uses the redis password to authenticate with sentinels' do + expect(subject[:sentinel_password]).to eq 'testpass1' + 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 + + context "when giving dedicated credentials in `#{prefix}REDIS_SENTINEL_USERNAME` and `#{prefix}REDIS_SENTINEL_PASSWORD`" do + around do |example| + ClimateControl.modify "#{prefix}REDIS_SENTINEL_USERNAME": 'sentinel_user', "#{prefix}REDIS_SENTINEL_PASSWORD": 'sentinel_pass1' do + example.run + end + end + + it 'uses the credential to authenticate with sentinels' do + expect(subject[:sentinel_username]).to eq 'sentinel_user' + expect(subject[:sentinel_password]).to eq 'sentinel_pass1' + end + end end context 'when giving sentinels without port numbers' do @@ -154,8 +171,6 @@ url: 'redis://localhost:6379/0', driver: :hiredis, namespace: nil, - name: nil, - sentinels: nil, }) end end @@ -188,8 +203,6 @@ url: 'redis://:testpass@redis.example.com:3333/3', driver: :hiredis, namespace: nil, - name: nil, - sentinels: nil, }) end end @@ -218,8 +231,6 @@ namespace: 'cache', expires_in: 10.minutes, connect_timeout: 5, - name: nil, - sentinels: nil, pool: { size: 5, timeout: 5, From d58faa20181c95b82ace744494a683b81eea681a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 10:07:17 -0400 Subject: [PATCH 42/47] Remove references to deprecated `Import` model (#31759) --- app/views/settings/imports/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/settings/imports/index.html.haml b/app/views/settings/imports/index.html.haml index bfddd4546022eb..634631b5aaa4cc 100644 --- a/app/views/settings/imports/index.html.haml +++ b/app/views/settings/imports/index.html.haml @@ -23,7 +23,7 @@ = f.input :mode, as: :radio_buttons, collection_wrapper_tag: 'ul', - collection: Import::MODES, + collection: Form::Import::MODES, item_wrapper_tag: 'li', label_method: ->(mode) { safe_join([I18n.t("imports.modes.#{mode}"), content_tag(:span, I18n.t("imports.modes.#{mode}_long"), class: 'hint')]) } From 850478dc140f16d407ade46f791e08f3ceb4bf2e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 10:41:14 -0400 Subject: [PATCH 43/47] Use `conflicted` configuration for renovate rebase strategy (#31770) --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 968c77cac27108..8a106762838bcb 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -7,6 +7,7 @@ ':prConcurrentLimitNone', // Remove limit for open PRs at any time. ':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour. ], + rebaseWhen: 'conflicted', minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it // packageRules order is important, they are applied from top to bottom and are merged, // meaning the most important ones must be at the bottom, for example grouping rules From bc435c63bd99df757d02737674ca2f39aca49438 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 5 Sep 2024 16:57:53 +0200 Subject: [PATCH 44/47] Change width of columns in advanced web UI (#31762) --- app/javascript/styles/mastodon/components.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 5936ef8a6490ba..0b7c9ac90310a6 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2789,7 +2789,7 @@ $ui-header-logo-wordmark-width: 99px; } .column { - width: 350px; + width: 400px; position: relative; box-sizing: border-box; display: flex; @@ -2822,7 +2822,7 @@ $ui-header-logo-wordmark-width: 99px; } .drawer { - width: 300px; + width: 350px; box-sizing: border-box; display: flex; flex-direction: column; From 5acec087caed4a2fdf0fd8ed11f891222496f321 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Sep 2024 11:36:05 -0400 Subject: [PATCH 45/47] Simplify basic presence validations (#29664) --- spec/models/announcement_spec.rb | 9 +----- spec/models/block_spec.rb | 13 ++------- spec/models/custom_emoji_category_spec.rb | 7 +---- spec/models/custom_filter_spec.rb | 15 ++-------- spec/models/domain_allow_spec.rb | 6 +--- spec/models/domain_block_spec.rb | 6 +--- spec/models/follow_spec.rb | 13 ++------- spec/models/import_spec.rb | 17 ++--------- spec/models/ip_block_spec.rb | 15 ++-------- spec/models/marker_spec.rb | 11 ++----- spec/models/media_attachment_spec.rb | 7 +---- spec/models/mention_spec.rb | 13 ++------- spec/models/poll_spec.rb | 7 ++--- spec/models/user_spec.rb | 6 +--- spec/models/webauthn_credential_spec.rb | 35 +++-------------------- spec/models/webhook_spec.rb | 7 +---- 16 files changed, 28 insertions(+), 159 deletions(-) diff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rb index e3865e6fc7ff50..8bd1e74b2975b5 100644 --- a/spec/models/announcement_spec.rb +++ b/spec/models/announcement_spec.rb @@ -64,14 +64,7 @@ end describe 'Validations' do - describe 'text' do - it 'validates presence of attribute' do - record = Fabricate.build(:announcement, text: nil) - - expect(record).to_not be_valid - expect(record.errors[:text]).to be_present - end - end + it { is_expected.to validate_presence_of(:text) } describe 'ends_at' do it 'validates presence when starts_at is present' do diff --git a/spec/models/block_spec.rb b/spec/models/block_spec.rb index 8249503c592a67..84f0f318f42583 100644 --- a/spec/models/block_spec.rb +++ b/spec/models/block_spec.rb @@ -4,17 +4,8 @@ RSpec.describe Block do describe 'validations' do - it 'is invalid without an account' do - block = Fabricate.build(:block, account: nil) - block.valid? - expect(block).to model_have_error_on_field(:account) - end - - it 'is invalid without a target_account' do - block = Fabricate.build(:block, target_account: nil) - block.valid? - expect(block).to model_have_error_on_field(:target_account) - end + it { is_expected.to belong_to(:account).required } + it { is_expected.to belong_to(:target_account).required } end it 'removes blocking cache after creation' do diff --git a/spec/models/custom_emoji_category_spec.rb b/spec/models/custom_emoji_category_spec.rb index 3da77344e26721..2b414a66eecdd7 100644 --- a/spec/models/custom_emoji_category_spec.rb +++ b/spec/models/custom_emoji_category_spec.rb @@ -4,11 +4,6 @@ RSpec.describe CustomEmojiCategory do describe 'validations' do - it 'validates name presence' do - record = described_class.new(name: nil) - - expect(record).to_not be_valid - expect(record).to model_have_error_on_field(:name) - end + it { is_expected.to validate_presence_of(:name) } end end diff --git a/spec/models/custom_filter_spec.rb b/spec/models/custom_filter_spec.rb index 5bb615bb37f68e..afbc42024173e0 100644 --- a/spec/models/custom_filter_spec.rb +++ b/spec/models/custom_filter_spec.rb @@ -4,19 +4,8 @@ RSpec.describe CustomFilter do describe 'Validations' do - it 'requires presence of title' do - record = described_class.new(title: '') - record.valid? - - expect(record).to model_have_error_on_field(:title) - end - - it 'requires presence of context' do - record = described_class.new(context: nil) - record.valid? - - expect(record).to model_have_error_on_field(:context) - end + it { is_expected.to validate_presence_of(:title) } + it { is_expected.to validate_presence_of(:context) } it 'requires non-empty of context' do record = described_class.new(context: []) diff --git a/spec/models/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 92f1ef8ccf3308..d8f438f07eea2e 100644 --- a/spec/models/domain_allow_spec.rb +++ b/spec/models/domain_allow_spec.rb @@ -4,11 +4,7 @@ RSpec.describe DomainAllow do describe 'Validations' do - it 'is invalid without a domain' do - domain_allow = Fabricate.build(:domain_allow, domain: nil) - domain_allow.valid? - expect(domain_allow).to model_have_error_on_field(:domain) - end + it { is_expected.to validate_presence_of(:domain) } it 'is invalid if the same normalized domain already exists' do _domain_allow = Fabricate(:domain_allow, domain: 'にゃん') diff --git a/spec/models/domain_block_spec.rb b/spec/models/domain_block_spec.rb index d595441fd30a8d..8278454cd7811a 100644 --- a/spec/models/domain_block_spec.rb +++ b/spec/models/domain_block_spec.rb @@ -4,11 +4,7 @@ RSpec.describe DomainBlock do describe 'validations' do - it 'is invalid without a domain' do - domain_block = Fabricate.build(:domain_block, domain: nil) - domain_block.valid? - expect(domain_block).to model_have_error_on_field(:domain) - end + it { is_expected.to validate_presence_of(:domain) } it 'is invalid if the same normalized domain already exists' do _domain_block = Fabricate(:domain_block, domain: 'にゃん') diff --git a/spec/models/follow_spec.rb b/spec/models/follow_spec.rb index 9aa172b2f21cfc..f22bd6ea88d53d 100644 --- a/spec/models/follow_spec.rb +++ b/spec/models/follow_spec.rb @@ -9,17 +9,8 @@ describe 'validations' do subject { described_class.new(account: alice, target_account: bob, rate_limit: true) } - it 'is invalid without an account' do - follow = Fabricate.build(:follow, account: nil) - follow.valid? - expect(follow).to model_have_error_on_field(:account) - end - - it 'is invalid without a target_account' do - follow = Fabricate.build(:follow, target_account: nil) - follow.valid? - expect(follow).to model_have_error_on_field(:target_account) - end + it { is_expected.to belong_to(:account).required } + it { is_expected.to belong_to(:target_account).required } it 'is invalid if account already follows too many people' do alice.update(following_count: FollowLimitValidator::LIMIT) diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb index 10df5f8c0b2a31..587e0a9d260aa8 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -3,19 +3,8 @@ require 'rails_helper' RSpec.describe Import do - let(:account) { Fabricate(:account) } - let(:type) { 'following' } - let(:data) { attachment_fixture('imports.txt') } - - describe 'validations' do - it 'is invalid without an type' do - import = described_class.create(account: account, data: data) - expect(import).to model_have_error_on_field(:type) - end - - it 'is invalid without a data' do - import = described_class.create(account: account, type: type) - expect(import).to model_have_error_on_field(:data) - end + describe 'Validations' do + it { is_expected.to validate_presence_of(:type) } + it { is_expected.to validate_presence_of(:data) } end end diff --git a/spec/models/ip_block_spec.rb b/spec/models/ip_block_spec.rb index 6f1eb38425c7d4..ac9f5db601329e 100644 --- a/spec/models/ip_block_spec.rb +++ b/spec/models/ip_block_spec.rb @@ -4,19 +4,8 @@ RSpec.describe IpBlock do describe 'validations' do - it 'validates ip presence', :aggregate_failures do - ip_block = described_class.new(ip: nil, severity: :no_access) - - expect(ip_block).to_not be_valid - expect(ip_block).to model_have_error_on_field(:ip) - end - - it 'validates severity presence', :aggregate_failures do - ip_block = described_class.new(ip: '127.0.0.1', severity: nil) - - expect(ip_block).to_not be_valid - expect(ip_block).to model_have_error_on_field(:severity) - end + it { is_expected.to validate_presence_of(:ip) } + it { is_expected.to validate_presence_of(:severity) } it 'validates ip uniqueness', :aggregate_failures do described_class.create!(ip: '127.0.0.1', severity: :no_access) diff --git a/spec/models/marker_spec.rb b/spec/models/marker_spec.rb index 8339f8e259b150..1da8eb6f43001b 100644 --- a/spec/models/marker_spec.rb +++ b/spec/models/marker_spec.rb @@ -3,14 +3,7 @@ require 'rails_helper' RSpec.describe Marker do - describe 'validations' do - describe 'timeline' do - it 'must be included in valid list' do - record = described_class.new(timeline: 'not real timeline') - - expect(record).to_not be_valid - expect(record).to model_have_error_on_field(:timeline) - end - end + describe 'Validations' do + it { is_expected.to validate_inclusion_of(:timeline).in_array(described_class::TIMELINES) } end end diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 50f8d00a5439c4..5f91ae096734c7 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -257,12 +257,7 @@ end end - it 'is invalid without file' do - media = described_class.new - - expect(media.valid?).to be false - expect(media).to model_have_error_on_field(:file) - end + it { is_expected.to validate_presence_of(:file) } describe 'size limit validation' do it 'rejects video files that are too large' do diff --git a/spec/models/mention_spec.rb b/spec/models/mention_spec.rb index b241049a54b346..3a9b9fddf2d3dd 100644 --- a/spec/models/mention_spec.rb +++ b/spec/models/mention_spec.rb @@ -4,16 +4,7 @@ RSpec.describe Mention do describe 'validations' do - it 'is invalid without an account' do - mention = Fabricate.build(:mention, account: nil) - mention.valid? - expect(mention).to model_have_error_on_field(:account) - end - - it 'is invalid without a status' do - mention = Fabricate.build(:mention, status: nil) - mention.valid? - expect(mention).to model_have_error_on_field(:status) - end + it { is_expected.to belong_to(:account).required } + it { is_expected.to belong_to(:status).required } end end diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb index 740ef63d81aaf0..736f3615d0d3c8 100644 --- a/spec/models/poll_spec.rb +++ b/spec/models/poll_spec.rb @@ -32,12 +32,9 @@ describe 'validations' do context 'when not valid' do - let(:poll) { Fabricate.build(:poll, expires_at: nil) } + subject { Fabricate.build(:poll) } - it 'is invalid without an expire date' do - poll.valid? - expect(poll).to model_have_error_on_field(:expires_at) - end + it { is_expected.to validate_presence_of(:expires_at) } end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5c2af4dc396902..fcff4c0d3bd435 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -32,11 +32,7 @@ end describe 'validations' do - it 'is invalid without an account' do - user = Fabricate.build(:user, account: nil) - user.valid? - expect(user).to model_have_error_on_field(:account) - end + it { is_expected.to belong_to(:account).required } it 'is invalid without a valid email' do user = Fabricate.build(:user, email: 'john@') diff --git a/spec/models/webauthn_credential_spec.rb b/spec/models/webauthn_credential_spec.rb index 23f0229a67ab39..c4105d91500622 100644 --- a/spec/models/webauthn_credential_spec.rb +++ b/spec/models/webauthn_credential_spec.rb @@ -4,37 +4,10 @@ RSpec.describe WebauthnCredential do describe 'validations' do - it 'is invalid without an external id' do - webauthn_credential = Fabricate.build(:webauthn_credential, external_id: nil) - - webauthn_credential.valid? - - expect(webauthn_credential).to model_have_error_on_field(:external_id) - end - - it 'is invalid without a public key' do - webauthn_credential = Fabricate.build(:webauthn_credential, public_key: nil) - - webauthn_credential.valid? - - expect(webauthn_credential).to model_have_error_on_field(:public_key) - end - - it 'is invalid without a nickname' do - webauthn_credential = Fabricate.build(:webauthn_credential, nickname: nil) - - webauthn_credential.valid? - - expect(webauthn_credential).to model_have_error_on_field(:nickname) - end - - it 'is invalid without a sign_count' do - webauthn_credential = Fabricate.build(:webauthn_credential, sign_count: nil) - - webauthn_credential.valid? - - expect(webauthn_credential).to model_have_error_on_field(:sign_count) - end + it { is_expected.to validate_presence_of(:external_id) } + it { is_expected.to validate_presence_of(:public_key) } + it { is_expected.to validate_presence_of(:nickname) } + it { is_expected.to validate_presence_of(:sign_count) } it 'is invalid if already exist a webauthn credential with the same external id' do Fabricate(:webauthn_credential, external_id: '_Typ0ygudDnk9YUVWLQayw') diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb index 1b2d803bd75ed0..03ef1dcc68e2e9 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -6,12 +6,7 @@ let(:webhook) { Fabricate(:webhook) } describe 'Validations' do - it 'requires presence of events' do - record = described_class.new(events: nil) - record.valid? - - expect(record).to model_have_error_on_field(:events) - end + it { is_expected.to validate_presence_of(:events) } it 'requires non-empty events value' do record = described_class.new(events: []) From cb324b5d7c6eba78aad28bfee1c806dc01517f2b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 5 Sep 2024 11:39:59 +0200 Subject: [PATCH 46/47] [Glitch] Change design of unread conversations in web UI Port ec4c49082edb5f4941bd4e129900628c6b30101e to glitch-soc Signed-off-by: Claire --- .../components/conversation.jsx | 2 +- .../flavours/glitch/styles/components.scss | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx index 50b2a9d5ab8f83..e7fc914b65c740 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx @@ -197,7 +197,7 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown }) return ( -
+
diff --git a/app/javascript/flavours/glitch/styles/components.scss b/app/javascript/flavours/glitch/styles/components.scss index 26be1f866c598a..c26ce0d62c7e67 100644 --- a/app/javascript/flavours/glitch/styles/components.scss +++ b/app/javascript/flavours/glitch/styles/components.scss @@ -9055,22 +9055,6 @@ noscript { margin: 0; } } - - &--unread { - background: lighten($ui-base-color, 2%); - - &:focus { - background: lighten($ui-base-color, 4%); - } - - .conversation__content__info { - font-weight: 700; - } - - .conversation__content__relative-time { - color: $primary-text-color; - } - } } .announcements { @@ -9265,7 +9249,8 @@ noscript { } .notification, -.status__wrapper { +.status__wrapper, +.conversation { position: relative; &.unread { From db6b1fe8fb56c5eab4f11cc2cd79703739ca2608 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Thu, 5 Sep 2024 07:34:13 -0500 Subject: [PATCH 47/47] [Glitch] Fix radio checkbox visibility in Report dialogs Port b4b639ee4a059385874f143027b75516c8db17d9 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/components.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/styles/components.scss b/app/javascript/flavours/glitch/styles/components.scss index c26ce0d62c7e67..4ae330d0a5df7e 100644 --- a/app/javascript/flavours/glitch/styles/components.scss +++ b/app/javascript/flavours/glitch/styles/components.scss @@ -6899,7 +6899,7 @@ a.status-card { } .dialog-option .poll__input { - border-color: $inverted-text-color; + border-color: $darker-text-color; color: $ui-secondary-color; display: inline-flex; align-items: center; @@ -6913,13 +6913,13 @@ a.status-card { &:active, &:focus, &:hover { - border-color: lighten($inverted-text-color, 15%); + border-color: $valid-value-color; border-width: 4px; } &.active { - border-color: $inverted-text-color; - background: $inverted-text-color; + border-color: $valid-value-color; + background: $valid-value-color; } }