Commit Graph
53 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 0445e5c509 chore(deps): upgrade rack & rails 2026-06-03 15:40:29 +01:00
Adam Cooke 7c47422c86 fix(health_server): use rackup handler instead of rack handler 2025-10-01 18:12:26 +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 9399e32234 fix: don't override paths in dockerfile
This allows for these paths to continue to be set in the config file or environment variable while still maintaining the default of having the default paths in the same directory as the postal config file.
2024-03-08 16:40:58 +00:00
Charlie Smurthwaite be0df7b463 fix: translate unicode domain names to Punycode for compatibility with DNS (#2823) 2024-02-29 15:02:30 +00:00
Adam Cooke 0163ac3d10 feat: new configuration system (and schema) (#2819) 2024-02-26 12:41:57 +00:00
Adam Cooke a2eb70edf1 feat: add health server and prometheus metrics to worker 2024-02-23 22:51:38 +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 2023200d91 test: add tests for Server model 2024-02-23 22:51:34 +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 dece1d487a test: add initial tests for Postal::SMTPServer::Client 2024-02-12 18:07:44 +00:00
Adam Cooke ec636661d5 style(rubocop): remaining offences 2024-02-12 09:55:20 +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 409a4a2c6f chore: upgrade rails to 6.1.7.6 2024-01-30 08:45:33 +00: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
Charlie Smurthwaite fd289c46fd style(rubocop): fix all safe auto correctable offenses 2023-03-16 15:50:53 +00:00
Charlie Smurthwaite 02c93a4850 style(rubocop): install rubocop configuration 2023-03-16 15:50:02 +00:00
Adam Cooke c42dd1b9f6 upgrade ruby and various other dependencies 2023-02-20 09:57:56 +00:00
Adam Cooke 152633adfe chore: upgrade to puma 5 2022-02-14 14:36:34 +00:00
Adam Cooke 3c17f1690c chore: upgrade rails to 5.2.6.2 2022-02-14 14:34:21 +00:00
Adam Cooke 2053a1dc1d chore: add dotenv 2022-02-14 14:17:38 +00:00
Adam Cooke 8dd5df6e8a chore: remove mongo gem 2022-02-14 13:00:03 +00:00
Adam Cooke 17dd7cc757 refactor: remove the fast server 2021-07-29 11:20:47 +00:00
Adam Cooke eef1a365a2 fix: add resolv 0.2.1
closes #1381
closes #1377
2021-07-27 14:10:24 +00:00
Adam Cooke eab9e93ac1 chore(deps): upgrade rails to 5.2.6 2021-07-22 16:34:11 +01:00
Adam Cooke d5c528e73f chore(deps): upgrade puma to 4.3.8 2021-07-22 16:04:29 +01:00
Adam Cooke 5ecc3a5a80 upgrade rails to 5.2.5 2021-03-31 16:26:21 +01:00
Adam Cooke 138f1c0983 upgrade rails 2020-07-17 09:10:16 +01:00
Adam Cooke 0f30a53ebb upgrade rails & puma 2020-04-01 09:05:40 +00:00
Adam Cooke 4cad787343 upgrade dependencies
* rails, puma, bunny, mysql2
* remove createsend which isn't needed/used
* don't require highline all the time
2020-02-12 10:53:03 +00:00
Charlie Smurthwaite 2c8a0e19ad switch mail gem to 2-7-stable git branch to fix https://github.com/mikel/mail/issues/1238 2019-07-16 16:01:43 +01:00
Adam Cooke f56dac2284 renaming factory girl => factory bot 2019-03-14 10:46:41 +00:00
Adam Cooke 145a5f3cba upgrade rails to 5.1.6.2 2019-03-14 10:46:41 +00:00
Charlie Smurthwaite cfc60d0e41 upgrade rails and supporting gems, refresh schema 2018-08-22 11:30:54 +01:00
Charlie Smurthwaite ed7889a40e update rails 2018-07-02 15:26:48 +01:00
Charlie Smurthwaite 1f3e8e1db8 upgrade to rails 5.1 2018-02-16 11:37:50 +00:00
Adam Cooke adb3eccec4 require asset gems in development too 2017-06-02 12:44:35 +01:00
Adam Cooke 0f61c8bfa4 put asset gems in their own group 2017-06-02 12:12:27 +01:00
Adam Cooke c3f71b0d2a don't use moonrope from repo 2017-06-01 14:26:58 +01:00
Adam Cooke ce90a1d4f5 don't use acme-client from the repo 2017-06-01 14:25:00 +01:00
Adam Cooke 2bde75720c initial test suite 2017-05-08 14:48:15 +01:00
Charlie Smurthwaite b90632b525 replace epoll and threaded servers with single nio4r evented server 2017-05-02 13:07:03 +01:00