Commit Graph

16766 Commits

Author SHA1 Message Date
cronopioelectronico
b6f0b1b063 Update machine learning ini files 2021-09-07 18:24:04 +02:00
cronopioelectronico
6d6888f201 Update machine learning scripts with NNMF and TextRank-GloVe techniques 2021-09-07 18:18:47 +02:00
Javi Martín
df623f39b9 Merge pull request #4682 from consul/flaky_drafting_spec
Fix flaky legislation draft version spec
2021-09-03 11:46:39 +02:00
Javi Martín
39a0679a71 Merge pull request #4669 from consul/fix_investment_spec
Fix flaky investments order spec
2021-09-03 11:46:06 +02:00
Javi Martín
ed3ad35142 Fix flaky investments order spec
We were clicking links and visiting pages without checking the previous
request had already finished. This might cause concurrent requests,
leading to unpredictable results.

It might be the reason why this test failed once when running our
continuous integration [1].

[1] https://github.com/consul/consul/runs/3295502777
2021-09-01 23:10:52 +02:00
Javi Martín
40e339d23d Fix flaky legislation draft version spec
The test was failing sometimes, probably because the "Edit" link within
the "An example legislation process" row is already present before
clicking the "All" link. This can lead to simultaneous requests.

Just removing the unnecessary click on the "All" link solves the issue.
2021-08-29 02:43:42 +02:00
efgalvao
713ae540b0 Add length validation for debate description
Fixes issue #4013.
2021-08-29 01:13:48 +02:00
Javi Martín
d32e2f9d77 Merge pull request #4647 from consul/rtl
Improve support for RTL languages
2021-08-18 15:14:10 +02:00
Javi Martín
8fdbd36741 Merge pull request #4664 from consul/fix_dockerfile
Explicitely use Debian Buster in Dockerfile
2021-08-18 13:30:45 +02:00
Javi Martín
05869bf465 Merge pull request #4663 from consul/revert-4538-notificationTranslation
Fix tests after replacing message with notification
2021-08-17 14:39:48 +02:00
Javi Martín
2c84f775d7 Explicitely use Debian Buster in Dockerfile
Debian Bullseye was released two days ago, and is now the default
distribution for the Docker image.

Our image isn't compatible with Debian Bullseye right now, and we
haven't done any testing with it, so for now we're staying with Buster.
2021-08-17 14:37:58 +02:00
Javi Martín
d5d9eb5093 Fix tests after replacing message with notification
Looks like our test suite wasn't executed in commit 4dbc027e5, and so we
weren't notified of these failures.
2021-08-17 14:23:24 +02:00
Javi Martín
9c8ee576a2 Merge pull request #4538 from andyjdavis/notificationTranslation
replace the word message with notification on proposal notification s…
2021-08-17 14:04:47 +02:00
Javi Martín
d827768c07 Set HTML dir attribute in RTL languages
This way properties flex layouts text direction will work properly.
2021-08-16 17:47:34 +02:00
Javi Martín
a868a5ff35 Change Foundation text direction in RTL languages
This way, when the language is written form right-to-left, elements
using Foundation mixins/classes will float to the opposite direction as
they do in left-to-right languages. The same will apply to text
alignment.

To offer full support for RTL languages, we need to change every single
reference to `float: left`, `float: right`, `text-align: left`,
`text-align: right`, and possible adjust other properties like `left`,
`margin-left`, `padding-left` or `border-left`. In the meantime, we at
least partially support these languages.

Replacing `float` with `flex` when possible would also improve RTL
support.
2021-08-16 17:47:33 +02:00
Javi Martín
8991d93bd1 Merge pull request #4585 from consul/experimental_machine_learning
Add experimental machine learning
2021-08-16 17:04:42 +02:00
Machine Learning
4d27bbebad Add experimental machine learning 2021-08-16 16:31:04 +02:00
Javi Martín
c8d8fae98d Move related list partial to a component
This way the code is easier to follow; the code checking whether the
list has contents is in the partial rendering the list.

We also remove some duplication setting up related content in the
controllers.

For some reason, we have to manually ignore i18n keys which were
automatically ignored when the code was in the view.
2021-08-16 16:30:13 +02:00
Javi Martín
89436b528f Extract component to render a date range
Note we're using the `call` method (which is equivalent to adding an ERB
file) because we were getting an error calling `render` from the `dates`
method:

```
ActionView::Base#lookup_context delegated to
view_renderer.lookup_context, but view_renderer is nil:
```

It might be because we aren't rendering the
`Adming::Budgets::DurationComponent` but just calling one method, and so
there's no view context in this case.
2021-08-16 16:30:13 +02:00
Javi Martín
e7da2cb0f3 Merge pull request #4641 from consul/dependabot/bundler/master/globalize-6.0.1
Bump globalize from 5.3.1 to 6.0.1
2021-08-16 02:33:48 +02:00
dependabot[bot]
6072372c9d Bump globalize from 5.3.1 to 6.0.1
Bumps [globalize](https://github.com/globalize/globalize) from 5.3.1 to 6.0.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/commits)

---
updated-dependencies:
- dependency-name: globalize
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-15 20:23:21 +00:00
Javi Martín
0ee0388111 Merge pull request #4636 from consul/dependabot/bundler/master/dalli-2.7.11
Bump dalli from 2.7.10 to 2.7.11
2021-08-15 20:02:45 +02:00
Javi Martín
e01a94d7bd Use mem_cache_store instead of dalli_store
`dalli_store` is deprecated since dalli 2.7.11.

We can now enable cache_versioning. We didn't enable it when upgrading
to Rails 5.2 because of possible incompatibility with `dalli_store` [1],
even though apparently some the issues were fixed in dalli 2.7.9 and
dalli 2.7.10 [2].

Since using cache versioning makes cache expiration more efficient, and
I'm not sure whether the options we were passing to the dalli store are
valid with memcache store (documentation here is a bit lacking), I'm
just removing the option we used to double the default cache size on
production.

[1] https://www.schneems.com/2018/10/17/cache-invalidation-complexity-rails-52-and-dalli-cache-store
[2] https://github.com/petergoldstein/dalli/blob/master/History.md
2021-08-15 19:42:22 +02:00
dependabot[bot]
1d594d1622 Bump dalli from 2.7.10 to 2.7.11
Bumps [dalli](https://github.com/petergoldstein/dalli) from 2.7.10 to 2.7.11.
- [Release notes](https://github.com/petergoldstein/dalli/releases)
- [Changelog](https://github.com/petergoldstein/dalli/blob/master/History.md)
- [Commits](https://github.com/petergoldstein/dalli/compare/v2.7.10...v2.7.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-14 23:54:58 +00:00
Javi Martín
faa6a7d5c6 Merge pull request #4635 from consul/dependabot/bundler/master/ahoy_matey-3.2.0
Bump ahoy_matey from 1.6.0 to 3.2.0
2021-08-15 01:46:17 +02:00
Javi Martín
b5220effd1 Bump ahoy_matey from 1.6.0 to 3.2.0
Bumps [ahoy_matey](https://github.com/ankane/ahoy) from 1.6.0 to 3.2.0.
- [Release notes](https://github.com/ankane/ahoy/releases)
- [Changelog](https://github.com/ankane/ahoy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/ahoy/compare/v1.6.0...v3.2.0)

---
updated-dependencies:
- dependency-name: ahoy_matey
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-15 01:26:29 +02:00
Javi Martín
340c591822 Merge pull request #4634 from consul/dependabot/bundler/master/acts_as_votable-0.13.1
Bump acts_as_votable from 0.12.1 to 0.13.1
2021-08-14 20:23:31 +02:00
dependabot[bot]
9290b0f1fc Bump acts_as_votable from 0.12.1 to 0.13.1
Bumps [acts_as_votable](https://github.com/ryanto/acts_as_votable) from 0.12.1 to 0.13.1.
- [Release notes](https://github.com/ryanto/acts_as_votable/releases)
- [Commits](https://github.com/ryanto/acts_as_votable/compare/v0.12.1...v0.13.1)

---
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>
2021-08-14 18:02:58 +00:00
Javi Martín
29808f3ea1 Merge pull request #4622 from consul/dependabot/bundler/master/wkhtmltopdf-binary-0.12.6.5
Bump wkhtmltopdf-binary from 0.12.4 to 0.12.6.5
2021-08-14 15:47:22 +02:00
dependabot[bot]
ee567c2946 Bump wkhtmltopdf-binary from 0.12.4 to 0.12.6.5
We're also updating the WickedPdf initializer since wkhtmltopdf prevents
accessing the filesystem by default since version 0.12.6, causing image
tags generated by the `wicked_pdf_image_tag` method not to be rendered.

Bumps [wkhtmltopdf-binary](https://github.com/zakird/wkhtmltopdf_binary_gem) from 0.12.4 to 0.12.6.5.
- [Release notes](https://github.com/zakird/wkhtmltopdf_binary_gem/releases)
- [Changelog](https://github.com/zakird/wkhtmltopdf_binary_gem/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zakird/wkhtmltopdf_binary_gem/commits)

---
updated-dependencies:
- dependency-name: wkhtmltopdf-binary
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-14 15:19:09 +02:00
Javi Martín
18c6f72cb4 Merge pull request #4656 from consul/dependabot/bundler/master/ancestry-4.1.0
Bump ancestry from 3.2.1 to 4.1.0
2021-08-13 21:36:01 +02:00
dependabot[bot]
9d4c781a4c Bump ancestry from 3.2.1 to 4.1.0
Bumps [ancestry](https://github.com/stefankroes/ancestry) from 3.2.1 to 4.1.0.
- [Release notes](https://github.com/stefankroes/ancestry/releases)
- [Changelog](https://github.com/stefankroes/ancestry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefankroes/ancestry/compare/v3.2.1...v4.1.0)

---
updated-dependencies:
- dependency-name: ancestry
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 19:04:17 +00:00
Javi Martín
3033df760f Merge pull request #4651 from consul/dependabot/bundler/master/caxlsx-3.1.0
Bump caxlsx from 3.0.4 to 3.1.0
2021-08-13 16:29:27 +02:00
dependabot[bot]
e67272a974 Bump caxlsx from 3.0.4 to 3.1.0
Bumps [caxlsx](https://github.com/caxlsx/caxlsx) from 3.0.4 to 3.1.0.
- [Release notes](https://github.com/caxlsx/caxlsx/releases)
- [Changelog](https://github.com/caxlsx/caxlsx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caxlsx/caxlsx/compare/v.3.0.4...v3.1.0)

---
updated-dependencies:
- dependency-name: caxlsx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 13:53:02 +00:00
Javi Martín
98d0e9f0a4 Merge pull request #4616 from consul/dependabot/bundler/master/devise-security-0.16.0
Bump devise-security from 0.11.1 to 0.16.0
2021-08-13 15:49:18 +02:00
dependabot[bot]
ffe9ac7854 Bump devise-security from 0.11.1 to 0.16.0
Bumps [devise-security](https://github.com/devise-security/devise-security) from 0.11.1 to 0.16.0.
- [Release notes](https://github.com/devise-security/devise-security/releases)
- [Commits](https://github.com/devise-security/devise-security/compare/v0.11.1...v0.16.0)

---
updated-dependencies:
- dependency-name: devise-security
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 15:28:22 +02:00
Javi Martín
bec41c7441 Merge pull request #4637 from consul/dependabot/bundler/master/faker-2.18.0
Bump faker from 2.0 to 2.18.0
2021-08-13 05:44:15 +02:00
dependabot[bot]
13a5a5a85e Bump faker from 1.8.7 to 2.18.0
Bumps [faker](https://github.com/faker-ruby/faker) from 1.8.7 to 2.18.0.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v1.8.7...v2.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 03:00:06 +00:00
Javi Martín
24026b7bfc Merge pull request #4658 from consul/faker-2.0
Bump faker from 1.8.7 to 2.0
2021-08-13 04:58:28 +02:00
Javi Martín
102cf74b3d Bump faker from 1.8.7 to 2.0
Since version 2.0 introduced many breaking changes, we're upgrading to
it first.

The changes have been done by installing the rubocop-faker gem and
running:

```
rubocop \
  --require rubocop-faker \
  --only Faker/DeprecatedArguments \
  --auto-correct
```
2021-08-13 04:39:44 +02:00
Javi Martín
416eac284a Merge pull request #4639 from consul/dependabot/bundler/master/knapsack_pro-3.0.0
Bump knapsack_pro from 2.11.0 to 3.0.0
2021-08-13 02:45:39 +02:00
Javi Martín
28c7c5de66 Use filter_run_when_matching option in RSpec
The `run_all_when_everything_filtered` is deprecated [1].

[1] https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it#warning-dont-use-deprecated-rspec-run_all_when_everything_filtered-option
2021-08-13 01:49:08 +02:00
dependabot[bot]
ceed02eb92 Bump knapsack_pro from 2.11.0 to 3.0.0
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 2.11.0 to 3.0.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.11.0...v3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 23:40:08 +00:00
Javi Martín
e1289104ae Merge pull request #4638 from consul/dependabot/bundler/master/daemons-1.4.0
Bump daemons from 1.3.1 to 1.4.0
2021-08-13 01:21:36 +02:00
dependabot[bot]
642fb1f512 Bump daemons from 1.3.1 to 1.4.0
Bumps [daemons](https://github.com/thuehlinger/daemons) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/thuehlinger/daemons/releases)
- [Changelog](https://github.com/thuehlinger/daemons/blob/master/Releases)
- [Commits](https://github.com/thuehlinger/daemons/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: daemons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 22:59:31 +00:00
Javi Martín
8cb344992a Merge pull request #4628 from consul/dependabot/bundler/master/rollbar-3.2.0
Bump rollbar from 3.1.2 to 3.2.0
2021-08-13 00:57:22 +02:00
Javi Martín
2c57e2b2f2 Merge pull request #4627 from consul/dependabot/bundler/master/rails-5.2.6
Bump rails from 5.2.4.6 to 5.2.6
2021-08-13 00:50:04 +02:00
dependabot[bot]
6d01995895 Bump rollbar from 3.1.2 to 3.2.0
Bumps [rollbar](https://github.com/rollbar/rollbar-gem) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/rollbar/rollbar-gem/releases)
- [Changelog](https://github.com/rollbar/rollbar-gem/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollbar/rollbar-gem/compare/v3.1.2...v3.2.0)

---
updated-dependencies:
- dependency-name: rollbar
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 22:37:25 +00:00
dependabot[bot]
c45d5cd4a4 Bump rails from 5.2.4.6 to 5.2.6
Bumps [rails](https://github.com/rails/rails) from 5.2.4.6 to 5.2.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v5.2.4.6...v5.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 22:26:49 +00:00
Javi Martín
051a071cd2 Merge pull request #4626 from consul/dependabot/bundler/master/devise-4.8.0
Bump devise from 4.7.3 to 4.8.0
2021-08-13 00:25:07 +02:00