Commit Graph
107 Commits
Author SHA1 Message Date
Adam Cooke 5eeed7c023 chore(deps): upgrade to Rails 7.2.3.2, Ruby 3.4.10 and latest gems
Upgrades Rails from 7.1.6 to 7.2.3.2, Ruby from 3.4.6 to 3.4.10, and
brings the rest of the bundle up to date.

Two things were broken by Rails 7.2 and are fixed here:

* MigrationWaiter called `ActiveRecord::Base.connection.migration_context`,
  which moved to the connection pool in 7.2. This raised NoMethodError on
  boot for any deployment with `migration_waiter.enabled` set, and had no
  test covering it.
* `config.action_dispatch.show_exceptions = false` was deprecated in 7.1
  and removed in 7.2. Now `:none`.

`json` is pinned to < 3. Active Support 7.2 passes `quirks_mode:` to both
`JSON.generate` and `JSON.parse`, and json 3.0 removed that option, so an
unpinned json resolves to 3.x and makes every `to_json` raise - webhook
payloads included. Nothing else in the bundle constrains it. The pin can go
when we reach Rails 8.1, which no longer passes the option.

`dynamic_form` is dropped. It is unmaintained and from 1.3.1 requires Ruby
< 3.4, so it could never be updated again. Ten views used it, so
`error_messages_for` now lives in ErrorMessagesHelper and `f.error_messages`
in a form builder extension. The rendered markup is unchanged apart from a
heading and description the stylesheet had always hidden; the rules that
hid them are removed too.

`execjs` is unpinned. The `< 2.8` constraint dated from the Rails 6.0
upgrade and asset output is byte-identical without it.

Notable gem majors: puma 8, haml 7, secure_headers 7, sentry 7, jwt 3,
prometheus-client 5, highline 3, omniauth-rails_csrf_protection 2,
rspec-rails 8, shoulda-matchers 8, rubocop 1.91. secure_headers 7 changes
X-XSS-Protection from "1; mode=block" to "0", which is the correct modern
default and matches Rails' own.

`config.load_defaults` deliberately stays at 7.0. The pending 7.1 and 7.2
options are listed, commented out, in new_framework_defaults_7_1.rb and
_7_2.rb so they can be adopted in stages - several change the signed cookie
and cache formats and need a staged deploy. The vestigial
new_framework_defaults_7_0.rb is removed, as `load_defaults 7.0` already
applies all of it.

Adds tests for the areas this touched, which were mostly uncovered:
MigrationWaiter, the serialized columns that gate a defaults bump, JSON
encoding, HAML template compilation for all 103 templates, page rendering,
form error rendering and security headers. The assets Gemfile group now
includes :test so the view layer can be exercised at all.
2026-09-15 10:27:16 +01:00
Adam Cooke ab6d4430ba chore: upgrade to rails 7.1 and ruby 3.4 (#3457) 2025-10-01 16:42:39 +01:00
Adam Cooke 4d9654dac4 refactor: remove moonrope but maintain legacy API actions (#2889) 2024-03-19 20:21:04 +00:00
Adam Cooke 96d73653d7 feat: add sha256 signatures to outgoing http requests (#2874) 2024-03-13 08:52:29 +00:00
Adam Cooke 5ed94f6f85 feat: openid connect support (#2873) 2024-03-12 17:40:07 +00:00
Adam Cooke 4e13577891 style(rubocop): Style/TrailingCommaInArrayLiteral 2024-03-12 11:45:44 +00:00
Adam Cooke 4e1deb2d2a fix(web-server): allow for trusted proxies not be set 2024-03-06 14:05:44 +00:00
Adam Cooke 3785c99851 feat: configurable trusted proxies for web requests 2024-03-05 22:54:19 +00:00
Adam Cooke 658aa71483 fix: remove support for setting the 'ssl' option for app-level smtp use 2024-03-04 15:54:54 +00:00
Adam Cooke 0daa667b55 feat: support for additional SMTP client options 2024-03-04 14:24:24 +00:00
Adam Cooke 633c509a45 refactor: refactor the SMTP sender 2024-03-01 09:54:22 +00:00
Adam Cooke 0163ac3d10 feat: new configuration system (and schema) (#2819) 2024-02-26 12:41:57 +00:00
Adam Cooke 1c5ff5a9a6 feat: add option to delay starting processes until all migrations are run 2024-02-24 15:10:02 +00:00
Adam Cooke b89e0a9e82 refactor: remove token logins 2024-02-23 22:51:37 +00:00
Adam Cooke ecd09a2445 chore: upgrade rails to 7.0 and other dependencies 2024-02-23 22:51:37 +00:00
Adam Cooke b8ad732152 refactor: move tracking middleware 2024-02-23 22:51:37 +00:00
Adam Cooke 2023200d91 test: add tests for Server model 2024-02-23 22:51:34 +00:00
Adam Cooke 8d21adcbd4 docs: add quick contributing instructions 2024-02-23 22:51:33 +00:00
Adam Cooke dc8e895bfe feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
2024-02-23 22:51:33 +00:00
Adam Cooke 044058d0f1 feat: more consistent logging 2024-02-23 22:51:32 +00:00
Adam Cooke c6326a6524 style(rubocop): Style/MultilineBlockChain 2024-02-12 09:55:19 +00:00
Adam Cooke e896f4689a style(rubocop): Style/ClassAndModuleChildren 2024-02-12 09:55:18 +00:00
Adam Cooke b9f3f313f8 style(rubocop): Style/AndOr 2024-02-12 09:55:17 +00:00
Adam Cooke 4674e63b5f style(rubocop): Lint/MissingSuper 2024-02-12 09:55:15 +00:00
Adam Cooke 75be690748 style(rubocop): Style/GlobalStdStream 2024-02-12 09:40:35 +00:00
Adam Cooke ee94e4e1a0 style(rubocop): Lint/UnusedBlockArgument 2024-02-10 17:20:13 +00:00
Adam Cooke cfd8d63321 style(rubocop): Layout/EmptyLinesAroundBlockBody 2024-02-10 17:18:24 +00:00
Adam Cooke b4cc81264c style(rubocop): Style/StringLiterals 2024-02-10 17:18:23 +00:00
Adam Cooke 0e4ed5ca03 style(rubocop): Layout/EmptyLineAfterMagicComment 2024-02-10 17:18:23 +00:00
Adam Cooke 6ab36c09c9 style(rubocop): Style/FrozenStringLiteralComment 2024-02-10 17:18:22 +00:00
Adam Cooke ed2e62b94f feat: remove strip_received_headers config option
This previously removed all Received headers which were sent to the smtp
server when enabled. This is not something that should be happening.
2024-02-07 09:45:12 +00:00
Adam Cooke 7bc5230cba fix: re-add reconnect: true to database
This is deprecated and, in my tests, isn't needed but to avoid any
potential issues I am re-adding it here. When we upgrade to Rails 7.1,
we can remove this and that'll handle reconnections as appropriate.
2024-02-06 13:14:21 +00:00
Adam Cooke 54306a9748 fix: adds new connection pool which will discard failed clients
closes #2780
2024-02-06 12:43:28 +00:00
Adam Cooke 4528a14d27 fix: fixes issue starting application in production mode
I haven't observed these all that recently and these fixes are temporary until
I have time to look properly.
2024-02-03 22:17:51 +00:00
Adam Cooke 96ba4b8f30 refactor: remove Postal.database_url 2024-02-01 18:09:39 +00:00
Adam Cooke 49cceaa6ca fix: move tracking middleware before host authorization
closes #2415
2024-01-31 17:55:39 +00:00
Adam Cooke 854aa5ebc8 feat: support for configuring postal with environment variables 2024-01-30 13:11:56 +00:00
Adam Cooke 3fb40e4e24 fix: ignore message DB migrations in autoloader 2024-01-30 10:19:37 +00:00
Adam Cooke 0f9882f132 refactor: remove explicit autoload 2024-01-30 09:15:25 +00:00
toptaran 59f4478197 fix: mail view encoding issue #2462 (#2596) 2024-01-30 08:41:53 +00:00
Charlie Smurthwaite 5998bf376a fix: Move RubyVer functionality to Utilities module
This change is required to mirror https://github.com/mikel/mail/commit/a58bf11afe170524817889b92a55531901c9bc9e
2023-04-18 09:35:26 +01:00
Adam Cooke 957b784658 chore: Upgrade to Ruby 3.2.1 & Rails 6.0
* chore: upgrade to rails 6.0

* chore: upgrade ruby to 3.2.1

* chore: upgrade bundler

* chore: upgrade execjs

* chore: upgrade to rails 6.1

* chore: switch to sentry-ruby from raven

* chore: add extra platforms to gemfile
2023-04-06 11:40:45 +01:00
Joost Kalwij - van Horssen c6fb8d223b Make resent-sender header optional (#2384) 2023-03-22 14:01:04 +00:00
Charlie Smurthwaite fd289c46fd style(rubocop): fix all safe auto correctable offenses 2023-03-16 15:50:53 +00:00
Dmitriy Alekseev 9f0697f194 feat: support for AMQPS for rabbitmq connections (#1911)
* Support AMQPS

* Update rabbit_mq.rb
2022-03-16 09:38:13 +00:00
Adam Cooke 152633adfe chore: upgrade to puma 5 2022-02-14 14:36:34 +00:00
Adam Cooke 51e3a1fb5e chore: remove setting process name since procodile has gone 2022-02-14 14:34:34 +00:00
Adam Cooke 5b04faca39 fix: use the Postal logger system for the rails log 2022-02-14 14:17:51 +00:00
Adam Cooke e49ae56d27 chore: replace procodile with foreman for dev 2022-02-14 14:16:11 +00:00
Adam Cooke a1277baba5 feat: support for using rspamd for spam filtering 2021-08-02 19:57:33 +00:00