Javi Martín
a1439d0790
Apply Layout/LineLength rubocop rule
...
Note we're excluding a few files:
* Configuration files that weren't generated by us
* Migration files that weren't generated by us
* The Gemfile, since it includes an important comment that must be on
the same line as the gem declaration
* The Budget::Stats class, since the heading statistics are a mess and
having shorter lines would require a lot of refactoring
2023-08-30 14:46:35 +02:00
Javi Martín
75d2782061
Make investment votes abilities tests consistent
...
Now both the tests to create and destroy use the `user.votes`
association.
2023-08-30 14:46:35 +02:00
Javi Martín
3fe292dfe2
Move relationable expectations to controller tests
...
Having expectations related to database operations in system tests after
the process running the browser has started might result in exceptions
while running our test suite.
2023-08-30 14:46:35 +02:00
Javi Martín
2113c00db8
Simplify tests for total anonymous votes
...
Since we added a `total_anonymous_votes` method, we might as well use
it.
2023-08-30 14:46:35 +02:00
Javi Martín
9abc7cd410
Simplify investment valuation scopes
2023-08-30 14:46:35 +02:00
Javi Martín
c4dbd94e48
Group related investment scopes together
2023-08-30 14:46:35 +02:00
Javi Martín
2db45c4719
Group related investment filters together
2023-08-30 14:46:35 +02:00
Javi Martín
8589adaf3e
Simplify verification scopes
...
The code was hard to read with so many nested conditions.
2023-08-30 14:46:35 +02:00
Javi Martín
58575374b1
Simplify condition in direct upload validation
2023-08-30 14:46:35 +02:00
Javi Martín
30767fa44e
Use Ruby 1.9 hash notation in assignment scopes
2023-08-30 14:46:35 +02:00
Javi Martín
a2cc414887
Remove unnecessary code in proposal scope
...
The `id:` condition works with a list of proposals that might include
nil items, so there's no need to compact it and manually get the IDs.
Note this scope is probably inefficient, since it instantiates proposal
objects (with the `find_voted_items` method) for something that could be
done with a database query. We might change it in he future.
2023-08-30 14:46:35 +02:00
Javi Martín
bff3331ba7
Group related proposal scopes together
2023-08-30 14:46:35 +02:00
Javi Martín
243d55ec82
Add method to get the archived proposals date limit
2023-08-30 14:46:35 +02:00
Javi Martín
8898c30f55
Rename AvailableLocales.available_locales method
...
I'm not sure whether we should rename the class instead. I'm renaming
the method because renaming the class would require more changes.
2023-08-30 14:46:35 +02:00
Javi Martín
36c3ba6601
Extract variable in manager authenticator method
2023-08-30 14:46:35 +02:00
Javi Martín
4b374151be
Extract variable in GraphQL test
2023-08-30 14:46:35 +02:00
Javi Martín
cdc166e830
Make it easier to distinguish counts and prices
...
With so many similar numbers, the tests were hard to follow. Besides,
we're now making these lines slightly shorter :).
2023-08-30 14:46:35 +02:00
Javi Martín
018ef2e483
Simplify stubbing age responses in residence tests
2023-08-30 14:46:35 +02:00
Javi Martín
332e3a296a
Simplify expectations in related content tests
2023-08-30 14:46:35 +02:00
Javi Martín
016595fd80
Simplify setting up poll geozones in test/dev data
2023-08-30 14:46:35 +02:00
Javi Martín
025f3ad210
Simplify variable names in remote translations tests
2023-08-30 14:46:35 +02:00
Javi Martín
03fa5fc8d6
Simplify long test titles
2023-08-30 14:46:35 +02:00
Javi Martín
07e1f92dd5
Make moderation tests easier to read
2023-08-30 14:46:35 +02:00
Javi Martín
316db607fe
Use polymorphic path in annotation tests
...
Invoking legislation_process_draft_version_annotation_path makes the
code harder to read.
2023-08-30 14:46:35 +02:00
Javi Martín
cd559e6361
Simplify legislation variable names
...
Since we're in the context of the legislation section, we don't need the
`legislation_` prefix.
2023-08-30 14:46:35 +02:00
Javi Martín
bb79274ffe
Simplify creating investments with the same heading
2023-08-30 14:46:35 +02:00
Javi Martín
cebd6ddb30
Simplify code testing investment ids
2023-08-30 14:46:34 +02:00
Javi Martín
b8ed81c5b8
Simplify setting up admin component tests
2023-08-30 14:46:34 +02:00
Javi Martín
62304b50e0
Remove non-existent action in management routes
2023-08-30 14:46:34 +02:00
Javi Martín
1d7a269408
Use a transaction when registering a vote
...
Otherwise it would be possible to increment the votes counter without
actually introducing the vote.
2023-08-30 14:46:34 +02:00
Javi Martín
9491b20314
Extract method to get vote counts by votable type
2023-08-30 14:46:34 +02:00
Javi Martín
0d35bddf9e
Simplify finding the booth assignment for a voter
2023-08-30 14:46:34 +02:00
Javi Martín
28a90f05f8
Make installation details code easier to follow
2023-08-30 14:46:34 +02:00
Javi Martín
88f499d114
Simplify passing parameters in FollowsController
2023-08-30 14:46:34 +02:00
Javi Martín
9d74f06d24
Simplify loading resources in DraftVersionsController
...
We were using `prepend: true`, but it doesn't seem to be necessary.
We were also loading the draft versions twice in the index, so we can
remove the line loading them a second time.
2023-08-30 14:46:34 +02:00
Javi Martín
3e2da29443
Merge pull request #5196 from consuldemocracy/dependabot/bundler/paranoia-2.6.2
...
Bump paranoia from 2.6.0 to 2.6.2
2023-08-30 14:14:46 +02:00
dependabot[bot]
3da41ed7b8
Bump paranoia from 2.6.0 to 2.6.2
...
Bumps [paranoia](https://github.com/rubysherpas/paranoia ) from 2.6.0 to 2.6.2.
- [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/v2.6.0...v2.6.2 )
---
updated-dependencies:
- dependency-name: paranoia
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-30 11:48:01 +00:00
Javi Martín
5a4f622932
Merge pull request #5191 from consuldemocracy/dependabot/bundler/dalli-3.2.5
...
Bump dalli from 3.2.3 to 3.2.5
2023-08-30 13:41:44 +02:00
dependabot[bot]
b3133e6f2b
Bump dalli from 3.2.3 to 3.2.5
...
Bumps [dalli](https://github.com/petergoldstein/dalli ) from 3.2.3 to 3.2.5.
- [Changelog](https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md )
- [Commits](https://github.com/petergoldstein/dalli/compare/v3.2.3...v3.2.5 )
---
updated-dependencies:
- dependency-name: dalli
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 18:12:43 +00:00
Javi Martín
818d37ba87
Merge pull request #5189 from consuldemocracy/dependabot/bundler/launchy-2.5.2
...
Bump launchy from 2.5.0 to 2.5.2
2023-08-29 18:41:29 +02:00
dependabot[bot]
44b1fe0380
Bump launchy from 2.5.0 to 2.5.2
...
Bumps [launchy](https://github.com/copiousfreetime/launchy ) from 2.5.0 to 2.5.2.
- [Changelog](https://github.com/copiousfreetime/launchy/blob/main/README.md )
- [Commits](https://github.com/copiousfreetime/launchy/compare/v2.5.0...v2.5.2 )
---
updated-dependencies:
- dependency-name: launchy
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 16:16:53 +00:00
Javi Martín
334cfe7355
Merge pull request #5187 from consuldemocracy/dependabot/bundler/pronto-eslint-0.11.1
...
Bump pronto-eslint from 0.11.0 to 0.11.1
2023-08-29 18:11:10 +02:00
dependabot[bot]
57c663c160
Bump pronto-eslint from 0.11.0 to 0.11.1
...
Bumps [pronto-eslint](https://github.com/mmozuras/pronto-eslint ) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/mmozuras/pronto-eslint/releases )
- [Commits](https://github.com/mmozuras/pronto-eslint/compare/v0.11.0...v0.11.1 )
---
updated-dependencies:
- dependency-name: pronto-eslint
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 15:42:51 +00:00
Javi Martín
4df98f65f1
Merge pull request #5186 from consuldemocracy/dependabot/bundler/scss_lint-0.60.0
...
Bump scss_lint from 0.59.0 to 0.60.0
2023-08-29 17:40:57 +02:00
dependabot[bot]
d34a14771c
Bump scss_lint from 0.59.0 to 0.60.0
...
Bumps [scss_lint](https://github.com/sds/scss-lint ) from 0.59.0 to 0.60.0.
- [Release notes](https://github.com/sds/scss-lint/releases )
- [Changelog](https://github.com/sds/scss-lint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sds/scss-lint/compare/v0.59.0...v0.60.0 )
---
updated-dependencies:
- dependency-name: scss_lint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 15:18:00 +00:00
Javi Martín
add4d3b80d
Merge pull request #5185 from consuldemocracy/dependabot/bundler/acts_as_votable-0.14.0
...
Bump acts_as_votable from 0.13.2 to 0.14.0
2023-08-29 17:16:27 +02:00
dependabot[bot]
422258acb9
Bump acts_as_votable from 0.13.2 to 0.14.0
...
Bumps [acts_as_votable](https://github.com/ryanto/acts_as_votable ) from 0.13.2 to 0.14.0.
- [Release notes](https://github.com/ryanto/acts_as_votable/releases )
- [Commits](https://github.com/ryanto/acts_as_votable/compare/v0.13.2...v0.14.0 )
---
updated-dependencies:
- dependency-name: acts_as_votable
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 14:49:01 +00:00
Javi Martín
abc0e75c61
Merge pull request #5183 from consuldemocracy/dependabot/bundler/capistrano-3.17.3
...
Bump capistrano from 3.17.1 to 3.17.3
2023-08-29 16:46:33 +02:00
dependabot[bot]
b2eec088ba
Bump capistrano from 3.17.1 to 3.17.3
...
Bumps [capistrano](https://github.com/capistrano/capistrano ) from 3.17.1 to 3.17.3.
- [Release notes](https://github.com/capistrano/capistrano/releases )
- [Commits](https://github.com/capistrano/capistrano/compare/v3.17.1...v3.17.3 )
---
updated-dependencies:
- dependency-name: capistrano
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-29 14:14:09 +00:00
Javi Martín
6b82f02840
Merge pull request #5182 from consuldemocracy/dependabot/bundler/mdl-0.12.0
...
Bump mdl from 0.11.0 to 0.12.0
2023-08-29 16:13:06 +02:00