Commit Graph

12756 Commits

Author SHA1 Message Date
decabeza
e0d60fc7c7 Update readme file 2019-04-01 18:21:29 +02:00
Julian Nicolas Herrero
625c15aaab Merge pull request #3416 from consul/use_3_travis_jobs
Use 3 Travis nodes for running the test suite
2019-04-01 13:53:42 +02:00
Julian Herrero
5822d250da Use 3 Travis nodes for running the test suite 2019-04-01 13:14:33 +02:00
Alberto
87b04a3d17 Merge pull request #3407 from consul/check-ballot
Update texts on check my ballot links
2019-03-28 19:20:15 +01:00
decabeza
d7bde5818e Update texts on check my ballot links 2019-03-28 17:16:15 +01:00
Javier Martín
ac58b87036 Merge pull request #3404 from consul/double_quotes
Add missing double quotes
2019-03-27 15:53:51 +01:00
Javi Martín
3e4e65ead7 Use double quotes inside ERB
We were using single quotes inside ERB code when that code was inside
HTML double quotes.
2019-03-25 14:58:54 +01:00
Javi Martín
4c35df4812 Use double quotes inside string interpolation 2019-03-25 14:58:54 +01:00
Javi Martín
d894d24bff Use double quotes in config/locales 2019-03-25 14:58:54 +01:00
Javi Martín
2b4e1cf358 Add missing double quotes
We overlooked a few single quotes while we changed thousands of them.
2019-03-25 13:22:35 +01:00
Julian Nicolas Herrero
1b76a34074 Merge pull request #3402 from consul/include_default_custom_pages_in_dev_seeds
Include default custom pages in developers seed
2019-03-22 17:38:42 +01:00
Julian Nicolas Herrero
9cfd3c70be Merge pull request #3385 from consul/welcome_page_not_logged_in_user
Require logged in user if navigate to /welcome
2019-03-22 17:35:29 +01:00
Alberto
ecd4a8a7b7 Merge pull request #3399 from consul/min-age-to-participate
Use min age to participate setting on verification residence form
2019-03-22 17:09:30 +01:00
decabeza
21c6da3767 Use min age to participate setting on verification residence form 2019-03-22 16:15:48 +01:00
Javier Martín
6593bc056a Merge pull request #3401 from consul/backport-remove_obsolete_rake_tasks
Remove obsolete rake tasks
2019-03-22 14:08:42 +01:00
Javi Martín
9d6bd7e788 Remove obsolete rake tasks
These tasks dealt with data migrations or stats generations which were
done only once, so we don't need them anymore.

New CONSUL installations don't need these tasks, and existing CONSUL
installations will execute them when upgrading one release at a time.
2019-03-22 13:07:09 +01:00
Julian Herrero
8e5e757b00 Include default custom pages in developers seed 2019-03-22 12:29:42 +01:00
Javier Martín
7d472b747e Merge pull request #3400 from consul/fix_processes_order
Fix legislation process feed order
2019-03-22 11:14:26 +01:00
Javi Martín
58816aef5f Fix legislation process feed order
We need to add an ORDER BY clause; not doing so was causing different
processes to show up sometimes. As mentioned in the PostgreSQL manual:

> Because the order of the rows in the database table is unpredictable,
> when you use the LIMIT clause, you should always use the ORDER BY
> clause to control the order of rows. If you don’t do so, you will get
> an unpredictable result set.
2019-03-21 17:12:03 +01:00
Alberto
b36e102d01 Merge pull request #3396 from consul/proposals-rake
Add rake to move external_url to description
2019-03-21 16:04:37 +01:00
decabeza
ab8f04a71e Add updated_at to proposals rake 2019-03-21 14:15:07 +01:00
decabeza
832f0c40a8 Add rake to move external_url to description
This rake move this field for Proposals and Legislation proposals.
2019-03-21 14:14:50 +01:00
Javier Martín
1fb110259e Merge pull request #3380 from consul/backport-rubocop_files
Enable rubocop rules in config and seed files
2019-03-20 15:36:26 +01:00
Javier Martín
3347776a65 Merge pull request #3379 from consul/backport-erb_lint
Add ERB Lint configuration file
2019-03-20 15:36:00 +01:00
Javi Martín
f30afab9e3 Add ERB Lint configuration file
The rubocop linter cannot use the `rubocop_config` option because it's
not compatible with Ruby 2.3. So we're setting the rubocop rules
manually.
2019-03-20 14:35:40 +01:00
Javi Martín
002599231f Enable rubocop rules in config and seed files
We were unintentionally ignoring them while trying to ignore just the
schema file, migration files, and initializers generated with `rails
generate`
2019-03-20 14:34:04 +01:00
Javier Martín
0fd9570ea8 Merge pull request #3384 from consul/backport-simplify_poll_factories
Simplify poll factories
2019-03-20 14:32:47 +01:00
Julian Nicolas Herrero
f4de8fd42a Merge pull request #3387 from consul/admin_settings_improvement
Improve Admin settings section
2019-03-20 11:10:02 +01:00
Julian Herrero
e04fd74cf1 Add rake task to rename existing setting keys 2019-03-19 19:45:34 +01:00
Julian Herrero
4df9a1a1b4 Move HTML settings to content blocks settings page
- Rename html settings keys
- Show html settings next to content blocks page
- Hide html settings from configuration tab
2019-03-19 19:45:34 +01:00
Julian Herrero
89d4ea5aa3 Remove homepage widget settings from configuration tab
- Rename homepage widget settings keys
2019-03-19 19:45:34 +01:00
Julian Herrero
c82b2a975a Add new settings tab for participation processes
- Rename setting keys
- New tab por participation processes
- Hide these settings from features tab
2019-03-19 19:45:32 +01:00
Julian Herrero
1ece761beb Render map properly when changing between setting tabs 2019-03-19 18:14:57 +01:00
Julian Herrero
dbac4bc222 Change admin settings tab for maps
- Rename map settings keys
- Add fields for latitude, longitude and zoom
- Add a callout message on how to enable map feature
2019-03-19 18:14:57 +01:00
Julian Herrero
c0d2776e8d Refactor Admin settings tabs
- Rename partial views for tabs.
- Extract tables settings to reuse across the tabs.
2019-03-19 18:14:55 +01:00
Julian Herrero
9ed6aae348 Refactor Setting model
- Make easier to group settings by using prefixes
- Add method to rename setting keys
- Add method to remove setting keys
2019-03-19 15:14:08 +01:00
Julian Herrero
8ae80cd1a1 Cleanup (remove unnecessary code) 2019-03-19 15:11:50 +01:00
Julian Herrero
27553e9058 Move setting next to similar/related settings 2019-03-19 15:11:30 +01:00
Julian Herrero
511f0be287 Require logged in user if navigate to /welcome 2019-03-19 14:55:51 +01:00
Julian Nicolas Herrero
8d83e70ef4 Merge pull request #3369 from consul/double_quotes_for_views
Change single quotes to double quotes for views
2019-03-19 14:34:53 +01:00
Javi Martín
b3a8924fe0 Don't create an officer for poll voter factories
For web poll voters, it isn't necessary in order to make the record
valid, and it adds an extra record to the database for each poll
voter created.
2019-03-19 13:29:45 +01:00
Javi Martín
d69adbccb7 Avoid creating extra poll records in tests
The line:

create(:poll_voter, booth_assignment: booth_assignment_final_recounted)

Creates a new poll for the poll voter. Not only it wastes time by
creating new database records, but it doesn't make sense to have a poll
voter for a poll which isn't the same as its booth assignment's poll.
2019-03-19 13:29:45 +01:00
Javi Martín
8118926ba7 Simplify tests creating poll voters 2019-03-19 13:29:43 +01:00
Javi Martín
4a3115607a Simplify poll stats test
Adding the option to assign a poll to a poll recount factory meant we
didn't need to create so much data.

Also note we're removing the `create(:poll_voter, origin: "booth")`
code, since it isn't used in the stats calculations.
2019-03-19 13:24:24 +01:00
Javi Martín
4830b563ea Create only one poll for a poll voter
The factories were creating strange database relations:

* The voter belonged to a poll, to a booth and to an officer
* The booth belonged to a different poll
* The officer belonged to a different booth

The code uses an unusual syntax because the following code:

association :booth_assignment,
            factory: :poll_booth_assignment,
            poll: poll

Would generate the following error:

ActiveRecord::AssociationTypeMismatch: Poll(#46976420451940) expected,
got FactoryBot::Declaration::Implicit
2019-03-19 13:19:24 +01:00
Javi Martín
b05ea2964c Simplify poll voter factory associations 2019-03-19 13:19:24 +01:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
Julian Nicolas Herrero
d83bf940be Merge pull request #3370 from consul/double_quoutes_everywhere
Change single quotes to double quotes everywhere
2019-03-19 12:20:16 +01:00
Julian Herrero
dbe99f058e Use double quotes in app/views/shared 2019-03-19 12:16:50 +01:00
Julian Herrero
7fe6285fe3 Use double quotes in app/views/proposals 2019-03-19 12:16:50 +01:00