Commit Graph
20 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 86de372382 chore(dockerfile): reduce container size 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 07c6b317f2 refactor(versioning): improve how current version and branch is determined and set
Refactor `Postal.version`` and `Postal.branch` and remove `Postal::VERSION`.
2024-03-21 14:55:14 +00:00
Adam Cooke bee509832e chore(container): add the branch name to the container 2024-03-20 14:28:44 +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
Adam Cooke 0b468f97c5 chore: remove -j4 from bundle install as it shouldn't be needed 2024-03-01 13:00:10 +00:00
Adam Cooke 5b022b9394 chore: reduce threads for bundling in docker 2024-03-01 10:21:51 +00:00
Adam Cooke 0163ac3d10 feat: new configuration system (and schema) (#2819) 2024-02-26 12:41:57 +00:00
Adam Cooke 1ae8ef6401 chore: upgrade bundler to 2.5.6 2024-02-23 22:51:37 +00:00
Adam Cooke 72715fe5f8 chore: upgrade ruby to 3.2.2 and nodejs to 20.x 2024-02-23 22:51:33 +00:00
Adam Cooke 5222263484 chore(build): improve build process, add release please (#2414) 2023-04-18 14:19:22 +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
Adam Cooke c42dd1b9f6 upgrade ruby and various other dependencies 2023-02-20 09:57:56 +00:00
Adam Cooke 6570ff1f77 fix(docker): fixes issue caused by changes to underlying ruby:2.6 image 2021-10-21 09:08:25 +00:00
Adam Cooke 30dd48defa build: add postal ./bin to path and set config root in container 2021-07-29 16:47:23 +00:00
Adam Cooke d3bdfbae96 build: allow ruby in container to listen on privileged ports 2021-07-29 15:53:15 +00:00
Adam Cooke c09ab62d0c chore: various tweaks to support running tests in the CI 2021-07-26 17:40:56 +00:00
Adam Cooke 8145dba157 chore(docker): add tools for generating docker images 2021-06-29 17:47:37 +01:00
Adam Cooke b08af5ab7d Add docker 2020-02-12 16:29:32 +00:00