Commit Graph

20593 Commits

Author SHA1 Message Date
taitus
db361d88f1 Restore puma_bind setting removed in capistrano3-puma 6.0.0
In earlier versions of capistrano3-puma, the puma_bind has a default value to:
unix://.../tmp/sockets/puma.sock via set_if_empty in lib/capistrano/puma.rb.

This default was removed in 6.0.0, requiring to explicitly set :puma_bind in deploy.rb.

This caused the following runtime error during deploy:
> Failed to restart consul_puma_staging.service: Unit
> consul_puma_staging.socket has a bad unit file setting.
2025-05-30 15:56:28 +02:00
taitus
cd61228790 Replace removed Puma systemd tasks by supported equivalents
capistrano3-puma 6.0.0 removed the `puma:systemd:config` and
`puma:systemd:enable` tasks. This commit updates the deploy script to use
the new `puma:install` and `puma:enable` tasks instead.
2025-05-30 15:56:28 +02:00
dependabot[bot]
cd72bf42da Bump capistrano3-puma from 5.2.0 to 6.0.0
Note we aren't updating concurrent-ruby (which Dependabot would have
updated) due to an incompatibility with Rails 7.0.

Bumps [capistrano3-puma](https://github.com/seuros/capistrano-puma) from 5.2.0 to 6.0.0.
- [Changelog](https://github.com/seuros/capistrano-puma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seuros/capistrano-puma/compare/v5.2.0...v6.0.0)

---
updated-dependencies:
- dependency-name: capistrano3-puma
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 15:56:28 +02:00
Sebastia
c05f027cfa Merge pull request #5904 from consuldemocracy/dependabot/npm_and_yarn/stylistic/stylelint-plugin-3.1.2
Bump @stylistic/stylelint-plugin from 3.1.1 to 3.1.2
2025-05-30 10:13:31 +02:00
dependabot[bot]
1a3cdb3cd2 Bump @stylistic/stylelint-plugin from 3.1.1 to 3.1.2
Bumps [@stylistic/stylelint-plugin](https://github.com/stylelint-stylistic/stylelint-stylistic) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/stylelint-stylistic/stylelint-stylistic/releases)
- [Changelog](https://github.com/stylelint-stylistic/stylelint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-stylistic/stylelint-stylistic/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: "@stylistic/stylelint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 12:52:27 +00:00
Sebastia
abc0083ef1 Merge pull request #5902 from consuldemocracy/dependabot/npm_and_yarn/stylelint-scss-6.11.1
Bump stylelint-scss from 6.11.0 to 6.12.0
2025-05-29 14:51:06 +02:00
Sebastia
923333b8b1 Merge pull request #5870 from consuldemocracy/dependabot/bundler/paranoia-3.0.1
Bump paranoia from 3.0.0 to 3.0.1
2025-05-26 15:55:14 +02:00
dependabot[bot]
663b92ba1d Bump stylelint-scss from 6.11.0 to 6.11.1
Bumps [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) from 6.11.0 to 6.11.1.
- [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-scss/compare/v6.11.0...v6.11.1)

---
updated-dependencies:
- dependency-name: stylelint-scss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-26 13:44:41 +00:00
dependabot[bot]
39fd024b22 Bump paranoia from 3.0.0 to 3.0.1
Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/rubysherpas/paranoia/releases)
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md)
- [Commits](https://github.com/rubysherpas/paranoia/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: paranoia
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-26 13:25:34 +00:00
Sebastia
f607048fd0 Merge pull request #5862 from consuldemocracy/dependabot/bundler/ahoy_matey-5.3.0
Bump ahoy_matey from 5.2.0 to 5.4.0
2025-05-26 15:24:02 +02:00
Sebastia
932222f8ea Merge pull request #5837 from consuldemocracy/dependabot/bundler/caxlsx-4.2.0
Bump caxlsx from 4.1.0 to 4.2.0
2025-05-26 15:11:46 +02:00
dependabot[bot]
252780635d Bump ahoy_matey from 5.2.0 to 5.3.0
Bumps [ahoy_matey](https://github.com/ankane/ahoy) from 5.2.0 to 5.3.0.
- [Changelog](https://github.com/ankane/ahoy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/ahoy/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: ahoy_matey
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 14:17:45 +00:00
Sebastia
9bad768ccb Merge pull request #5831 from consuldemocracy/dependabot/bundler/airbrake-13.0.5
Bump airbrake from 13.0.4 to 13.0.5
2025-05-23 16:12:30 +02:00
dependabot[bot]
a1f3cedb44 Bump caxlsx from 4.1.0 to 4.2.0
Bumps [caxlsx](https://github.com/caxlsx/caxlsx) from 4.1.0 to 4.2.0.
- [Changelog](https://github.com/caxlsx/caxlsx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caxlsx/caxlsx/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: caxlsx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 14:06:53 +00:00
Sebastia
aa9ab0f079 Merge pull request #5804 from consuldemocracy/dependabot/bundler/delayed_job_active_record-4.1.11
Bump delayed_job_active_record from 4.1.10 to 4.1.11
2025-05-23 16:04:36 +02:00
Sebastia
87c1632950 Merge pull request #5799 from consuldemocracy/dependabot/bundler/audited-5.8.0
Bump audited from 5.7.0 to 5.8.0
2025-05-23 15:44:15 +02:00
dependabot[bot]
814a12a048 Bump delayed_job_active_record from 4.1.10 to 4.1.11
Bumps [delayed_job_active_record](https://github.com/collectiveidea/delayed_job_active_record) from 4.1.10 to 4.1.11.
- [Release notes](https://github.com/collectiveidea/delayed_job_active_record/releases)
- [Commits](https://github.com/collectiveidea/delayed_job_active_record/compare/v4.1.10...v4.1.11)

---
updated-dependencies:
- dependency-name: delayed_job_active_record
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 13:44:15 +00:00
dependabot[bot]
d35dcf4725 Bump audited from 5.7.0 to 5.8.0
Bumps [audited](https://github.com/collectiveidea/audited) from 5.7.0 to 5.8.0.
- [Changelog](https://github.com/collectiveidea/audited/blob/main/CHANGELOG.md)
- [Commits](https://github.com/collectiveidea/audited/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: audited
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 13:23:36 +00:00
Sebastia
2156fe5e27 Merge pull request #5785 from consuldemocracy/dependabot/bundler/pg-1.5.9
Bump pg from 1.5.8 to 1.5.9
2025-05-23 15:22:06 +02:00
Sebastia
32b5558bd3 Merge pull request #5939 from consuldemocracy/dependabot/bundler/view_component-3.22.0
Bump view_component from 3.11.0 to 3.23.1
2025-05-23 15:09:59 +02:00
dependabot[bot]
eac1776a1c Bump pg from 1.5.8 to 1.5.9
Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.8 to 1.5.9.
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.5.8...v1.5.9)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 12:56:14 +00:00
dependabot[bot]
56d0cbe690 Bump view_component from 3.11.0 to 3.22.0
Bumps [view_component](https://github.com/viewcomponent/view_component) from 3.11.0 to 3.22.0.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/viewcomponent/view_component/compare/v3.11.0...v3.22.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-version: 3.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 11:36:51 +00:00
Sebastia
d0b1f077eb Merge pull request #5769 from consuldemocracy/dependabot/bundler/wicked_pdf-2.8.2
Bump wicked_pdf from 2.8.1 to 2.8.2
2025-05-21 16:55:14 +02:00
dependabot[bot]
b930a40a4b Bump wicked_pdf from 2.8.1 to 2.8.2
Bumps [wicked_pdf](https://github.com/mileszs/wicked_pdf) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/mileszs/wicked_pdf/releases)
- [Changelog](https://github.com/mileszs/wicked_pdf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mileszs/wicked_pdf/commits)

---
updated-dependencies:
- dependency-name: wicked_pdf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-21 12:14:51 +00:00
Javi Martín
3e9d0c04bd Merge pull request #5916 from consuldemocracy/node20
Update Node.js from 18.20.3 to 20.19.2
2025-05-21 12:48:24 +02:00
Javi Martín
372a1dda3b Update Node.js from 18.20.3 to 20.19.2
Node 18 is reaching its end of life on April 30th, 2025, so we're
updating in order to keep using a maintained version after that date.
2025-05-20 18:17:35 +02:00
Javi Martín
1d6f69cfab Merge pull request #5915 from consuldemocracy/ruby3.3
Upgrade Ruby to version 3.3.8
2025-05-20 18:13:20 +02:00
Javi Martín
096023dffb Upgrade Ruby to version 3.3.8 2025-05-20 15:56:13 +02:00
Javi Martín
078ddb7717 Merge pull request #5496 from consuldemocracy/rails7.1
Upgrade to Rails 7.1
2025-05-20 15:54:44 +02:00
Javi Martín
5a5c0a716b Use Rails 7.1 defaults and overwrite them
We're still using YAML to serialize the legislation_annotations ranges
column. I'm not sure whether changing the serializer can have
consequences on existing data, and I'm not sure which serializer we
should provide instead. Quoting the Rails configuration guide [1]:

> Unfortunately there isn't really any suitable defaults available in
> Ruby's standard library. JSON could work as a format, but the json
> gems will cast unsupported types to strings which may lead to bugs.

[1] https://guides.rubyonrails.org/v7.1/configuring.html#config-active-record-default-column-serializer
2025-05-20 15:38:52 +02:00
Javi Martín
3432c385bc Use an HTML5 parser in test helpers
I think this doesn't affect us because we use RSpec instead of Rails
test classes. In any case, if it ever affects us, we'll get notified
when a test fails.
2025-05-20 15:38:52 +02:00
Javi Martín
140619ff00 Log exceptions as :error instead of :fatal
As mentioned in the pull request introducing this change [1]:

> FATAL is documented in the Ruby Logger docs as being for "An
> unhandleable error that results in a program crash.", which does not
> really apply to this case since DebugExceptions is handling the error.

So we're using the new default value, which makes more sense.

[1] Pull request 48575 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
cbf11c2514 Use Rails::HTML5::Sanitizer when sanitizing HTML
Since we use a version of Loofah supporting HTML5 since db2d0bb80, the
`Rails::HTML::Sanitizer.best_supported_vendor` method will return the
HTML5 sanitizer. As mentioned in the pull request introducting this
change [1], the libxml2 maintainer wrote:

> it's still a bad idea to use a 20+ years old, unmaintained HTML 4
> parser to sanitize input for the modern web

So we're going with the new default sanitizer.

Note we aren't uncommenting the `action_text.sanitizer_vendor` option
because we don't use Action Text and so it doesn't affect us , and
uncommeting it will raise an error.

Also note we need to change one test because the new sanitizer handles
whitespace slightly differently.

[1] Pull request 48293 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
0dec47c055 Use just the banner title as the banner link text
We were using an <a> tag wrapping the whole content of the banner in
order to make the whole banner clickable. However, that made the text of
the link less concise, affecting people using screen readers. So,
instead, we're using the `card` mixin, which we introduced in commit
f285dfcba.

We're making this change now because the HTML5 Sanitizer that we're
about to enable in the next commit was handling the whitespace inside
the banner differently, causing one test to fail, and we didn't find a
different way to fix it.
2025-05-20 15:38:52 +02:00
Javi Martín
8dcf66886e Fix broken tags in JavaScript injection tests
This was introduced in commit 5ecbe01d4, probably by accident while
copying a suggestion made in the pull request for that change [1]. This
broken tag introduces issues when sanitizing the HTML text with an HTML5
sanitizer, which we will start using in a couple of commits.

[1] https://github.com/consuldemocracy/consuldemocracy/pull/462#issuecomment-139309289
2025-05-20 15:38:52 +02:00
Javi Martín
82c3c6646d Use Rails 7.1 cache format
Just like we mentioned in commit 001eee3d6, according to the Rails
configuration guide [1], with this format, Rails serializes cache
entries more efficiently. Most importantly:

> All formats are backward and forward compatible, meaning cache entries
> written in one format can be read when using another format. This
> behavior makes it easy to migrate between formats without invalidating
> the entire cache.

[1] https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-cache-format-version
2025-05-20 15:38:52 +02:00
Javi Martín
a6e735dc4e Generate a secure token when initializing a record
This options doesn't affect us because we don't use `has_secure_token`,
so we're just using the new default value.
2025-05-20 15:38:52 +02:00
Javi Martín
e35bf97928 Commit transactions when using return inside them
It doesn't really affect us because we never use `return`, `break` or
`throw` inside transactions, since it would be confusing exactly because
it wouldn't be 100% clear whether the transaction is committed or not.

So we're using the new default value, which will be the only available
option in Rails 7.2 [1].

[1] Commit eccc6061f4 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
d6b642a23d Run after_commit callbacks in order defined
This change doesn't affect us, since we don't use `after_commit`
callbacks, and, among our dependencies, AFAIK only the Devise gem uses
them, and it only defines one after_commit callback when creating a
record and another one when updating it, so we're never going to have
more than one callback being executed after a transaction is finished.
2025-05-20 15:38:52 +02:00
Javi Martín
0d0f3a48ff Use Rails 7.1 marshalling format
Enabling this option is only dangerous when deploying applications using
multiple servers. Since this isn't our case, we can enable it.
2025-05-20 15:38:52 +02:00
Javi Martín
7993f6d1ed Enable before_committed callbacks on all records
This doesn't really affect us because we don't use `before_committed`
callbacks (and neither do any of our dependencies), so we're using the
new default value.
2025-05-20 15:38:52 +02:00
Javi Martín
5ecd65b7dc Precompile filter parameters
This is done for performance reasons. Quoting the pull request
introducing this option [1]:

> A config might be overkill, but I wanted to provide an escape hatch
> for any upgraded apps that might be testing the exact value of the
> action_dispatch.parameter_filter header.

Since we don't test the exact value of action_dispatch.parameter_filter,
we can enable this option.

[1] Pull request 46452 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
529b4d2a98 Don't validate foreign key in required belongs_to
Before this change, every time we saved a record, the association was
validated if we had `belongs_to :something, required: true`. After this
change [1], it's only validated if the `something_id` column is nil (or
`something_type` for polymorphic associations) or if the `something_id`
attribute has changed.

The main difference is that we no longer get validation errors if the
associated record has been deleted. Doesn't affect us much, so we're
going with the new default value.

[1] Pull request 46522 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
364fa2603c Raise exceptions when assigning to attr_readonly attributes
Since we don't use attr_readonly, this option doesn't really affect us.
So we're just using the new default value.
2025-05-20 15:38:52 +02:00
Javi Martín
a1ae4651ff Simplify the way to set the maximum log size
We can use the new configuration option in Rails 7.1, so we don't have
to configure it manually.
2025-05-20 15:38:52 +02:00
Javi Martín
5db773e44f Serialize message data and metadata together
This is the new default option, and its only dangerous when deploying to
applications with multiple servers. Since this isn't our case, we can
enable it.
2025-05-20 15:38:52 +02:00
Javi Martín
e08ba7efbe Use JSON to serialize messages
The new serializer can decrypt legacy messages using the `marshal`
serializer, so there's no risk of losing data when upgrading. Since we
aren't using applications with several servers, where upgrading some
servers might cause issues on the servers that aren't upgraded yet,
we're enabling the option.

[1] See comments in pull request 42846 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
Javi Martín
36828ee86b Use SQLCommenter format to format tags in Query Logs
Don't really care about the format, so we'll use the new default one.
2025-05-20 15:38:52 +02:00
Javi Martín
9054d31ab3 Raise exceptions on invalid cache expiration time
It doesn't really affect us (unless some of our dependencies make this
mistake) because we only use `expires_in/expires_at` once and we do it
correctly, but it might be help us detect this issue if we ever
introduce it in the future.
2025-05-20 15:38:51 +02:00
Javi Martín
e45dc5d45a Use BigDecimal argument serializer in Active Job
This option won't even exist in Rails 7.2 [1], and the possibility to
disable it was only added to guarantee safe upgrades in Rails
applications with multiple replicas [2].

Since we don't have applications with multiple replicas, where one
replica could be using Active Job 7.0 and another one could be using
Active Job 7.1 while upgrading, we can enable this options.

[1] Commit 2a761d23d2 in https://github.com/rails/rails
[2] Commit bc1f323338 in https://github.com/rails/rails
2025-05-20 15:38:51 +02:00