Commit Graph

20618 Commits

Author SHA1 Message Date
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
dependabot[bot]
9a800a4145 Bump knapsack_pro from 8.3.0 to 8.4.0
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 8.3.0 to 8.4.0.
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v8.3.0...v8.4.0)

---
updated-dependencies:
- dependency-name: knapsack_pro
  dependency-version: 8.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 10:58:54 +00:00
Javi Martín
6bbba8fe88 Merge pull request #6089 from consuldemocracy/dependabot/bundler/factory_bot_rails-6.5.1
Bump factory_bot_rails from 6.4.4 to 6.5.1
2025-10-31 11:56:02 +01:00
dependabot[bot]
21869e223d Bump factory_bot_rails from 6.4.4 to 6.5.1
Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 6.4.4 to 6.5.1.
- [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases)
- [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/main/NEWS.md)
- [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v6.4.4...v6.5.1)

---
updated-dependencies:
- dependency-name: factory_bot_rails
  dependency-version: 6.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 10:34:30 +00:00
Javi Martín
c055683bb6 Merge pull request #6025 from consuldemocracy/dependabot/bundler/faker-3.5.2
Bump faker from 3.5.1 to 3.5.2
2025-10-31 11:33:10 +01:00
Javi Martín
552c06e8b6 Merge pull request #6107 from consuldemocracy/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-10-31 11:32:18 +01:00
Javi Martín
152378537a Merge pull request #6108 from consuldemocracy/dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-10-31 11:28:29 +01:00
dependabot[bot]
428a0e287e Bump faker from 3.5.1 to 3.5.2
Bumps [faker](https://github.com/faker-ruby/faker) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v3.5.1...v3.5.2)

---
updated-dependencies:
- dependency-name: faker
  dependency-version: 3.5.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 10:13:16 +00:00
Javi Martín
5e3eab1f3c Merge pull request #6114 from consuldemocracy/release_2.4.0
Release version 2.4.0
2025-10-27 14:06:38 +01:00
Javi Martín
a70cc6e5b0 Release version 2.4.0 2025-10-27 13:41:10 +01:00