Javi Martín c5103d3025 Fix generating dashboard poster on production
In commit 905ac48bb we mentioned:

> Since we don't use `asset_path` to reference assets in the public
> folder, we can safely disable the `unknown_asset_fallback` option.

However, `asset_path` is used by the wicked_pdf gem when calling the
`wicked_pdf_stylesheet_link_tag` method. This method also checks the CSS
files, searching for `url()` calls and converting any relative URLs
referenced there to absolute URLs.

However, when compiling assets on production, our `application.css` file
contains the following line imported from Leaflet which says:

```
behavior: url(#default#VML);
```

When passing this URL to `asset_path` (which is something the wicked_pdf
gem does automatically), it doesn't find the URL, and so this call
crashes unless we enable then `unknown_asset_fallback` option.

Since the dashboard poster is a feature we might remove in the future,
we're avoiding changing a Rails global configuration just for this
feature. So, instead of enabling the `unknown_asset_fallback` option,
we're changing the `poster.pdf` view so it doesn't load all the CSS of
the application but only the CSS it needs.

Note we aren't adding a test case because this bug is only present on
production environments when assets have been precompiled.
2022-01-12 13:45:59 +01:00
2021-03-20 19:20:46 +01:00
2022-01-10 15:01:23 +01:00
2015-07-15 13:32:13 +02:00
2021-12-20 14:42:53 +01:00
2021-11-02 16:26:25 +01:00
2021-09-24 13:39:15 +02:00
2021-09-03 12:12:38 +02:00
2015-08-17 19:55:28 +02:00
2021-11-16 12:37:32 +01:00
2021-09-03 12:12:38 +02:00
2021-11-25 13:13:45 +01:00
2020-08-11 12:13:23 +02:00
2019-03-15 10:29:07 +01:00
2021-07-02 16:48:28 +02:00
2021-07-02 16:48:28 +02:00
2022-01-10 15:01:23 +01:00
2021-11-25 13:13:45 +01:00

CONSUL logo

CONSUL

Citizen Participation and Open Government Application

Build status Code Climate Coverage Status Crowdin License: AGPL v3

Accessibility conformance A11y issues checked with Rocket Validator

Join the chat at https://gitter.im/consul/consul Help wanted

Knapsack Pro Parallel CI builds for RSpec tests

This is the opensource code repository of the eParticipation website CONSUL, originally developed for the Madrid City government eParticipation website

Documentation

Check the ongoing documentation at https://docs.consulproject.org to learn more about how to start your own CONSUL fork, install it, customize it and learn to use it from an administrator/maintainer perspective.

CONSUL Project main website

You can access the main website of the project at http://consulproject.org where you can find documentation about the use of the platform, videos, and links to the community space.

Configuration for development and test environments

NOTE: For more detailed instructions check the docs

Prerequisites: install git, Ruby 2.7.4, CMake, pkg-config, shared-mime-info, Node.js and PostgreSQL (>=9.5).

git clone https://github.com/consul/consul.git
cd consul
bundle install
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
bin/rake db:create
bin/rake db:migrate
bin/rake db:dev_seed
RAILS_ENV=test rake db:setup

Run the app locally:

bin/rails s

Run the tests with:

bin/rspec

You can use the default admin user from the seeds file:

user: admin@consul.dev pass: 12345678

But for some actions like voting, you will need a verified user, the seeds file also includes one:

user: verified@consul.dev pass: 12345678

Configuration for production environments

See installer

Current state

Development started on 2015 July 15th. Code was deployed to production on 2015 september 7th to decide.madrid.es. Since then new features are added often. You can take a look at the current features at the project's website and future features at the Roadmap and open issues list.

License

Code published under AFFERO GPL v3 (see LICENSE-AGPLv3.txt)

Contributions

See CONTRIBUTING.md

Description
This is the repository for a demo instance for Nairobi County
Readme 104 MiB
Languages
Ruby 76.1%
HTML 14.6%
SCSS 5.7%
JavaScript 2.3%
Python 1.2%