about summary refs log tree commit diff
path: root/lib/tasks
AgeCommit message (Collapse)Author
2023-03-30Change user settings to be stored in a more optimal way (#23630)Eugen Rochko
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-03-27Add migration tests for user mail notification settings (#24277)Claire
2023-03-16Autofix Rubocop Style/RedundantArgument (#23798)Nick Schonning
2023-03-13Enable Rubocop Performance/DeleteSuffix (#24077)Nick Schonning
2023-02-22Autofix Rubocop Rails/RootPathnameMethods (#23760)Nick Schonning
2023-02-20Autofix Rubocop Style/RescueStandardError (#23745)Nick Schonning
2023-02-20Autofix Rubocop remaining Layout rules (#23679)Nick Schonning
2023-02-20Audofix Rubocop Style/WordArray (#23739)Nick Schonning
2023-02-19Autofix Rubocop Style/StringLiterals (#23695)Nick Schonning
2023-02-19Autofix Rubocop Style/RedundantBegin (#23703)Nick Schonning
2023-02-18Apply Rubocop Style/RedundantConstantBase (#23463)Nick Schonning
2023-02-18Run rubocop formatting except line length (#23632)Nick Schonning
2023-02-08Apply Rubocop Rails/RootPublicPath (#23447)Nick Schonning
2023-02-08Apply Rubocop Style/NegatedIfElseCondition (#23451)Nick Schonning
2023-01-18Add Storj DCS to cloud object storage options (#21929)JT Olio
* Add Storj DCS to cloud object storage options More explanation here: https://forum.storj.io/t/object-storage-provider-for-mastodon-instance/11464/37 * more help for which command to use
2023-01-13Fix incorrect env file generation in mastodon:setup (#23072)Claire
Regression from #23012
2023-01-11Fix `$` not being escaped in `.env.production` file generated by ↵Claire
`mastodon:setup` (#23012) * Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup` * Improve robustness of dotenv escaping
2022-12-15Fix default S3_HOSTNAME used in mastodon:setup (#19932)Dan Peterson
s3-us-east-1.amazonaws.com does not exist. Co-authored-by: Effy Elden <effy@effy.space>
2022-12-06Fix pre-4.0 admin action logs (#22091)Claire
* Fix BackfillAdminActionLogs post-deployment migration * Improve migration tests * Backfill admin action logs again
2022-11-13Copied Spaces support from packer .rake (#20573)Arthur Isac
2022-11-11Fix `ENV` (#20377)Yamagishi Kazutoshi
2022-11-10Make enable_starttls configurable by envvars (#20321)F
ENABLE_STARTTLS is designed to replace ENABLE_STARTTLS_AUTO by accepting three values: 'auto' (the default), 'always', and 'never'. If ENABLE_STARTTLS isn't provided, we fall back to ENABLE_STARTTLS_AUTO. In this way, this change should be fully backwards compatible. Resolves #20311
2022-11-04Add assets from Twemoji 14.0 (#19733)Eugen Rochko
2022-11-03Fix admin action logs page (#19649)Claire
* Add tests * Fix crash when trying to display orphaned action logs * Add migration for older admin action logs
2022-11-02Fix mastodon:setup not setting the admin's role properly (#19670)Claire
* Fix mastodon:setup not setting the admin's role properly * Set contact username when creating admin account in mastodon:setup
2022-08-28Fix typos (#18604)luzpaz
* Fix typos Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,pixelx,ro` * Follow-up typo fix
2022-06-28Revamp post filtering system (#18058)Claire
* Add model for custom filter keywords * Use CustomFilterKeyword internally Does not change the API * Fix /filters/edit and /filters/new * Add migration tests * Remove whole_word column from custom_filters (covered by custom_filter_keywords) * Redesign /filters Instead of a list, present a card that displays more information and handles multiple keywords per filter. * Redesign /filters/new and /filters/edit to add and remove keywords This adds a new gem dependency: cocoon, as well as a npm dependency: cocoon-js-vanilla. Those are used to easily populate and remove form fields from the user interface when manipulating multiple keyword filters at once. * Add /api/v2/filters to edit filter with multiple keywords Entities: - `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context` `keywords` - `FilterKeyword`: `id`, `keyword`, `whole_word` API endpoits: - `GET /api/v2/filters` to list filters (including keywords) - `POST /api/v2/filters` to create a new filter `keywords_attributes` can also be passed to create keywords in one request - `GET /api/v2/filters/:id` to read a particular filter - `PUT /api/v2/filters/:id` to update a new filter `keywords_attributes` can also be passed to edit, delete or add keywords in one request - `DELETE /api/v2/filters/:id` to delete a particular filter - `GET /api/v2/filters/:id/keywords` to list keywords for a filter - `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a filter - `GET /api/v2/filter_keywords/:id` to read a particular keyword - `PUT /api/v2/filter_keywords/:id` to edit a particular keyword - `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword * Change from `irreversible` boolean to `action` enum * Remove irrelevent `irreversible_must_be_within_context` check * Fix /filters/new and /filters/edit with update for filter_action * Fix Rubocop/Codeclimate complaining about task names * Refactor FeedManager#phrase_filtered? This moves regexp building and filter caching to the `CustomFilter` class. This does not change the functional behavior yet, but this changes how the cache is built, doing per-custom_filter regexps so that filters can be matched independently, while still offering caching. * Perform server-side filtering and output result in REST API * Fix numerous filters_changed events being sent when editing multiple keywords at once * Add some tests * Use the new API in the WebUI - use client-side logic for filters we have fetched rules for. This is so that filter changes can be retroactively applied without reloading the UI. - use server-side logic for filters we haven't fetched rules for yet (e.g. network error, or initial timeline loading) * Minor optimizations and refactoring * Perform server-side filtering on the streaming server * Change the wording of filter action labels * Fix issues pointed out by linter * Change design of “Show anyway” link in accordence to review comments * Drop “irreversible” filtering behavior * Move /api/v2/filter_keywords to /api/v1/filters/keywords * Rename `filter_results` attribute to `filtered` * Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer * Fix systemChannelId value in streaming server * Simplify code by removing client-side filtering code The simplifcation comes at a cost though: filters aren't retroactively applied anymore.
2022-06-11Fix wrong aspect ratio of logo in icons (#18639)Eugen Rochko
2022-06-09Change brand color and logotypes (#18592)Eugen Rochko
- Add rake task for generating Apple/Android icons and favicons from SVG - Add rake task for generating PNG icons and logos for e-mails from SVG - Remove obsolete Microsoft icons and configuration - Remove PWA shortcut icons
2022-05-09Fix redis configuration not being changed by mastodon:setup (#18383)Claire
Fixes #18342
2022-04-29Fix light-mode emoji borders. (#18131)Gaelan Steele
2022-04-26Fix instance actor being incorrectly created when running migrations (#18109)Claire
* Add migration test about instance actor key * Fix old migration * Work around incorrect database state
2022-03-12Fix null values being included in some indexes (#17711)Eugen Rochko
* Fix null values being included in some indexes * Update lib/mastodon/migration_helpers.rb Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Add documentation link to corruption error message Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-03-07Add more migration tests (#17710)Claire
* Add migration tests for hide_network settings migration * Add tests about suspended/suspended_at * Add more tests regarding the results of migrations * Fix migration test regarding stale conflicting remote account * Add migration tests about AccountConversation
2022-02-08Remove language detection through cld3 (#17478)Eugen Rochko
* Remove language detection through cld3 * Update app/helpers/languages_helper.rb Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-01-30Add more advanced migration tests (#17393)Claire
- populate the database with some data when testing migrations - try both one-step and two-step migrations (`SKIP_POST_DEPLOYMENT_MIGRATIONS`)
2022-01-30Change index corruption warning to be a little less scary (#17395)Claire
2022-01-20Change mastodon:webpush:generate_vapid_key task to not require functional ↵Claire
env (#17338) Fixes #17297
2021-11-25Add trending links (#16917)Eugen Rochko
* Add trending links * Add overriding specific links trendability * Add link type to preview cards and only trend articles Change trends review notifications from being sent every 5 minutes to being sent every 2 hours Change threshold from 5 unique accounts to 15 unique accounts * Fix tests
2021-11-11Fix "bundle exec rails mastodon:setup" crashing in some circumstances (#16976)Claire
Fix regression from #16896
2021-10-25Fix mastodon:setup to take dotenv/docker-compose differences into account ↵Claire
(#16896) In order to work around https://github.com/mastodon/mastodon/issues/16895, add a warning to .env.production.sample, and change the mastodon:setup rake task to: - output a warning if a variable will be interpreted differently by dotenv and docker-compose - ensure the printed config is compatible with docker-compose
2021-07-13Change references to tootsuite/mastodon to mastodon/mastodon (#16491)Claire
* Change references to tootsuite/mastodon to mastodon/mastodon * Remove obsolete test fixture * Replace occurrences of tootsuite/mastodon with mastodon/mastodon in CHANGELOG And a few other places
2021-06-03Update emoji codepoint mappings to v13.1 (#16352)Claire
2021-05-16Add more checks to `repo:check_locales_files` (#16249)Eugen Rochko
2021-04-27Fix typo in db.rake (#16126)Ikko Ashimine
occured -> occurred
2021-04-13Add border to 🚲 emoji (#16035)Claire
2021-03-24Update Mastodon to Rails 6.1 (#15910)Claire
* Update devise-two-factor to unreleased fork for Rails 6 support Update tests to match new `rotp` version. * Update nsa gem to unreleased fork for Rails 6 support * Update rails to 6.1.3 and rails-i18n to 6.0 * Update to unreleased fork of pluck_each for Ruby 6 support * Run "rails app:update" * Add missing ActiveStorage config file * Use config.ssl_options instead of removed ApplicationController#force_ssl Disabled force_ssl-related tests as they do not seem to be easily testable anymore. * Fix nonce directives by removing Rails 5 specific monkey-patching * Fix fixture_file_upload deprecation warning * Fix yield-based test failing with Rails 6 * Use Rails 6's index_with when possible * Use ActiveRecord::Cache::Store#delete_multi from Rails 6 This will yield better performances when deleting an account * Disable Rails 6.1's automatic preload link headers Since Rails 6.1, ActionView adds preload links for javascript files in the Links header per default. In our case, that will bloat headers too much and potentially cause issues with reverse proxies. Furhermore, we don't need those links, as we already output them as HTML link tags. * Switch to Rails 6.0 default config * Switch to Rails 6.1 default config * Do not include autoload paths in the load path
2021-03-24Change mastodon:setup to not call assets:precompile in docker (#13942)Claire
It appears assets are built during image build, and they shouldn't need to be rebuilt, since we now have reproducible builds.
2021-03-19Improve account counters handling (#15913)Claire
* Improve account counters handling * Use ActiveRecord::Base::sanitize_sql to pass values instead of interpolating them Keep using string interpolation for `key` as it is safe and using “ActiveRecord::Base::sanitize_sql_hash_for_assignment” would require stitching bits of SQL in a way that is not more easily checked for safety. * Add migration hook to catch PostgreSQL versions earlier than 9.5
2021-03-19Use more robust hook for loading timestamp_id function into database (#15919)Claire