diff --git a/.dockerignore b/.dockerignore index fedbea236d..41da718049 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,6 +8,7 @@ public/system public/assets public/packs +public/packs-test node_modules neo4j vendor/bundle diff --git a/.rubocop.yml b/.rubocop.yml index 63de5e17c7..68352e3198 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -109,16 +109,11 @@ Rails/Exit: # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath RSpec/FilePath: CustomTransform: - ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename + ActivityPub: activitypub DeepL: deepl FetchOEmbedService: fetch_oembed_service - JsonLdHelper: jsonld_helper OEmbedController: oembed_controller OStatus: ostatus - NodeInfoController: nodeinfo_controller # NodeInfo isn't snake_cased for any of the instances - Exclude: - - 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder - - 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder # Reason: # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject @@ -135,6 +130,16 @@ RSpec/NotToNot: RSpec/Rails/HttpStatus: EnforcedStyle: numeric +# Reason: Match overrides from Rspec/FilePath rule above +# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecspecfilepathformat +RSpec/SpecFilePathFormat: + CustomTransform: + ActivityPub: activitypub + DeepL: deepl + FetchOEmbedService: fetch_oembed_service + OEmbedController: oembed_controller + OStatus: ostatus + # Reason: # https://docs.rubocop.org/rubocop/cops_style.html#styleclassandmodulechildren Style/ClassAndModuleChildren: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index c0afd7e1d8..7f3e333436 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-exclude-limit --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.57.1. +# using RuboCop version 1.57.2. # 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 @@ -20,25 +20,10 @@ Layout/LineLength: Exclude: - 'app/models/account.rb' -# Configuration parameters: AllowComments, AllowEmptyLambdas. -Lint/EmptyBlock: - Exclude: - - 'spec/controllers/api/v2/search_controller_spec.rb' - - 'spec/fabricators/access_token_fabricator.rb' - - 'spec/fabricators/conversation_fabricator.rb' - - 'spec/fabricators/system_key_fabricator.rb' - - 'spec/lib/activitypub/adapter_spec.rb' - - 'spec/models/user_role_spec.rb' - Lint/NonLocalExitFromIterator: Exclude: - 'app/helpers/jsonld_helper.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -Lint/OrAssignmentToConstant: - Exclude: - - 'lib/sanitize_ext/sanitize_config.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: @@ -67,13 +52,6 @@ Metrics/CyclomaticComplexity: Metrics/PerceivedComplexity: Max: 27 -Performance/MapMethodChain: - Exclude: - - 'app/models/feed.rb' - - 'lib/mastodon/cli/maintenance.rb' - - 'spec/services/bulk_import_service_spec.rb' - - 'spec/services/import_service_spec.rb' - RSpec/AnyInstance: Exclude: - 'spec/controllers/activitypub/inboxes_controller_spec.rb' @@ -96,20 +74,6 @@ RSpec/AnyInstance: RSpec/ExampleLength: Max: 22 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: implicit, each, example -RSpec/HookArgument: - Exclude: - - 'spec/controllers/api/v1/streaming_controller_spec.rb' - - 'spec/controllers/well_known/webfinger_controller_spec.rb' - - 'spec/helpers/instance_helper_spec.rb' - - 'spec/models/user_spec.rb' - - 'spec/rails_helper.rb' - - 'spec/serializers/activitypub/note_serializer_spec.rb' - - 'spec/serializers/activitypub/update_poll_serializer_spec.rb' - - 'spec/services/import_service_spec.rb' - # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: @@ -178,24 +142,6 @@ RSpec/MessageChain: - 'spec/models/session_activation_spec.rb' - 'spec/models/setting_spec.rb' -# Configuration parameters: EnforcedStyle. -# SupportedStyles: have_received, receive -RSpec/MessageSpies: - Exclude: - - 'spec/controllers/admin/accounts_controller_spec.rb' - - 'spec/helpers/admin/account_moderation_notes_helper_spec.rb' - - 'spec/lib/webfinger_resource_spec.rb' - - 'spec/models/admin/account_action_spec.rb' - - 'spec/models/concerns/remotable_spec.rb' - - 'spec/models/follow_request_spec.rb' - - 'spec/models/identity_spec.rb' - - 'spec/models/session_activation_spec.rb' - - 'spec/models/setting_spec.rb' - - 'spec/services/activitypub/fetch_replies_service_spec.rb' - - 'spec/services/activitypub/process_collection_service_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/validators/status_length_validator_spec.rb' - RSpec/MultipleExpectations: Max: 8 @@ -212,13 +158,6 @@ Rails/ApplicationController: Exclude: - 'app/controllers/health_controller.rb' -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Severity. -Rails/DuplicateAssociation: - Exclude: - - 'app/serializers/activitypub/collection_serializer.rb' - - 'app/serializers/activitypub/note_serializer.rb' - # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/HasAndBelongsToMany: @@ -333,7 +272,6 @@ Rails/SkipsModelValidations: - 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb' - 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb' - 'lib/mastodon/cli/accounts.rb' - - 'lib/mastodon/cli/main.rb' - 'lib/mastodon/cli/maintenance.rb' - 'spec/lib/activitypub/activity/follow_spec.rb' - 'spec/services/follow_service_spec.rb' @@ -426,7 +364,6 @@ Style/FetchEnvVar: - 'config/initializers/3_omniauth.rb' - 'config/initializers/blacklists.rb' - 'config/initializers/cache_buster.rb' - - 'config/initializers/content_security_policy.rb' - 'config/initializers/devise.rb' - 'config/initializers/paperclip.rb' - 'config/initializers/vapid.rb' diff --git a/Dockerfile b/Dockerfile index 600336de92..6065e10d91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.4 # This needs to be bookworm-slim because the Ruby image is built on bookworm-slim -ARG NODE_VERSION="20.8-bookworm-slim" +ARG NODE_VERSION="20.9-bookworm-slim" FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby FROM node:${NODE_VERSION} as build diff --git a/Gemfile.lock b/Gemfile.lock index c38666f91e..9c5da5d065 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -661,21 +661,21 @@ GEM rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-capybara (2.19.0) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) + rubocop-factory_bot (2.24.0) rubocop (~> 1.33) rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.20.2) + rubocop-rails (2.22.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.23.2) - rubocop (~> 1.33) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-prof (1.6.3) diff --git a/app/controllers/well_known/nodeinfo_controller.rb b/app/controllers/well_known/node_info_controller.rb similarity index 100% rename from app/controllers/well_known/nodeinfo_controller.rb rename to app/controllers/well_known/node_info_controller.rb diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index 878ff5d89d..eafbf42d1b 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -98,7 +98,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) { } - dispatch(notificationsUpdate(notification, preferPendingItems, playSound && !filtered)); + dispatch(notificationsUpdate({ notification, preferPendingItems, playSound: playSound && !filtered})); fetchRelatedRelationships(dispatch, [notification]); } else if (playSound && !filtered) { diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index c4dbbc5f03..cc4a9391a3 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -1,6 +1,6 @@ { "about.blocks": "Moderoidut palvelimet", - "about.contact": "Ota yhteyttä:", + "about.contact": "Ota yhteys:", "about.disclaimer": "Mastodon on vapaa avoimen lähdekoodin ohjelmisto ja Mastodon gGmbH:n tavaramerkki.", "about.domain_blocks.no_reason_available": "Syytä ei ole ilmoitettu", "about.domain_blocks.preamble": "Mastodonin avulla voidaan yleensä tarkastella minkä tahansa fediversumiin kuuluvan palvelimen sisältöä ja vuorovaikuttaa eri palvelinten käyttäjien kanssa. Nämä ovat tälle palvelimelle määritetyt poikkeukset.", diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index 8431d12acc..14ff22b287 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -39,7 +39,7 @@ "account.follows.empty": "Esta usuaria aínda non segue a ninguén.", "account.follows_you": "Séguete", "account.go_to_profile": "Ir ao perfil", - "account.hide_reblogs": "Agochar repeticións de @{name}", + "account.hide_reblogs": "Agochar promocións de @{name}", "account.in_memoriam": "Lembranzas.", "account.joined_short": "Uniuse", "account.languages": "Modificar os idiomas subscritos", @@ -518,7 +518,7 @@ "privacy.public.long": "Visible por todas", "privacy.public.short": "Público", "privacy.unlisted.long": "Visible por todas, pero excluída da sección descubrir", - "privacy.unlisted.short": "Non listado", + "privacy.unlisted.short": "Sen listar", "privacy_policy.last_updated": "Actualizado por última vez no {date}", "privacy_policy.title": "Política de Privacidade", "refresh": "Actualizar", diff --git a/app/javascript/mastodon/locales/he.json b/app/javascript/mastodon/locales/he.json index a8cb2ec276..ff7e864e5e 100644 --- a/app/javascript/mastodon/locales/he.json +++ b/app/javascript/mastodon/locales/he.json @@ -143,7 +143,7 @@ "compose_form.hashtag_warning": "הודעה זו לא תרשם תחת תגיות הקבצה היות והנראות שלה איננה 'ציבורית'. רק הודעות ציבוריות ימצאו בחיפוש תגיות הקבצה.", "compose_form.lock_disclaimer": "חשבונך אינו {locked}. כל אחד יוכל לעקוב אחריך כדי לקרוא את הודעותיך המיועדות לעוקבים בלבד.", "compose_form.lock_disclaimer.lock": "נעול", - "compose_form.placeholder": "על מה את/ה חושב/ת ?", + "compose_form.placeholder": "על מה את.ה חושב.ת?", "compose_form.poll.add_option": "הוסיפו בחירה", "compose_form.poll.duration": "משך הסקר", "compose_form.poll.option_placeholder": "אפשרות מספר {number}", @@ -235,7 +235,7 @@ "empty_column.favourites": "עוד לא חיבבו את ההודעה הזו. כאשר זה יקרה, החיבובים יופיעו כאן.", "empty_column.follow_requests": "אין לך שום בקשות מעקב עדיין. לכשיתקבלו כאלה, הן תופענה כאן.", "empty_column.followed_tags": "עוד לא עקבת אחרי תגיות. כשיהיו לך תגיות נעקבות, ההודעות יופיעו פה.", - "empty_column.hashtag": "אין כלום בהאשתג הזה עדיין.", + "empty_column.hashtag": "אין כלום בתגית הזאת עדיין.", "empty_column.home": "פיד הבית ריק ! אפשר לבקר ב{public} או להשתמש בחיפוש כדי להתחיל ולהכיר משתמשים/ות אחרים/ות. {suggestions}", "empty_column.list": "אין עדיין פריטים ברשימה. כאשר חברים ברשימה הזאת יפרסמו הודעות חדשות, הן יופיעו פה.", "empty_column.lists": "אין לך שום רשימות עדיין. לכשיהיו, הן תופענה כאן.", @@ -278,7 +278,7 @@ "follow_requests.unlocked_explanation": "למרות שחשבונך אינו נעול, צוות {domain} חושב שאולי כדאי לוודא את בקשות המעקב האלה ידנית.", "followed_tags": "התגיות שהחשבון שלך עוקב אחריהן", "footer.about": "אודות", - "footer.directory": "מדריך פרופילים", + "footer.directory": "ספריית פרופילים", "footer.get_app": "להתקנת היישומון", "footer.invite": "להזמין אנשים", "footer.keyboard_shortcuts": "קיצורי מקלדת", diff --git a/app/javascript/mastodon/locales/hr.json b/app/javascript/mastodon/locales/hr.json index cb1b201a12..16d25e7846 100644 --- a/app/javascript/mastodon/locales/hr.json +++ b/app/javascript/mastodon/locales/hr.json @@ -1,12 +1,16 @@ { + "about.blocks": "Moderirani poslužitelji", "about.contact": "Kontakt:", "about.domain_blocks.no_reason_available": "Razlog nije dostupan", + "about.domain_blocks.suspended.title": "Suspendiran", + "about.rules": "Pravila servera", "account.account_note_header": "Bilješka", "account.add_or_remove_from_list": "Dodaj ili ukloni s liste", "account.badges.bot": "Bot", "account.badges.group": "Grupa", "account.block": "Blokiraj @{name}", "account.block_domain": "Blokiraj domenu {domain}", + "account.block_short": "Blokiraj", "account.blocked": "Blokirano", "account.browse_more_on_origin_server": "Pogledajte više na izvornom profilu", "account.cancel_follow_request": "Withdraw follow request", @@ -15,17 +19,20 @@ "account.edit_profile": "Uredi profil", "account.enable_notifications": "Obavjesti me kada @{name} napravi objavu", "account.endorse": "Istakni na profilu", + "account.featured_tags.last_status_at": "Zadnji post {date}", "account.featured_tags.last_status_never": "Nema postova", "account.follow": "Prati", "account.followers": "Pratitelji", "account.followers.empty": "Nitko još ne prati korisnika/cu.", "account.followers_counter": "{count, plural, one {{counter} pratitelj} other {{counter} pratitelja}}", + "account.following": "Pratim", "account.following_counter": "{count, plural, one {{counter} praćeni} few{{counter} praćena} other {{counter} praćenih}}", "account.follows.empty": "Korisnik/ca još ne prati nikoga.", "account.follows_you": "Prati te", "account.go_to_profile": "Idi na profil", "account.hide_reblogs": "Sakrij boostove od @{name}", "account.in_memoriam": "U sjećanje.", + "account.joined_short": "Pridružen", "account.link_verified_on": "Vlasništvo ove poveznice provjereno je {date}", "account.locked_info": "Status privatnosti ovog računa postavljen je na zaključano. Vlasnik ručno pregledava tko ih može pratiti.", "account.media": "Medijski sadržaj", @@ -65,13 +72,17 @@ "bundle_column_error.error.title": "Oh, ne!", "bundle_column_error.network.title": "Greška mreže", "bundle_column_error.retry": "Pokušajte ponovno", + "bundle_column_error.return": "Na glavnu", "bundle_column_error.routing.title": "404", "bundle_modal_error.close": "Zatvori", "bundle_modal_error.message": "Nešto je pošlo po zlu tijekom učitavanja ove komponente.", "bundle_modal_error.retry": "Pokušajte ponovno", + "closed_registrations_modal.find_another_server": "Nađi drugi server", + "column.about": "O aplikaciji", "column.blocks": "Blokirani korisnici", "column.bookmarks": "Knjižne oznake", "column.community": "Lokalna vremenska crta", + "column.direct": "Privatna spominjanja", "column.directory": "Pregledavanje profila", "column.domain_blocks": "Blokirane domene", "column.favourites": "Favoriti", @@ -95,6 +106,7 @@ "community.column_settings.remote_only": "Samo udaljeno", "compose.language.change": "Promijeni jezik", "compose.language.search": "Pretraži jezike...", + "compose.published.body": "Post je objavljen.", "compose.published.open": "Otvori", "compose.saved.body": "Post spremljen.", "compose_form.direct_message_warning_learn_more": "Saznajte više", @@ -132,6 +144,7 @@ "confirmations.discard_edit_media.message": "Postoje nespremljene promjene u opisu medija ili u pretpregledu, svejedno ih odbaciti?", "confirmations.domain_block.confirm": "Blokiraj cijelu domenu", "confirmations.domain_block.message": "Jeste li zaista, zaista sigurni da želite blokirati cijelu domenu {domain}? U većini slučajeva dovoljno je i preferirano nekoliko ciljanih blokiranja ili utišavanja. Nećete vidjeti sadržaj s te domene ni u kojim javnim vremenskim crtama ili Vašim obavijestima. Vaši pratitelji s te domene bit će uklonjeni.", + "confirmations.edit.confirm": "Uredi", "confirmations.logout.confirm": "Odjavi se", "confirmations.logout.message": "Jeste li sigurni da se želite odjaviti?", "confirmations.mute.confirm": "Utišaj", @@ -146,10 +159,14 @@ "conversation.mark_as_read": "Označi kao pročitano", "conversation.open": "Prikaži razgovor", "conversation.with": "S {names}", + "copypaste.copied": "Kopirano", + "copypaste.copy_to_clipboard": "Kopiraj u međuspremnik", "directory.federated": "Iz znanog fediversa", "directory.local": "Samo iz {domain}", "directory.new_arrivals": "Novi korisnici", "directory.recently_active": "Nedavno aktivni", + "disabled_account_banner.account_settings": "Postavke računa", + "disabled_account_banner.text": "Tvoj račun {disabledAccount} je trenutno onemogućen.", "dismissable_banner.explore_links": "These news stories are being talked about by people on this and other servers of the decentralized network right now.", "dismissable_banner.explore_tags": "These hashtags are gaining traction among people on this and other servers of the decentralized network right now.", "embed.instructions": "Embed this status on your website by copying the code below.", @@ -172,7 +189,7 @@ "empty_column.account_timeline": "Ovdje nema tootova!", "empty_column.account_unavailable": "Profil nije dostupan", "empty_column.blocks": "Još niste blokirali nikoga.", - "empty_column.bookmarked_statuses": "Još nemaš niti jedan označeni toot. Kada označiš jedan, prikazad će se ovdje.", + "empty_column.bookmarked_statuses": "Još nemaš niti jedan označeni toot. Kada označiš jedan, prikazat će se ovdje.", "empty_column.community": "Lokalna vremenska crta je prazna. Napišite nešto javno da biste pokrenuli stvari!", "empty_column.domain_blocks": "Još nema blokiranih domena.", "empty_column.follow_requests": "Nemaš niti jedan zahtjev za praćenjem. Ako ga dobiješ, prikazat će se ovdje.", @@ -204,6 +221,7 @@ "filter_modal.title.status": "Filtriraj objavu", "firehose.all": "Sve", "firehose.local": "Ovaj server", + "firehose.remote": "Drugi serveri", "follow_request.authorize": "Autoriziraj", "follow_request.reject": "Odbij", "footer.about": "O aplikaciji", @@ -235,6 +253,7 @@ "interaction_modal.login.action": "Odvedi me kući", "interaction_modal.no_account_yet": "Nisi na Mastodonu?", "interaction_modal.on_this_server": "Na ovom serveru", + "interaction_modal.title.follow": "Prati {name}", "intervals.full.days": "{number, plural, one {# dan} other {# dana}}", "intervals.full.hours": "{number, plural, one {# sat} few {# sata} other {# sati}}", "intervals.full.minutes": "{number, plural, one {# minuta} few {# minute} other {# minuta}}", @@ -247,6 +266,7 @@ "keyboard_shortcuts.direct": "to open direct messages column", "keyboard_shortcuts.down": "za pomak dolje na listi", "keyboard_shortcuts.enter": "za otvaranje toota", + "keyboard_shortcuts.favourites": "Otvori listu omiljenih", "keyboard_shortcuts.federated": "za otvaranje federalne vremenske crte", "keyboard_shortcuts.heading": "Tipkovnički prečaci", "keyboard_shortcuts.home": "za otvaranje početne vremenske crte", @@ -273,6 +293,7 @@ "lightbox.close": "Zatvori", "lightbox.next": "Sljedeće", "lightbox.previous": "Prethodno", + "limited_account_hint.action": "Svejedno prikaži profil", "lists.account.add": "Dodaj na listu", "lists.account.remove": "Ukloni s liste", "lists.delete": "Izbriši listu", @@ -289,12 +310,16 @@ "media_gallery.toggle_visible": "Sakrij {number, plural, one {sliku} other {slike}}", "mute_modal.duration": "Trajanje", "mute_modal.hide_notifications": "Sakrij obavijesti ovog korisnika?", + "navigation_bar.about": "O aplikaciji", "navigation_bar.blocks": "Blokirani korisnici", "navigation_bar.community_timeline": "Lokalna vremenska crta", "navigation_bar.compose": "Compose new toot", + "navigation_bar.direct": "Privatna spominjanja", "navigation_bar.discover": "Istraživanje", "navigation_bar.domain_blocks": "Blokirane domene", "navigation_bar.edit_profile": "Uredi profil", + "navigation_bar.explore": "Istraži", + "navigation_bar.favourites": "Favoriti", "navigation_bar.filters": "Utišane riječi", "navigation_bar.follow_requests": "Zahtjevi za praćenje", "navigation_bar.follows_and_followers": "Praćeni i pratitelji", @@ -305,6 +330,7 @@ "navigation_bar.pins": "Prikvačeni tootovi", "navigation_bar.preferences": "Postavke", "navigation_bar.public_timeline": "Federalna vremenska crta", + "navigation_bar.search": "Traži", "navigation_bar.security": "Sigurnost", "not_signed_in_indicator.not_signed_in": "You need to sign in to access this resource.", "notification.follow": "{name} Vas je počeo/la pratiti", @@ -332,6 +358,7 @@ "notifications.filter.follows": "Praćenja", "notifications.filter.mentions": "Spominjanja", "notifications.filter.polls": "Rezultati anketa", + "notifications.grant_permission": "Odobri dopuštenje.", "notifications.group": "{count} obavijesti", "notifications.mark_as_read": "Označi sve obavijesti kao pročitane", "onboarding.actions.go_to_explore": "See what's trending", @@ -343,12 +370,14 @@ "onboarding.steps.follow_people.body": "You curate your own feed. Lets fill it with interesting people.", "onboarding.steps.follow_people.title": "Follow {count, plural, one {one person} other {# people}}", "onboarding.steps.publish_status.body": "Say hello to the world.", + "onboarding.steps.publish_status.title": "Napiši svoj prvi post", "onboarding.steps.setup_profile.body": "Others are more likely to interact with you with a filled out profile.", "onboarding.steps.setup_profile.title": "Customize your profile", "onboarding.steps.share_profile.body": "Let your friends know how to find you on Mastodon!", "onboarding.steps.share_profile.title": "Share your profile", "poll.closed": "Završeno", "poll.refresh": "Osvježi", + "poll.reveal": "Vidi rezultate", "poll.total_people": "{count, plural, one {# osoba} few {# osobe} other {# osoba}}", "poll.total_votes": "{count, plural, one {# glas} few {# glasa} other {# glasova}}", "poll.vote": "Glasaj", @@ -397,14 +426,41 @@ "report.reasons.spam_description": "Zlonamjerne poveznice, lažni angažman ili repetitivni odgovori", "report.submit": "Pošalji", "report.target": "Prijavljivanje korisnika {target}", + "report.thanks.title": "Ne želiš vidjeti ovo?", "report_notification.attached_statuses": "{count, plural, one {# post} other {# posts}} attached", + "report_notification.categories.other": "Drugo", + "report_notification.categories.spam": "Spam", + "report_notification.categories.violation": "Povreda pravila", + "report_notification.open": "Otvori izvješće", + "search.no_recent_searches": "Nema nedavnih pretraga", "search.placeholder": "Traži", + "search.quick_action.go_to_account": "Idi na profil {x}", + "search.quick_action.open_url": "Otvori link u Mastodonu", + "search.search_or_paste": "Pretraži ili zalijepi URL", + "search_popout.full_text_search_disabled_message": "Nije dostuppno na {domain}.", + "search_popout.language_code": "ISO jezični kod", + "search_popout.options": "Opcije pretraživanja", + "search_popout.quick_actions": "Brze radnje", + "search_popout.recent": "Nedavne pretrage", + "search_popout.specific_date": "specifičan datum", + "search_popout.user": "korisnik", + "search_results.accounts": "Profili", + "search_results.all": "Sve", + "search_results.nothing_found": "Nije pronađeno ništa za te ključne riječi", + "search_results.see_all": "Prikaži sve", "search_results.statuses": "Toots", + "search_results.title": "Traži {q}", + "server_banner.about_active_users": "Popis aktivnih korisnika prošli mjesec", "server_banner.active_users": "aktivni korisnici", + "server_banner.administered_by": "Administrator je:", + "server_banner.introduction": "{domain} je dio decentralizirane socijalne mreže koju pokreće {mastodon}.", "server_banner.learn_more": "Saznaj više", + "server_banner.server_stats": "Statistike poslužitelja:", "sign_in_banner.create_account": "Stvori račun", "sign_in_banner.sign_in": "Prijavi se", + "sign_in_banner.sso_redirect": "Prijava ili registracija", "status.admin_status": "Open this status in the moderation interface", + "status.block": "Blokiraj @{name}", "status.bookmark": "Dodaj u favorite", "status.cannot_reblog": "Ova objava ne može biti boostana", "status.copy": "Copy link to status", @@ -419,6 +475,7 @@ "status.history.created": "Kreirao/la {name} prije {date}", "status.history.edited": "Uredio/la {name} prije {date}", "status.load_more": "Učitaj više", + "status.media.open": "Kliknite za otvaranje", "status.media_hidden": "Sakriven medijski sadržaj", "status.mention": "Spomeni @{name}", "status.more": "Više", @@ -447,6 +504,7 @@ "status.title.with_attachments": "{user} posted {attachmentCount, plural, one {an attachment} other {# attachments}}", "status.translate": "Prevedi", "status.translated_from_with": "Prevedno s {lang} koristeći {provider}", + "status.uncached_media_warning": "Pregled nije dostupan", "status.unmute_conversation": "Poništi utišavanje razgovora", "status.unpin": "Otkvači s profila", "subscribed_languages.save": "Spremi promjene", @@ -484,6 +542,7 @@ "upload_modal.description_placeholder": "Gojazni đačić s biciklom drži hmelj i finu vatu u džepu nošnje", "upload_modal.detect_text": "Detektiraj tekst sa slike", "upload_modal.edit_media": "Uređivanje medija", + "upload_modal.preparing_ocr": "Pripremam OCR…", "upload_modal.preview_label": "Pretpregled ({ratio})", "upload_progress.label": "Prenošenje...", "upload_progress.processing": "Obrada…", diff --git a/app/javascript/mastodon/locales/ko.json b/app/javascript/mastodon/locales/ko.json index 3a78a9cd79..269063b7cb 100644 --- a/app/javascript/mastodon/locales/ko.json +++ b/app/javascript/mastodon/locales/ko.json @@ -204,7 +204,7 @@ "dismissable_banner.explore_links": "이 소식들은 오늘 소셜 웹에서 가장 많이 공유된 내용들입니다. 새 소식을 더 많은 사람들이 공유할수록 높은 순위가 됩니다.", "dismissable_banner.explore_statuses": "이 게시물들은 오늘 소셜 웹에서 호응을 얻고 있는 게시물들입니다. 부스트와 관심을 받는 새로운 글들이 높은 순위가 됩니다.", "dismissable_banner.explore_tags": "이 해시태그들은 이 서버와 분산화된 네트워크의 다른 서버에서 사람들의 인기를 끌고 있는 것들입니다.", - "dismissable_banner.public_timeline": "{domain} 사람들이 팔로우하는 소셜 웹 사람들의 최신 공개 게시물입니다.", + "dismissable_banner.public_timeline": "이것들은 {domain}에 있는 사람들이 팔로우한 사람들의 최신 공개 게시물들입니다.", "embed.instructions": "아래의 코드를 복사하여 대화를 원하는 곳으로 공유하세요.", "embed.preview": "이렇게 표시됩니다:", "emoji_button.activity": "활동", diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index dab8a72191..5d3d74ea68 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -225,7 +225,7 @@ "empty_column.account_suspended": "帳號已被停權", "empty_column.account_timeline": "這裡還沒有嘟文!", "empty_column.account_unavailable": "無法取得個人檔案", - "empty_column.blocks": "您尚未封鎖任何使用者。", + "empty_column.blocks": "您還沒有封鎖任何使用者。", "empty_column.bookmarked_statuses": "您還沒有建立任何書籤。當您建立書籤時,它將於此顯示。", "empty_column.community": "本站時間軸是空的。快公開嘟些文搶頭香啊!", "empty_column.direct": "您還沒有收到任何私訊。當您私訊別人或收到私訊時,它將於此顯示。", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index ba5897aa4d..0630e17e3e 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1818,12 +1818,14 @@ a.account__display-name { &.activate { & > .icon { animation: spring-rotate-in 1s linear; + transform-origin: 50% 55%; } } &.deactivate { & > .icon { animation: spring-rotate-out 1s linear; + transform-origin: 50% 55%; } } } diff --git a/app/lib/delivery_failure_tracker.rb b/app/lib/delivery_failure_tracker.rb index c907166329..d938269829 100644 --- a/app/lib/delivery_failure_tracker.rb +++ b/app/lib/delivery_failure_tracker.rb @@ -62,7 +62,7 @@ class DeliveryFailureTracker key.delete_prefix(exhausted_deliveries_key_by('')) end - domains - UnavailableDomain.all.pluck(:domain) + domains - UnavailableDomain.pluck(:domain) end def warning_domains_map(domains = nil) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index fed7bd40d8..32cc375aaa 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -271,7 +271,7 @@ class FeedManager # @param [Account] target_account # @return [void] def clear_from_lists(account, target_account) - List.where(account: account).each do |list| + List.where(account: account).find_each do |list| clear_from_list(list, target_account) end end diff --git a/app/lib/nodeinfo/adapter.rb b/app/lib/node_info/adapter.rb similarity index 100% rename from app/lib/nodeinfo/adapter.rb rename to app/lib/node_info/adapter.rb diff --git a/app/models/feed.rb b/app/models/feed.rb index f51dcfab1d..d9cab2cd1e 100644 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -23,9 +23,9 @@ class Feed max_id = '+inf' if max_id.blank? if min_id.blank? since_id = '-inf' if since_id.blank? - unhydrated = redis.zrevrangebyscore(key, "(#{max_id}", "(#{since_id}", limit: [0, limit], with_scores: true).map(&:first).map(&:to_i) + unhydrated = redis.zrevrangebyscore(key, "(#{max_id}", "(#{since_id}", limit: [0, limit], with_scores: true).map { |id| id.first.to_i } else - unhydrated = redis.zrangebyscore(key, "(#{min_id}", "(#{max_id}", limit: [0, limit], with_scores: true).map(&:first).map(&:to_i) + unhydrated = redis.zrangebyscore(key, "(#{min_id}", "(#{max_id}", limit: [0, limit], with_scores: true).map { |id| id.first.to_i } end Status.where(id: unhydrated).cache_ids diff --git a/app/models/user.rb b/app/models/user.rb index ece3254a6b..bb8e992617 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -488,7 +488,7 @@ class User < ApplicationRecord end def validate_email_dns? - email_changed? && !external? && !Rails.env.local? # rubocop:disable Rails/UnknownEnv + email_changed? && !external? && !Rails.env.local? end def validate_role_elevation diff --git a/app/serializers/nodeinfo/discovery_serializer.rb b/app/serializers/node_info/discovery_serializer.rb similarity index 100% rename from app/serializers/nodeinfo/discovery_serializer.rb rename to app/serializers/node_info/discovery_serializer.rb diff --git a/app/serializers/nodeinfo/serializer.rb b/app/serializers/node_info/serializer.rb similarity index 100% rename from app/serializers/nodeinfo/serializer.rb rename to app/serializers/node_info/serializer.rb diff --git a/app/services/activitypub/fetch_featured_tags_collection_service.rb b/app/services/activitypub/fetch_featured_tags_collection_service.rb index cb71b37e75..a0b3c6036b 100644 --- a/app/services/activitypub/fetch_featured_tags_collection_service.rb +++ b/app/services/activitypub/fetch_featured_tags_collection_service.rb @@ -55,7 +55,7 @@ class ActivityPub::FetchFeaturedTagsCollectionService < BaseService FeaturedTag.includes(:tag).references(:tag).where(account: @account).where.not(tag: { name: normalized_names }).delete_all - FeaturedTag.includes(:tag).references(:tag).where(account: @account, tag: { name: normalized_names }).each do |featured_tag| + FeaturedTag.includes(:tag).references(:tag).where(account: @account, tag: { name: normalized_names }).find_each do |featured_tag| featured_tag.update(name: tags.delete(featured_tag.tag.name)) end diff --git a/app/services/activitypub/synchronize_followers_service.rb b/app/services/activitypub/synchronize_followers_service.rb index 9bd6034a57..7ccc917309 100644 --- a/app/services/activitypub/synchronize_followers_service.rb +++ b/app/services/activitypub/synchronize_followers_service.rb @@ -23,7 +23,7 @@ class ActivityPub::SynchronizeFollowersService < BaseService private def remove_unexpected_local_followers! - @account.followers.local.where.not(id: @expected_followers.map(&:id)).each do |unexpected_follower| + @account.followers.local.where.not(id: @expected_followers.map(&:id)).reorder(nil).find_each do |unexpected_follower| UnfollowService.new.call(unexpected_follower, @account) end end diff --git a/app/services/appeal_service.rb b/app/services/appeal_service.rb index ef052e3547..a7fb61195b 100644 --- a/app/services/appeal_service.rb +++ b/app/services/appeal_service.rb @@ -22,7 +22,7 @@ class AppealService < BaseService end def notify_staff! - User.those_who_can(:manage_appeals).includes(:account).each do |u| + User.those_who_can(:manage_appeals).includes(:account).find_each do |u| AdminMailer.with(recipient: u.account).new_appeal(@appeal).deliver_later if u.allows_appeal_emails? end end diff --git a/app/services/approve_appeal_service.rb b/app/services/approve_appeal_service.rb index 96aaaa7d07..b8a522b2a1 100644 --- a/app/services/approve_appeal_service.rb +++ b/app/services/approve_appeal_service.rb @@ -53,7 +53,7 @@ class ApproveAppealService < BaseService def undo_mark_statuses_as_sensitive! representative_account = Account.representative - @strike.statuses.includes(:media_attachments).each do |status| + @strike.statuses.includes(:media_attachments).find_each do |status| UpdateStatusService.new.call(status, representative_account.id, sensitive: false) if status.with_media? end end diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index 43d7bcca6f..17c347b088 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -24,7 +24,7 @@ class ProcessHashtagsService < BaseService added_tags = @current_tags - @previous_tags unless added_tags.empty? - @account.featured_tags.where(tag_id: added_tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: added_tags.map(&:id)).find_each do |featured_tag| featured_tag.increment(@status.created_at) end end @@ -32,7 +32,7 @@ class ProcessHashtagsService < BaseService removed_tags = @previous_tags - @current_tags unless removed_tags.empty? - @account.featured_tags.where(tag_id: removed_tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: removed_tags.map(&:id)).find_each do |featured_tag| featured_tag.decrement(@status.id) end end diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index 64ace295b9..4e1849a098 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -116,7 +116,7 @@ class RemoveStatusService < BaseService end def remove_from_hashtags - @account.featured_tags.where(tag_id: @status.tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: @status.tags.map(&:id)).find_each do |featured_tag| featured_tag.decrement(@status.id) end diff --git a/app/services/report_service.rb b/app/services/report_service.rb index b4015d1cbf..38e55c5b63 100644 --- a/app/services/report_service.rb +++ b/app/services/report_service.rb @@ -42,7 +42,7 @@ class ReportService < BaseService def notify_staff! return if @report.unresolved_siblings? - User.those_who_can(:manage_reports).includes(:account).each do |u| + User.those_who_can(:manage_reports).includes(:account).find_each do |u| LocalNotificationWorker.perform_async(u.account_id, @report.id, 'Report', 'admin.report') AdminMailer.with(recipient: u.account).new_report(@report).deliver_later if u.allows_report_emails? end diff --git a/app/views/admin/statuses/show.html.haml b/app/views/admin/statuses/show.html.haml index 5fda50a94e..7067c45dc7 100644 --- a/app/views/admin/statuses/show.html.haml +++ b/app/views/admin/statuses/show.html.haml @@ -47,7 +47,7 @@ %h3= t('admin.statuses.history') %ol.history - - @status.edits.includes(:account, status: [:account]).each.with_index do |status_edit, i| + - @status.edits.reorder(nil).includes(:account, status: [:account]).find_each(order: :asc).with_index do |status_edit, i| %li .history__entry %h5 diff --git a/config/application.rb b/config/application.rb index ad931fd36b..44a3326a2d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -206,7 +206,7 @@ module Mastodon # We use our own middleware for this config.public_file_server.enabled = false - config.middleware.use PublicFileServerMiddleware if Rails.env.local? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true' # rubocop:disable Rails/UnknownEnv + config.middleware.use PublicFileServerMiddleware if Rails.env.local? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true' config.middleware.use Rack::Attack config.middleware.use Mastodon::RackMiddleware diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 727a1350d0..3d17509456 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -20,7 +20,6 @@ ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.acronym 'PubSubHubbub' inflect.acronym 'ActivityStreams' inflect.acronym 'JsonLd' - inflect.acronym 'NodeInfo' inflect.acronym 'Ed25519' inflect.acronym 'TOC' inflect.acronym 'RSS' diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 04b4d438bb..9da8343019 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1537,7 +1537,7 @@ bg: reach: Обхват reach_hint_html: Управлявайте дали искате да бъдете открити и последвани от нови хора. Искате ли публикациите ви да се появяват в главния екран? Искате ли другите да ви виждат в препоръките им за последване? Желаете ли да приемате автоматично всички нови последователи или да имате подробен контрол върху всеки един? search: Търсене - search_hint_html: Управлявайте как искате да бъдете открити. Желаете ли хората да ви открият по това, за което сте публикували публично? Искате ли хората извън Mastodon да намират профила ви, търсейки из мрежата? Обърнете внимание, че общото изключване от всички търсачки не може да гарантира за публичната информация. + search_hint_html: Управлявайте как искате да бъдете открити. Желаете ли хората да ви открият по това, за което сте публикували обществено? Искате ли хората извън Mastodon да намират профила ви, търсейки из уебпространството? Обърнете внимание, че пълното изключване от всички търсачки не може да се гарантира за обществените сведения. title: Поверителност и обхват privacy_policy: title: Политика за поверителност diff --git a/config/locales/de.yml b/config/locales/de.yml index ca7659c4c9..2ab90611fb 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -747,7 +747,7 @@ de: title: Neue Nutzer*innen müssen ein CAPTCHA lösen, um das Konto zu bestätigen content_retention: preamble: Lege fest, wie lange Inhalte von Nutzer*innen auf deinem Mastodon-Server gespeichert bleiben. - title: Aufbewahrung von Inhalten + title: Cache & Archive default_noindex: desc_html: Betrifft alle Profile, die diese Einstellung bei sich nicht geändert haben title: Profile standardmäßig von der Suchmaschinen-Indizierung ausnehmen diff --git a/config/locales/devise.fi.yml b/config/locales/devise.fi.yml index 8bbcb071e3..7846ebd8c2 100644 --- a/config/locales/devise.fi.yml +++ b/config/locales/devise.fi.yml @@ -27,12 +27,12 @@ fi: title: Vahvista sähköpostiosoite email_changed: explanation: 'Tilin sähköpostiosoitteeksi vaihdetaan:' - extra: Jos et vaihtanut sähköpostiosoitettasi, joku muu on todennäköisesti päässyt käyttämään tiliäsi. Vaihda salasanasi viipymättä, tai ota yhteyttä palvelimen ylläpitäjään, jos et pääse kirjautumaan tilillesi. + extra: Jos et vaihtanut sähköpostiosoitettasi, joku muu on todennäköisesti päässyt käyttämään tiliäsi. Vaihda salasanasi viipymättä, tai ota yhteys palvelimen ylläpitäjään, jos et pääse kirjautumaan tilillesi. subject: 'Mastodon: Sähköpostiosoite vaihdettu' title: Uusi sähköpostiosoite password_change: explanation: Tilisi salasana on vaihdettu. - extra: Jos et vaihtanut salasanaasi, joku muu on todennäköisesti päässyt käyttämään tiliäsi. Vaihda salasanasi viipymättä, tai ota yhteyttä palvelimen ylläpitäjään, jos et pääse kirjautumaan tilillesi. + extra: Jos et vaihtanut salasanaasi, joku muu on todennäköisesti päässyt käyttämään tiliäsi. Vaihda salasanasi viipymättä, tai ota yhteys palvelimen ylläpitäjään, jos et pääse kirjautumaan tilillesi. subject: 'Mastodon: salasana vaihdettu' title: Salasana vaihdettu reconfirmation_instructions: diff --git a/config/locales/devise.hr.yml b/config/locales/devise.hr.yml index 235e354140..89db8922e4 100644 --- a/config/locales/devise.hr.yml +++ b/config/locales/devise.hr.yml @@ -5,24 +5,61 @@ hr: confirmed: Vaša adresa e-pošte uspješno je potvrđena. send_instructions: Za nekoliko minuta primit ćete e-poštu s uputama kako potvrditi Vašu adresu e-pošte. Molimo pogledajte Vašu mapu s neželjenom poštom, ako niste primili ovu e-poštu. send_paranoid_instructions: Ako Vaša adresa e-pošte postoji u našoj bazi podataka, za nekoliko minuta primit ćete e-poštu s uputama kako ju potvrditi. Molimo provjerite mapu s neželjenom poštom, ako niste primili ovu e-poštu. + failure: + already_authenticated: Već ste prijavljeni. + inactive: Vaš račun još nije aktiviran. + invalid: "%{authentication_keys} ili lozinka nisu valjani." + last_attempt: Imate još jedan pokušaj prije zaključavanja računa. + locked: Vaš je račun zaključan. + not_found_in_database: "%{authentication_keys} ili lozinka nisu valjani." + pending: Tvoj račun je još uvijek pod revizijom. + timeout: Vaša je sesija istekla. Ponovno se prijavite kako biste nastavili. + unauthenticated: Morate se prijaviti ili registrirati prije nastavka. + unconfirmed: Moraš potvrditi svoju email adresu kako bi nastavio. mailer: confirmation_instructions: action: Potvrdi adresu e-pošte action_with_app: Potvrdi i vrati se na %{app} + extra_html: Važno je da pročitaš pravila ovog servera i naše uvjete korištenja. subject: 'Mastodon: upute za potvrđivanje za %{instance}' title: Potvrdi adresu e-pošte email_changed: + explanation: 'Email adresa za ovaj račun je izmijenjena u:' subject: 'Mastodon: adresa e-pošte je promijenjena' title: Nova adresa e-pošte password_change: + explanation: Lozinka tvog računa je promijenjena. subject: 'Mastodon: lozinka je promijenjena' + title: Lozinka je promijenjena + reconfirmation_instructions: + explanation: Potvrdi novu adresu kako bi promijenio email. + subject: 'Mastodon: Potvrdi email za %{instance}' + title: Potvrdi adresu e-pošte reset_password_instructions: + action: Promijeni lozinku + explanation: Zatražili ste novu lozinku za svoj račun. + extra: Ako nisi ovo zatražio, samo ignoriraj ovu email poruku. Tvoja lozinka neće biti promijenjena sve dok ne pristupiš linku iznad kako bi stvorio novu. subject: 'Mastodon: upute za ponovno postavljanje lozinke' title: Ponovno postavljanje lozinke two_factor_disabled: + subject: 'Mastodon: Dvo-faktorska autentifikacija je onemogućena' title: 2FA je onemogućen + two_factor_enabled: + subject: 'Mastodon: Dvo-faktorska autentifikacija je omogućena' + title: 2FA omogućena unlock_instructions: subject: 'Mastodon: upute za otključavanje' + webauthn_credential: + added: + subject: 'Mastodon: Novi sigurnosni ključ' + title: Dodan je novi sigurnosni ključ + deleted: + subject: 'Mastodon: Sigurnosni ključ je obrisan' + title: Jedan od tvojih sigurnosnih ključeva je obrisan + webauthn_disabled: + title: Sigurnosni ključevi su onemogućeni + webauthn_enabled: + title: Sigurnosni ključevi su omogućeni omniauth_callbacks: failure: Ne možemo Vas autentificirati s %{kind} zbog "%{reason}". success: Uspješno ste autentificirani s računom na %{kind}. diff --git a/config/locales/doorkeeper.gl.yml b/config/locales/doorkeeper.gl.yml index c7f21d1ba8..57ee4777c9 100644 --- a/config/locales/doorkeeper.gl.yml +++ b/config/locales/doorkeeper.gl.yml @@ -33,7 +33,7 @@ gl: help: native_redirect_uri: Utiliza %{native_redirect_uri} para probas locais redirect_uri: Utiliza unha liña por URI - scopes: Separar permisos con espazos. Deixar en branco para utilizar os permisos por omisión. + scopes: Separar permisos con espazos. Deixar en branco para utilizar os permisos por defecto. index: application: Aplicación callback_url: URL de chamada diff --git a/config/locales/doorkeeper.he.yml b/config/locales/doorkeeper.he.yml index 6d6b5866ee..9030e45e0c 100644 --- a/config/locales/doorkeeper.he.yml +++ b/config/locales/doorkeeper.he.yml @@ -38,12 +38,12 @@ he: application: יישום callback_url: כתובת גישה חוזרת (Callback URL) delete: למחוק - empty: אין לך אפליקציות. + empty: אין לך יישומים. name: שם new: ישום חדש scopes: תחומים show: להציג - title: ישומך + title: היישומים שלך new: title: ישום חדש show: diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 3ce8cc7287..3b7bba6ce3 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -776,6 +776,7 @@ eu: open: Edonork eman dezake izena security: authorized_fetch: Eskatu autentifikazioa federatutako zerbitzarietatik + federation_authentication: Federazio autentifikazioaren betearaztea title: Zerbitzariko ezarpenak site_uploads: delete: Ezabatu igotako fitxategia @@ -859,6 +860,7 @@ eu: message_html: Mastodon eguneraketa kritikoa eskuragarri, mesedez eguneratu ahal bezain azkar. software_version_patch_check: action: Ikusi eguneraketa eskuragarriak + message_html: Mastodon akats konponketa eguneratze bat eskuragarri dago. upload_check_privacy_error: action: Ikus hemen informazio gehiagorako message_html: "Zure zerbitzaria ez dago ongi konfiguratua. Zure erabiltzaileen pribatutasuna arriskuan dago." @@ -981,6 +983,9 @@ eu: body: "%{reporter}(e)k %{target} salatu du" body_remote: "%{domain} domeinuko norbaitek %{target} salatu du" subject: Salaketa berria %{instance} instantzian (#%{id}) + new_software_updates: + body: Mastodon bertsio berria atera da, eguneratu nahiko duzu, ezta! + subject: Mastodon bertsio berriak %{instance} rentzat eskuragarri daude! new_trends: body: 'Ondorengo elementuak berrikusi behar dira publikoki bistaratu aurretik:' new_trending_links: @@ -1033,6 +1038,12 @@ eu: hint_html: Azken kontu bat! Gizakia zarela berretsi behar dugu (zabor-kontuak kanpoan mantentzeko baino ez da!) Ebatzi azpiko CAPTCHA eta sakatu "Jarraitu". title: Segurtasun txekeoa confirmations: + awaiting_review_title: Zure izen-ematea berrikusten ari da + clicking_this_link: lotura hau klikatzen + login_link: hasi saioa + proceed_to_login_html: Orain jarraitu dezakezu %{login_link} -era. + registration_complete: Osatuta dago orain zure izen-ematea %{domain} -en! + welcome_title: Ongi etorri, %{name}! wrong_email_hint: Helbide-elektroniko hori zuzena ez bada, kontuaren ezarpenetan alda dezakezu. delete_account: Ezabatu kontua delete_account_html: Kontua ezabatu nahi baduzu, jarraitu hemen. Berrestea eskatuko zaizu. diff --git a/config/locales/fa.yml b/config/locales/fa.yml index e2138e0aeb..8e076878a0 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -748,6 +748,12 @@ fa: message_html: هیچ قانون کارسازی تعریف نکرده‌اید. sidekiq_process_check: message_html: صف(های) %{value} فاقد هیچونه فرایند Sidekiq هستند. لطفا تنظیمات Sidekiq خود را بازبینی کنید + software_version_critical_check: + action: مشاهده به‌روزرسانی‌های موجود + message_html: یک به‌روزرسانی حیاتی ماستودون موجود است، لطفا در اسرع وقت به‌روزرسانی کنید. + software_version_patch_check: + action: مشاهده به‌روزرسانی‌های موجود + message_html: یک به‌روزرسانی رفع اشکال ماستودون موجود است. upload_check_privacy_error: action: برای اطّلاعات بیش‌تر این‌جا را بررسی کنید message_html: "کارساز وبتان بد پیکربندی شده. محرمانگی کاربرانتان در خطر است." @@ -879,6 +885,9 @@ fa: apply_for_account: درخواست یک حساب captcha_confirmation: title: بررسی های امنیتی + confirmations: + login_link: ورود + welcome_title: خوش آمدید، %{name}! delete_account: پاک‌کردن حساب delete_account_html: اگر می‌خواهید حساب خود را پاک کنید، از این‌جا پیش بروید. از شما درخواست تأیید خواهد شد. description: @@ -901,6 +910,8 @@ fa: progress: confirm: تأیید رایانامه details: جزئیات شما + review: بررسی ما + rules: پذیرش قوانین providers: cas: CAS saml: SAML diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 0f670847f4..d6f327c327 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1837,7 +1837,7 @@ fi: follow_limit_reached: Et voi seurata yli %{limit} henkilöä go_to_sso_account_settings: Avaa identiteettitarjoajasi tiliasetukset invalid_otp_token: Virheellinen kaksivaiheisen todentamisen koodi - otp_lost_help_html: Jos sinulla ei ole pääsyä kumpaankaan, voit ottaa yhteyttä osoitteeseen %{email} + otp_lost_help_html: Jos sinulla ei ole pääsyä kumpaankaan, voit ottaa yhteyden osoitteeseen %{email} seamless_external_login: Olet kirjautunut ulkoisen palvelun kautta, joten salasana- ja sähköpostiasetukset eivät ole käytettävissä. signed_in_as: 'Kirjautunut tilillä:' verification: diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 525532ed98..f86b4fc20b 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -750,7 +750,7 @@ gl: title: Retención do contido default_noindex: desc_html: Aféctalle a tódalas usuarias que non cambiaron este axuste elas mesmas - title: Por omisión exclúe as usuarias do indexado por servidores de busca + title: Omitir por defecto ás usuarias do indexado por servidores de busca discovery: follow_recommendations: Recomendacións de seguimento preamble: Destacar contido interesante é importante para axudar a que as novas usuarias se sintan cómodas se non coñecen a ninguén en Mastodon. Xestiona os diferentes xeitos de promocionar contidos. @@ -1528,7 +1528,7 @@ gl: too_many_options: non pode haber máis de %{max} opcións preferences: other: Outro - posting_defaults: Valores por omisión + posting_defaults: Valores por defecto public_timelines: Cronoloxías públicas privacy: hint_html: "Personaliza o xeito no que queres que se atope o teu perfil e publicacións. Mastodon ten variedade de ferramentas para axudarche a acadar unha audiencia maior. Dedica un minuto a revisalas e confirma que se axustan ao teu caso persoal." @@ -1698,7 +1698,7 @@ gl: private_long: Mostrar só as seguidoras public: Público public_long: Visible para calquera - unlisted: Non listado + unlisted: Sen listar 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/he.yml b/config/locales/he.yml index 2bd9f89c71..ea2ab8f29a 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -782,7 +782,7 @@ he: discovery: follow_recommendations: המלצות מעקב preamble: הצפה של תוכן מעניין בקבלת פני משתמשות חדשות שאולי אינן מכירות עדיין א.נשים במסטודון. ניתן לשלוט איך אפשרויות גילוי שונות עובדות על השרת שלך. - profile_directory: מדריך פרופילים + profile_directory: ספריית פרופילים public_timelines: פידים פומביים publish_discovered_servers: פרסום שרתים שנתגלו publish_statistics: פרסום הסטטיסטיקות בפומבי @@ -1417,7 +1417,7 @@ he: '604800': שבוע '86400': יום אחד expires_in_prompt: לעולם לא - generate: צור קישור להזמנה + generate: יצירת קישור להזמנה invited_by: הוזמנת ע"י max_uses: many: "%{count} שימושים" @@ -1425,9 +1425,9 @@ he: other: "%{count} שימושים" two: "%{count} שימושים" max_uses_prompt: ללא הגבלה - prompt: צור ושתף קישורים לאחרים על מנת להעניק גישה לשרת זה + prompt: צרו ושתפו קישורים לאחרים על מנת להעניק גישה לשרת זה table: - expires_at: פוקעת ב + expires_at: פג תוקף ב- uses: שימושים title: הזמנת אנשים lists: @@ -1917,7 +1917,7 @@ he: error: היתה בעיה בהוספת מפתח האבטחה. נסה שנית. success: מפתח האבטחה הוסף בהצלחה. delete: למחוק - delete_confirmation: האם אתה בטוח שברצונך למחוק מפתח אבטחה זה? + delete_confirmation: האם את.ה בטוח.ה שברצונך למחוק מפתח אבטחה זה? description_html: אם יאופשר אימות במפתח אבטחה, כניסה לאתר תדרוש שימוש באחד ממפתחות האבטחה שלך. destroy: error: היתה בעיה במחיקת מפתח האבטחה. נסה בשנית. diff --git a/config/locales/hr.yml b/config/locales/hr.yml index aa7ee760ba..28bd830158 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -47,6 +47,8 @@ hr: followers: Pratitelji follows: Praćeni header: Zaglavlje + ip: IP + joined: Pridružen location: all: Sve local: Lokalno @@ -54,6 +56,11 @@ hr: title: Lokacija moderation: all: Sve + most_recent_activity: Nedavne aktivnosti + perform_full_suspension: Suspendiraj + protocol: Protokol + public: Javno + reject: Odbij action_logs: empty: Nema pronađenih izvješća. filter_by_action: Filtriraj prema radnji diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 1c187c1de1..551824e800 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -534,6 +534,7 @@ nn: total_reported: Rapportar om dei total_storage: Medievedlegg totals_time_period_hint_html: Totalsum vist nedanfor gjeld data for alle tidsperiodar. + unknown_instance: Dette domenet er ukjent for denne serveren. invites: deactivate_all: Slå av alle filter: @@ -1101,6 +1102,7 @@ nn: functional: Kontoen din er fullt operativt. pending: Søknaden din ventar på gjennomgang frå personalet vårt. Dette kan taka litt tid. Du får ein e-post om søknaden din vert godkjend. redirecting_to: Kontoen din er inaktiv fordi den for øyeblikket omdirigerer til %{acct}. + self_destruct: Siden %{domain} stenger, vil du kun ha begrenset tilgang til kontoen din. view_strikes: Vis tidligere advarsler mot kontoen din too_fast: Skjemaet ble sendt inn for raskt, prøv på nytt. use_security_key: Bruk sikkerhetsnøkkel @@ -1570,6 +1572,9 @@ nn: over_daily_limit: Du har overskredet grensen på %{limit} planlagte tuter for den dagen over_total_limit: Du har overskredet grensen på %{limit} planlagte tuter too_soon: Den planlagte datoen må være i fremtiden + self_destruct: + lead_html: Dessverre stenger %{domain} for alltid. Hvis du hadde en konto der vil du ikke kunne fortsette å bruke den, men du kan fremdeles be om en sikkerhetskopi av dataene dine. + title: Denne serveren stenger sessions: activity: Siste aktivitet browser: Nettlesar diff --git a/config/locales/no.yml b/config/locales/no.yml index dc8151d552..1abfbdb97d 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -534,6 +534,7 @@ total_reported: Rapporter om dem total_storage: Mediavedlegg totals_time_period_hint_html: Summen som vises nedenfor inkluderer data for alle tider. + unknown_instance: Dette domenet er ukjent for denne serveren. invites: deactivate_all: Deaktiver alle filter: @@ -1096,6 +1097,7 @@ functional: Kontoen din er fullt operativt. pending: Søknaden din avventer gjennomgang av våre medarbeidere. Dette kan ta litt tid. Du vil motta en e-post dersom søknaden din blir godkjent. redirecting_to: Kontoen din er inaktiv fordi den for øyeblikket omdirigerer til %{acct}. + self_destruct: Siden %{domain} stenger, vil du kun ha begrenset tilgang til kontoen din. view_strikes: Vis tidligere advarsler mot kontoen din too_fast: Skjemaet ble sendt inn for raskt, prøv på nytt. use_security_key: Bruk sikkerhetsnøkkel @@ -1565,6 +1567,9 @@ over_daily_limit: Du har overskredet grensen på %{limit} planlagte innlegg for i dag over_total_limit: Du har overskredet grensen på %{limit} planlagte innlegg too_soon: Den planlagte datoen må være i fremtiden + self_destruct: + lead_html: Dessverre stenger %{domain} for alltid. Hvis du hadde en konto der vil du ikke kunne fortsette å bruke den, men du kan fremdeles be om en sikkerhetskopi av dataene dine. + title: Denne serveren stenger sessions: activity: Siste aktivitet browser: Nettleser diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 4e64f9cfd9..d99c265fe2 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -534,6 +534,7 @@ pt-BR: total_reported: Denúncias sobre eles total_storage: Mídias anexadas totals_time_period_hint_html: Os totais exibidos abaixo incluem dados para todo o tempo. + unknown_instance: Atualmente não há registros deste domínio neste servidor. invites: deactivate_all: Desativar todos filter: @@ -1040,6 +1041,12 @@ 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 foi confirmado! A equipe de %{domain} está agora revisando o seu cadastro. Eles lhe enviarão um e-mail se aprovarem a sua conta! + awaiting_review_title: Seu cadastro está sendo analisado + clicking_this_link: clicar este link + login_link: entrar + proceed_to_login_html: Agora você pode prosseguir para %{login_link}. + 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. diff --git a/config/locales/simple_form.bg.yml b/config/locales/simple_form.bg.yml index d576da71c6..68e45ef47b 100644 --- a/config/locales/simple_form.bg.yml +++ b/config/locales/simple_form.bg.yml @@ -295,7 +295,7 @@ bg: all: Известие за всички обновявания critical: Известие само за критични обновявания label: Има нова версия на Mastodon - none: Никога да не се известяват обновявания (не се препоръчва) + none: Никога да не се известява обновяване (непрепоръчително) patch: Известие за обновявания на оправени грешки trending_tag: Изискване на преглед за новонашумели rule: diff --git a/config/locales/simple_form.fa.yml b/config/locales/simple_form.fa.yml index 676eb192ee..5ff495a540 100644 --- a/config/locales/simple_form.fa.yml +++ b/config/locales/simple_form.fa.yml @@ -84,6 +84,7 @@ fa: custom_css: می‌توانیدروی نگارش وب ماستودون سبک‌های سفارشی اعمال کنید. mascot: نقش میانای وب پیش‌رفته را پایمال می‌کند. media_cache_retention_period: اگر به مقدار مثبتی تنظیم شود، پرونده‌های رسانهٔ بارگرفته پس از روزهای مشخّص شده حذف خواهند شد و هنگام درخواست دوباره بارگرفته می‌شوند. + peers_api_enabled: فهرستی از نام‌های دامنه‌ای که این کارساز در فدیورس با آن مواجه شده است. هیچ اطلاعاتی در مورد اینکه آیا شما با یک کارساز داده شده متعهد هستید، در اینجا گنجانده نشده است، فقط کارساز شما در مورد آن می‌داند. این توسط خدماتی استفاده می‌شود که آمار مربوط به فدراسیون را به معنای کلی جمع‌آوری می‌کنند. profile_directory: شاخهٔ نمایه، همهٔ کاربرانی که کشف‌پذیری را برگزیده‌اند سیاهه می‌کند. require_invite_text: زمانی که نام‌نویسی ها نیازمند تایید دستی است، متن «چرا می‌خواهید بپیوندید؟» بخش درخواست دعوت را به جای اختیاری، اجباری کنید site_contact_email: چگونگی دسترسی افراد به شما برای مقاصد قانونی یا پشتیبانی. @@ -91,6 +92,7 @@ fa: site_extended_description: هر اطّلاعات بیش‌تری که ممکن است برای بازدیدکنندگان و کاربرانتان مفید باشد. می‌تواند به شکل مارک‌دون باشد. site_short_description: شرحی کوتاه برای کمک به شناسایی یکتای کارسازتان. چه‌کسی می‌گرداندش و برای چه کسیست؟ site_terms: از سیاست محرمانگی خوتان استفاده کرده یا برای استفاده از سیاست پیش‌گزیده خالی بگذارید. می‌تواند در قالب مارک‌دون باشد. + site_title: چگونه مردم ممکن است به کارساز شما علاوه بر نام دامنه آن مراجعه کنند. form_challenge: current_password: شما در حال ورود به یک منطقهٔ‌ حفاظت‌شده هستید imports: diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 403162b820..bada4c3d0f 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -252,7 +252,7 @@ fi: require_invite_text: Vaadi syy liittyä show_domain_blocks: Näytä verkkotunnusten estot show_domain_blocks_rationale: Näytä, miksi verkkotunnukset on estetty - site_contact_email: Ota yhteyttä sähköpostilla + site_contact_email: Ota yhteys sähköpostitse site_contact_username: Yhteyshenkilön käyttäjänimi site_extended_description: Laajennettu kuvaus site_short_description: Palvelimen kuvaus diff --git a/config/locales/simple_form.gl.yml b/config/locales/simple_form.gl.yml index 4eb4ae4f24..b917f551c7 100644 --- a/config/locales/simple_form.gl.yml +++ b/config/locales/simple_form.gl.yml @@ -210,7 +210,7 @@ gl: setting_delete_modal: Solicitar confirmación antes de eliminar unha publicación setting_disable_swiping: Desactivar opcións de desprazamento setting_display_media: Mostrar multimedia - setting_display_media_default: Por omisión + setting_display_media_default: Por defecto setting_display_media_hide_all: Ocultar todo setting_display_media_show_all: Mostrar todo setting_expand_spoilers: Despregar sempre as publicacións marcadas con avisos de contido @@ -259,7 +259,7 @@ gl: site_terms: Política de Privacidade site_title: Nome do servidor status_page_url: URL da páxina do estado - theme: Decorado por omisión + theme: Decorado por defecto thumbnail: Icona do servidor timeline_preview: Permitir acceso á cronoloxía pública sen autenticación trendable_by_default: Permitir tendencias sen aprobación previa diff --git a/config/locales/simple_form.hr.yml b/config/locales/simple_form.hr.yml index 0f2896fe05..8f0178c7b2 100644 --- a/config/locales/simple_form.hr.yml +++ b/config/locales/simple_form.hr.yml @@ -2,12 +2,18 @@ hr: simple_form: hints: + account: + display_name: Tvoje puno ime ili tvoj online nadimak. + account_warning_preset: + title: Proizvoljno. Nije vidljivo primatelju defaults: avatar: PNG, GIF ili JPG. Najviše %{size}. Bit će smanjeno na %{dimensions}px header: PNG, GIF ili JPG. Najviše %{size}. Bit će smanjeno na %{dimensions}px + password: Mora biti najmanje 8 znakova setting_display_media_default: Sakrij medijski sadržaj označen kao osjetljiv setting_display_media_hide_all: Uvijek sakrij medijski sadržaj setting_display_media_show_all: Uvijek prikaži medijski sadržaj + username: Mora sadržavati samo slova, brojeve i _ imports: data: CSV datoteka izvezena iz drugog Mastodonovog poslužitelja labels: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index a6ee12ba27..736d839f91 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1041,6 +1041,7 @@ sv: hint_html: En sista sak till! Vi måste bekräfta att du är en människa (för att hålla borta skräpinlägg!). Lös CAPTCHA nedan och klicka på "Fortsätt". title: Säkerhetskontroll confirmations: + awaiting_review: Din e-postadress är bekräftad! %{domain} personalen granskar nu din registrering. Du kommer att få ett e-postmeddelande om de godkänner ditt konto! awaiting_review_title: Din registrering är under granskning clicking_this_link: klicka på denna länk login_link: logga in diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 85db04715b..eb947a7d0b 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -54,14 +54,14 @@ uk: no_role: Немає ролі title: Змінити роль для %{username} confirm: Зберегти - confirmed: Підтвердити ел.адресу + confirmed: Підтверджено confirming: Зберігається custom: Власне delete: Видалити дані deleted: Видалено demote: Усунути destroyed_msg: Дані %{username} тепер в черзі на негайне видалення - disable: Вимкнути + disable: Заморозити disable_sign_in_token_auth: Вимкнути автентифікацію за допомогою е-пошти disable_two_factor_authentication: Вимкнути двофакторну авторизацію disabled: Вимкнено @@ -70,7 +70,7 @@ uk: edit: Змінити email: Електронна пошта email_status: Стан електронної пошти - enable: Увімкнути + enable: Розморозити enable_sign_in_token_auth: Увімкнути автентифікацію за допомогою е-пошти enabled: Увімкнено enabled_msg: Обліковий запис %{username} успішно розморожено diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 236b2d0cf9..58aeac8414 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -1023,6 +1023,14 @@ zh-HK: hint_html: 還有最後一步!我們需要確認你是人類(這樣我們才能杜絕垃圾郵件!)。解答下方的 CAPTCHA,然後點擊「繼續」。 title: 安全檢查 confirmations: + awaiting_review: 已確認你的電郵地址!%{domain} 的工作人員正在審核你的註冊資料。如果他們批准你的帳號,你將會收到電郵通知。 + awaiting_review_title: 正在審核你的註冊 + clicking_this_link: 點擊此連結 + login_link: 登入 + proceed_to_login_html: 你現在可前往 %{login_link} + redirect_to_app_html: 你應該已被重新導向%{app_name}應用程式。如果尚未被導向,請嘗試%{clicking_this_link}或自行回到應用程式。 + registration_complete: 你在%{domain}已完成註冊! + welcome_title: 歡迎,%{name}! wrong_email_hint: 如果該電郵地址不正確,你可以在帳號設定中修改。 delete_account: 刪除帳號 delete_account_html: 如果你想刪除你的帳號,請點擊這裡繼續。你需要確認你的操作。 diff --git a/config/routes.rb b/config/routes.rb index 6c8c301628..d42650441f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -52,12 +52,12 @@ Rails.application.routes.draw do end get '.well-known/host-meta', to: 'well_known/host_meta#show', as: :host_meta, defaults: { format: 'xml' } - get '.well-known/nodeinfo', to: 'well_known/nodeinfo#index', as: :nodeinfo, defaults: { format: 'json' } + get '.well-known/nodeinfo', to: 'well_known/node_info#index', as: :nodeinfo, defaults: { format: 'json' } get '.well-known/webfinger', to: 'well_known/webfinger#show', as: :webfinger get '.well-known/change-password', to: redirect('/auth/edit') get '.well-known/proxy', to: redirect { |_, request| "/authorize_interaction?#{request.params.to_query}" } - get '/nodeinfo/2.0', to: 'well_known/nodeinfo#show', as: :nodeinfo_schema + get '/nodeinfo/2.0', to: 'well_known/node_info#show', as: :nodeinfo_schema get 'manifest', to: 'manifests#show', defaults: { format: 'json' } get 'intent', to: 'intents#show' diff --git a/db/migrate/20160222143943_add_profile_fields_to_accounts.rb b/db/migrate/20160222143943_add_profile_fields_to_accounts.rb index 058eb702c3..960ae0ddcd 100644 --- a/db/migrate/20160222143943_add_profile_fields_to_accounts.rb +++ b/db/migrate/20160222143943_add_profile_fields_to_accounts.rb @@ -2,8 +2,10 @@ class AddProfileFieldsToAccounts < ActiveRecord::Migration[4.2] def change - add_column :accounts, :note, :text, null: false, default: '' - add_column :accounts, :display_name, :string, null: false, default: '' - add_column :accounts, :uri, :string, null: false, default: '' + change_table :accounts, bulk: true do |t| + t.column :note, :text, null: false, default: '' + t.column :display_name, :string, null: false, default: '' + t.column :uri, :string, null: false, default: '' + end end end diff --git a/db/migrate/20160223162837_add_metadata_to_statuses.rb b/db/migrate/20160223162837_add_metadata_to_statuses.rb index c564d69422..b344800d1e 100644 --- a/db/migrate/20160223162837_add_metadata_to_statuses.rb +++ b/db/migrate/20160223162837_add_metadata_to_statuses.rb @@ -2,7 +2,9 @@ class AddMetadataToStatuses < ActiveRecord::Migration[4.2] def change - add_column :statuses, :in_reply_to_id, :integer, null: true - add_column :statuses, :reblog_of_id, :integer, null: true + change_table(:statuses, bulk: true) do |t| + t.column :in_reply_to_id, :integer, null: true + t.column :reblog_of_id, :integer, null: true + end end end diff --git a/db/migrate/20160305115639_add_devise_to_users.rb b/db/migrate/20160305115639_add_devise_to_users.rb index 5b9a817c60..64ad78dbc6 100644 --- a/db/migrate/20160305115639_add_devise_to_users.rb +++ b/db/migrate/20160305115639_add_devise_to_users.rb @@ -2,7 +2,7 @@ class AddDeviseToUsers < ActiveRecord::Migration[4.2] def self.up - change_table(:users) do |t| + change_table(:users, bulk: true) do |t| ## Database authenticatable t.string :encrypted_password, null: false, default: '' diff --git a/db/migrate/20160314164231_add_owner_to_application.rb b/db/migrate/20160314164231_add_owner_to_application.rb index d4eda38df0..633c467900 100644 --- a/db/migrate/20160314164231_add_owner_to_application.rb +++ b/db/migrate/20160314164231_add_owner_to_application.rb @@ -2,8 +2,10 @@ class AddOwnerToApplication < ActiveRecord::Migration[4.2] def change - add_column :oauth_applications, :owner_id, :integer, null: true - add_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.column :owner_id, :integer, null: true + t.column :owner_type, :string, null: true + end add_index :oauth_applications, [:owner_id, :owner_type] end end diff --git a/db/migrate/20160926213048_remove_owner_from_application.rb b/db/migrate/20160926213048_remove_owner_from_application.rb index 0be01dc4cb..d08ebd7b35 100644 --- a/db/migrate/20160926213048_remove_owner_from_application.rb +++ b/db/migrate/20160926213048_remove_owner_from_application.rb @@ -2,8 +2,10 @@ class RemoveOwnerFromApplication < ActiveRecord::Migration[5.0] def change - remove_index :oauth_applications, [:owner_id, :owner_type] - remove_column :oauth_applications, :owner_id, :integer, null: true - remove_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.remove_index [:owner_id, :owner_type] + t.remove :owner_id, type: :integer, options: { null: true } + t.remove :owner_type, type: :string, options: { null: true } + end end end diff --git a/db/migrate/20161003142332_add_confirmable_to_users.rb b/db/migrate/20161003142332_add_confirmable_to_users.rb index b33c9eadad..4472e5cd80 100644 --- a/db/migrate/20161003142332_add_confirmable_to_users.rb +++ b/db/migrate/20161003142332_add_confirmable_to_users.rb @@ -2,10 +2,12 @@ class AddConfirmableToUsers < ActiveRecord::Migration[5.0] def change - add_column :users, :confirmation_token, :string - add_column :users, :confirmed_at, :datetime - add_column :users, :confirmation_sent_at, :datetime - add_column :users, :unconfirmed_email, :string + change_table(:users, bulk: true) do |t| + t.column :confirmation_token, :string + t.column :confirmed_at, :datetime + t.column :confirmation_sent_at, :datetime + t.column :unconfirmed_email, :string + end add_index :users, :confirmation_token, unique: true end end diff --git a/db/migrate/20170112154826_migrate_settings.rb b/db/migrate/20170112154826_migrate_settings.rb index a1dc0fe4e4..d1faa81f5d 100644 --- a/db/migrate/20170112154826_migrate_settings.rb +++ b/db/migrate/20170112154826_migrate_settings.rb @@ -2,20 +2,24 @@ class MigrateSettings < ActiveRecord::Migration[4.2] def up - remove_index :settings, [:target_type, :target_id, :var] - rename_column :settings, :target_id, :thing_id - rename_column :settings, :target_type, :thing_type - change_column :settings, :thing_id, :integer, null: true, default: nil - change_column :settings, :thing_type, :string, null: true, default: nil - add_index :settings, [:thing_type, :thing_id, :var], unique: true + change_table(:settings, bulk: true) do |t| + t.remove_index [:target_type, :target_id, :var] + t.rename :target_id, :thing_id + t.rename :target_type, :thing_type + t.change :thing_id, :integer, null: true, default: nil + t.change :thing_type, :string, null: true, default: nil + t.index [:thing_type, :thing_id, :var], unique: true + end end def down - remove_index :settings, [:thing_type, :thing_id, :var] - rename_column :settings, :thing_id, :target_id - rename_column :settings, :thing_type, :target_type - change_column :settings, :target_id, :integer, null: false - change_column :settings, :target_type, :string, null: false, default: '' - add_index :settings, [:target_type, :target_id, :var], unique: true + change_table(:settings, bulk: true) do |t| + t.remove_index [:thing_type, :thing_id, :var] + t.rename :thing_id, :target_id + t.rename :thing_type, :target_type + t.column :target_id, :integer, null: false + t.column :target_type, :string, null: false, default: '' + t.index [:target_type, :target_id, :var], unique: true + end end end diff --git a/db/migrate/20170127165745_add_devise_two_factor_to_users.rb b/db/migrate/20170127165745_add_devise_two_factor_to_users.rb index f4eb72a6b7..0f60758d3b 100644 --- a/db/migrate/20170127165745_add_devise_two_factor_to_users.rb +++ b/db/migrate/20170127165745_add_devise_two_factor_to_users.rb @@ -2,10 +2,12 @@ class AddDeviseTwoFactorToUsers < ActiveRecord::Migration[5.0] def change - add_column :users, :encrypted_otp_secret, :string - add_column :users, :encrypted_otp_secret_iv, :string - add_column :users, :encrypted_otp_secret_salt, :string - add_column :users, :consumed_timestep, :integer - add_column :users, :otp_required_for_login, :boolean + change_table(:users, bulk: true) do |t| + t.column :encrypted_otp_secret, :string + t.column :encrypted_otp_secret_iv, :string + t.column :encrypted_otp_secret_salt, :string + t.column :consumed_timestep, :integer + t.column :otp_required_for_login, :boolean + end end end diff --git a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb index 09959100ac..b98fffab83 100644 --- a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb +++ b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb @@ -2,9 +2,11 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0] def change - change_column :statuses, :id, :bigint - change_column :statuses, :reblog_of_id, :bigint - change_column :statuses, :in_reply_to_id, :bigint + change_table(:statuses, bulk: true) do |t| + t.change :id, :bigint + t.change :reblog_of_id, :bigint + t.change :in_reply_to_id, :bigint + end change_column :media_attachments, :status_id, :bigint change_column :mentions, :status_id, :bigint diff --git a/db/migrate/20170330021336_add_counter_caches.rb b/db/migrate/20170330021336_add_counter_caches.rb index a9e496ad2f..941823cc21 100644 --- a/db/migrate/20170330021336_add_counter_caches.rb +++ b/db/migrate/20170330021336_add_counter_caches.rb @@ -2,11 +2,15 @@ class AddCounterCaches < ActiveRecord::Migration[5.0] def change - add_column :statuses, :favourites_count, :integer, null: false, default: 0 - add_column :statuses, :reblogs_count, :integer, null: false, default: 0 - add_column :accounts, :statuses_count, :integer, null: false, default: 0 - add_column :accounts, :followers_count, :integer, null: false, default: 0 - add_column :accounts, :following_count, :integer, null: false, default: 0 + change_table(:statuses, bulk: true) do |t| + t.column :favourites_count, :integer, null: false, default: 0 + t.column :reblogs_count, :integer, null: false, default: 0 + end + change_table(:accounts, bulk: true) do |t| + t.column :statuses_count, :integer, null: false, default: 0 + t.column :followers_count, :integer, null: false, default: 0 + t.column :following_count, :integer, null: false, default: 0 + end end end diff --git a/db/migrate/20170425202925_add_oembed_to_preview_cards.rb b/db/migrate/20170425202925_add_oembed_to_preview_cards.rb index f71d2c27ec..e0fd1919a3 100644 --- a/db/migrate/20170425202925_add_oembed_to_preview_cards.rb +++ b/db/migrate/20170425202925_add_oembed_to_preview_cards.rb @@ -2,13 +2,15 @@ class AddOEmbedToPreviewCards < ActiveRecord::Migration[5.0] def change - add_column :preview_cards, :type, :integer, default: 0, null: false - add_column :preview_cards, :html, :text, null: false, default: '' - add_column :preview_cards, :author_name, :string, null: false, default: '' - add_column :preview_cards, :author_url, :string, null: false, default: '' - add_column :preview_cards, :provider_name, :string, null: false, default: '' - add_column :preview_cards, :provider_url, :string, null: false, default: '' - add_column :preview_cards, :width, :integer, default: 0, null: false - add_column :preview_cards, :height, :integer, default: 0, null: false + change_table(:preview_cards, bulk: true) do |t| + t.column :type, :integer, default: 0, null: false + t.column :html, :text, null: false, default: '' + t.column :author_name, :string, null: false, default: '' + t.column :author_url, :string, null: false, default: '' + t.column :provider_name, :string, null: false, default: '' + t.column :provider_url, :string, null: false, default: '' + t.column :width, :integer, default: 0, null: false + t.column :height, :integer, default: 0, null: false + end end end diff --git a/db/migrate/20170427011934_re_add_owner_to_application.rb b/db/migrate/20170427011934_re_add_owner_to_application.rb index 182ce36d2a..1fd913e3b0 100644 --- a/db/migrate/20170427011934_re_add_owner_to_application.rb +++ b/db/migrate/20170427011934_re_add_owner_to_application.rb @@ -2,8 +2,10 @@ class ReAddOwnerToApplication < ActiveRecord::Migration[5.0] def change - add_column :oauth_applications, :owner_id, :integer, null: true - add_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.column :owner_id, :integer, null: true + t.column :owner_type, :string, null: true + end add_index :oauth_applications, [:owner_id, :owner_type] add_foreign_key :oauth_applications, :users, column: :owner_id, on_delete: :cascade end diff --git a/db/migrate/20170520145338_change_language_filter_to_opt_out.rb b/db/migrate/20170520145338_change_language_filter_to_opt_out.rb index 12e045480a..f0a95819c3 100644 --- a/db/migrate/20170520145338_change_language_filter_to_opt_out.rb +++ b/db/migrate/20170520145338_change_language_filter_to_opt_out.rb @@ -3,9 +3,12 @@ class ChangeLanguageFilterToOptOut < ActiveRecord::Migration[5.0] def change remove_index :users, :allowed_languages - remove_column :users, :allowed_languages - add_column :users, :filtered_languages, :string, array: true, default: [], null: false + change_table(:users, bulk: true) do |t| + t.remove :allowed_languages + t.column :filtered_languages, :string, array: true, default: [], null: false + end + add_index :users, :filtered_languages, using: :gin end end diff --git a/db/migrate/20170624134742_add_description_to_session_activations.rb b/db/migrate/20170624134742_add_description_to_session_activations.rb index 78f9e7a8d9..08b28247ae 100644 --- a/db/migrate/20170624134742_add_description_to_session_activations.rb +++ b/db/migrate/20170624134742_add_description_to_session_activations.rb @@ -2,8 +2,10 @@ class AddDescriptionToSessionActivations < ActiveRecord::Migration[5.1] def change - add_column :session_activations, :user_agent, :string, null: false, default: '' - add_column :session_activations, :ip, :inet + change_table(:session_activations, bulk: true) do |t| + t.column :user_agent, :string, null: false, default: '' + t.column :ip, :inet + end add_foreign_key :session_activations, :users, on_delete: :cascade end end diff --git a/db/migrate/20170718211102_add_activitypub_to_accounts.rb b/db/migrate/20170718211102_add_activitypub_to_accounts.rb index 83a45f13a9..4d10b02159 100644 --- a/db/migrate/20170718211102_add_activitypub_to_accounts.rb +++ b/db/migrate/20170718211102_add_activitypub_to_accounts.rb @@ -2,10 +2,12 @@ class AddActivityPubToAccounts < ActiveRecord::Migration[5.1] def change - add_column :accounts, :inbox_url, :string, null: false, default: '' - add_column :accounts, :outbox_url, :string, null: false, default: '' - add_column :accounts, :shared_inbox_url, :string, null: false, default: '' - add_column :accounts, :followers_url, :string, null: false, default: '' - add_column :accounts, :protocol, :integer, null: false, default: 0 + change_table(:accounts, bulk: true) do |t| + t.column :inbox_url, :string, null: false, default: '' + t.column :outbox_url, :string, null: false, default: '' + t.column :shared_inbox_url, :string, null: false, default: '' + t.column :followers_url, :string, null: false, default: '' + t.column :protocol, :integer, null: false, default: 0 + end end end diff --git a/db/migrate/20171006142024_add_uri_to_custom_emojis.rb b/db/migrate/20171006142024_add_uri_to_custom_emojis.rb index a9d760d04b..d7b87b8342 100644 --- a/db/migrate/20171006142024_add_uri_to_custom_emojis.rb +++ b/db/migrate/20171006142024_add_uri_to_custom_emojis.rb @@ -2,7 +2,11 @@ class AddUriToCustomEmojis < ActiveRecord::Migration[5.2] def change - add_column :custom_emojis, :uri, :string - add_column :custom_emojis, :image_remote_url, :string + safety_assured do + change_table(:custom_emojis, bulk: true) do |t| + t.column :uri, :string + t.column :image_remote_url, :string + end + end end end diff --git a/db/migrate/20180812123222_change_relays_enabled.rb b/db/migrate/20180812123222_change_relays_enabled.rb index 7424b91c7e..274d936f8c 100644 --- a/db/migrate/20180812123222_change_relays_enabled.rb +++ b/db/migrate/20180812123222_change_relays_enabled.rb @@ -15,7 +15,9 @@ class ChangeRelaysEnabled < ActiveRecord::Migration[5.2] end def down - remove_column :relays, :state - add_column :relays, :enabled, :boolean, default: false, null: false + change_table(:relays, bulk: true) do |t| + t.remove :state + t.column :enabled, :boolean, default: false, null: false + end end end diff --git a/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb b/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb index c9f0849557..cbb5fc67b4 100644 --- a/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb +++ b/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb @@ -13,8 +13,12 @@ class AddSilencedAtSuspendedAtToAccounts < ActiveRecord::Migration[5.2] end def up - add_column :accounts, :silenced_at, :datetime - add_column :accounts, :suspended_at, :datetime + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :silenced_at, :datetime + t.column :suspended_at, :datetime + end + end # Record suspend date of blocks and silences for users whose limitations match # a domain block @@ -36,7 +40,9 @@ class AddSilencedAtSuspendedAtToAccounts < ActiveRecord::Migration[5.2] Account.where(suspended: false).where.not(suspended_at: nil).in_batches.update_all(suspended: true) Account.where(silenced: false).where.not(silenced_at: nil).in_batches.update_all(silenced: true) - remove_column :accounts, :silenced_at - remove_column :accounts, :suspended_at + change_table(:accounts, bulk: true) do |t| + t.column :silenced_at, :datetime + t.column :suspended_at, :datetime + end end end diff --git a/db/migrate/20190805123746_add_capabilities_to_tags.rb b/db/migrate/20190805123746_add_capabilities_to_tags.rb index 623b56a831..949938bb1e 100644 --- a/db/migrate/20190805123746_add_capabilities_to_tags.rb +++ b/db/migrate/20190805123746_add_capabilities_to_tags.rb @@ -2,10 +2,14 @@ class AddCapabilitiesToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :usable, :boolean - add_column :tags, :trendable, :boolean - add_column :tags, :listable, :boolean - add_column :tags, :reviewed_at, :datetime - add_column :tags, :requested_review_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :usable, :boolean + t.column :trendable, :boolean + t.column :listable, :boolean + t.column :reviewed_at, :datetime + t.column :requested_review_at, :datetime + end + end end end diff --git a/db/migrate/20190807135426_add_comments_to_domain_blocks.rb b/db/migrate/20190807135426_add_comments_to_domain_blocks.rb index 7cca3229c9..2f5b561e16 100644 --- a/db/migrate/20190807135426_add_comments_to_domain_blocks.rb +++ b/db/migrate/20190807135426_add_comments_to_domain_blocks.rb @@ -2,7 +2,11 @@ class AddCommentsToDomainBlocks < ActiveRecord::Migration[5.2] def change - add_column :domain_blocks, :private_comment, :text - add_column :domain_blocks, :public_comment, :text + safety_assured do + change_table(:domain_blocks, bulk: true) do |t| + t.column :private_comment, :text + t.column :public_comment, :text + end + end end end diff --git a/db/migrate/20190815225426_add_last_status_at_to_tags.rb b/db/migrate/20190815225426_add_last_status_at_to_tags.rb index 03181988c6..b53821368f 100644 --- a/db/migrate/20190815225426_add_last_status_at_to_tags.rb +++ b/db/migrate/20190815225426_add_last_status_at_to_tags.rb @@ -2,7 +2,11 @@ class AddLastStatusAtToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :last_status_at, :datetime - add_column :tags, :last_trend_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :last_status_at, :datetime + t.column :last_trend_at, :datetime + end + end end end diff --git a/db/migrate/20190901035623_add_max_score_to_tags.rb b/db/migrate/20190901035623_add_max_score_to_tags.rb index 42a5796949..0686db15b3 100644 --- a/db/migrate/20190901035623_add_max_score_to_tags.rb +++ b/db/migrate/20190901035623_add_max_score_to_tags.rb @@ -2,7 +2,11 @@ class AddMaxScoreToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :max_score, :float - add_column :tags, :max_score_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :max_score, :float + t.column :max_score_at, :datetime + end + end end end diff --git a/db/migrate/20200417125749_add_storage_schema_version.rb b/db/migrate/20200417125749_add_storage_schema_version.rb index b504537311..193861d016 100644 --- a/db/migrate/20200417125749_add_storage_schema_version.rb +++ b/db/migrate/20200417125749_add_storage_schema_version.rb @@ -3,8 +3,12 @@ class AddStorageSchemaVersion < ActiveRecord::Migration[5.2] def change add_column :preview_cards, :image_storage_schema_version, :integer - add_column :accounts, :avatar_storage_schema_version, :integer - add_column :accounts, :header_storage_schema_version, :integer + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :avatar_storage_schema_version, :integer + t.column :header_storage_schema_version, :integer + end + end add_column :media_attachments, :file_storage_schema_version, :integer add_column :custom_emojis, :image_storage_schema_version, :integer end diff --git a/db/migrate/20200608113046_add_sign_in_token_to_users.rb b/db/migrate/20200608113046_add_sign_in_token_to_users.rb index 5b71276a24..6866f197a0 100644 --- a/db/migrate/20200608113046_add_sign_in_token_to_users.rb +++ b/db/migrate/20200608113046_add_sign_in_token_to_users.rb @@ -2,7 +2,11 @@ class AddSignInTokenToUsers < ActiveRecord::Migration[5.2] def change - add_column :users, :sign_in_token, :string - add_column :users, :sign_in_token_sent_at, :datetime + safety_assured do + change_table(:users, bulk: true) do |t| + t.column :sign_in_token, :string + t.column :sign_in_token_sent_at, :datetime + end + end end end diff --git a/db/migrate/20211112011713_add_language_to_preview_cards.rb b/db/migrate/20211112011713_add_language_to_preview_cards.rb index b9049e9795..6d32980915 100644 --- a/db/migrate/20211112011713_add_language_to_preview_cards.rb +++ b/db/migrate/20211112011713_add_language_to_preview_cards.rb @@ -2,8 +2,12 @@ class AddLanguageToPreviewCards < ActiveRecord::Migration[6.1] def change - add_column :preview_cards, :language, :string - add_column :preview_cards, :max_score, :float - add_column :preview_cards, :max_score_at, :datetime + safety_assured do + change_table(:preview_cards, bulk: true) do |t| + t.column :language, :string + t.column :max_score, :float + t.column :max_score_at, :datetime + end + end end end diff --git a/db/migrate/20211231080958_add_category_to_reports.rb b/db/migrate/20211231080958_add_category_to_reports.rb index 97a59f8c23..f114cda615 100644 --- a/db/migrate/20211231080958_add_category_to_reports.rb +++ b/db/migrate/20211231080958_add_category_to_reports.rb @@ -8,16 +8,24 @@ class AddCategoryToReports < ActiveRecord::Migration[6.1] disable_ddl_transaction! def up - safety_assured { add_column_with_default :reports, :category, :int, default: 0, allow_null: false } - add_column :reports, :action_taken_at, :datetime - add_column :reports, :rule_ids, :bigint, array: true - safety_assured { execute 'UPDATE reports SET action_taken_at = updated_at WHERE action_taken = TRUE' } + safety_assured do + add_column_with_default :reports, :category, :int, default: 0, allow_null: false + change_table(:reports, bulk: true) do |t| + t.column :action_taken_at, :datetime + t.column :rule_ids, :bigint, array: true + end + execute 'UPDATE reports SET action_taken_at = updated_at WHERE action_taken = TRUE' + end end def down - safety_assured { execute 'UPDATE reports SET action_taken = TRUE WHERE action_taken_at IS NOT NULL' } - remove_column :reports, :category - remove_column :reports, :action_taken_at - remove_column :reports, :rule_ids + safety_assured do + execute 'UPDATE reports SET action_taken = TRUE WHERE action_taken_at IS NOT NULL' + remove_column :reports, :category + change_table(:reports, bulk: true) do |t| + t.column :action_taken_at, :datetime + t.column :rule_ids, :bigint, array: true + end + end end end diff --git a/db/migrate/20220202200743_add_trendable_to_accounts.rb b/db/migrate/20220202200743_add_trendable_to_accounts.rb index 20de235c2d..539717b751 100644 --- a/db/migrate/20220202200743_add_trendable_to_accounts.rb +++ b/db/migrate/20220202200743_add_trendable_to_accounts.rb @@ -2,8 +2,12 @@ class AddTrendableToAccounts < ActiveRecord::Migration[6.1] def change - add_column :accounts, :trendable, :boolean - add_column :accounts, :reviewed_at, :datetime - add_column :accounts, :requested_review_at, :datetime + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :trendable, :boolean + t.column :reviewed_at, :datetime + t.column :requested_review_at, :datetime + end + end end end diff --git a/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb b/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb index f70dbe5e32..86a1c420f4 100644 --- a/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb +++ b/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb @@ -2,7 +2,11 @@ class AddIpsToEmailDomainBlocks < ActiveRecord::Migration[6.1] def change - add_column :email_domain_blocks, :ips, :inet, array: true - add_column :email_domain_blocks, :last_refresh_at, :datetime + safety_assured do + change_table(:email_domain_blocks, bulk: true) do |t| + t.column :ips, :inet, array: true + t.column :last_refresh_at, :datetime + end + end end end diff --git a/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb index a733fa1c4b..a5eb732720 100644 --- a/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb +++ b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb @@ -2,7 +2,11 @@ class AddLastUsedAtToOauthAccessTokens < ActiveRecord::Migration[6.1] def change - add_column :oauth_access_tokens, :last_used_at, :datetime - add_column :oauth_access_tokens, :last_used_ip, :inet + safety_assured do + change_table(:oauth_access_tokens, bulk: true) do |t| + t.column :last_used_at, :datetime + t.column :last_used_ip, :inet + end + end end end diff --git a/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb b/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb index b8ebee6f07..55567d62e1 100644 --- a/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb +++ b/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb @@ -2,9 +2,13 @@ class AddOrderedMediaAttachmentIdsToStatusEdits < ActiveRecord::Migration[6.1] def change - add_column :status_edits, :ordered_media_attachment_ids, :bigint, array: true - add_column :status_edits, :media_descriptions, :text, array: true - add_column :status_edits, :poll_options, :string, array: true - add_column :status_edits, :sensitive, :boolean + safety_assured do + change_table(:status_edits, bulk: true) do |t| + t.column :ordered_media_attachment_ids, :bigint, array: true + t.column :media_descriptions, :text, array: true + t.column :poll_options, :string, array: true + t.column :sensitive, :boolean + end + end end end diff --git a/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb b/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb index 90bc767288..4719ac4822 100644 --- a/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb +++ b/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb @@ -2,8 +2,12 @@ class AddHumanIdentifierToAdminActionLogs < ActiveRecord::Migration[6.1] def change - add_column :admin_action_logs, :human_identifier, :string - add_column :admin_action_logs, :route_param, :string - add_column :admin_action_logs, :permalink, :string + safety_assured do + change_table(:admin_action_logs, bulk: true) do |t| + t.column :human_identifier, :string + t.column :route_param, :string + t.column :permalink, :string + end + end end end diff --git a/lib/mastodon/cli/maintenance.rb b/lib/mastodon/cli/maintenance.rb index e73bcbf86a..9cc9a3507a 100644 --- a/lib/mastodon/cli/maintenance.rb +++ b/lib/mastodon/cli/maintenance.rb @@ -224,7 +224,7 @@ module Mastodon::CLI users = User.where(id: row['ids'].split(',')).sort_by(&:updated_at).reverse ref_user = users.shift say "Multiple users registered with e-mail address #{ref_user.email}.", :yellow - say "e-mail will be disabled for the following accounts: #{user.map(&:account).map(&:acct).join(', ')}", :yellow + say "e-mail will be disabled for the following accounts: #{user.map { |user| user.account.acct }.join(', ')}", :yellow say 'Please reach out to them and set another address with `tootctl account modify` or delete them.', :yellow users.each_with_index do |user, index| @@ -253,7 +253,7 @@ module Mastodon::CLI def deduplicate_users_process_confirmation_token ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE confirmation_token IS NOT NULL GROUP BY confirmation_token HAVING count(*) > 1").each do |row| users = User.where(id: row['ids'].split(',')).sort_by(&:created_at).reverse.drop(1) - say "Unsetting confirmation token for those accounts: #{users.map(&:account).map(&:acct).join(', ')}", :yellow + say "Unsetting confirmation token for those accounts: #{users.map { |user| user.account.acct }.join(', ')}", :yellow users.each do |user| user.update!(confirmation_token: nil) @@ -265,7 +265,7 @@ module Mastodon::CLI if ActiveRecord::Migrator.current_version < 2022_01_18_183010 ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE remember_token IS NOT NULL GROUP BY remember_token HAVING count(*) > 1").each do |row| users = User.where(id: row['ids'].split(',')).sort_by(&:updated_at).reverse.drop(1) - say "Unsetting remember token for those accounts: #{users.map(&:account).map(&:acct).join(', ')}", :yellow + say "Unsetting remember token for those accounts: #{users.map { |user| user.account.acct }.join(', ')}", :yellow users.each do |user| user.update!(remember_token: nil) @@ -277,7 +277,7 @@ module Mastodon::CLI def deduplicate_users_process_password_token ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE reset_password_token IS NOT NULL GROUP BY reset_password_token HAVING count(*) > 1").each do |row| users = User.where(id: row['ids'].split(',')).sort_by(&:updated_at).reverse.drop(1) - say "Unsetting password reset token for those accounts: #{users.map(&:account).map(&:acct).join(', ')}", :yellow + say "Unsetting password reset token for those accounts: #{users.map { |user| user.account.acct }.join(', ')}", :yellow users.each do |user| user.update!(reset_password_token: nil) diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb index 53508d3e45..e600b171b2 100644 --- a/lib/sanitize_ext/sanitize_config.rb +++ b/lib/sanitize_ext/sanitize_config.rb @@ -74,7 +74,7 @@ class Sanitize current_node.replace(Nokogiri::XML::Text.new(current_node.text, current_node.document)) unless LINK_PROTOCOLS.include?(scheme) end - MASTODON_STRICT ||= freeze_config( + MASTODON_STRICT = freeze_config( elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li), attributes: { @@ -106,7 +106,7 @@ class Sanitize ] ) - MASTODON_OEMBED ||= freeze_config( + MASTODON_OEMBED = freeze_config( elements: %w(audio embed iframe source video), attributes: { @@ -154,7 +154,7 @@ class Sanitize end end - MASTODON_OUTGOING ||= freeze_config MASTODON_STRICT.merge( + MASTODON_OUTGOING = freeze_config MASTODON_STRICT.merge( attributes: merge( MASTODON_STRICT[:attributes], 'a' => %w(href rel class title target translate) diff --git a/spec/config/initializers/rack_attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb similarity index 100% rename from spec/config/initializers/rack_attack_spec.rb rename to spec/config/initializers/rack/attack_spec.rb diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb index b57ec67141..ba03ec85a4 100644 --- a/spec/controllers/admin/accounts_controller_spec.rb +++ b/spec/controllers/admin/accounts_controller_spec.rb @@ -18,9 +18,20 @@ RSpec.describe Admin::AccountsController do end it 'filters with parameters' do - new = AccountFilter.method(:new) + account_filter = instance_double(AccountFilter, results: Account.all) + allow(AccountFilter).to receive(:new).and_return(account_filter) - expect(AccountFilter).to receive(:new) do |params| + get :index, params: { + origin: 'local', + by_domain: 'domain', + status: 'active', + username: 'username', + display_name: 'display name', + email: 'local-part@domain', + ip: '0.0.0.42', + } + + expect(AccountFilter).to have_received(:new) do |params| h = params.to_h expect(h[:origin]).to eq 'local' @@ -30,19 +41,7 @@ RSpec.describe Admin::AccountsController do expect(h[:display_name]).to eq 'display name' expect(h[:email]).to eq 'local-part@domain' expect(h[:ip]).to eq '0.0.0.42' - - new.call({}) end - - get :index, params: { - origin: 'local', - by_domain: 'domain', - status: 'active', - username: 'username', - display_name: 'display name', - email: 'local-part@domain', - ip: '0.0.0.42', - } end it 'paginates accounts' do diff --git a/spec/controllers/api/v1/streaming_controller_spec.rb b/spec/controllers/api/v1/streaming_controller_spec.rb index 7014ed9b2b..06639a13fd 100644 --- a/spec/controllers/api/v1/streaming_controller_spec.rb +++ b/spec/controllers/api/v1/streaming_controller_spec.rb @@ -3,14 +3,14 @@ require 'rails_helper' describe Api::V1::StreamingController do - around(:each) do |example| + around do |example| before = Rails.configuration.x.streaming_api_base_url Rails.configuration.x.streaming_api_base_url = Rails.configuration.x.web_domain example.run Rails.configuration.x.streaming_api_base_url = before end - before(:each) do + before do request.headers.merge! Host: Rails.configuration.x.web_domain end @@ -24,7 +24,7 @@ describe Api::V1::StreamingController do end context 'with streaming api on different host' do - before(:each) do + before do Rails.configuration.x.streaming_api_base_url = "wss://streaming-#{Rails.configuration.x.web_domain}" @streaming_host = URI.parse(Rails.configuration.x.streaming_api_base_url).host end diff --git a/spec/controllers/api/v2/search_controller_spec.rb b/spec/controllers/api/v2/search_controller_spec.rb index a3b92fc37a..d3ff42d6a0 100644 --- a/spec/controllers/api/v2/search_controller_spec.rb +++ b/spec/controllers/api/v2/search_controller_spec.rb @@ -53,7 +53,7 @@ RSpec.describe Api::V2::SearchController do context 'without token' do describe 'GET #index' do - let(:search_params) {} + let(:search_params) { nil } before do get :index, params: search_params diff --git a/spec/controllers/well_known/nodeinfo_controller_spec.rb b/spec/controllers/well_known/node_info_controller_spec.rb similarity index 100% rename from spec/controllers/well_known/nodeinfo_controller_spec.rb rename to spec/controllers/well_known/node_info_controller_spec.rb diff --git a/spec/controllers/well_known/webfinger_controller_spec.rb b/spec/controllers/well_known/webfinger_controller_spec.rb index 20770a7211..6610f4d138 100644 --- a/spec/controllers/well_known/webfinger_controller_spec.rb +++ b/spec/controllers/well_known/webfinger_controller_spec.rb @@ -16,7 +16,7 @@ describe WellKnown::WebfingerController do let(:alice) { Fabricate(:account, username: 'alice') } let(:resource) { nil } - around(:each) do |example| + around do |example| tmp = Rails.configuration.x.alternate_domains Rails.configuration.x.alternate_domains = alternate_domains example.run diff --git a/spec/fabricators/access_token_fabricator.rb b/spec/fabricators/access_token_fabricator.rb index 508c328085..d07f1ca14f 100644 --- a/spec/fabricators/access_token_fabricator.rb +++ b/spec/fabricators/access_token_fabricator.rb @@ -1,4 +1,3 @@ # frozen_string_literal: true -Fabricator :access_token, from: 'Doorkeeper::AccessToken' do -end +Fabricator :access_token, from: 'Doorkeeper::AccessToken' diff --git a/spec/fabricators/conversation_fabricator.rb b/spec/fabricators/conversation_fabricator.rb index 07c6780bf9..5440e4380c 100644 --- a/spec/fabricators/conversation_fabricator.rb +++ b/spec/fabricators/conversation_fabricator.rb @@ -1,4 +1,3 @@ # frozen_string_literal: true -Fabricator(:conversation) do -end +Fabricator(:conversation) diff --git a/spec/fabricators/system_key_fabricator.rb b/spec/fabricators/system_key_fabricator.rb index ef6cec9c40..bcb3bd5577 100644 --- a/spec/fabricators/system_key_fabricator.rb +++ b/spec/fabricators/system_key_fabricator.rb @@ -1,4 +1,3 @@ # frozen_string_literal: true -Fabricator(:system_key) do -end +Fabricator(:system_key) diff --git a/spec/features/captcha_spec.rb b/spec/features/captcha_spec.rb index a5c5a44aa6..906aec4af9 100644 --- a/spec/features/captcha_spec.rb +++ b/spec/features/captcha_spec.rb @@ -7,11 +7,7 @@ describe 'email confirmation flow when captcha is enabled' do let(:client_app) { nil } before do - # rubocop:disable RSpec/AnyInstance -- easiest way to deal with that that I know of - allow_any_instance_of(Auth::ConfirmationsController).to receive(:captcha_enabled?).and_return(true) - allow_any_instance_of(Auth::ConfirmationsController).to receive(:check_captcha!).and_return(true) - allow_any_instance_of(Auth::ConfirmationsController).to receive(:render_captcha).and_return(nil) - # rubocop:enable RSpec/AnyInstance + allow(Auth::ConfirmationsController).to receive(:new).and_return(stubbed_controller) end context 'when the user signed up through an app' do @@ -40,4 +36,12 @@ describe 'email confirmation flow when captcha is enabled' do expect(page).to have_link(I18n.t('auth.confirmations.clicking_this_link'), href: client_app.confirmation_redirect_uri) end end + + private + + def stubbed_controller + Auth::ConfirmationsController.new.tap do |controller| + allow(controller).to receive_messages(captcha_enabled?: true, check_captcha!: true, render_captcha: nil) + end + end end diff --git a/spec/helpers/admin/account_moderation_notes_helper_spec.rb b/spec/helpers/admin/account_moderation_notes_helper_spec.rb index 6386f07ac9..91bf4ab6fe 100644 --- a/spec/helpers/admin/account_moderation_notes_helper_spec.rb +++ b/spec/helpers/admin/account_moderation_notes_helper_spec.rb @@ -18,13 +18,15 @@ RSpec.describe Admin::AccountModerationNotesHelper do let(:account) { Fabricate(:account) } it 'calls #link_to' do - expect(helper).to receive(:link_to).with( + allow(helper).to receive(:link_to) + + helper.admin_account_link_to(account) + + expect(helper).to have_received(:link_to).with( admin_account_path(account.id), class: name_tag_classes(account), title: account.acct ) - - helper.admin_account_link_to(account) end end end diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 4b4207b2e7..70d8138ccd 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -89,7 +89,7 @@ describe ApplicationHelper do end end - describe 'show_landing_strip?', without_verify_partial_doubles: true do + describe 'show_landing_strip?', :without_verify_partial_doubles do describe 'when signed in' do before do allow(helper).to receive(:user_signed_in?).and_return(true) diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb index c2e26dbed3..cdbce56598 100644 --- a/spec/helpers/instance_helper_spec.rb +++ b/spec/helpers/instance_helper_spec.rb @@ -18,7 +18,7 @@ describe InstanceHelper do end describe 'site_hostname' do - around(:each) do |example| + around do |example| before = Rails.configuration.x.local_domain example.run Rails.configuration.x.local_domain = before diff --git a/spec/helpers/jsonld_helper_spec.rb b/spec/helpers/json_ld_helper_spec.rb similarity index 100% rename from spec/helpers/jsonld_helper_spec.rb rename to spec/helpers/json_ld_helper_spec.rb diff --git a/spec/lib/activitypub/adapter_spec.rb b/spec/lib/activitypub/adapter_spec.rb index f9f8b8dce0..7d8d703ec2 100644 --- a/spec/lib/activitypub/adapter_spec.rb +++ b/spec/lib/activitypub/adapter_spec.rb @@ -53,7 +53,7 @@ RSpec.describe ActivityPub::Adapter do describe '#serializable_hash' do subject { ActiveModelSerializers::SerializableResource.new(TestObject.new(foo: 'bar'), serializer: serializer_class, adapter: described_class).as_json } - let(:serializer_class) {} + let(:serializer_class) { nil } context 'when serializer defines no context' do let(:serializer_class) { TestWithBasicContextSerializer } diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb index 88d79ced37..6b87eda151 100644 --- a/spec/lib/feed_manager_spec.rb +++ b/spec/lib/feed_manager_spec.rb @@ -10,7 +10,7 @@ RSpec.describe FeedManager do end end - it 'tracks at least as many statuses as reblogs', skip_stub: true do + it 'tracks at least as many statuses as reblogs', :skip_stub do expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS end diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize/config_spec.rb similarity index 100% rename from spec/lib/sanitize_config_spec.rb rename to spec/lib/sanitize/config_spec.rb diff --git a/spec/lib/vacuum/imports_vacuum_spec.rb b/spec/lib/vacuum/imports_vacuum_spec.rb index 1e0abc5e01..c712b7b9b2 100644 --- a/spec/lib/vacuum/imports_vacuum_spec.rb +++ b/spec/lib/vacuum/imports_vacuum_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Vacuum::ImportsVacuum do describe '#perform' do it 'cleans up the expected imports' do - expect { subject.perform }.to change { BulkImport.all.pluck(:id) }.from([old_unconfirmed, new_unconfirmed, recent_ongoing, recent_finished, old_finished].map(&:id)).to([new_unconfirmed, recent_ongoing, recent_finished].map(&:id)) + expect { subject.perform }.to change { BulkImport.pluck(:id) }.from([old_unconfirmed, new_unconfirmed, recent_ongoing, recent_finished, old_finished].map(&:id)).to([new_unconfirmed, recent_ongoing, recent_finished].map(&:id)) end end end diff --git a/spec/lib/webfinger_resource_spec.rb b/spec/lib/webfinger_resource_spec.rb index 558a318927..0e2bdcb71a 100644 --- a/spec/lib/webfinger_resource_spec.rb +++ b/spec/lib/webfinger_resource_spec.rb @@ -29,12 +29,16 @@ describe WebfingerResource do allow(recognized).to receive(:[]).with(:username).and_return('alice') allow(recognized).to receive(:[]).with(:action).and_return('create') - expect(Rails.application.routes).to receive(:recognize_path).with(resource).and_return(recognized).at_least(:once) + allow(Rails.application.routes).to receive(:recognize_path).with(resource).and_return(recognized) expect do described_class.new(resource).username end.to raise_error(ActiveRecord::RecordNotFound) expect(recognized).to have_received(:[]).exactly(3).times + + expect(Rails.application.routes).to have_received(:recognize_path) + .with(resource) + .at_least(:once) end it 'raises with a string that doesnt start with URL' do diff --git a/spec/models/admin/account_action_spec.rb b/spec/models/admin/account_action_spec.rb index b47561dd48..604fe73189 100644 --- a/spec/models/admin/account_action_spec.rb +++ b/spec/models/admin/account_action_spec.rb @@ -78,13 +78,15 @@ RSpec.describe Admin::AccountAction do end it 'calls process_email!' do - expect(account_action).to receive(:process_email!) + allow(account_action).to receive(:process_email!) subject + expect(account_action).to have_received(:process_email!) end it 'calls process_reports!' do - expect(account_action).to receive(:process_reports!) + allow(account_action).to receive(:process_reports!) subject + expect(account_action).to have_received(:process_reports!) end end diff --git a/spec/models/concerns/remotable_spec.rb b/spec/models/concerns/remotable_spec.rb index b2aa56a704..6413b6f467 100644 --- a/spec/models/concerns/remotable_spec.rb +++ b/spec/models/concerns/remotable_spec.rb @@ -120,8 +120,11 @@ RSpec.describe Remotable do end it 'does not try to write attribute' do - expect(foo).to_not receive('[]=').with(attribute_name, url) + allow(foo).to receive('[]=').with(attribute_name, url) + foo.hoge_remote_url = url + + expect(foo).to_not have_received('[]=').with(attribute_name, url) end end @@ -131,8 +134,11 @@ RSpec.describe Remotable do end it 'does not try to write attribute' do - expect(foo).to receive('[]=').with(attribute_name, url) + allow(foo).to receive('[]=').with(attribute_name, url) + foo.hoge_remote_url = url + + expect(foo).to have_received('[]=').with(attribute_name, url) end end @@ -146,10 +152,13 @@ RSpec.describe Remotable do let(:code) { 500 } it 'does not assign file' do - expect(foo).to_not receive(:public_send).with("#{hoge}=", any_args) - expect(foo).to_not receive(:public_send).with("#{hoge}_file_name=", any_args) + allow(foo).to receive(:public_send) + allow(foo).to receive(:public_send) foo.hoge_remote_url = url + + expect(foo).to_not have_received(:public_send).with("#{hoge}=", any_args) + expect(foo).to_not have_received(:public_send).with("#{hoge}_file_name=", any_args) end end @@ -165,13 +174,13 @@ RSpec.describe Remotable do allow(ResponseWithLimit).to receive(:new).with(anything, anything).and_return(response_with_limit) - expect(foo).to receive(:public_send).with("download_#{hoge}!", url) - + allow(foo).to receive(:public_send) foo.hoge_remote_url = url + expect(foo).to have_received(:public_send).with("download_#{hoge}!", url) - expect(foo).to receive(:public_send).with("#{hoge}=", response_with_limit) - + allow(foo).to receive(:public_send) foo.download_hoge!(url) + expect(foo).to have_received(:public_send).with("#{hoge}=", response_with_limit) end end end @@ -193,10 +202,13 @@ RSpec.describe Remotable do let(:error_class) { error_class } it 'calls Rails.logger.debug' do - expect(Rails.logger).to receive(:debug) do |&block| + allow(Rails.logger).to receive(:debug) + + foo.hoge_remote_url = url + + expect(Rails.logger).to have_received(:debug) do |&block| expect(block.call).to match(/^Error fetching remote #{hoge}: /) end - foo.hoge_remote_url = url end end end diff --git a/spec/models/follow_request_spec.rb b/spec/models/follow_request_spec.rb index 01faec0e70..f30e27e701 100644 --- a/spec/models/follow_request_spec.rb +++ b/spec/models/follow_request_spec.rb @@ -21,12 +21,17 @@ RSpec.describe FollowRequest do end it 'calls Account#follow!, MergeWorker.perform_async, and #destroy!' do - expect(account).to receive(:follow!).with(target_account, reblogs: true, notify: false, uri: follow_request.uri, languages: nil, bypass_limit: true) do + allow(account).to receive(:follow!) do account.active_relationships.create!(target_account: target_account) end - expect(MergeWorker).to receive(:perform_async).with(target_account.id, account.id) - expect(follow_request).to receive(:destroy!) + allow(MergeWorker).to receive(:perform_async) + allow(follow_request).to receive(:destroy!) + follow_request.authorize! + + expect(account).to have_received(:follow!).with(target_account, reblogs: true, notify: false, uri: follow_request.uri, languages: nil, bypass_limit: true) + expect(MergeWorker).to have_received(:perform_async).with(target_account.id, account.id) + expect(follow_request).to have_received(:destroy!) end it 'generates a Follow' do diff --git a/spec/models/identity_spec.rb b/spec/models/identity_spec.rb index 2fca1e1c14..7022454443 100644 --- a/spec/models/identity_spec.rb +++ b/spec/models/identity_spec.rb @@ -7,8 +7,11 @@ RSpec.describe Identity do let(:auth) { Fabricate(:identity, user: Fabricate(:user)) } it 'calls .find_or_create_by' do - expect(described_class).to receive(:find_or_create_by).with(uid: auth.uid, provider: auth.provider) + allow(described_class).to receive(:find_or_create_by) + described_class.find_for_oauth(auth) + + expect(described_class).to have_received(:find_or_create_by).with(uid: auth.uid, provider: auth.provider) end it 'returns an instance of Identity' do diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 6a82c8135a..89916f9f50 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe MediaAttachment, paperclip_processing: true do +RSpec.describe MediaAttachment, :paperclip_processing do describe 'local?' do subject { media_attachment.local? } diff --git a/spec/models/session_activation_spec.rb b/spec/models/session_activation_spec.rb index 75842e25ba..4012d46fd7 100644 --- a/spec/models/session_activation_spec.rb +++ b/spec/models/session_activation_spec.rb @@ -74,9 +74,13 @@ RSpec.describe SessionActivation do let(:options) { { user: Fabricate(:user), session_id: '1' } } it 'calls create! and purge_old' do - expect(described_class).to receive(:create!).with(**options) - expect(described_class).to receive(:purge_old) + allow(described_class).to receive(:create!).with(**options) + allow(described_class).to receive(:purge_old) + described_class.activate(**options) + + expect(described_class).to have_received(:create!).with(**options) + expect(described_class).to have_received(:purge_old) end it 'returns an instance of SessionActivation' do diff --git a/spec/models/setting_spec.rb b/spec/models/setting_spec.rb index 5ed5c5d766..5f53ee5634 100644 --- a/spec/models/setting_spec.rb +++ b/spec/models/setting_spec.rb @@ -23,8 +23,11 @@ RSpec.describe Setting do let(:rails_initialized) { false } it 'calls RailsSettings::Base#[]' do - expect(RailsSettings::Base).to receive(:[]).with(key) + allow(RailsSettings::Base).to receive(:[]).with(key) + described_class[key] + + expect(RailsSettings::Base).to have_received(:[]).with(key) end end @@ -38,8 +41,11 @@ RSpec.describe Setting do let(:cache_value) { 'cache-value' } it 'calls not RailsSettings::Base#[]' do - expect(RailsSettings::Base).to_not receive(:[]).with(key) + allow(RailsSettings::Base).to receive(:[]).with(key) + described_class[key] + + expect(RailsSettings::Base).to_not have_received(:[]).with(key) end context 'when Rails.cache does not exists' do @@ -56,8 +62,11 @@ RSpec.describe Setting do let(:records) { [Fabricate(:setting, var: key, value: nil)] } it 'calls RailsSettings::Settings.object' do - expect(RailsSettings::Settings).to receive(:object).with(key) + allow(RailsSettings::Settings).to receive(:object).with(key) + described_class[key] + + expect(RailsSettings::Settings).to have_received(:object).with(key) end context 'when RailsSettings::Settings.object returns truthy' do diff --git a/spec/models/user_role_spec.rb b/spec/models/user_role_spec.rb index f7cfe9bb04..d5234ebe8d 100644 --- a/spec/models/user_role_spec.rb +++ b/spec/models/user_role_spec.rb @@ -60,7 +60,7 @@ RSpec.describe UserRole do end describe '#permissions_as_keys=' do - let(:input) {} + let(:input) { nil } before do subject.permissions_as_keys = input diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 92ce87e369..faf7fabf1e 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -102,7 +102,7 @@ RSpec.describe User do end describe 'blacklist' do - around(:each) do |example| + around do |example| old_blacklist = Rails.configuration.x.email_blacklist Rails.configuration.x.email_domains_blacklist = 'mvrht.com' @@ -169,7 +169,7 @@ RSpec.describe User do let(:user) { Fabricate(:user, confirmed_at: nil, unconfirmed_email: new_email) } context 'when the user is already approved' do - around(:example) do |example| + around do |example| registrations_mode = Setting.registrations_mode Setting.registrations_mode = 'approved' @@ -193,7 +193,7 @@ RSpec.describe User do end context 'when the user does not require explicit approval' do - around(:example) do |example| + around do |example| registrations_mode = Setting.registrations_mode Setting.registrations_mode = 'open' @@ -213,7 +213,7 @@ RSpec.describe User do end context 'when the user requires explicit approval but is not approved' do - around(:example) do |example| + around do |example| registrations_mode = Setting.registrations_mode Setting.registrations_mode = 'approved' @@ -237,7 +237,7 @@ RSpec.describe User do describe '#approve!' do subject { user.approve! } - around(:example) do |example| + around do |example| registrations_mode = Setting.registrations_mode Setting.registrations_mode = 'approved' @@ -338,7 +338,7 @@ RSpec.describe User do end describe 'whitelist' do - around(:each) do |example| + around do |example| old_whitelist = Rails.configuration.x.email_domains_whitelist Rails.configuration.x.email_domains_whitelist = 'mastodon.space' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 8d9677f6ce..c2ef3e3159 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -142,13 +142,13 @@ RSpec.configure do |config| search_data_manager.remove_indexes end - config.before(:each) do |example| + config.before do |example| unless example.metadata[:paperclip_processing] allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance end end - config.after :each do + config.after do Rails.cache.clear redis.del(redis.keys) end diff --git a/spec/requests/api/v1/media_spec.rb b/spec/requests/api/v1/media_spec.rb index 7253a9f1e8..2c29328087 100644 --- a/spec/requests/api/v1/media_spec.rb +++ b/spec/requests/api/v1/media_spec.rb @@ -127,19 +127,19 @@ RSpec.describe 'Media' do end end - context 'with image/jpeg', paperclip_processing: true do + context 'with image/jpeg', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.jpg', 'image/jpeg'), description: 'jpeg image' } } it_behaves_like 'a successful media upload', 'image' end - context 'with image/gif', paperclip_processing: true do + context 'with image/gif', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.gif', 'image/gif') } } it_behaves_like 'a successful media upload', 'image' end - context 'with video/webm', paperclip_processing: true do + context 'with video/webm', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } } it_behaves_like 'a successful media upload', 'gifv' diff --git a/spec/requests/api/v2/media_spec.rb b/spec/requests/api/v2/media_spec.rb index 89384d0ca3..fc6946be53 100644 --- a/spec/requests/api/v2/media_spec.rb +++ b/spec/requests/api/v2/media_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Media API', paperclip_processing: true do +RSpec.describe 'Media API', :paperclip_processing do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write' } diff --git a/spec/serializers/activitypub/note_serializer_spec.rb b/spec/serializers/activitypub/note_serializer_spec.rb index 31ee31f132..311a4573d9 100644 --- a/spec/serializers/activitypub/note_serializer_spec.rb +++ b/spec/serializers/activitypub/note_serializer_spec.rb @@ -14,7 +14,7 @@ describe ActivityPub::NoteSerializer do let!(:reply_by_account_third) { Fabricate(:status, account: account, thread: parent, visibility: :public) } let!(:reply_by_account_visibility_direct) { Fabricate(:status, account: account, thread: parent, visibility: :direct) } - before(:each) do + before do @serialization = ActiveModelSerializers::SerializableResource.new(parent, serializer: described_class, adapter: ActivityPub::Adapter) end diff --git a/spec/serializers/activitypub/update_poll_serializer_spec.rb b/spec/serializers/activitypub/update_poll_serializer_spec.rb index 14c24c70cc..9a13fdd576 100644 --- a/spec/serializers/activitypub/update_poll_serializer_spec.rb +++ b/spec/serializers/activitypub/update_poll_serializer_spec.rb @@ -9,7 +9,7 @@ describe ActivityPub::UpdatePollSerializer do let(:poll) { Fabricate(:poll, account: account) } let!(:status) { Fabricate(:status, account: account, poll: poll) } - before(:each) do + before do @serialization = ActiveModelSerializers::SerializableResource.new(status, serializer: described_class, adapter: ActivityPub::Adapter) end diff --git a/spec/services/activitypub/fetch_replies_service_spec.rb b/spec/services/activitypub/fetch_replies_service_spec.rb index bf8e296764..d7716dd4ef 100644 --- a/spec/services/activitypub/fetch_replies_service_spec.rb +++ b/spec/services/activitypub/fetch_replies_service_spec.rb @@ -36,8 +36,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do context 'when the payload is a Collection with inlined replies' do context 'when passing the collection itself' do it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, payload) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end @@ -47,8 +50,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do end it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, collection_uri) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end end @@ -65,8 +71,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do context 'when passing the collection itself' do it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, payload) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end @@ -76,8 +85,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do end it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, collection_uri) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end end @@ -98,8 +110,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do context 'when passing the collection itself' do it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, payload) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end @@ -109,8 +124,11 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do end it 'spawns workers for up to 5 replies on the same server' do - expect(FetchReplyWorker).to receive(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) + allow(FetchReplyWorker).to receive(:push_bulk) + subject.call(status, collection_uri) + + expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1', 'http://example.com/self-reply-2', 'http://example.com/self-reply-3', 'http://example.com/self-reply-4', 'http://example.com/self-reply-5']) end end end diff --git a/spec/services/activitypub/process_collection_service_spec.rb b/spec/services/activitypub/process_collection_service_spec.rb index 02011afea0..ede9f5c049 100644 --- a/spec/services/activitypub/process_collection_service_spec.rb +++ b/spec/services/activitypub/process_collection_service_spec.rb @@ -41,8 +41,11 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do end it 'does not process payload' do - expect(ActivityPub::Activity).to_not receive(:factory) + allow(ActivityPub::Activity).to receive(:factory) + subject.call(json, actor) + + expect(ActivityPub::Activity).to_not have_received(:factory) end end end @@ -59,8 +62,11 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do end it 'processes the payload' do - expect(ActivityPub::Activity).to receive(:factory) + allow(ActivityPub::Activity).to receive(:factory) + subject.call(json, actor) + + expect(ActivityPub::Activity).to have_received(:factory) end end end @@ -71,27 +77,33 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do it 'does not process payload if no signature exists' do allow_any_instance_of(ActivityPub::LinkedDataSignature).to receive(:verify_actor!).and_return(nil) - expect(ActivityPub::Activity).to_not receive(:factory) + allow(ActivityPub::Activity).to receive(:factory) subject.call(json, forwarder) + + expect(ActivityPub::Activity).to_not have_received(:factory) end it 'processes payload with actor if valid signature exists' do payload['signature'] = { 'type' => 'RsaSignature2017' } allow_any_instance_of(ActivityPub::LinkedDataSignature).to receive(:verify_actor!).and_return(actor) - expect(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), actor, instance_of(Hash)) + allow(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), actor, instance_of(Hash)) subject.call(json, forwarder) + + expect(ActivityPub::Activity).to have_received(:factory).with(instance_of(Hash), actor, instance_of(Hash)) end it 'does not process payload if invalid signature exists' do payload['signature'] = { 'type' => 'RsaSignature2017' } allow_any_instance_of(ActivityPub::LinkedDataSignature).to receive(:verify_actor!).and_return(nil) - expect(ActivityPub::Activity).to_not receive(:factory) + allow(ActivityPub::Activity).to receive(:factory) subject.call(json, forwarder) + + expect(ActivityPub::Activity).to_not have_received(:factory) end context 'when receiving a fabricated status' do @@ -225,7 +237,11 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do end it 'does not process forged payload' do - expect(ActivityPub::Activity).to_not receive(:factory).with( + allow(ActivityPub::Activity).to receive(:factory) + + subject.call(json, forwarder) + + expect(ActivityPub::Activity).to_not have_received(:factory).with( hash_including( 'object' => hash_including( 'id' => 'https://example.com/users/bob/fake-status' @@ -235,7 +251,7 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do anything ) - expect(ActivityPub::Activity).to_not receive(:factory).with( + expect(ActivityPub::Activity).to_not have_received(:factory).with( hash_including( 'object' => hash_including( 'content' => '

puck was here

' @@ -245,8 +261,6 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do anything ) - subject.call(json, forwarder) - expect(Status.where(uri: 'https://example.com/users/bob/fake-status').exists?).to be false end end diff --git a/spec/services/bulk_import_service_spec.rb b/spec/services/bulk_import_service_spec.rb index 281b642ea4..16d718815a 100644 --- a/spec/services/bulk_import_service_spec.rb +++ b/spec/services/bulk_import_service_spec.rb @@ -54,7 +54,7 @@ RSpec.describe BulkImportService do Import::RowWorker.drain - expect(FollowRequest.includes(:target_account).where(account: account).map(&:target_account).map(&:acct)).to contain_exactly('user@foo.bar', 'unknown@unknown.bar') + expect(FollowRequest.includes(:target_account).where(account: account).map { |follow_request| follow_request.target_account.acct }).to contain_exactly('user@foo.bar', 'unknown@unknown.bar') end end @@ -102,7 +102,7 @@ RSpec.describe BulkImportService do Import::RowWorker.drain - expect(FollowRequest.includes(:target_account).where(account: account).map(&:target_account).map(&:acct)).to contain_exactly('user@foo.bar', 'unknown@unknown.bar') + expect(FollowRequest.includes(:target_account).where(account: account).map { |follow_request| follow_request.target_account.acct }).to contain_exactly('user@foo.bar', 'unknown@unknown.bar') end end @@ -367,7 +367,7 @@ RSpec.describe BulkImportService do Import::RowWorker.drain - expect(account.bookmarks.map(&:status).map(&:uri)).to contain_exactly(already_bookmarked.uri, status.uri, bookmarked.uri, 'https://domain.unknown/foo') + expect(account.bookmarks.map { |bookmark| bookmark.status.uri }).to contain_exactly(already_bookmarked.uri, status.uri, bookmarked.uri, 'https://domain.unknown/foo') end end @@ -410,7 +410,7 @@ RSpec.describe BulkImportService do Import::RowWorker.drain - expect(account.bookmarks.map(&:status).map(&:uri)).to contain_exactly(status.uri, bookmarked.uri, 'https://domain.unknown/foo') + expect(account.bookmarks.map { |bookmark| bookmark.status.uri }).to contain_exactly(status.uri, bookmarked.uri, 'https://domain.unknown/foo') end end end diff --git a/spec/services/import_service_spec.rb b/spec/services/import_service_spec.rb index 1904ac8dc9..3936b2363f 100644 --- a/spec/services/import_service_spec.rb +++ b/spec/services/import_service_spec.rb @@ -208,7 +208,7 @@ RSpec.describe ImportService, type: :service do let!(:remote_status) { Fabricate(:status, uri: 'https://example.com/statuses/1312') } let!(:direct_status) { Fabricate(:status, uri: 'https://example.com/statuses/direct', visibility: :direct) } - around(:each) do |example| + around do |example| local_before = Rails.configuration.x.local_domain web_before = Rails.configuration.x.web_domain Rails.configuration.x.local_domain = 'local.com' @@ -232,9 +232,9 @@ RSpec.describe ImportService, type: :service do it 'adds the toots the user has access to to bookmarks' do local_status = Fabricate(:status, account: local_account, uri: 'https://local.com/users/foo/statuses/42', id: 42, local: true) subject.call(import) - expect(account.bookmarks.map(&:status).map(&:id)).to include(local_status.id) - expect(account.bookmarks.map(&:status).map(&:id)).to include(remote_status.id) - expect(account.bookmarks.map(&:status).map(&:id)).to_not include(direct_status.id) + expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to include(local_status.id) + expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to include(remote_status.id) + expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to_not include(direct_status.id) expect(account.bookmarks.count).to eq 3 end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6ff0a8f842..4c4e31dd2a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -53,7 +53,9 @@ def json_str_to_hash(str) end def expect_push_bulk_to_match(klass, matcher) - expect(Sidekiq::Client).to receive(:push_bulk).with(hash_including({ + allow(Sidekiq::Client).to receive(:push_bulk) + yield + expect(Sidekiq::Client).to have_received(:push_bulk).with(hash_including({ 'class' => klass, 'args' => matcher, })) diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index 16ebda5641..2c9b5514aa 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountAvatar' do |fabricator| - describe 'static avatars', paperclip_processing: true do + describe 'static avatars', :paperclip_processing do describe 'when GIF' do it 'creates a png static style' do account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif')) @@ -17,7 +17,7 @@ shared_examples 'AccountAvatar' do |fabricator| end end - describe 'base64-encoded files', paperclip_processing: true do + describe 'base64-encoded files', :paperclip_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, avatar: base64_attachment) } diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index d65f54f00f..ce09eb006b 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountHeader' do |fabricator| - describe 'base64-encoded files', paperclip_processing: true do + describe 'base64-encoded files', :paperclip_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/validators/status_length_validator_spec.rb b/spec/validators/status_length_validator_spec.rb index 8535ddd750..614f5d3909 100644 --- a/spec/validators/status_length_validator_spec.rb +++ b/spec/validators/status_length_validator_spec.rb @@ -6,14 +6,20 @@ describe StatusLengthValidator do describe '#validate' do it 'does not add errors onto remote statuses' do status = instance_double(Status, local?: false) + allow(status).to receive(:errors) + subject.validate(status) - expect(status).to_not receive(:errors) + + expect(status).to_not have_received(:errors) end it 'does not add errors onto local reblogs' do status = instance_double(Status, local?: false, reblog?: true) + allow(status).to receive(:errors) + subject.validate(status) - expect(status).to_not receive(:errors) + + expect(status).to_not have_received(:errors) end it 'adds an error when content warning is over MAX_CHARS characters' do diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb index a9d3edf7a1..233965883a 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', without_verify_partial_doubles: true do +describe 'statuses/show.html.haml', :without_verify_partial_doubles do before do allow(view).to receive_messages(api_oembed_url: '', show_landing_strip?: true, site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false) allow(view).to receive(:local_time) diff --git a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb index 0bdbf63903..afe2b291fd 100644 --- a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb +++ b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb @@ -16,8 +16,9 @@ describe ActivityPub::DistributePollUpdateWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com']]) - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com']]) do + subject.perform(status.id) + end end end end diff --git a/spec/workers/activitypub/distribution_worker_spec.rb b/spec/workers/activitypub/distribution_worker_spec.rb index d8803f6b8a..2706967fca 100644 --- a/spec/workers/activitypub/distribution_worker_spec.rb +++ b/spec/workers/activitypub/distribution_worker_spec.rb @@ -19,8 +19,9 @@ describe ActivityPub::DistributionWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do + subject.perform(status.id) + end end end @@ -30,8 +31,9 @@ describe ActivityPub::DistributionWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do + subject.perform(status.id) + end end end @@ -44,8 +46,9 @@ describe ActivityPub::DistributionWorker do end it 'delivers to mentioned accounts' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'https://foo.bar/inbox', anything]]) - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'https://foo.bar/inbox', anything]]) do + subject.perform(status.id) + end end end end diff --git a/spec/workers/activitypub/move_distribution_worker_spec.rb b/spec/workers/activitypub/move_distribution_worker_spec.rb index b8601f78cf..75ca21733c 100644 --- a/spec/workers/activitypub/move_distribution_worker_spec.rb +++ b/spec/workers/activitypub/move_distribution_worker_spec.rb @@ -19,8 +19,9 @@ describe ActivityPub::MoveDistributionWorker do expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [ [kind_of(String), migration.account.id, 'http://example.com'], [kind_of(String), migration.account.id, 'http://example2.com'], - ]) - subject.perform(migration.id) + ]) do + subject.perform(migration.id) + end end end end diff --git a/spec/workers/activitypub/status_update_distribution_worker_spec.rb b/spec/workers/activitypub/status_update_distribution_worker_spec.rb index c500bac959..a4fd246e53 100644 --- a/spec/workers/activitypub/status_update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/status_update_distribution_worker_spec.rb @@ -25,9 +25,9 @@ describe ActivityPub::StatusUpdateDistributionWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) - - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do + subject.perform(status.id) + end end end @@ -37,9 +37,9 @@ describe ActivityPub::StatusUpdateDistributionWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) - - subject.perform(status.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do + subject.perform(status.id) + end end end end diff --git a/spec/workers/activitypub/update_distribution_worker_spec.rb b/spec/workers/activitypub/update_distribution_worker_spec.rb index d0eeda43bf..4a0ed050bb 100644 --- a/spec/workers/activitypub/update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/update_distribution_worker_spec.rb @@ -14,8 +14,9 @@ describe ActivityPub::UpdateDistributionWorker do end it 'delivers to followers' do - expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com', anything]]) - subject.perform(account.id) + expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com', anything]]) do + subject.perform(account.id) + end end end end diff --git a/yarn.lock b/yarn.lock index dd31a1cc38..2b50d3a07e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1310,14 +1310,14 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" - integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" - integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== +"@eslint/eslintrc@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" + integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1329,10 +1329,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.52.0": - version "8.52.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" - integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== +"@eslint/js@8.53.0": + version "8.53.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.53.0.tgz#bea56f2ed2b5baea164348ff4d5a879f6f81f20d" + integrity sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w== "@floating-ui/core@^1.4.2": version "1.5.0" @@ -2270,9 +2270,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.2": - version "29.5.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.6.tgz#f4cf7ef1b5b0bfc1aa744e41b24d9cc52533130b" - integrity sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w== + version "29.5.7" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.7.tgz#2c0dafe2715dd958a455bc10e2ec3e1ec47b5036" + integrity sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -2337,11 +2337,11 @@ integrity sha512-Kfe/D3hxHTusnPNRbycJE1N77WHDsdS4AjUYIzlDzhDrS47NrwuL3YW4VITxwR7KCVpzwgy4Rbj829KSSQmwXQ== "@types/node@*": - version "20.8.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25" - integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ== + version "20.8.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e" + integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@14 || 16 || 17": version "17.0.45" @@ -2512,9 +2512,9 @@ "@types/react" "*" "@types/react@*", "@types/react@16 || 17 || 18", "@types/react@>=16.9.11", "@types/react@^18.0.26", "@types/react@^18.2.7": - version "18.2.33" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.33.tgz#055356243dc4350a9ee6c6a2c07c5cae12e38877" - integrity sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg== + version "18.2.35" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.35.tgz#bacdc6d139a4d6d47e5186e1a96952c65e1f3792" + integrity sha512-LG3xpFZ++rTndV+/XFyX5vUP7NI9yxyk+MQvBDq+CVs8I9DLSc3Ymwb1Vmw5YDoeNeHN4PDZa3HylMKJYT9PNQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2648,15 +2648,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^6.0.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz#06abe4265e7c82f20ade2dcc0e3403c32d4f148b" - integrity sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw== + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz#d8ce497dc0ed42066e195c8ecc40d45c7b1254f4" + integrity sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/type-utils" "6.8.0" - "@typescript-eslint/utils" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/type-utils" "6.9.1" + "@typescript-eslint/utils" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2665,14 +2665,14 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.0.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb" - integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg== - dependencies: - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.9.1.tgz#4f685f672f8b9580beb38d5fb99d52fc3e34f7a3" + integrity sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg== + dependencies: + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/typescript-estree" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" debug "^4.3.4" "@typescript-eslint/scope-manager@6.8.0": @@ -2683,13 +2683,21 @@ "@typescript-eslint/types" "6.8.0" "@typescript-eslint/visitor-keys" "6.8.0" -"@typescript-eslint/type-utils@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz#50365e44918ca0fd159844b5d6ea96789731e11f" - integrity sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g== +"@typescript-eslint/scope-manager@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz#e96afeb9a68ad1cd816dba233351f61e13956b75" + integrity sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg== dependencies: - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/utils" "6.8.0" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" + +"@typescript-eslint/type-utils@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz#efd5db20ed35a74d3c7d8fba51b830ecba09ce32" + integrity sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg== + dependencies: + "@typescript-eslint/typescript-estree" "6.9.1" + "@typescript-eslint/utils" "6.9.1" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -2698,6 +2706,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== +"@typescript-eslint/types@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.1.tgz#a6cfc20db0fcedcb2f397ea728ef583e0ee72459" + integrity sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ== + "@typescript-eslint/typescript-estree@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" @@ -2711,7 +2724,33 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.8.0", "@typescript-eslint/utils@^6.5.0": +"@typescript-eslint/typescript-estree@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz#8c77910a49a04f0607ba94d78772da07dab275ad" + integrity sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw== + dependencies: + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.9.1.tgz#763da41281ef0d16974517b5f0d02d85897a1c1e" + integrity sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/typescript-estree" "6.9.1" + semver "^7.5.4" + +"@typescript-eslint/utils@^6.5.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.8.0.tgz#d42939c2074c6b59844d0982ce26a51d136c4029" integrity sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q== @@ -2732,6 +2771,14 @@ "@typescript-eslint/types" "6.8.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz#6753a9225a0ba00459b15d6456b9c2780b66707d" + integrity sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw== + dependencies: + "@typescript-eslint/types" "6.9.1" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2935,11 +2982,16 @@ acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^8.0.4, acorn@^8.1.0, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.0.4, acorn@^8.1.0, acorn@^8.8.1, acorn@^8.8.2: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.9.0: + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -5643,14 +5695,14 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.41.0: - version "8.52.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.52.0.tgz#d0cd4a1fac06427a61ef9242b9353f36ea7062fc" - integrity sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg== + version "8.53.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.53.0.tgz#14f2c8244298fcae1f46945459577413ba2697ce" + integrity sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.52.0" + "@eslint/eslintrc" "^2.1.3" + "@eslint/js" "8.53.0" "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -11693,7 +11745,6 @@ stringz@^2.1.0: char-regex "^1.0.2" "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: - name strip-ansi-cjs version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12385,10 +12436,10 @@ uncontrollable@^7.2.1: invariant "^2.2.4" react-lifecycles-compat "^3.0.4" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0"