Skip to content

Commit

Permalink
Merge pull request #2520 from ClearlyClaire/glitch-soc/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream changes up to f476d9d
  • Loading branch information
ClearlyClaire authored Dec 18, 2023
2 parents c8fe36c + 33dd5d8 commit 1885637
Show file tree
Hide file tree
Showing 137 changed files with 763 additions and 421 deletions.
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

0 comments on commit 1885637

Please sign in to comment.