184 Commits

Author SHA1 Message Date
Oliver Günther 6d0b39b466 Merge pull request #23251 from opf/fix/use-message-pack-cache-serializer
Use MessagePack serializer that treats old marshal cache as miss
2026-05-19 10:26:48 +02:00
Klaus Zanders b9a125c3be Get rid of deprecation warnings when starting the application 2026-03-23 10:06:41 +01:00
Oliver Günther 57cb7d3372 Remove deprecated X-XSS-Protection header
https://community.openproject.org/projects/openproject/work_packages/66004/activity?query_id=862
2025-11-06 11:33:56 +01:00
Christophe Bliard 996abfa4da Fix deprecation warning for to_time
Warning was:

> DEPRECATION WARNING: `to_time` will always preserve the full timezone
> rather than offset of the receiver in Rails 8.1. To opt in to the new
> behavior, set `config.active_support.to_time_preserves_timezone =
> :zone`.

Actually we were already using `:zone`, but it was set in a file
required late in the loading process. Moving it to
`config/application.rb` fixes the deprecation warning.
2025-10-21 12:07:53 +02:00
Alexander Brandon Coles 3be5e4183a Ensure Sprockets initialized before ViewComponent
Works around an issue where asset resolution fails in test environment.

     Sprockets::Rails::Helper::AssetNotFound:
       The asset "loading_indicator.svg" is not present in the asset pipeline.

See: ViewComponent/view_component#2433
2025-09-01 08:30:31 +01:00
Alexander Brandon Coles 78ed9ea580 Freeze string literals in config
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze config
2025-08-19 17:04:00 +01:00
Oliver Günther a175c84879 Move CSP to Rails 2025-07-08 16:17:29 +02:00
ulferts 345ca2308f enable 6.1 default options 2025-03-24 10:35:55 +01:00
ulferts 9c2ed337a1 remove configs commented out or set to default 2025-03-21 15:27:52 +01:00
ulferts 96c2fea638 bump default configs to rails 6.0 2025-03-21 15:27:52 +01:00
ulferts 8cb69deb14 enable rails 6.0 settings 2025-03-21 15:27:52 +01:00
ulferts 3509eba034 update comment 2025-03-14 17:08:32 +01:00
ulferts be24c049a8 bump default configs to rails 5.2 2025-03-12 17:01:25 +01:00
ulferts 93c3852ce6 enable rails 5.2 defaults 2025-03-12 16:20:46 +01:00
ulferts 9260ae5980 use SHA256 for ETags 2025-03-12 16:20:20 +01:00
ulferts 11095cf22b use rails 5.1 defaults 2025-03-12 10:55:29 +01:00
ulferts 232ec48597 rely on now built in i18n behaviour 2025-03-11 13:27:54 +01:00
Marcello Rocha e09be7cd08 Updates config as we had the wrong behaviour around and tests
# Conflicts:
#	Gemfile.lock
2025-01-06 17:30:59 +01:00
Dombi Attila 6d8c319c4b Add comment about a new config in the application.rb 2024-11-22 17:58:04 +01:00
Dombi Attila e376750989 Enable rails 7.1 config to raise on assigning readonly attribute 2024-11-22 17:58:04 +01:00
Oliver Günther 3962109282 Fix error pages being styled incorrectly
https://community.openproject.org/work_packages/57658
2024-09-06 10:42:30 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +02:00
Pavel Balashou fe7d214cc5 [#54061] Rails.application.routes don't respects OPENPROJECT_RAILS__RELATIVE__URL__ROOT
https://community.openproject.org/work_packages/54061

- Solution
    Move the config up in application.rb to be called early enough.
    The config option has been renamed due to its more genela nature than being in`config.action_controller.*` scope.

- How to test?
    1. Set OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/something
    2. Open up rails console before/after changes and call `Rails.application.routes.url_helpers.root_path`.
    3. Prefix should not be there before and should be there after.

Check discussion in https://github.com/rails/rails/issues/42243 for more
details if you'd like.
2024-04-15 12:26:48 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Oliver Günther 337eda7dfa Revert "Revert "Merge pull request #12998 from opf/task/48717-replace-delayedjob""
This reverts commit dfa75621ea.
2024-03-07 13:59:24 +01:00
Markus Kahl dfa75621ea Revert "Merge pull request #12998 from opf/task/48717-replace-delayedjob"
This reverts commit 9f3e4c48ea, reversing
changes made to 10412f7c85.
2024-03-07 12:40:15 +00:00
Pavel Balashou 2267a0a1e3 React on comments from review.
- Do not use string literals for job class names. Use `class.name` instead.
- Rename `ApplicationJob#good_job_scheduled_at` to `ApplicationJob#job_scheduled_at` to be backend agnostic.
- update queries in bin/check-worker-liveness to use good_jobs table
- Set good_job config options through appropriate OpenProject::Configuration
- Remove delayed_jobs table.
- Update health_check docs.
2024-02-27 22:35:33 +01:00
Pavel Balashou fd6a899b29 [#48717] Replace DelayedJob with GoodJob.
https://community.openproject.org/work_packages/48717
2024-02-14 10:18:27 +01:00
Dombi Attila 8555eb6ce2 Remove unnecessary path loading config. Fix module naming for Constraints::Enterprise. 2024-02-01 14:23:28 +02:00
Dombi Attila 17296b3c92 Redefine rails application methods to use Rails.application 2024-02-01 14:22:09 +02:00
Dombi Attila f1e4c2adc8 Remove warning suppress config 2024-02-01 14:22:07 +02:00
Dombi Attila f67aee52f5 [#46647] Bump Rails to 7.1
- Modified config files:
  - config/application.rb
  - config/environment.rb
  - config/environments/development.rb
  - config/environments/production.rb

https://community.openproject.org/work_packages/46647
2024-02-01 14:22:03 +02:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther be6b24e0db Silence database warning 2023-12-20 09:13:41 +01:00
Oliver Günther e7fe9c8a2f Enable lograge at all times, improve output for grape
Instead of opting into lograge, enable at all times for all environments
and instead show Rails view logs in development additionally.

This makes debugging the logs easier. Also, adds request_id to all logs even for grape
2023-11-14 09:36:39 +01:00
ulferts 06623a2768 remove legacy option removed in rails 7.1
Since the application is already using the default this change should not really constitute a change
2023-10-02 11:26:47 +02:00
Oliver Günther 5b27903911 Fix missing path to eager load 2023-08-07 14:32:58 +02:00
Oliver Günther 7f3a30f324 Fix load paths for production 2023-08-07 09:33:08 +02:00
ulferts 7446b482cb Merge pull request #12823 from opf/implementation/45980-improve-performance-of-baseline-filtering
Implementation/45980 improve performance of baseline filtering
2023-07-26 13:54:45 +02:00
Henriette Darge 2757a4fe5b Correct loading of view_component according to the Primer docs 2023-07-24 13:38:40 +02:00
ulferts 7c8432c9e6 add validity_period to journal 2023-07-14 12:07:16 +02:00
Henriette Darge d90573f8ac Introduce Primer CSS and Primer ViewComponents 2023-07-11 12:04:14 +02:00
Christophe Bliard 2671a4500b Do not require belongs_to associations to be present by default 2023-03-15 08:48:22 +01:00
Christophe Bliard 22d084e53a Use Rails 5.0 framework defaults 2023-03-14 08:56:15 +01:00
Pavel Balashov 459fab0d46 Refactor Settings::Definition.
- Add .add_all method. The purpose is to extract this logic from
  config/application.rb and have it in proper place and tested.
- Refactor .all method to initialize @all with {} if it is nil.
  It simlifies the usage significantly and makes code more stable.
2023-02-23 20:46:57 +01:00
Pavel Balashov c5d75459dd [#45965] Setting definitions validations access nonloaded constants
https://community.openproject.org/work_packages/45965
2023-02-22 16:03:50 +01:00
Christophe Bliard 4fca1eaaea Fix deprecation warning
It set Rails.application.config.active_record.legacy_connection_handling to false, as would Rails 6.1 default do. This removes a deprecation warning showing up each time tests are run, and enables granular connection swapping (which we do not use currently, but this may change in the future).
2023-01-20 11:41:21 +01:00