Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes up to f476d9dab2f5cca6ae44b95961df6b6557d66dab #2520

Merged
merged 21 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
22b4713
Update eslint (non-major) (#27715)
renovate[bot] Nov 6, 2023
0ca27b2
Update DefinitelyTyped types (non-major) (#27713)
renovate[bot] Nov 6, 2023
9c34bb4
Update Node.js to v20.9 (#27714)
renovate[bot] Nov 6, 2023
e4e752c
Adjust transform origin for favorite star (#27700)
zunda Nov 6, 2023
949f5eb
Fix `RSpec/MetadataStyle` cop in spec/ (#27729)
mjankowski Nov 6, 2023
fe26f33
Fix `Rails/RedundantActiveRecordAllMethod` cop (#26885)
mjankowski Nov 6, 2023
0c4e7c0
Fix `Rails/FindEach` cop (#26886)
mjankowski Nov 6, 2023
c501d62
Fix `Rails/BulkChangeTable` cop (#26890)
mjankowski Nov 6, 2023
d6f5083
Fix `RSpec/SpecFilePathFormat` cops (#27730)
mjankowski Nov 6, 2023
1b28ab7
New Crowdin Translations (automated) (#27687)
github-actions[bot] Nov 7, 2023
b06284c
Fix `RSpec/HookArgument` cop (#27747)
mjankowski Nov 7, 2023
cfa14ec
Fix `Lint/EmptyBlock` cop (#27748)
mjankowski Nov 7, 2023
2d39268
Fix `Lint/OrAssignmentToConstant` cop (#27750)
mjankowski Nov 7, 2023
2862ad7
Stub controller methods and remove `rubocop:disable` in captcha featu…
mjankowski Nov 7, 2023
ae0d551
Do not copy `public/packs-test` into Docker (#27736)
renchap Nov 7, 2023
49e2772
Fix `RSpec/MessageSpies` cop (#27751)
mjankowski Nov 7, 2023
bbad5b6
Remove false positive cop detection (#27457)
mjankowski Nov 7, 2023
45770c9
Fix `Performance/MapMethodChain` cop (#27744)
mjankowski Nov 7, 2023
f476d9d
Fix the `notificationsUpdate` call (#27758)
renchap Nov 7, 2023
4113fbf
Merge commit 'f476d9dab2f5cca6ae44b95961df6b6557d66dab' into glitch-s…
ClearlyClaire Dec 17, 2023
33dd5d8
Fix Ruby lint issues
ClearlyClaire Dec 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
public/system
public/assets
public/packs
public/packs-test
node_modules
neo4j
vendor/bundle
Expand Down
17 changes: 11 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
65 changes: 1 addition & 64 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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'
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/actions/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/fi.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/mastodon/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down Expand Up @@ -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": "אין לך שום רשימות עדיין. לכשיהיו, הן תופענה כאן.",
Expand Down Expand Up @@ -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": "קיצורי מקלדת",
Expand Down
Loading
Loading