20681 Commits

Author SHA1 Message Date
Javi Martín
a5e788dde4 Add and apply property-no-deprecated stylelint rule
This rule was introduced in stylelint 16.23. Out of the deprecated
properties it detects, we were only using `word-wrap`.

According to the CSS Working Group [1]:

> For legacy reasons, UAs must treat word-wrap as a legacy name alias of
> the overflow-wrap property.

Since there's universal browser support for `overflow-wrap: break-word`
[2], we can safely replace `word-wrap` with `overflow-wrap`.

[1] https://drafts.csswg.org/css-text/#overflow-wrap-property
[2] https://caniuse.com/mdn-css_properties_overflow-wrap_break-word
2025-11-05 19:56:00 +01:00
Javi Martín
917c9e6ac4 Add no-invalid-position-declaration stylelint rule
This rule was introduced in stylelint 16.23. We were always following
it, and it's unlikely that we miss it before opening a pull request, but
it might be useful during development.
2025-11-05 19:56:00 +01:00
dependabot[bot]
f9f718543f Bump stylelint from 16.20.0 to 16.25.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.20.0 to 16.25.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.20.0...16.25.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.25.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 19:56:00 +01:00
Javi Martín
3e1276510c Merge pull request #6093 from consuldemocracy/dependabot/bundler/rubocop-1.81.1
Bump rubocop from 1.76.1 to 1.81.7
2025-11-05 18:21:26 +01:00
Javi Martín
ad654949ab Add and apply stylistic/max-empty-lines rule
We were already using a similar rule in Ruby files.
2025-11-05 14:34:00 +01:00
Javi Martín
8d7deef413 Don't flash the menu button on desktop screens
The button flashed briefly when loading the page. This was even more
obvious when using devices with slow internet connections.

Using CSS instead of JavaScript to hide the menu solves the issue, since
styles are loaded before scripts.
2025-11-05 14:33:09 +01:00
Javi Martín
618fc4b2c0 Move responsive menu styles to its proper file
We forgot to do so in commit 49cb6e010.
2025-11-05 14:33:09 +01:00
Javi Martín
8e6a5eac78 Add Style/ArrayIntersectWithSingleElement rule
This rule was introduced in rubocop 1.81. Even though it doesn't
currently affect us, it makes sense.
2025-11-05 14:27:12 +01:00
Javi Martín
d18c627392 Add and apply Layout/EmptyLinesAfterModuleInclusion rule
This rule was added in rubocop 1.79. We were inconsistent about it, so
we're adding it to get more consistency.
2025-11-05 14:27:12 +01:00
Javi Martín
7f749bb9bb Add and apply Style/CollectionQuerying rubocop rule
This rule was added in rubocop 1.77. We were following it most of the
time. It makes the code more readable in my humble opinion.
2025-11-05 14:27:12 +01:00
dependabot[bot]
1fa3cf8ce7 Bump rubocop from 1.76.1 to 1.81.1
This release includes some updates in the Style/RedundantParentheses and
Naming/PredicateMethod rules. We're changing the code accordingly.

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.76.1 to 1.81.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.76.1...v1.81.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-version: 1.81.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 14:27:11 +01:00
Javi Martín
413d0ed9be Return the persisted line in add_investment
This method was returning a boolean value and caused a
`Naming/PredicateMethod` when upgrading rubocop.

So, instead, we're returning the created line when it was successfully
created, and `nil` when it wasn't.

Having said that, I'm not sure why we added the `.persisted?` back in
commit 3eb22ab7b since as far as I can tell we don't use the return
value for anything. The test added in commit da43e9e2e for this change
passes if we simply return `lines.create(investment: investment)`.

For now I'm leaving the `persisted?` check just in case, but removing it
might be fine.
2025-11-05 14:27:11 +01:00
Javi Martín
15f7632f3d Refactor notifiable_available? method
This method was calling `check_availability`, which returned a boolean
value and caused a `Naming/PredicateMethod` when upgrading rubocop.

So we're changing the logic a little bit to remove the
`check_availability` method and merge the tests of `check_availability`
and `notifiable_available?` (which were almost identical) together.
2025-11-05 14:27:11 +01:00
Javi Martín
2fdfefe55d Use Verification::Email.valid_token? instead of .find
This way it's more obvious that the method is supposed to return a
boolean. When upgrading rubocop, we get a `Naming/PredicateMethod` error
due to `.find` returning a boolean.
2025-11-05 14:27:11 +01:00
Javi Martín
520f0c42d4 Merge pull request #6142 from consuldemocracy/dependabot/bundler/rubocop-rspec_rails-2.31.0
Bump rubocop-rspec_rails from 2.30.0 to 2.31.0
2025-11-05 14:26:38 +01:00
dependabot[bot]
cc9f7904ac Bump rubocop-rspec_rails from 2.30.0 to 2.31.0
We're changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-rspec_rails extension supports plugin, specify `plugins:
rubocop-rspec_rails` instead of `require: rubocop-rspec_rails` in
.rubocop.yml.  For more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
```

Bumps [rubocop-rspec_rails](https://github.com/rubocop/rubocop-rspec_rails) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec_rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec_rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec_rails/compare/v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec_rails
  dependency-version: 2.31.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 14:16:06 +01:00
Javi Martín
ec6252cc41 Merge pull request #6106 from consuldemocracy/dependabot/bundler/rubocop-rails-2.33.4
Bump rubocop-rails from 2.29.1 to 2.33.4
2025-11-05 14:06:09 +01:00
Javi Martín
0ca94e5443 Add and apply Rails/FindByOrAssignmentMemoization rule
This rule was added in rubocop-rails 2.33.

At first, I wasn't very fond of this rule. It made the code less
readable even if it improved performace in some cases.

Then I realized that in the `Admin::MachineLearning::SettingComponent`
we were using `find_by` when we should be using `find_by!` instead, and
we detected that thanks to this rule.

So, only for that reason, I'm adding this rule, but I'm fine if we
remove it.
2025-11-05 11:51:23 +01:00
Javi Martín
048bdb2e9e Add and apply Rails/OrderArguments rubocop rule
This rule was introduced in rubocop-rails 2.33. We were following it
most of the time.
2025-11-05 11:51:23 +01:00
dependabot[bot]
0c5dc24cc2 Bump rubocop-rails from 2.29.1 to 2.33.4
We're changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-rails extension supports plugin, specify `plugins:
rubocop-rails` instead of `require: rubocop-rails` in .rubocop.yml. For
more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
```

Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.29.1 to 2.33.4.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.29.1...v2.33.4)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-version: 2.33.4
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:51:23 +01:00
Javi Martín
c3f34030fe Merge pull request #6090 from consuldemocracy/dependabot/bundler/rubocop-performance-1.26.0
Bump rubocop-performance from 1.23.1 to 1.26.1
2025-11-05 11:51:04 +01:00
Javi Martín
a3c25b5a2b Add Performance/ZipWithoutBlock rubocop rule
This rule was added in rubocop-performance 1.24.

We currently don't have code where it'd be relevant, but it's a nice
rule to have if we ever write `something.map { |element| [element] }`.
2025-11-05 11:44:27 +01:00
dependabot[bot]
42378285ac Bump rubocop-performance from 1.23.1 to 1.26.0
We're changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-performance extension supports plugin, specify `plugins:
rubocop-performance` instead of `require: rubocop-performance` in
.rubocop.yml. For more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html
```

Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.23.1 to 1.26.0.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.23.1...v1.26.0)

---
updated-dependencies:
- dependency-name: rubocop-performance
  dependency-version: 1.26.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:44:27 +01:00
Javi Martín
a72d137fac Merge pull request #6027 from consuldemocracy/dependabot/bundler/rubocop-capybara-2.22.1
Bump rubocop-capybara from 2.21.0 to 2.22.1
2025-11-05 11:40:03 +01:00
dependabot[bot]
6bc24755bc Bump rubocop-capybara from 2.21.0 to 2.22.1
`Capybara/ClickLinkOrButtonStyle` is now deprecated, so we're replacing
it with `Capybara/AmbiguousClick`.

We're also changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-capybara extension supports plugin, specify `plugins:
rubocop-capybara` instead of `require: rubocop-capybara` in
.rubocop.yml.  For more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
```

Bumps [rubocop-capybara](https://github.com/rubocop/rubocop-capybara) from 2.21.0 to 2.22.1.
- [Release notes](https://github.com/rubocop/rubocop-capybara/releases)
- [Changelog](https://github.com/rubocop/rubocop-capybara/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-capybara/compare/v2.21.0...v2.22.1)

---
updated-dependencies:
- dependency-name: rubocop-capybara
  dependency-version: 2.22.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:29:28 +01:00
Javi Martín
00bff60afa Merge pull request #6096 from consuldemocracy/dependabot/bundler/rubocop-rspec-3.7.0
Bump rubocop-rspec from 3.4.0 to 3.7.0
2025-11-05 11:29:16 +01:00
Javi Martín
4ec2e87c2c Add and apply RSpec/IncludeExamples rubocop rule
This rule was added in rubocop-rspec 3.6. We were already following it
most of the time.
2025-11-05 11:23:49 +01:00
dependabot[bot]
c1dd2a583a Bump rubocop-rspec from 3.4.0 to 3.7.0
We're changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-rspec extension supports plugin, specify `plugins:
rubocop-rspec` instead of `require: rubocop-rspec` in .rubocop.yml. For
more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
```

Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 3.4.0 to 3.7.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.4.0...v3.7.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-version: 3.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:23:49 +01:00
Javi Martín
7396452cc6 Merge pull request #6034 from consuldemocracy/dependabot/bundler/rubocop-factory_bot-2.27.1
Bump rubocop-factory_bot from 2.26.1 to 2.27.1
2025-11-05 11:23:31 +01:00
dependabot[bot]
6fa2946dd3 Bump rubocop-factory_bot from 2.26.1 to 2.27.1
We're changing the `.rubocop.yml` file because we were getting a
warning:

```
rubocop-factory_bot extension supports plugin, specify `plugins:
rubocop-factory_bot` instead of `require: rubocop-factory_bot` in
.rubocop.yml.  For more information, see
https://docs.rubocop.org/rubocop/plugin_migration_guide.html
```

---
updated-dependencies:
- dependency-name: rubocop-factory_bot
  dependency-version: 2.27.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:19:19 +01:00
Javi Martín
37ccc34429 Merge pull request #6056 from consuldemocracy/dependabot/bundler/puma-6.6.1
Bump puma from 6.6.0 to 6.6.1
2025-11-04 18:18:33 +01:00
dependabot[bot]
7d47eeb68b Bump puma from 6.6.0 to 6.6.1
Bumps [puma](https://github.com/puma/puma) from 6.6.0 to 6.6.1.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v6.6.0...v6.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 16:37:20 +00:00
Javi Martín
cfcbcf5303 Merge pull request #6021 from consuldemocracy/dependabot/bundler/faraday-retry-2.3.2
Bump faraday-retry from 2.3.1 to 2.3.2
2025-11-04 17:22:45 +01:00
dependabot[bot]
de6f76aa3e Bump faraday-retry from 2.3.1 to 2.3.2
Bumps [faraday-retry](https://github.com/lostisland/faraday-retry) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/lostisland/faraday-retry/releases)
- [Changelog](https://github.com/lostisland/faraday-retry/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday-retry/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: faraday-retry
  dependency-version: 2.3.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 16:05:11 +00:00
Javi Martín
efe3b95492 Merge pull request #6130 from consuldemocracy/dependabot/bundler/selenium-webdriver-4.38.0
Bump selenium-webdriver from 4.33.0 to 4.38.0
2025-11-04 17:00:01 +01:00
dependabot[bot]
48d0fba91d Bump selenium-webdriver from 4.33.0 to 4.38.0
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.33.0 to 4.38.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.33.0...selenium-4.38.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-version: 4.38.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 15:41:56 +00:00
Javi Martín
83d368ed60 Merge pull request #6060 from consuldemocracy/dependabot/github_actions/browser-actions/setup-chrome-2
Bump browser-actions/setup-chrome from 1 to 2
2025-11-04 16:39:08 +01:00
dependabot[bot]
b785f53b20 Bump browser-actions/setup-chrome from 1 to 2
Bumps [browser-actions/setup-chrome](https://github.com/browser-actions/setup-chrome) from 1 to 2.
- [Release notes](https://github.com/browser-actions/setup-chrome/releases)
- [Changelog](https://github.com/browser-actions/setup-chrome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/browser-actions/setup-chrome/compare/v1...v2)

---
updated-dependencies:
- dependency-name: browser-actions/setup-chrome
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 15:18:36 +00:00
Javi Martín
9e2d7bc9e4 Merge pull request #6138 from consuldemocracy/dependabot/github_actions/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-11-04 16:13:01 +01:00
Javi Martín
fb8c4dfc9d Merge pull request #6139 from consuldemocracy/dependabot/github_actions/actions/setup-node-6
Bump actions/setup-node from 5 to 6
2025-11-04 16:08:40 +01:00
Javi Martín
0be6970a45 Merge pull request #6035 from consuldemocracy/dependabot/npm_and_yarn/stylelint-scss-6.12.1
Bump stylelint-scss from 6.12.0 to 6.12.1
2025-11-04 13:17:53 +01:00
dependabot[bot]
3b7818b592 Bump stylelint-scss from 6.12.0 to 6.12.1
Bumps [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) from 6.12.0 to 6.12.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.12.0...v6.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 11:58:54 +00:00
Javi Martín
1404197014 Merge pull request #6129 from consuldemocracy/fix_mark_featured_debate
Fix mark as featured button being rendered to everyone
2025-11-03 15:55:32 +01:00
Sebastia
7cf5e7fdae Merge pull request #6122 from consuldemocracy/obsolete-meta
Remove obsolete Foundation meta generator tag from layout
2025-11-03 15:21:17 +01:00
dependabot[bot]
8338c663fd Bump actions/setup-node from 5 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 22:08:13 +00:00
dependabot[bot]
26181b3594 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 22:08:08 +00:00
Javi Martín
251968ae72 Fix mark as featured button being rendered to everyone
We introduced this issue in commit f8faabf7d.

Since this component didn't have any tests (there are system tests for
it, though), we're also adding tests that check that only the right
buttons are rendered when accessing as administrator.
2025-10-31 16:01:33 +01:00
Javi Martín
90b1f06a7c Merge pull request #6097 from consuldemocracy/dependabot/bundler/simplecov-lcov-0.9.0
Bump simplecov-lcov from 0.8.0 to 0.9.0
2025-10-31 13:34:05 +01:00
dependabot[bot]
8ee9491505 Bump simplecov-lcov from 0.8.0 to 0.9.0
Bumps [simplecov-lcov](https://github.com/fortissimo1997/simplecov-lcov) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/fortissimo1997/simplecov-lcov/releases)
- [Changelog](https://github.com/fortissimo1997/simplecov-lcov/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fortissimo1997/simplecov-lcov/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: simplecov-lcov
  dependency-version: 0.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 11:55:56 +00:00
Javi Martín
60c0b0c7ec Merge pull request #6102 from consuldemocracy/dependabot/bundler/knapsack_pro-8.4.0
Bump knapsack_pro from 8.3.0 to 8.4.0
2025-10-31 12:51:12 +01:00