Commit Graph

18129 Commits

Author SHA1 Message Date
Senén Rodero
b4f2e66c78 Merge pull request #5147 from consul/bump_capybara-webmock
Bump selenium-webdriver from 3.142 to 4.0.0
2023-06-29 18:37:57 +02:00
Senén Rodero Rodríguez
41a84d6625 Bump selenium-webdriver from 3.142 to 4.0.0
And also `capybara-webmock' to the latest as the previous
one is not supported by selenium-webdriver.

The change in the rails_helper.rb file fixes a deprecation warning
related to desired capabilities after this upgrade.
2023-06-29 17:29:21 +02:00
Senén Rodero
59d260c891 Merge pull request #5143 from consul/bump_parser
Bump parser from 3.1.0.3 to 3.2.2.3
2023-06-29 13:37:36 +02:00
Senén Rodero Rodríguez
15e9c593a8 Bump parser from 3.1.0.3 to 3.2.2.3 2023-06-29 13:03:54 +02:00
Senén Rodero
93d33b6d83 Merge pull request #5141 from consul/search_dictionary_selector
Fix Serbian locale code
2023-06-28 13:02:26 +02:00
Senén Rodero Rodríguez
83b5965821 Fix Serbian locale code
I accidentally duplicated the locale code within
commit 3c3ff65.
2023-06-27 18:06:19 +02:00
Sebastia
f001f07210 Merge pull request #5140 from consul/legislation-proposals
Remove unused code from Legislation proposals
2023-06-27 16:48:20 +02:00
taitus
d2b181777d Call Legislation::Proposals::VotesComponent directly 2023-06-27 15:57:03 +02:00
Senén Rodero
ab698a79a8 Merge pull request #5098 from consul/map_open_popups_with_keyboard
Open marker popups when navigating with the keyboard
2023-06-27 15:33:45 +02:00
taitus
ab2c548964 Remove unused code for legislation proposals votes
In these commits 38ba5e159b and 8805037e2f we added the parameter
"vote_url" in the call to the partial "votes" in collaborative legislation
proposals.

It seems that this parameter is only used in the proposals module and not in
collaborative legislation proposals.

While it is true that in the partial "votes" in these commits this parameter
"vote_url" is referred to, in commit 276baedcf it seems to be removed.

For this reason, we remove the parameter.
2023-06-27 14:44:54 +02:00
Senén Rodero
90ddd99751 Merge pull request #5134 from consul/pg_search_dictionaries
Update search dictionaries
2023-06-26 20:54:51 +02:00
Senén Rodero Rodríguez
3fa3c90db6 Fix map markers navigation for keyboard users
By using the bindPopup function instead of the click event
popups work when using the keyboard.

Note that now we are loading all the map markers in the first
request in a single query to the database (needed when there
is a lot or markers to show). Because of that we removed the
AJAX endpoint.
2023-06-26 20:33:35 +02:00
Senén Rodero Rodríguez
2b0a812543 Add method to retrieve translations in one database query
This methods performs much better when we need to load a lot of
globalized models translations and returns the best fallback translation
for the current language.
2023-06-26 20:33:35 +02:00
Sebastia
bb8759d8fd Merge pull request #5122 from consul/strip-metadata
Remove metadata from images
2023-06-26 15:56:33 +02:00
Javi Martín
ec1fe1fbb1 Merge pull request #5104 from markusgeert/feature/disable-create-booths-button
Disable the create booths button when the polls function is disabled
2023-06-23 15:45:50 +02:00
Max Stevens
13bf866c95 Disable the create booths button when the polls function is disabled 2023-06-23 14:33:19 +02:00
Javi Martín
8ed898a13c Merge pull request #5110 from consul/dependabot/bundler/audited-5.3.3
Bump audited from 5.0.2 to 5.3.3
2023-06-23 14:09:46 +02:00
Senén Rodero Rodríguez
3c3ff65be1 Update search dictionaries
Since the creation of this list 3 years ago we added more languages to the
application and PostgreSQL added more dictionaries too.
2023-06-23 12:53:43 +02:00
Senén Rodero Rodríguez
1d7c821935 Sort languages alphabetically
So it's easier to know where to add new ones when needed.
2023-06-23 12:53:41 +02:00
Senén Rodero
443c5e0a53 Merge pull request #5137 from consul/legislation_translations
Allow administrators to override legislation and budget translations
2023-06-23 11:51:32 +02:00
Senén Rodero Rodríguez
27249f6e69 Allow administrators to override budgets translations 2023-06-23 11:15:54 +02:00
Senén Rodero Rodríguez
dc9a30adda Allow administrators to override legislation translations
Now administrators can override default legislation translations through
the administration panel.
2023-06-23 11:15:54 +02:00
Senén Rodero
cf8a98f06b Merge pull request #5121 from consul/application_name_for_deployments
Allow to change the application name for deployments
2023-06-12 16:38:04 +02:00
taitus
78ee45630b Remove metadata from images
Currently in the application we never show the original image, we always
show one of its variants.

This change removes the metadata of both the variants and the original
version so that if at some point we decide to show the original version,
we will no longer have to remember to remove the metadata.
2023-06-12 14:30:00 +02:00
Senén Rodero Rodríguez
d7bc82a8ab Allow to change the application name for deployments
When someone installs CONSUL with the installer using
a custom `app_name`, the deployment configuration file
must use the same application name; otherwise, the
Capistrano task to update the crontab will duplicate the
crontab entries with different names causing unexpected
errors.

Below is an example of the issue. The first set of crontab
entries was created during installation using a custom
app_name. The second set of entries are duplicated
during the first deployment with a wrong application
name in the config/deploy.rb file.

```
deploy@ubuntu:~$ crontab -l
* * * * * /bin/bash -l -c 'date > ~/cron-test.txt'
0 5 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && RAILS_ENV=production bundle exec rake -s sitemap:refresh --silent'
0 1 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && RAILS_ENV=production bundle exec rake files:remove_old_cached_attachments --silent'
0 3 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && RAILS_ENV=production bundle exec rake votes:reset_hot_score --silent'
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && RAILS_ENV=production bundle exec rake -s stats:generate --silent'
@reboot /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && bundle exec puma -C config/puma/production.rb'
@reboot /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230529101753 && RAILS_ENV=production bin/delayed_job -n 2 restart'

* * * * * /bin/bash -l -c 'date > ~/cron-test.txt'
0 5 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230530112702 && RAILS_ENV=production bundle exec rake -s sitemap:refresh --silent'
0 1 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230530112702 && RAILS_ENV=production bundle exec rake files:remove_old_cached_attachments --silent'
0 3 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230530112702 && RAILS_ENV=production bundle exec rake votes:reset_hot_score --silent'
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230530112702 && RAILS_ENV=production bundle exec rake -s stats:generate --silent'
@reboot /bin/bash -l -c 'cd /home/deploy/participacyl/releases/20230530112702 && bundle exec puma -C config/puma/production.rb'
```
2023-06-07 16:58:40 +02:00
Javi Martín
a480c5d545 Merge pull request #5123 from consul/fix-current-secrets
Fix cached tenant secrets when running tests
2023-06-06 14:50:08 +02:00
taitus
4de39918c2 Fix cached secrets when running tests
When running multiple specs that have to overwrite the rails secrets,
it can happen that the condition:
"@cached_rails_secrets != Rails.application.secrets"
is not met and unexpected secrets are returned.

We have found this case while experimenting with tests related to the
Tenant secrets. In one case, assigning cached rails secrets to nil resulted in
a failure to detect when the 'rails.application.secrets' had changed.
2023-06-05 19:53:15 +02:00
Senén Rodero
ae4cf319f6 Merge pull request #5119 from consul/airbrake_setup_for_errbit
Fix integration between `Errbit` and the `airbrake` gem
2023-06-05 17:07:24 +02:00
Javi Martín
1392733dbc Merge pull request #3907 from consul/polygon_geographies
Add polygon geographies to Budgets' map
2023-05-31 17:45:59 +02:00
Javi Martín
a9029be93d Include heading geozone in investments sidebar map
Note that, in this case, we aren't binding a popup to the polygon
because the link would point to the same page we're already in.
2023-05-31 16:56:15 +02:00
Matheus Miranda
de13e789dd Add polygon geographies to Budgets' map
Note that in the budgets wizard test we now create district with no
associated geozone, so the text "all city" will appear in the districts
table too, meaning we can't use `within "section", text: "All city" do`
anymore since it would result in an ambiguous match.

Co-Authored-By: Julian Herrero <microweb10@gmail.com>
Co-Authored-By: Javi Martín <javim@elretirao.net>
2023-05-31 16:56:15 +02:00
Javi Martín
d1f1e1dfea Add notices when creating and updating geozones
Just like we do in pretty much every section in the admin area.
2023-05-31 16:56:14 +02:00
Javi Martín
fb0caa3eda Remove obsolete check for the budget presence
This check isn't necessary since commit 7e3dd47d5, since now we check
that the budget is present before creating the components which call
this method.
2023-05-31 16:56:14 +02:00
Javi Martín
106dee0040 Remove redundant HTML map classes
The `map` class is applied to the map element by LeafletJS; using it in
the container led to hacks like adding an `inline` class to fix the fact
that the container was using the `height` rule of the `.map` elements.

Even though we don't add styles for them, I'm adding the `budgets-map`
and `budget-investments-map` HTML classes so these elements can still be
easily selected with CSS and JavaScript.
2023-05-31 16:56:12 +02:00
Javi Martín
727e849fd4 Move investments sidebar map view to a component
This way we remove some logic from the (huge) investments controller
class.
2023-05-29 17:46:04 +02:00
Javi Martín
60d52686b9 Remove text-center class in heading price header
Not sure why it was added in commit 9fb5019f0, but it made the table
look funny on some screens, particularly after adding the extra field
we're about to add.
2023-05-29 17:46:04 +02:00
Javi Martín
882cc85532 Move geozones index view to a component
This way we simplify the header and it will be easier to add more code
and tests.
2023-05-29 17:46:04 +02:00
Javi Martín
ca013cf9f1 Move budget headings form partial to a component
This way it'll be easier to test it.
2023-05-29 17:46:04 +02:00
Javi Martín
c6c09074df Move geozone form partial to a component
That way it'll be easier to refactor it.
2023-05-29 17:46:04 +02:00
Sebastia
1462ae72a8 Merge pull request #4854 from iraline/activation_status
Show account activation status for each user in the admin section
2023-05-29 16:50:40 +02:00
Iraline
2dc32c6bc1 Add new column to show activation status 2023-05-29 16:06:51 +02:00
Sebastia
0c1e860760 Merge pull request #5115 from consul/remove-unused-field
Remove unused field and related code
2023-05-29 16:00:09 +02:00
taitus
0d937647af Remove the unused field from the database.
In the PR #1140 this field was added in commit ad697cd2c1, but in this same
PR in commit 28d12fe55 all the related functionality that had been added was
removed but the field was not removed.
2023-05-29 15:12:40 +02:00
taitus
2425d0ecfc Remove unused code
In the commit: 315c57929a this code was added, but at that time this field
was no longer in use, even though it existed in the database.

I don't know why this line was added, but there seems to be no point in
keeping it.
2023-05-29 15:11:38 +02:00
Senén Rodero Rodríguez
b85df50a28 Configure airbrake as Errbit documentation says
Quoting `errbit/errbit/blob/main/app/views/apps/_configuration_instructions.html.erb`

> airbrake.io supports various features that are out of scope for Errbit.
2023-05-29 13:50:33 +02:00
Sebastia
0b7dfb2172 Merge pull request #5114 from consul/bump-wkhtmltopdf-binary
Bump wkhtmltopdf-binary from 0.12.6.5 to 0.12.6.6
2023-05-29 09:29:35 +02:00
Sebastia
d655acc2b6 Merge pull request #5117 from consul/update-spec
Update spec
2023-05-24 11:19:17 +02:00
taitus
81b7f30c8a Update spec
Configure the database before starting the browser with a call to `visit`
2023-05-24 10:25:59 +02:00
Senén Rodero
c52d28788a Merge pull request #5113 from consul/proposals_notifications
Show email digest only if proposals are enabled
2023-05-23 11:35:31 +02:00
dependabot[bot]
14d4abe99a Bump audited from 5.0.2 to 5.3.3
Bumps [audited](https://github.com/collectiveidea/audited) from 5.0.2 to 5.3.3.
- [Release notes](https://github.com/collectiveidea/audited/releases)
- [Changelog](https://github.com/collectiveidea/audited/blob/main/CHANGELOG.md)
- [Commits](https://github.com/collectiveidea/audited/compare/v5.0.2...v5.3.3)

---
updated-dependencies:
- dependency-name: audited
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 12:18:30 +02:00