Javi Martín
8ae138aa19
Add and apply Rails/WhereNot rubocop rule
...
We simplify the code a little bit, and make it more consistent since we
were already using `where.not` in most places.
2021-08-09 23:52:47 +02:00
Javi Martín
69dda19af7
Add and apply Rails/PluckId rubocop rule
2021-08-09 23:52:47 +02:00
Javi Martín
8d47acc12b
Add and apply Rails/ActiveRecordCallbacksOrder rule
...
We were already following it most of the time.
2021-08-09 23:52:34 +02:00
dependabot-preview[bot]
33c962c63c
Bump rubocop-rails from 2.6.0 to 2.9.1
...
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails ) from 2.6.0 to 2.9.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.6.0...v2.9.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 22:41:26 +02:00
decabeza
4a9aae9806
Add groups index page
...
When render the investment list component with the link "see all
investments", now we redirect to groups index page when a budget has
multiple headings.
2021-08-09 21:45:29 +02:00
Javi Martín
469b39ffa3
Add and apply Style/RedundantInterpolation rule
...
Somehow I thought we already had this rule; must have forgotten to
actually add it.
2021-08-09 21:37:04 +02:00
Javi Martín
3cd2529791
Fix huge header in participatory budgets
...
The budget header was supposed to be huge, but only in the participatory
budgets index or show actions. It was still huge, with plenty of empty
space, when there was no budget, or in the "submit my ballot" and
"select a heading" pages.
2021-08-09 20:07:51 +02:00
Javi Martín
297956b579
Extract placeholder selector for budget header
...
This way it'll be easier to reuse its main properties.
2021-08-09 20:07:51 +02:00
taitus
c6b23bb6fa
Render investments list in all budgets types
...
We make this change to unify the index/show budget pages.
This way both single and multiple budgets will render the investments
list component.
2021-08-09 20:07:51 +02:00
Javi Martín
f92796c7fa
Move list of investments tests to component tests
...
In general, slow system tests requiring no interaction from the user are
good candidates to be moved to component tests because component tests
are much faster.
In this case, the system tests were also updating the database after
starting the browser, which might cause concurrency issues. We could
split the test and have one system test per phase, but IMHO there's no
need.
We're still having a couple of system tests for the happy path, in order
to make sure users actually see the list of investments.
2021-08-09 20:07:50 +02:00
Javi Martín
9328c72aaa
Simplify link to see all investments test
2021-08-09 19:46:40 +02:00
Javi Martín
d39c46468a
Fix typo in investments list spec
2021-08-09 19:46:40 +02:00
Javi Martín
99bbad9b1e
Add and apply Style/RedundantCondition rule
...
This is a rule we generally follow all the time but accidentally forgot
in one place.
2021-08-09 19:21:31 +02:00
Javi Martín
a102f3f0a7
Add and apply Style/ExplicitBlockArgument rule
...
We were already applying it in most places.
2021-08-09 19:11:29 +02:00
Javi Martín
4e33664055
Add and apply Lint/BooleanSymbol rubocop rule
2021-08-09 18:54:44 +02:00
Javi Martín
57d8a59d10
Add an apply Style/RaiseArgs rubocop rule
...
We were already applying it most of the time.
2021-08-09 17:32:46 +02:00
dependabot-preview[bot]
8979472820
Bump rubocop from 0.91.1 to 0.93.1
...
Bumps [rubocop](https://github.com/rubocop-hq/rubocop ) from 0.91.1 to 0.93.1.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.91.1...v0.93.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 17:11:24 +02:00
Javi Martín
71b2d62c18
Merge pull request #4221 from consul/dependabot/bundler/rubocop-rspec-1.44.1
...
Bump rubocop-rspec from 1.41.0 to 1.44.1
2021-08-09 17:05:08 +02:00
Javi Martín
535a039a31
Add and apply RSpec/FilePath rubocop rule
...
This way we make sure editors which support navigating between one class
and its test file can find the alternative files.
2021-08-09 16:51:59 +02:00
dependabot-preview[bot]
126f7bfb97
Bump rubocop-rspec from 1.41.0 to 1.44.1
...
Bumps [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec ) from 1.41.0 to 1.44.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-rspec/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop-rspec/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop-rspec/compare/v1.41.0...v1.44.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 16:51:58 +02:00
Javi Martín
72b9dbce30
Merge pull request #4597 from consul/rubocop_offenses
...
Fix rubocop convention offenses
2021-08-09 16:48:34 +02:00
Javi Martín
afb660f82c
Fix rubocop convention offenses
...
While we use Pronto to detect offenses in the lines changed in our pull
request, sometimes our changes introduce offenses in other lines, and we
don't detect them.
In commit 0488b3735 , we removed the only usage of the `heading` method
in a test, which caused a `RSpec/LetSetup` offense.
In commit 287c48873 , we changed some lines from `fill_in` to
`fill_in_ckeditor`. Some of these lines were aligned with the following
ones, which after that change had extra spacing for no reason.
Finally, in commit 8d38ed58c we added a line before two lines which had
their equals signs aligned. Since, after adding this line, the block was
no longer aligned, there was no reason for the extra space in one of the
lines.
2021-08-09 16:23:40 +02:00
Javi Martín
55ea7f78d7
Merge pull request #4194 from consul/dependabot/bundler/pg-1.2.3
...
Bump pg from 1.0.0 to 1.2.3
2021-08-09 16:10:52 +02:00
dependabot-preview[bot]
ef7c631248
Bump pg from 1.0.0 to 1.2.3
...
Bumps [pg](https://github.com/ged/ruby-pg ) from 1.0.0 to 1.2.3.
- [Release notes](https://github.com/ged/ruby-pg/releases )
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc )
- [Commits](https://github.com/ged/ruby-pg/compare/v1.0.0...v1.2.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 15:38:18 +02:00
Javi Martín
92315201a7
Merge pull request #4307 from consul/dependabot/bundler/knapsack_pro-2.11.0
...
Bump knapsack_pro from 2.6.0 to 2.11.0
2021-08-09 15:30:43 +02:00
dependabot-preview[bot]
66f470e629
Bump knapsack_pro from 2.6.0 to 2.11.0
...
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby ) from 2.6.0 to 2.11.0.
- [Release notes](https://github.com/KnapsackPro/knapsack_pro-ruby/releases )
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v2.6.0...v2.11.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 15:16:58 +02:00
Javi Martín
73f3a91221
Merge pull request #4417 from consul/dependabot/bundler/capistrano-3.16.0
...
Bump capistrano from 3.14.1 to 3.16.0
2021-08-09 15:11:28 +02:00
Javi Martín
00d277a88a
Merge pull request #4203 from consul/dependabot/bundler/omniauth-facebook-8.0.0
...
Bump omniauth-facebook from 7.0.0 to 8.0.0
2021-08-09 15:06:26 +02:00
dependabot-preview[bot]
4260563964
Bump omniauth-facebook from 7.0.0 to 8.0.0
...
Bumps [omniauth-facebook](https://github.com/simi/omniauth-facebook ) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/simi/omniauth-facebook/releases )
- [Changelog](https://github.com/simi/omniauth-facebook/blob/master/CHANGELOG.md )
- [Commits](https://github.com/simi/omniauth-facebook/compare/v7.0.0...v8.0.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2021-08-09 14:37:18 +02:00
Javi Martín
0473f1a38b
Merge pull request #4419 from consul/dependabot/bundler/omniauth-google-oauth2-0.8.2
...
Bump omniauth-google-oauth2 from 0.8.0 to 0.8.2
2021-08-09 14:30:09 +02:00
Javi Martín
4117d6417f
Merge pull request #4430 from consul/dependabot/bundler/i18n-tasks-0.9.34
...
Bump i18n-tasks from 0.9.31 to 0.9.34
2021-08-09 14:23:13 +02:00
dependabot[bot]
0c83943dc1
Bump i18n-tasks from 0.9.31 to 0.9.34
...
Bumps [i18n-tasks](https://github.com/glebm/i18n-tasks ) from 0.9.31 to 0.9.34.
- [Release notes](https://github.com/glebm/i18n-tasks/releases )
- [Changelog](https://github.com/glebm/i18n-tasks/blob/main/CHANGES.md )
- [Commits](https://github.com/glebm/i18n-tasks/compare/v0.9.31...v0.9.34 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-09 11:57:51 +00:00
dependabot[bot]
711d65846c
Bump omniauth-google-oauth2 from 0.8.0 to 0.8.2
...
Bumps [omniauth-google-oauth2](https://github.com/zquestz/omniauth-google-oauth2 ) from 0.8.0 to 0.8.2.
- [Release notes](https://github.com/zquestz/omniauth-google-oauth2/releases )
- [Changelog](https://github.com/zquestz/omniauth-google-oauth2/blob/master/CHANGELOG.md )
- [Commits](https://github.com/zquestz/omniauth-google-oauth2/compare/v0.8.0...v0.8.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-09 11:57:48 +00:00
Javi Martín
ddfd04f08d
Merge pull request #4408 from consul/dependabot/bundler/paranoia-2.4.3
...
Bump paranoia from 2.4.2 to 2.4.3
2021-08-09 13:56:09 +02:00
Javi Martín
ff850138e0
Merge pull request #4604 from consul/ruby_2.6.8
...
Upgrade Ruby to version 2.6.8
2021-08-09 13:45:10 +02:00
dependabot[bot]
c1491a7ce0
Bump capistrano from 3.14.1 to 3.16.0
...
Bumps [capistrano](https://github.com/capistrano/capistrano ) from 3.14.1 to 3.16.0.
- [Release notes](https://github.com/capistrano/capistrano/releases )
- [Commits](https://github.com/capistrano/capistrano/compare/v3.14.1...v3.16.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-09 01:13:46 +00:00
dependabot[bot]
2a1c83a526
Bump paranoia from 2.4.2 to 2.4.3
...
Bumps [paranoia](https://github.com/rubysherpas/paranoia ) from 2.4.2 to 2.4.3.
- [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.4.2...2.4.3 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-09 01:11:59 +00:00
Javi Martín
e25b6f4ebe
Merge pull request #4424 from consul/dependabot/bundler/pronto-rubocop-0.11.1
...
Bump pronto-rubocop from 0.11.0 to 0.11.1
2021-08-09 02:13:07 +02:00
Javi Martín
c2e1b8e11c
Merge pull request #4425 from consul/dependabot/bundler/globalize-5.3.1
...
Bump globalize from 5.3.0 to 5.3.1
2021-08-09 02:10:23 +02:00
dependabot[bot]
ff27f43d45
Bump pronto-rubocop from 0.11.0 to 0.11.1
...
Bumps [pronto-rubocop](https://github.com/mmozuras/pronto-rubocop ) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/mmozuras/pronto-rubocop/releases )
- [Commits](https://github.com/mmozuras/pronto-rubocop/compare/v0.11.0...v0.11.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-08 23:46:11 +00:00
dependabot[bot]
354cc0ae6c
Bump globalize from 5.3.0 to 5.3.1
...
Bumps [globalize](https://github.com/globalize/globalize ) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/globalize/globalize/releases )
- [Changelog](https://github.com/globalize/globalize/blob/master/CHANGELOG.md )
- [Commits](https://github.com/globalize/globalize/compare/v5.3.0...v5.3.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-08 23:41:32 +00:00
Javi Martín
3e90bb8a90
Merge pull request #4426 from consul/dependabot/bundler/bullet-6.1.4
...
Bump bullet from 6.1.0 to 6.1.4
2021-08-09 01:37:37 +02:00
Javi Martín
9222ea0cf6
Upgrade Ruby to version 2.6.8
...
So get the latest security fixes in the 2.6.x series and we can update
the parser gem without getting any warnings.
2021-08-09 01:14:08 +02:00
dependabot[bot]
e59742067c
Bump bullet from 6.1.0 to 6.1.4
...
Bumps [bullet](https://github.com/flyerhzm/bullet ) from 6.1.0 to 6.1.4.
- [Release notes](https://github.com/flyerhzm/bullet/releases )
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md )
- [Commits](https://github.com/flyerhzm/bullet/compare/6.1.0...6.1.4 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-08 23:12:02 +00:00
Javi Martín
bb8dd49172
Merge pull request #4431 from consul/dependabot/bundler/groupdate-5.2.2
...
Bump groupdate from 5.2.1 to 5.2.2
2021-08-09 00:46:16 +02:00
dependabot[bot]
51d6d4712d
Bump groupdate from 5.2.1 to 5.2.2
...
Bumps [groupdate](https://github.com/ankane/groupdate ) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/ankane/groupdate/releases )
- [Changelog](https://github.com/ankane/groupdate/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ankane/groupdate/compare/v5.2.1...v5.2.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-08 22:25:14 +00:00
Javi Martín
743dc27b85
Merge pull request #4596 from consul/cached_attachments_task
...
Use a rake task to delete cached attachments
2021-08-02 15:44:33 +02:00
Javi Martín
930bb753c5
Use a rake task to delete cached attachments
...
Our previous system to delete cached attachments didn't work for
documents because the `custom_hash_data` is different for files created
from a file and files created from cached attachments.
When creating a document attachment, the name of the file is taken into
account to calculate the hash. Let's say the original file name is
"logo.pdf", and the generated hash is "123456". The cached attachment
will be "123456.pdf", so the generated hash using the cached attachment
will be something different, like "28af3". So the file that will be
removed will be "28af3.pdf", and not "123456.pdf", which will still be
present.
Furthermore, there are times where users choose a file and then they
close the browser or go to a different page. In those cases, we weren't
deleting the cached attachments either.
So we're adding a rake task to delete these files once a day. This way
we can simplify the logic we were using to destroy cached attachments.
Note there's related a bug in documents: when editing a record (for
example, a proposal), if the title of the document changes, its hash
changes, and so it will be impossible to generate a link to that
document. Changing the way this hash is generated is not an option
because it would break links to existing files. We'll try to fix it when
moving to Active Storage.
2021-07-30 17:30:11 +02:00
Javi Martín
a8c4cc3edc
Merge pull request #4599 from consul/invalid_image_fields_html
...
Fix removing existing image and adding a new one
2021-07-30 16:03:01 +02:00
Javi Martín
c0a6bf54fc
Fix invisible error message in attachments
...
In commit cc6f9391f we made the images and documents file inputs
invisible (instead of using `display: none`) in order to make it
possible to attach images and documents using the keyboard.
However, since the error messages associated to these inputs has the
same HTML class as the inputs, we were also hiding them (the `display:
none` didn't affect the error messages because they've also got the
`is-visible` class).
Using the `[type=file]` selector we make it more explicit that we only
want to style these inputs.
I'm not adding a test for this scenario because technically the text is
there and I'm not sure how to test for the presence of invisible
elements.
2021-07-27 23:57:41 +02:00