├── .gitignore ├── .gitbook.yaml ├── img ├── consul_logo.png ├── digital_ocean │ ├── size.png │ ├── create.png │ ├── image.png │ ├── region.png │ ├── server.png │ ├── droplets.png │ ├── hostname.png │ ├── new_ssh.png │ └── ssh_keys.png ├── graphql │ ├── graphiql.png │ ├── graphql-postman-get.png │ ├── graphql-postman-post-body.png │ └── graphql-postman-post-headers.png ├── multitenancy │ ├── form-en.png │ ├── form-es.png │ ├── index-en.png │ ├── index-es.png │ ├── email-settings-en.png │ └── email-settings-es.png ├── mailserver │ ├── development.rb.png │ ├── mailgun-domains.png │ ├── mailgun-sandbox.png │ └── mailgun-create-account.png ├── remote_census │ ├── request-data-en.png │ ├── request-data-es.png │ ├── response-data-en.png │ ├── response-data-es.png │ ├── feature-disabled-en.png │ ├── feature-disabled-es.png │ ├── feature-enabled-en.png │ ├── feature-enabled-es.png │ ├── request-data-structure-en.png │ ├── request-data-structure-es.png │ ├── response-data-path-name-en.png │ ├── response-data-path-name-es.png │ ├── request-data-method-name-en.png │ ├── request-data-method-name-es.png │ ├── response-data-path-gender-en.png │ ├── response-data-path-gender-es.png │ ├── general-information-endpoint-en.png │ ├── general-information-endpoint-es.png │ ├── request-data-structure-info-en.png │ ├── request-data-structure-info-es.png │ ├── response-data-path-district-en.png │ ├── response-data-path-district-es.png │ ├── response-data-path-last-name-en.png │ ├── response-data-path-last-name-es.png │ ├── request-data-path-date-of-birth-en.png │ ├── request-data-path-date-of-birth-es.png │ ├── request-data-path-document-type-en.png │ ├── request-data-path-document-type-es.png │ ├── request-data-path-postal-code-en.png │ ├── request-data-path-postal-code-es.png │ ├── response-data-path-postal-code-en.png │ ├── response-data-path-postal-code-es.png │ ├── request-data-path-document-number-en.png │ ├── request-data-path-document-number-es.png │ ├── response-data-path-date-of-birth-en.png │ ├── response-data-path-date-of-birth-es.png │ ├── response-data-path-valid-response-en.png │ └── response-data-path-valid-response-es.png ├── local_census │ ├── manage-local-census-en.png │ ├── manage-local-census-es.png │ ├── add-local-census-record-en.png │ ├── add-local-census-record-es.png │ ├── manage-local-census-csv-en.png │ ├── manage-local-census-csv-es.png │ ├── add-local-census-records-csv-en.png │ └── add-local-census-records-csv-es.png ├── recommendations │ ├── recommendations_no_follows.jpg │ ├── recommendations_follow_button.jpg │ ├── recommendations_not_logged_in.jpg │ └── recommendations_with_follows.jpg └── translations │ ├── remote_translations │ ├── add-api-key-to-secrets.png │ ├── display-text-and-button-en.png │ ├── display-text-and-button-es.png │ ├── active-remote-translations-en.png │ ├── active-remote-translations-es.png │ ├── display-translated-content-en.png │ ├── display-translated-content-es.png │ ├── display-text-translations-pending-en.png │ ├── display-text-translations-pending-es.png │ ├── display-notice-and-text-after-enqueued-en.png │ └── display-notice-and-text-after-enqueued-es.png │ └── interface_translations │ ├── active-interface-translations-en.png │ ├── active-interface-translations-es.png │ ├── translations-interface-disabled-en.png │ ├── translations-interface-disabled-es.png │ ├── translations-interface-enabled-en.png │ └── translations-interface-enabled-es.png ├── en ├── open_source │ ├── open_source.md │ ├── code_of_conduct.md │ └── contributing.md ├── book.json ├── installation │ ├── prerequisites.md │ ├── installer.md │ ├── windows.md │ ├── servers.md │ ├── generating_ssh_key.md │ ├── introduction.md │ ├── documentation_and_guides.md │ ├── vagrant.md │ ├── mail_server_configuration.md │ ├── local_installation.md │ ├── create_deploy_user.md │ ├── ubuntu.md │ ├── manual_installation_production.md │ ├── digital_ocean.md │ ├── macos.md │ ├── using-aws-s3-as-storage.md │ ├── debian.md │ ├── docker.md │ ├── deploying-on-heroku.md │ └── basic_configuration.md ├── getting_started │ ├── getting_started.md │ ├── configuration.md │ ├── communication.md │ ├── create.md │ └── update.md ├── features │ ├── features.md │ ├── oauth.md │ ├── local_census.md │ ├── recommendations.md │ └── globalize.md ├── customization │ ├── customization.md │ ├── gems.md │ ├── javascript.md │ ├── overwriting.md │ ├── components.md │ ├── images.md │ ├── views_and_styles.md │ ├── models.md │ └── translations.md └── README.md ├── es ├── open_source │ ├── open_source.md │ ├── code_of_conduct.md │ └── contributing.md ├── book.json ├── installation │ ├── prerequisites.md │ ├── installer.md │ ├── windows.md │ ├── servers.md │ ├── generating_ssh_key.md │ ├── introduction.md │ ├── documentation_and_guides.md │ ├── vagrant.md │ ├── mail_server_configuration.md │ ├── local_installation.md │ ├── create_deploy_user.md │ ├── ubuntu.md │ ├── manual_installation_production.md │ ├── digital_ocean.md │ ├── macos.md │ ├── debian.md │ ├── docker.md │ └── deploying-on-heroku.md ├── getting_started │ ├── getting_started.md │ ├── configuration.md │ ├── communication.md │ ├── create.md │ └── update.md ├── features │ ├── features.md │ ├── oauth.md │ ├── local_census.md │ ├── recommendations.md │ └── globalize.md ├── customization │ ├── customization.md │ ├── gems.md │ ├── javascript.md │ ├── overwriting.md │ ├── components.md │ ├── images.md │ ├── views_and_styles.md │ ├── models.md │ └── translations.md └── README.md ├── .mdlrc ├── README.md └── SUMMARY.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | _book/**/* 3 | -------------------------------------------------------------------------------- /.gitbook.yaml: -------------------------------------------------------------------------------- 1 | root: ./ 2 | 3 | structure: 4 | readme: README.md 5 | summary: SUMMARY.md 6 | -------------------------------------------------------------------------------- /img/consul_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/consul_logo.png -------------------------------------------------------------------------------- /img/digital_ocean/size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/size.png -------------------------------------------------------------------------------- /img/graphql/graphiql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/graphql/graphiql.png -------------------------------------------------------------------------------- /img/digital_ocean/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/create.png -------------------------------------------------------------------------------- /img/digital_ocean/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/image.png -------------------------------------------------------------------------------- /img/digital_ocean/region.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/region.png -------------------------------------------------------------------------------- /img/digital_ocean/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/server.png -------------------------------------------------------------------------------- /img/multitenancy/form-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/form-en.png -------------------------------------------------------------------------------- /img/multitenancy/form-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/form-es.png -------------------------------------------------------------------------------- /img/digital_ocean/droplets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/droplets.png -------------------------------------------------------------------------------- /img/digital_ocean/hostname.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/hostname.png -------------------------------------------------------------------------------- /img/digital_ocean/new_ssh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/new_ssh.png -------------------------------------------------------------------------------- /img/digital_ocean/ssh_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/digital_ocean/ssh_keys.png -------------------------------------------------------------------------------- /img/multitenancy/index-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/index-en.png -------------------------------------------------------------------------------- /img/multitenancy/index-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/index-es.png -------------------------------------------------------------------------------- /img/mailserver/development.rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/mailserver/development.rb.png -------------------------------------------------------------------------------- /img/graphql/graphql-postman-get.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/graphql/graphql-postman-get.png -------------------------------------------------------------------------------- /img/mailserver/mailgun-domains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/mailserver/mailgun-domains.png -------------------------------------------------------------------------------- /img/mailserver/mailgun-sandbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/mailserver/mailgun-sandbox.png -------------------------------------------------------------------------------- /img/multitenancy/email-settings-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/email-settings-en.png -------------------------------------------------------------------------------- /img/multitenancy/email-settings-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/multitenancy/email-settings-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-es.png -------------------------------------------------------------------------------- /img/graphql/graphql-postman-post-body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/graphql/graphql-postman-post-body.png -------------------------------------------------------------------------------- /img/mailserver/mailgun-create-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/mailserver/mailgun-create-account.png -------------------------------------------------------------------------------- /img/remote_census/feature-disabled-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/feature-disabled-en.png -------------------------------------------------------------------------------- /img/remote_census/feature-disabled-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/feature-disabled-es.png -------------------------------------------------------------------------------- /img/remote_census/feature-enabled-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/feature-enabled-en.png -------------------------------------------------------------------------------- /img/remote_census/feature-enabled-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/feature-enabled-es.png -------------------------------------------------------------------------------- /en/open_source/open_source.md: -------------------------------------------------------------------------------- 1 | # Open Source project 2 | 3 | * [Code of conduct](code_of_conduct.md) 4 | * [Contributing](contributing.md) 5 | -------------------------------------------------------------------------------- /img/local_census/manage-local-census-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/manage-local-census-en.png -------------------------------------------------------------------------------- /img/local_census/manage-local-census-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/manage-local-census-es.png -------------------------------------------------------------------------------- /es/open_source/open_source.md: -------------------------------------------------------------------------------- 1 | # Open Source project 2 | 3 | * [Código de conducta](code_of_conduct.md) 4 | * [Contribuciones](contributing.md) 5 | -------------------------------------------------------------------------------- /img/graphql/graphql-postman-post-headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/graphql/graphql-postman-post-headers.png -------------------------------------------------------------------------------- /img/local_census/add-local-census-record-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/add-local-census-record-en.png -------------------------------------------------------------------------------- /img/local_census/add-local-census-record-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/add-local-census-record-es.png -------------------------------------------------------------------------------- /img/local_census/manage-local-census-csv-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/manage-local-census-csv-en.png -------------------------------------------------------------------------------- /img/local_census/manage-local-census-csv-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/manage-local-census-csv-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-structure-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-structure-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-structure-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-structure-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-name-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-name-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-name-es.png -------------------------------------------------------------------------------- /img/recommendations/recommendations_no_follows.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/recommendations/recommendations_no_follows.jpg -------------------------------------------------------------------------------- /img/remote_census/request-data-method-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-method-name-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-method-name-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-method-name-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-gender-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-gender-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-gender-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-gender-es.png -------------------------------------------------------------------------------- /img/local_census/add-local-census-records-csv-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/add-local-census-records-csv-en.png -------------------------------------------------------------------------------- /img/local_census/add-local-census-records-csv-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/local_census/add-local-census-records-csv-es.png -------------------------------------------------------------------------------- /img/recommendations/recommendations_follow_button.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/recommendations/recommendations_follow_button.jpg -------------------------------------------------------------------------------- /img/recommendations/recommendations_not_logged_in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/recommendations/recommendations_not_logged_in.jpg -------------------------------------------------------------------------------- /img/recommendations/recommendations_with_follows.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/recommendations/recommendations_with_follows.jpg -------------------------------------------------------------------------------- /img/remote_census/general-information-endpoint-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/general-information-endpoint-en.png -------------------------------------------------------------------------------- /img/remote_census/general-information-endpoint-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/general-information-endpoint-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-structure-info-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-structure-info-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-structure-info-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-structure-info-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-district-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-district-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-district-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-district-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-last-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-last-name-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-last-name-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-last-name-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-date-of-birth-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-date-of-birth-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-date-of-birth-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-date-of-birth-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-document-type-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-document-type-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-document-type-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-document-type-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-postal-code-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-postal-code-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-postal-code-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-postal-code-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-postal-code-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-postal-code-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-postal-code-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-postal-code-es.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-document-number-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-document-number-en.png -------------------------------------------------------------------------------- /img/remote_census/request-data-path-document-number-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/request-data-path-document-number-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-date-of-birth-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-date-of-birth-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-date-of-birth-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-date-of-birth-es.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-valid-response-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-valid-response-en.png -------------------------------------------------------------------------------- /img/remote_census/response-data-path-valid-response-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/remote_census/response-data-path-valid-response-es.png -------------------------------------------------------------------------------- /en/book.json: -------------------------------------------------------------------------------- 1 | { 2 | "gitbook": ">= 3.0.0", 3 | "title": "Consul Democracy Documentation", 4 | "description": "Citizen Participation and Open Government Application" 5 | } 6 | -------------------------------------------------------------------------------- /es/book.json: -------------------------------------------------------------------------------- 1 | { 2 | "gitbook": ">= 3.0.0", 3 | "title": "Documentación Consul Democracy", 4 | "description": "Aplicación de Gobierno Abierto y Participación Ciudadana" 5 | } 6 | -------------------------------------------------------------------------------- /img/translations/remote_translations/add-api-key-to-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/add-api-key-to-secrets.png -------------------------------------------------------------------------------- /en/installation/prerequisites.md: -------------------------------------------------------------------------------- 1 | # Prerequisites Installation 2 | 3 | * [Ubuntu Linux](ubuntu.md) 4 | * [Debian Linux](debian.md) 5 | * [MacOS](macos.md) 6 | * [Windows](windows.md) 7 | -------------------------------------------------------------------------------- /es/installation/prerequisites.md: -------------------------------------------------------------------------------- 1 | # Instalación de Prerrequisitos 2 | 3 | * [Ubuntu Linux](ubuntu.md) 4 | * [Debian Linux](debian.md) 5 | * [MacOS](macos.md) 6 | * [Windows](windows.md) 7 | -------------------------------------------------------------------------------- /img/translations/remote_translations/display-text-and-button-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-text-and-button-en.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-text-and-button-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-text-and-button-es.png -------------------------------------------------------------------------------- /img/translations/remote_translations/active-remote-translations-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/active-remote-translations-en.png -------------------------------------------------------------------------------- /img/translations/remote_translations/active-remote-translations-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/active-remote-translations-es.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-translated-content-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-translated-content-en.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-translated-content-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-translated-content-es.png -------------------------------------------------------------------------------- /en/installation/installer.md: -------------------------------------------------------------------------------- 1 | # Installer 2 | 3 | ## Installation notes for Production and Staging servers 4 | 5 | Check out the [installer's README](https://github.com/consuldemocracy/installer). 6 | -------------------------------------------------------------------------------- /en/installation/windows.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | Windows is not yet officially supported. Please install [Virtual Box](https://www.virtualbox.org/) to setup a virtual machine in [Linux](prerequisites.md). 4 | -------------------------------------------------------------------------------- /img/translations/interface_translations/active-interface-translations-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/active-interface-translations-en.png -------------------------------------------------------------------------------- /img/translations/interface_translations/active-interface-translations-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/active-interface-translations-es.png -------------------------------------------------------------------------------- /img/translations/interface_translations/translations-interface-disabled-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/translations-interface-disabled-en.png -------------------------------------------------------------------------------- /img/translations/interface_translations/translations-interface-disabled-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/translations-interface-disabled-es.png -------------------------------------------------------------------------------- /img/translations/interface_translations/translations-interface-enabled-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/translations-interface-enabled-en.png -------------------------------------------------------------------------------- /img/translations/interface_translations/translations-interface-enabled-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/interface_translations/translations-interface-enabled-es.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-text-translations-pending-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-text-translations-pending-en.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-text-translations-pending-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-text-translations-pending-es.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-notice-and-text-after-enqueued-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-notice-and-text-after-enqueued-en.png -------------------------------------------------------------------------------- /img/translations/remote_translations/display-notice-and-text-after-enqueued-es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/consuldemocracy/docs/HEAD/img/translations/remote_translations/display-notice-and-text-after-enqueued-es.png -------------------------------------------------------------------------------- /es/installation/installer.md: -------------------------------------------------------------------------------- 1 | # Instalador 2 | 3 | ## Instrucciones de instalación para entornos de Producción y Pruebas 4 | 5 | Se encuentran en el [repositorio del instalador](https://github.com/consuldemocracy/installer) 6 | -------------------------------------------------------------------------------- /en/getting_started/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | * [Fork Consul Democracy](create.md) 4 | * [Configure your fork](configuration.md) 5 | * [Keep your fork updated](update.md) 6 | * [Communication](communication.md) 7 | -------------------------------------------------------------------------------- /es/getting_started/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | * [Fork Consul Democracy](create.md) 4 | * [Configure your fork](configuration.md) 5 | * [Keep your fork updated](update.md) 6 | * [Communication](communication.md) 7 | -------------------------------------------------------------------------------- /es/installation/windows.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | De momento Windows no es un sistema operativo compatible. Por favor instale [Virtual Box](https://www.virtualbox.org/) para crear una máquina virtual en [Linux](prerequisites.md). 4 | -------------------------------------------------------------------------------- /en/features/features.md: -------------------------------------------------------------------------------- 1 | # Technical Features 2 | 3 | * [OAuth](oauth.md) 4 | * [GraphQL](graphql.md) 5 | * [Recommendations](recommendations.md) 6 | * [Configure Census Connection](census_configuration.md) 7 | * [Local Census](local_census.md) 8 | -------------------------------------------------------------------------------- /es/features/features.md: -------------------------------------------------------------------------------- 1 | # Funcionalidades Técnicas 2 | 3 | * [OAuth](oauth.md) 4 | * [GraphQL](graphql.md) 5 | * [Recomendaciones](recommendations.md) 6 | * [Configurar conexión con el Censo](census_configuration.md) 7 | * [Censo Local](local_census.md) 8 | -------------------------------------------------------------------------------- /.mdlrc: -------------------------------------------------------------------------------- 1 | rules "MD001", "MD002", "MD003", "MD004", "MD005", "MD006", "MD007", "MD008", "MD009", "MD010", "MD011", "MD012", "MD014", "MD015", "MD016", "MD017", "MD018", "MD019", "MD020", "MD021", "MD022", "MD023", "MD025", "MD026", "MD027", "MD028", "MD030", "MD031", "MD032", "MD033", "MD034", "MD035", "MD036", "MD037", "MD038", "MD039", "MD040", "MD041" 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Consul Democracy documentation 2 | 3 | :warning: The technical documentation has been moved to the [Consul Democracy documentation site](https://docs.consuldemocracy.org/). This repository is now read-only, since now the changes to the documentation are handled by editing the texts on that site. 4 | 5 | ![CONSUL DEMOCRACY logo](img/consul_logo.png) 6 | -------------------------------------------------------------------------------- /en/customization/customization.md: -------------------------------------------------------------------------------- 1 | # Customization 2 | 3 | * [Introduction](introduction.md) 4 | * [Translations and Texts](translations.md) 5 | * [Images](images.md) 6 | * [Views and Styles](views_and_styles.md) 7 | * [Javascript](javascript.md) 8 | * [Models](models.md) 9 | * [Components](components.md) 10 | * [Gems](gems.md) 11 | * [Overwriting Application](overwriting.md) 12 | -------------------------------------------------------------------------------- /es/customization/customization.md: -------------------------------------------------------------------------------- 1 | # Customization 2 | 3 | * [Introducción](introduction.md) 4 | * [Traducciones y Textos](translations.md) 5 | * [Imágenes](images.md) 6 | * [Vistas y Estilos](views_and_styles.md) 7 | * [Javascript](javascript.md) 8 | * [Modelos](models.md) 9 | * [Componentes](components.md) 10 | * [Gemas](gems.md) 11 | * [Adaptar la aplicación](overwriting.md) 12 | -------------------------------------------------------------------------------- /en/customization/gems.md: -------------------------------------------------------------------------------- 1 | # Gemfile 2 | 3 | To add new gems (libraries) you can edit the `Gemfile_custom` file. For example to add [rails-footnotes](https://github.com/josevalim/rails-footnotes) gem you would just add: 4 | 5 | ```ruby 6 | gem 'rails-footnotes', '~> 4.0' 7 | ``` 8 | 9 | And then just do the classic Ruby on Rails flow `bundle install` and following any gem specific install steps from it's own documentation. 10 | -------------------------------------------------------------------------------- /es/customization/gems.md: -------------------------------------------------------------------------------- 1 | # Gemfile 2 | 3 | Para agregar librerías (gems) nuevas puedes hacerlo en el fichero `Gemfile_custom`. Por ejemplo si quieres agregar la gema [rails-footnotes](https://github.com/josevalim/rails-footnotes) debes hacerlo agregandole 4 | 5 | ```ruby 6 | gem 'rails-footnotes', '~> 4.0' 7 | ``` 8 | 9 | Y siguiendo el flujo clásico en Ruby on Rails (`bundle install` y seguir con los pasos específicos de la gema en la documentación) 10 | -------------------------------------------------------------------------------- /en/customization/javascript.md: -------------------------------------------------------------------------------- 1 | # Javascript 2 | 3 | If you want to add some custom Javascript code, `app/assets/javascripts/custom.js` is the file to do it. For example to create a new alert just add: 4 | 5 | ```js 6 | $(function(){ 7 | alert('foobar'); 8 | }); 9 | ``` 10 | 11 | If you work with Coffeescript code you can check it with [coffeelint](http://www.coffeelint.org/) (install with `npm install -g coffeelint`) : 12 | 13 | ```bash 14 | coffeelint . 15 | ``` 16 | -------------------------------------------------------------------------------- /es/customization/javascript.md: -------------------------------------------------------------------------------- 1 | # Javascript 2 | 3 | Si quieres agregar código Javascript puedes hacerlo en el fichero `app/assets/javascripts/custom.js`. Por ejemplo si quieres que salga una alerta puedes poner lo siguiente: 4 | 5 | ```js 6 | $(function(){ 7 | alert('foobar'); 8 | }); 9 | ``` 10 | 11 | Si trabajas con código coffeescript puedes revisarlo con [coffeelint](http://www.coffeelint.org/) (instalalo con `npm install -g coffeelint`) : 12 | 13 | ```bash 14 | coffeelint . 15 | ``` 16 | -------------------------------------------------------------------------------- /en/customization/overwriting.md: -------------------------------------------------------------------------------- 1 | # Overwriting application.rb 2 | 3 | If you need to extend or modify the `config/application.rb` just do it at the `config/application_custom.rb` file. For example if you want to change de default language to English, just add: 4 | 5 | ```ruby 6 | module Consul 7 | class Application < Rails::Application 8 | config.i18n.default_locale = :en 9 | config.i18n.available_locales = [:en, :es] 10 | end 11 | end 12 | ``` 13 | 14 | Remember that in order to see this changes live you'll need to restart the server. 15 | -------------------------------------------------------------------------------- /es/customization/overwriting.md: -------------------------------------------------------------------------------- 1 | # Adaptar application.rb 2 | 3 | Cuando necesites extender o modificar el `config/application.rb` puedes hacerlo a través del fichero `config/application_custom.rb`. Por ejemplo si quieres modificar el idioma por defecto al inglés pondrías lo siguiente: 4 | 5 | ```ruby 6 | module Consul 7 | class Application < Rails::Application 8 | config.i18n.default_locale = :en 9 | config.i18n.available_locales = [:en, :es] 10 | end 11 | end 12 | ``` 13 | 14 | Recuerda que para ver reflejado estos cambios debes reiniciar el servidor de desarrollo. 15 | -------------------------------------------------------------------------------- /en/installation/servers.md: -------------------------------------------------------------------------------- 1 | # Production and Staging servers 2 | 3 | ## Recommended Minimum System Requirements 4 | 5 | ### 1. Production Server 6 | 7 | - Distribution: Ubuntu 16.04.X 8 | - RAM: 32GB 9 | - Processor: Quad core 10 | - Hard Drive: 20 GB 11 | - Database: Postgres 12 | 13 | ### 2. Staging Server 14 | 15 | - Distribution: Ubuntu 16.04.X 16 | - RAM: 16GB 17 | - Processor: Dual core 18 | - Hard Drive: 20 GB 19 | - Database: Postgres 20 | 21 | If your city has a population of over 1.000.000, consider balancing your load using 2-3 production servers and a separate server for the database. 22 | -------------------------------------------------------------------------------- /es/installation/servers.md: -------------------------------------------------------------------------------- 1 | # Servidores de producción y pruebas 2 | 3 | ## Requisitos de sistema mínimos recomendados 4 | 5 | ### 1. Production Server 6 | 7 | - Distrubution: Ubuntu 16.04.X 8 | - RAM: 32GB 9 | - Processor: Quad core 10 | - Hard Drive: 20 GB 11 | - Database: Postgres 12 | 13 | ### 2. Staging Server 14 | 15 | - Distrubution: Ubuntu 16.04.X 16 | - RAM: 16GB 17 | - Processor: Dual core 18 | - Hard Drive: 20 GB 19 | - Database: Postgres 20 | 21 | Si tu ciudad tiene una población superior a 1.000.000, considera añadir un balanceador de carga y usar 2-3 servidores de producción, además de un servidor de base de datos dedicado. 22 | -------------------------------------------------------------------------------- /en/installation/generating_ssh_key.md: -------------------------------------------------------------------------------- 1 | # Generating your SSH keys 2 | 3 | These instructions will help you generate a public key with which you can connect to the server without using a password. 4 | 5 | In the terminal window, type: 6 | 7 | ``` 8 | ssh-keygen 9 | ``` 10 | 11 | When prompted for the file in which to save the key just press ENTER to leave the default. When prompted for a passphrase, just press ENTER again to leave this empty. At the end you should see a message like this: 12 | 13 | ``` 14 | Your identification has been saved in /your_home/.ssh/id_rsa.
 15 | Your public key has been saved in /your_home/.ssh/id_rsa.pub. 16 | ``` 17 | 18 | Take note of the **id_rsa.pub** file location, because you’ll need the content of this file later. 19 | -------------------------------------------------------------------------------- /en/installation/introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | These are our recommendations for the different environments and purposes: 4 | 5 | - To setup Consul Democracy for a production environment we recommend using the [installer](https://github.com/consuldemocracy/installer). 6 | 7 | - For developers working on a Consul Democracy fork we recommend using a UNIX based system (Linux or Mac) and installing Consul Democracy [locally system wide](local_installation.md). 8 | 9 | - If you run into problems configuring Consul Democracy locally system wide and would like to show Consul Democracy for demo purposes we recommend using [Docker](docker.md) in a local machine. 10 | 11 | - We also have a [Heroku guide](deploying-on-heroku.md) which can be used for demo purposes in a remote server. 12 | -------------------------------------------------------------------------------- /es/installation/generating_ssh_key.md: -------------------------------------------------------------------------------- 1 | # Generación de claves SSH 2 | 3 | Estas instrucciones le ayudarán a generar una clave pública con la que podrá conectarse al servidor sin necesidad de utilizar una contraseña. 4 | 5 | En la ventana del terminal, escriba: 6 | 7 | ``` 8 | ssh-keygen 9 | ``` 10 | 11 | Cuando se le pida el archivo en el que guardar la clave, sólo tiene que pulsar ENTER para dejar el valor predeterminado. Cuando se le pida una frase de contraseña, pulse ENTER de nuevo para dejarla vacía. Al final debería ver un mensaje como este: 12 | 13 | ``` 14 | Your identification has been saved in /your_home/.ssh/id_rsa.
 15 | Your public key has been saved in /your_home/.ssh/id_rsa.pub. 16 | ``` 17 | 18 | Tome nota de la ubicación del archivo **id_rsa.pub**, porque necesitará el contenido de este archivo más adelante. 19 | -------------------------------------------------------------------------------- /es/installation/introduction.md: -------------------------------------------------------------------------------- 1 | # Introducción 2 | 3 | Estas son nuestras recomendaciones para los diferentes entornos y propósitos: 4 | 5 | - Para configurar Consul Democracy para un entorno de producción, recomendamos utilizar el [instalador](https://github.com/consuldemocracy/installer). 6 | 7 | - Para los programadores que trabajan en un entorno de desarrollo, recomendamos instalar Consul Democracy en un sistema basado en UNIX (Linux o Mac) y hacer una [instalación local](local_installation.md) de Consul Democracy. 8 | 9 | - Si tienes problemas para hacer una instalación local y deseas mostrar Consul Democracy para fines de demostración, te recomendamos que utilices [Docker](docker.md) en tu ordenador personal. 10 | 11 | - También tenemos una [Guía Heroku](deploying-on-heroku.md) que se puede utilizar para fines de demostración en un servidor remoto. 12 | -------------------------------------------------------------------------------- /en/installation/documentation_and_guides.md: -------------------------------------------------------------------------------- 1 | # Consul Democracy Documentation and guides 2 | 3 | There are several guides where you can read very detailed information about Consul Democracy and its possibilities. You can find them all at: 4 | 5 | - **Consul Democracy Use Guide**. In this guide you can see different ways to use Consul Democracy and examples of participation processes. 6 | - **Consul Democracy Administration Guide**. This guide contains detailed information on the administration and management of Consul Democracy. 7 | - **Consul Democracy Communication Guide**. This guide can give you an initial idea of how to plan communication campaigns to invite people to use your Consul Democracy platform. Communication is a key issue in getting relevant participation and engagement. 8 | 9 | In addition to these guides you can access the [Consul Democracy Community](http://community.consulproject.org/), a discussion space to share more documentation, questions, learning, etc. 10 | -------------------------------------------------------------------------------- /es/installation/documentation_and_guides.md: -------------------------------------------------------------------------------- 1 | # Documentación y guías sonbre Consul Democracy 2 | 3 | Hay diversas guías donde puedes leer información muy detallada sobre Consul Democracy y sus posibilidades. Puedes encontrarlas todas en: 4 | 5 | - **Guía de uso de Consul Democracy**. En esta guía puedes ver las diferentes maneras de usar Consul Democracy y ejemplos de procesos de participación. 6 | - **Guía de administración de Consul Democracy**. Esta guía contiene información detallada sobre la administración y gestión de Consul Democracy. 7 | - **Guía de comunicación de Consul Democracy**. Esta guía te puede ofrecer una idea inicial de cómo planear campañas de comunicación para invitar a la gente a usar tu instalación de Consul Democracy. La comunicación es una cuestión clave a la hora de conseguir una participación relevante. 8 | 9 | Además de estas guías puedes acceder a la [Comunidad Consul Democracy](http://community.consulproject.org/), un espacio de debate para compartir más documentación, dudas, aprendizajes, etc. 10 | -------------------------------------------------------------------------------- /en/getting_started/configuration.md: -------------------------------------------------------------------------------- 1 | # Configure your fork 2 | 3 | ## Travis CI 4 | 5 | [Travis](https://travis-ci.org/) is a Continuous Integration service, free for OpenSource projects (like Consul Democracy and its forks). It will help you check on each Pull Request if the test suite is alright. 6 | 7 | 1. Visit and click the "**Install it for free**" green button at the bottom of the page. 8 | 9 | 2. Click on the "**Complete order and begin installation**" green button. 10 | 11 | 3. If you are asked to Authorize Travis CI to access your Github account, check the organization or user where you have your Consul Democracy fork at the bottom and click the "**Authorize travis-ci**" button. 12 | 13 | 4. Visit your [Travis profile](https://travis-ci.org/profile/) and enable Travis for your Consul Democracy fork in the list of repositories. 14 | 15 | 5. Click on the sprocket icon to the right of the repository to see the builds. 16 | 17 | 6. Check that everything is well configured by creating a test Pull Request (editing a simple .md file could help). 18 | -------------------------------------------------------------------------------- /es/getting_started/configuration.md: -------------------------------------------------------------------------------- 1 | # Configura tu fork 2 | 3 | ## Travis CI 4 | 5 | [Travis](https://travis-ci.org/) es un servicio de Integración Contínua, gratuito para proyectos OpenSource (como Consul Democracy y sus forks). Te ayudará a vigilar que en las Pull Requests no se rompan los tests. 6 | 7 | 1. Visita y haz click en el botón verde "**Install it for free**"" al pie de la página. 8 | 9 | 2. Haz click en el botón verde "**Complete order and begin installation**" 10 | 11 | 3. Si se te solicita acceso a tu cuenta de Github por parte de Travis CIaccess, marca la organización o usuario bajo el cual reside tu fork de Consul Democracy y haz click en el botón "**Authorize travis-ci**". 12 | 13 | 4. Visita [tu perfil en Travis](https://travis-ci.org/profile/) y habilita Travis para tu fork de Consul Democracy en el listado de repositorios. 14 | 15 | 5. Haz click en el icono de un piñón a la derecha del repositorio para ver las builds. 16 | 17 | 6. Comprueba que todo está bien configurado creando un Pull Request de prueba (editar un simple fichero .md podría servir). 18 | -------------------------------------------------------------------------------- /en/customization/components.md: -------------------------------------------------------------------------------- 1 | # Components 2 | 3 | For components, customization can be used to change both the logic (included in a `.rb` file) and the view (included in a `.erb` file). If you only want to customize the logic for, let's say, the `Admin::TableActionsComponent`, create a file named `app/components/custom/admin/table_actions_component.rb` with the following content: 4 | 5 | ```ruby 6 | require_dependency Rails.root.join("app", "components", "admin", "table_actions_component").to_s 7 | 8 | class Admin::TableActionsComponent 9 | # Your custom logic here 10 | end 11 | ``` 12 | 13 | If, on the other hand, you also want to customize the view, you need a small modification. Instead of the previous code, use: 14 | 15 | ```ruby 16 | class Admin::TableActionsComponent < ApplicationComponent; end 17 | 18 | require_dependency Rails.root.join("app", "components", "admin", "table_actions_component").to_s 19 | 20 | class Admin::TableActionsComponent 21 | # Your custom logic here 22 | end 23 | ``` 24 | 25 | This will make the component use the view in `app/components/custom/admin/table_actions_component.html.erb`. You can create this file and customize it to your needs. 26 | -------------------------------------------------------------------------------- /en/installation/vagrant.md: -------------------------------------------------------------------------------- 1 | # Vagrant 2 | 3 | Install [Vagrant](https://www.vagrantup.com/) and setup a virtual machine with [Linux](prerequisites.md) 4 | 5 | Vagrant is compatible for [Debian](/en/installation/debian.md) and [Ubuntu](/en/installation/ubuntu.md). 6 | 7 | ## Browser configuration 8 | 9 | To access the application through the browser at `localhost:3000` we must forward a port and run the rails server with a binding option: 10 | 11 | ## Port forwarding 12 | 13 | Open the Vagrant configuration file: 14 | 15 | ``` 16 | nano Vagranfile 17 | ``` 18 | 19 | Find this line: 20 | 21 | ``` 22 | # config.vm.network "forwarded_port", guest: 80, host: 8080 23 | ``` 24 | 25 | And change it for this configuration: 26 | 27 | ``` 28 | config.vm.network "forwarded_port", guest: 3000, host: 3000 29 | ``` 30 | 31 | Reload your virtual machine: 32 | 33 | ``` 34 | vagrant reload 35 | ``` 36 | 37 | ## Running the rails server 38 | 39 | In your virtual machine, run the application server, binding to your local ip address: 40 | 41 | ``` 42 | bin/rails s -b 0.0.0.0 43 | ``` 44 | 45 | Now you should be able to see the application running in your browser at url `localhost:3000`! :tada: 46 | -------------------------------------------------------------------------------- /en/getting_started/communication.md: -------------------------------------------------------------------------------- 1 | # Communication 2 | 3 | The preferred way to report any missing piece of information is [opening an issue in the project's Github repo](https://github.com/consuldemocracy/docs/issues/new). 4 | 5 | For more informal communication, chat with us at [Consul Democracy's gitter](https://gitter.im/consul/consul). 6 | 7 | Before doing it, **please take some time to check the [existing issues](https://github.com/consuldemocracy/consuldemocracy/issues) and make sure what you are about to report isn't already reported** by another person. In case someone else reported the same problem before or a similar one, and you have more details about it, you can write a comment in the issue page... a little more help can make a huge difference! 8 | 9 | In order to write a new issue, take into account these few tips to make it easy to read and comprehend: 10 | 11 | - Try to use a descriptive and to-the-point title. 12 | - It's a good idea to include some sections -in case they're needed- such as: steps to reproduce the bug, expected behaviour/response, actual response or screenshots. 13 | - Also it could be helpful to provide your operating system, browser version and installed plugins. 14 | -------------------------------------------------------------------------------- /es/installation/vagrant.md: -------------------------------------------------------------------------------- 1 | # Vagrant 2 | 3 | Instale [Vagrant](https://www.vagrantup.com/) y configure una máquina virtual con [Linux](prerequisites.md) 4 | 5 | Vagrant es compatible para [Debian](/es/installation/debian.md) y [Ubuntu](/es/installation/ubuntu.md). 6 | 7 | ## Browser configuration 8 | 9 | Para acceder a la aplicación a través del navegador en la url `localhost:3000` debe enrutar el puerto de la aplicación y ejectuar el servidor de la aplicación con la opción `-b`: 10 | 11 | ## Enrutar el puerto de la aplicación 12 | 13 | Abra el archivo de configuración de Vagrant: 14 | 15 | ``` 16 | nano Vagranfile 17 | ``` 18 | 19 | Encuentre esta línea: 20 | 21 | ``` 22 | # config.vm.network "forwarded_port", guest: 80, host: 8080 23 | ``` 24 | 25 | Cámbiela por esta: 26 | 27 | ``` 28 | config.vm.network "forwarded_port", guest: 3000, host: 3000 29 | ``` 30 | 31 | Recargue la máquina virtual: 32 | 33 | ``` 34 | vagrant reload 35 | ``` 36 | 37 | ## Ejecutar el servidor 38 | 39 | En su máquina virtual, debe ejecutar la aplicación enlanzándola a su IP local: 40 | 41 | ``` 42 | bin/rails s -b 0.0.0.0 43 | ``` 44 | 45 | Ahora debería ver la aplicación desde el navegardor en la url `localhost:3000` :tada: 46 | -------------------------------------------------------------------------------- /es/customization/components.md: -------------------------------------------------------------------------------- 1 | # Componentes 2 | 3 | En el caso de los componentes, la personalización puede utilizarse para cambiar tanto la lógica (incluida en un archivo `.rb`) como la vista (incluida en un archivo `.erb`). Si solo quieres personalizar la lógica, por ejemplo del componente `Admin::TableActionsComponent`, crea el archivo `app/components/custom/admin/table_actions_component.rb` con el siguiente contenido: 4 | 5 | ```ruby 6 | require_dependency Rails.root.join("app", "components", "admin", "table_actions_component").to_s 7 | 8 | class Admin::TableActionsComponent 9 | # Tu lógica personalizada aquí 10 | end 11 | ``` 12 | 13 | Si, por el contrario, también quieres personalizar la vista, necesitas una pequeña modificación. En lugar del código anterior, utiliza: 14 | 15 | ```ruby 16 | class Admin::TableActionsComponent < ApplicationComponent; end 17 | 18 | require_dependency Rails.root.join("app", "components", "admin", "table_actions_component").to_s 19 | 20 | class Admin::TableActionsComponent 21 | # Tu lógica personalizada aquí 22 | end 23 | ``` 24 | 25 | Esto hará que el componente utilice la vista en `app/components/custom/admin/table_actions_component.html.erb`. Puedes crear este archivo y personalizarlo según tus necesidades. 26 | -------------------------------------------------------------------------------- /en/features/oauth.md: -------------------------------------------------------------------------------- 1 | # OAuth 2 | 3 | You can configure authentication services with external OAuth suppliers, right now Twitter, Facebook and Google are supported. 4 | 5 | ## 1. Create an App on the platform 6 | 7 | For each platform, go to their developers section and follow their guides to create an app. 8 | 9 | ## 2. Set your Consul Democracy's url 10 | 11 | They'll ask you for your Consul Democracy's auth URL, and as you can see running `rake routes` at your Consul Democracy repo locally: 12 | 13 | ```bash 14 | user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/twitter|facebook|google_oauth2/} 15 | ``` 16 | 17 | So for example the URL for facebook application would be `yourdomain.com/users/auth/facebook/callback` 18 | 19 | ## 3. Set key & secret values 20 | 21 | When you complete the application registration you'll get a *key* and *secret* values, those need to be stored at your `config/secrets.yml` file: 22 | 23 | ```yml 24 | twitter_key: "" 25 | twitter_secret: "" 26 | facebook_key: "" 27 | facebook_secret: "" 28 | google_oauth2_key: "" 29 | google_oauth2_secret: "" 30 | ``` 31 | 32 | *NOTE:* Also in the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application. 33 | -------------------------------------------------------------------------------- /es/getting_started/communication.md: -------------------------------------------------------------------------------- 1 | # Comunicación 2 | 3 | Para comunicar sugerencias/incidencias te animamos a [abrir una incidencia en el repositorio de Documentación de Consul Democracy](https://github.com/consuldemocracy/consuldemocracy/issues/new). 4 | 5 | Para comunicaciones más informales, chatea con nosotros en el [gitter de consul](https://gitter.im/consul/consul) 6 | 7 | Antes de hacerlo, **por favor tómate un tiempo para comprobar los [issues ya existentes](https://github.com/consuldemocracy/consuldemocracy/issues) y asegúrate de que lo que estás a punto de reportar no ha sido reportado previamente** por otra persona. De ser así, si tienes más detalles acerca de la incidencia puedes escribir un comentario en la página ‑¡un poco de ayuda puede marcar una gran diferencia! 8 | 9 | Para escribir un nuevo issue, ten en cuenta estas recomendaciones para hacerlo más fácil de leer y comprender: 10 | 11 | - Intenta usar un título descriptivo. 12 | - Es buena idea incluir algunas secciones -en caso de que sean necesarias- como los pasos para reproducir el error, el comportamiento o respuesta que cabría esperar, la respuesta que devuelve o capturas de pantalla. 13 | - También puede ser de ayuda incluir en la descripción tu sistema operativo, versión del navegador que usaste y posibles plugins instalados. 14 | -------------------------------------------------------------------------------- /es/customization/images.md: -------------------------------------------------------------------------------- 1 | # Imágenes 2 | 3 | Si quieres sobreescribir alguna imagen debes primero fijarte el nombre que tiene, por defecto se encuentran en `app/assets/images`. Por ejemplo si quieres modificar `app/assets/images/logo_header.png` debes poner otra con ese mismo nombre en el directorio `app/assets/images/custom`. Los iconos que seguramente quieras modificar son: 4 | 5 | * apple-touch-icon-200.png 6 | * icon_home.png 7 | * logo_email.png 8 | * logo_header.png 9 | * map.jpg 10 | * social_media_icon.png 11 | * social_media_icon_twitter.png 12 | 13 | ## Mapa de la ciudad 14 | 15 | Puedes encontrar el mapa de la ciudad en [`/app/assets/images/map.jpg`](https://github.com/consuldemocracy/consuldemocracy/blob/master/app/assets/images/map.jpg), simplemente reemplazalo con una imagen de los distritos de tu ciudad ([ejemplo](https://github.com/consuldemocracy/consuldemocracy/blob/master/app/assets/images/map.jpg)). 16 | 17 | Después te recomendamos utilizar una herramienta online como o para generar las coordenadas para poder establecer un [image-map](https://www.w3schools.com/tags/tag_map.asp) sobre cada distrito. Estas coordenadas deben ser introducidas en la respectiva Geozona creada en el panel de administración (`/admin/geozones`) 18 | -------------------------------------------------------------------------------- /en/customization/images.md: -------------------------------------------------------------------------------- 1 | # Images 2 | 3 | If you want to overwrite any image, firstly you need to find out the filename, and by default it will be located under `app/assets/images`. For example if you want to change the header logo (`app/assets/images/logo_header.png`) you must create another file with the exact same file name under `app/assets/images/custom` folder. The images and icons that you will most likely want to change are: 4 | 5 | * apple-touch-icon-200.png 6 | * icon_home.png 7 | * logo_email.png 8 | * logo_header.png 9 | * map.jpg 10 | * social_media_icon.png 11 | * social_media_icon_twitter.png 12 | 13 | ## City Map 14 | 15 | You'll find the city map at [`/app/assets/images/map.jpg`](https://github.com/consuldemocracy/consuldemocracy/blob/master/app/assets/images/map.jpg), just replace it with an image of your cities districts ([example](https://github.com/consuldemocracy/consuldemocracy/blob/master/app/assets/images/map.jpg)). 16 | 17 | Afterwards we recommend you to use an online tool like or to generate the html coordinates to be able to generate a [image-map](https://www.w3schools.com/tags/tag_map.asp) for each of the districts. Those coordinates should be introduced on the respective Geozones at the admin geozones panel (`/admin/geozones`). 18 | -------------------------------------------------------------------------------- /es/features/oauth.md: -------------------------------------------------------------------------------- 1 | # OAuth 2 | 3 | Puedes configurar la autenticación con servicios externos usando OAuth, por ahora están soportados Twitter, Facebook y Google. 4 | 5 | ## 1. Crea una aplicación en la plataforma 6 | 7 | Para cada plataforma, sigue las instrucciones en la sección de desarrolladores de su página web. 8 | 9 | ## 2. Establece la url de tu Consul Democracy 10 | 11 | Te preguntarán por la URL de autenticación de tu instalación de Consul Democracy, y como podrás comprobar corriendo la tarea `rake routes` en tu repositorio local: 12 | 13 | ```bash 14 | user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/twitter|facebook|google_oauth2/} 15 | ``` 16 | 17 | Por ejemplo para facebook la URL sería `yourdomain.com/users/auth/facebook/callback` 18 | 19 | ## 3. Establece la clave y secreto 20 | 21 | Cuando completes el registro de la aplicación en su plataforma te darán un *key* y *secret*, estos deben ser almacenados en tu fichero `config/secrets.yml`: 22 | 23 | ```yml 24 | twitter_key: "" 25 | twitter_secret: "" 26 | facebook_key: "" 27 | facebook_secret: "" 28 | google_oauth2_key: "" 29 | google_oauth2_secret: "" 30 | ``` 31 | 32 | *NOTA:* Además en el caso de Google, verifica que las APIs de *Contacts API* y *Google+ API* están habilitadas para tu aplicación en su plataforma. 33 | -------------------------------------------------------------------------------- /en/customization/views_and_styles.md: -------------------------------------------------------------------------------- 1 | # Views and Styles 2 | 3 | ## Views (HTML) 4 | 5 | If you want to change any page HTML you can just find the correct file under the `app/views` folder and put a copy at `app/views/custom` keeping as well any sub-folder structure, and then apply your customizations. For example if you want to customize `app/views/pages/conditions.html` you'll have to make a copy at `app/views/custom/pages/conditions.html.erb` (note the `pages` subdirectory). 6 | 7 | ## CSS Styles with SASS 8 | 9 | In order to make changes to any CSS selector (custom style sheets), you can add them directly at `app/assets/stylesheets/custom.scss`. For example to change the header color (`.top-links`) you can just add: 10 | 11 | ```css 12 | .top-links { 13 | background: red; 14 | } 15 | ``` 16 | 17 | If you want to change any [foundation](http://foundation.zurb.com/) variable, you can do it at the `app/assets/stylesheets/_custom_settings.scss` file. For example to change the main application color just add: 18 | 19 | ```css 20 | $brand: #446336; 21 | ``` 22 | 23 | We use [SASS, with SCSS syntax](http://sass-lang.com/guide) as CSS preprocessor. 24 | 25 | Also you can check your scss files syntax with 26 | 27 | ```bash 28 | scss-lint 29 | ``` 30 | 31 | ## Accessibility 32 | 33 | To maintain accessibility level, if you add new colors use a [Color contrast checker](http://webaim.org/resources/contrastchecker/) (WCAG AA is mandatory, WCAG AAA is recommended). 34 | -------------------------------------------------------------------------------- /es/installation/mail_server_configuration.md: -------------------------------------------------------------------------------- 1 | # Configuración del servidor de correo 2 | 3 | Este es un ejemplo de cómo integrar un servicio de correo con Consul Democracy. 4 | 5 | En este ejemplo usamos [Mailgun](https://www.mailgun.com/). 6 | 7 | ## Crear una cuenta en Mailgun 8 | 9 | ![Creando una cuenta en Mailgun](../../img/mailserver/mailgun-create-account.png) 10 | 11 | * Puedes omitir el formulario de tarjeta de crédito 12 | * Y activa tu cuenta con el enlace enviado por correo electrónico 13 | 14 | ## Configuración del dominio 15 | 16 | * Ve a la sección "domain": ![Mailgun sección domain](../../img/mailserver/mailgun-domains.png) 17 | * Como todavía no tienes un dominio, debes pinchar en el "sandbox" que ya está creado 18 | * Recuerda las siguientes credenciales: ![Mailgun sandbox](../../img/mailserver/mailgun-sandbox.png) 19 | 20 | ## Configuración del correo en Consul Democracy 21 | 22 | * Ve al archivo `config/secrets.yml` 23 | * Modifica las líneas en el archivo para configurar el servidor de correo: 24 | 25 | ```yml 26 | mailer_delivery_method: :smtp 27 | smtp_settings: 28 | :address: "" 29 | :port: 587 30 | :domain: "" 31 | :user_name: "" 32 | :password: "" 33 | :authentication: "plain" 34 | :enable_starttls_auto: true 35 | ``` 36 | 37 | * Rellena ``, ``, `` y `` con tu información. 38 | * Guarda el fichero y reinicia tu aplicación Consul Democracy 39 | -------------------------------------------------------------------------------- /es/customization/views_and_styles.md: -------------------------------------------------------------------------------- 1 | # Vistas y Estilos 2 | 3 | ## Vistas (HTML) 4 | 5 | Si quieres modificar el HTML de alguna página puedes hacerlo copiando el HTML de `app/views` y poniendolo en `app/views/custom` respetando los subdirectorios que encuentres ahí. Por ejemplo si quieres modificar `app/views/pages/conditions.html` debes copiarlo y modificarla en `app/views/custom/pages/conditions.html.erb` 6 | 7 | ## Estilos CSS con SASS 8 | 9 | Si quieres cambiar algun selector CSS (de las hojas de estilo) puedes hacerlo en el fichero `app/assets/stylesheets/custom.scss`. Por ejemplo si quieres cambiar el color del header (`.top-links`) puedes hacerlo agregando: 10 | 11 | ```css 12 | .top-links { 13 | background: red; 14 | } 15 | ``` 16 | 17 | Si quieres cambiar alguna variable de [foundation](http://foundation.zurb.com/) puedes hacerlo en el fichero `app/assets/stylesheets/_custom_settings.scss`. Por ejemplo para cambiar el color general de la aplicación puedes hacerlo agregando: 18 | 19 | ```css 20 | $brand: #446336; 21 | ``` 22 | 23 | Usamos un preprocesador de CSS, [SASS, con la sintaxis SCSS](http://sass-lang.com/guide). 24 | 25 | Además puedes comprobar la sintaxis de tus ficheros scss con: 26 | 27 | ```bash 28 | scss-lint 29 | ``` 30 | 31 | ## Accesibilidad 32 | 33 | Para mantener el nivel de accesibilidad, si añades colores nuevos utiliza un [Comprobador de contraste de color](http://webaim.org/resources/contrastchecker/) (WCAG AA es obligatorio, WCAG AAA es recomendable) 34 | -------------------------------------------------------------------------------- /en/installation/mail_server_configuration.md: -------------------------------------------------------------------------------- 1 | # Mail Server Configuration 2 | 3 | This is an example of how to integrate a mailing service with Consul Democracy. 4 | 5 | In this example we use [Mailgun](https://www.mailgun.com/). 6 | 7 | ## Create an account in Mailgun 8 | 9 | ![Creating an account in Mailgun](../../img/mailserver/mailgun-create-account.png) 10 | 11 | * Skip the credit card form 12 | * And activate your account with the link sent by email 13 | 14 | ## Domain configuration 15 | 16 | * Go to the Domains section: ![Mailgun domain section](../../img/mailserver/mailgun-domains.png) 17 | * Since you don't have a domain yet, you should click in the sandbox that is already created 18 | * Remember the following credentials: ![Mailgun sandbox](../../img/mailserver/mailgun-sandbox.png) 19 | 20 | ## Consul Democracy mailing configuration 21 | 22 | * Go to the `config/secrets.yml` file 23 | * Change the lines on the file to configure the mail server under the section `staging`, `preproduction` or `production`, depending on your setup: 24 | 25 | ```yml 26 | mailer_delivery_method: :smtp 27 | smtp_settings: 28 | :address: "" 29 | :port: 587 30 | :domain: "" 31 | :user_name: "" 32 | :password: "" 33 | :authentication: "plain" 34 | :enable_starttls_auto: true 35 | ``` 36 | 37 | * Fill ``, ``, `` and `` with your information 38 | * Save the file and restart your Consul Democracy application 39 | -------------------------------------------------------------------------------- /en/features/local_census.md: -------------------------------------------------------------------------------- 1 | # Local Census 2 | 3 | To provide to administrator users a way to manage the local census database through the administration panel **Settings > Manage local census**. Currently the only way to manipulate this table records is through the rails console. 4 | 5 | Allow administrators users to manage this table in two different ways: 6 | 7 | - **Manually**: one by one through a CRUD interface. 8 | - **Automatically**: through an importation process. 9 | 10 | ## Manually 11 | 12 | Provide a way to manage local census records to administrator users through administration interface. 13 | 14 | - Local Census Page 15 | ![Manage local census](../../img/local_census/manage-local-census-en.png) 16 | 17 | - Add new record 18 | ![Create local census record](../../img/local_census/add-local-census-record-en.png) 19 | 20 | Features: 21 | 22 | 1. Search by document_number: As local_census_records could contain a lot of records we have added a search feature to allow administrators to find existing records by document_number. 23 | 1. Avoid the introduction of duplicated records: A model validation has been added to the following attributes pair [:document_number, :document_type] 24 | 25 | ## Automatically 26 | 27 | Allow administrator users to import local census records though CSV file. 28 | 29 | - Local Census Page 30 | ![Manage local census csv](../../img/local_census/manage-local-census-csv-en.png) 31 | 32 | - Import CSV 33 | ![Create local census records csv](../../img/local_census/add-local-census-records-csv-en.png) 34 | -------------------------------------------------------------------------------- /en/features/recommendations.md: -------------------------------------------------------------------------------- 1 | # Debates & Proposals Recommendations 2 | 3 | Logged in users can see recommended Debates or Proposals listed with the ordering option "recommendations". 4 | 5 | The list shows, ordered by votes descending, those elements that: 6 | 7 | 1. Have tags that interests the user. Being those tags the ones on the proposals that the user follows. 8 | 2. The user isn't the author. 9 | 3. In the case of proposals: only those that haven't reached the required threshold of votes, hiding as well those that the user is already following. 10 | 11 | ## How to try it 12 | 13 | In our local installation, if we haven't logged in, we can check at that the "recommendations" ordering isn't present: 14 | 15 | ![Recommendations not logged in](../../img/recommendations/recommendations_not_logged_in.jpg) 16 | 17 | Once we log in we see the menu, but because we don't aren't following any proposals we get the message "Follow proposals so we can give you recommendations" at 18 | 19 | ![Recommendations no follows](../../img/recommendations/recommendations_no_follows.jpg) 20 | 21 | After following any proposal with the "Follow citizen proposal" on the side menu: 22 | 23 | ![Recommendations follow button](../../img/recommendations/recommendations_follow_button.jpg) 24 | 25 | We can finally see some recommendations: 26 | 27 | ![Recommendations with follows](../../img/recommendations/recommendations_with_follows.jpg) 28 | 29 | The feature works the same for debates 30 | -------------------------------------------------------------------------------- /es/features/local_census.md: -------------------------------------------------------------------------------- 1 | # Censo Local 2 | 3 | Proporcionar a los usuarios administradores una forma de gestionar la base de datos del censo local a través del panel de administración **Configuración > Gestionar censo local**. Actualmente la única manera de manipular los registros de esta tabla es a través de la consola de rails. 4 | 5 | Permitir a los usuarios de administradores gestionar esta tabla de dos maneras diferentes: 6 | 7 | - **Manualmente**: uno por uno a través de una interfaz CRUD. 8 | - **Automáticamente**: a través de un proceso de importación. 9 | 10 | ## Manualmente 11 | 12 | Provide a way to manage local census records to administrator users through administration interface. 13 | 14 | - Página de censo local 15 | ![Manage local census](../../img/local_census/manage-local-census-es.png) 16 | 17 | - Añadir un nuevo registro 18 | ![Create local census record](../../img/local_census/add-local-census-record-es.png) 19 | 20 | Funcionalidades: 21 | 22 | 1. Búsqueda por número_de_documento: Como local_census_records podría contener muchos registros, hemos añadido una función de búsqueda para permitir a los administradores encontrar los registros existentes por número de documento. 23 | 1. Evitar la introducción de registros duplicados: Se ha añadido una validación de modelo al siguiente par de atributos [:número_de_documento, :tipo_de_documento] 24 | 25 | ## Automáticamente 26 | 27 | Permite a los usuarios administradores importar registros del censo local a través de un archivo CSV. 28 | 29 | - Página de censo local 30 | ![Manage local census csv](../../img/local_census/manage-local-census-csv-en.png) 31 | 32 | - Página para importar un CSV 33 | ![Create local census records csv](../../img/local_census/add-local-census-records-csv-en.png) 34 | -------------------------------------------------------------------------------- /es/features/recommendations.md: -------------------------------------------------------------------------------- 1 | # Recomendaciones de Debates y Propuestas 2 | 3 | Para Debates y Propuestas los usuarios logueados pueden encontrar elementos recomendados usando el filtro de ordenación "Recomendaciones". 4 | 5 | En este listado se muestran, ordenados por votos de forma descendiente, aquellos elementos que: 6 | 7 | 1. Tengan etiquetas que interesen al usuario. Siendo las etiquetas de su interés aquellas usadas en propuestas que ha seguido. 8 | 2. El usuario no sea el autor de los mismos. 9 | 3. Sólo en el caso de las propuestas: únicamente se muestran aquellas que aún no hayan llegado al umbral de votos requerido, ocultándose además aquellas que el usuario este siguiendo. 10 | 11 | ## Cómo probar la funcionalidad 12 | 13 | En nuestra instalación en local, si no hemos iniciado sesión, podemos comprobar visitando que no aparece la opción de ordenación "Recomendaciones" 14 | 15 | ![Recommendations not logged in](../../img/recommendations/recommendations_not_logged_in.jpg) 16 | 17 | Una vez iniciada sesión aparece el menú de ordenación, pero al no tener intereses nos muestra un mensaje "Sigue propuestas para que podamos darte recomendaciones" si lo visitamos en 18 | 19 | ![Recommendations no follows](../../img/recommendations/recommendations_no_follows.jpg) 20 | 21 | Tras seguir una propuesta cualquiera con el botón de "Seguir propuesta ciudadana" que aparece en el menu lateral: 22 | 23 | ![Recommendations follow button](../../img/recommendations/recommendations_follow_button.jpg) 24 | 25 | Podemos comprobar que tenemos recomendaciones: 26 | 27 | ![Recommendations with follows](../../img/recommendations/recommendations_with_follows.jpg) 28 | 29 | La funcionalidad es similar en el menú de debates. 30 | -------------------------------------------------------------------------------- /en/getting_started/create.md: -------------------------------------------------------------------------------- 1 | # Creating your fork 2 | 3 | Consul Democracy git repo is hosted at Github.com, we recommend using it for your fork's repo to make things easier. But you can use any other service like Bitbucket or Gitlab if you want to, just don't forget to put a reference link back to Consul Democracy on the footer to comply with project's license (GPL Affero 3). 4 | 5 | 1. [Register an user account on Github](https://github.com/join) if you don't have one. 6 | 7 | 2. [Create an Organization](https://help.github.com/articles/creating-a-new-organization-from-scratch/) on Github with the name of your city or the organization that's going to use Consul Democracy. **This is not mandatory**, but it will help understand the fork's purpose and future contributions by other users. 8 | 9 | 3. [Fork Consul Democracy](https://help.github.com/articles/fork-a-repo/) using the **fork** button on the top right corner at 10 | 11 | 4. [Clone your fork repository](https://help.github.com/articles/cloning-a-repository/) on to your computer. 12 | 13 | ****IMPORTANT NOTICE**: Do not fork `https://github.com/AyuntamientoMadrid/consul`, it's a common mistake that leads to multiple and grave problems. 14 | 15 | ## Why make code public? 16 | 17 | We strongly recommend making code public for multiple reasons: 18 | 19 | - **Transparency**: It should be part of the culture of public entities that adopt Consul Democracy, as well as any organization or group. 20 | - **Support**: If you need technical help, both community and Consul Democracy core team will be able to understand and advice by easily seeing involved code. 21 | - **Collaboration**: By other professionals, citizens, etc... 22 | - Last but not least, Consul Democracy is distributed under the **[AGPLv3](https://github.com/consuldemocracy/consuldemocracy/blob/master/LICENSE-AGPLv3.txt) license** that commands to publish source code. 23 | -------------------------------------------------------------------------------- /es/getting_started/create.md: -------------------------------------------------------------------------------- 1 | # Crea tu fork 2 | 3 | El repositorio git de Consul Democracy está hospedado en Github.com, recomendamos lo uses para tu fork para hacer las cosas mas fáciles. Pero puedes usar cualquier otro servicio como Bitbucket o Gitlab si deseas, pero no te olvides de poner el enlace en el footer a tu repositorio en cumplimiento con la licencia de este proyecto (GPL Affero 3). 4 | 5 | 1. [Registra una cuenta de usuario en Github](https://github.com/join) si no tienes una ya. 6 | 7 | 2. [Crea una Organización](https://help.github.com/articles/creating-a-new-organization-from-scratch/) en Github con el nombre de la ciudad u organización que usará Consul Democracy. **Esto no es obligatorio**, pero ayudará a entender el propósito del fork y la colaboración de otros usuarios. 8 | 9 | 3. [Forkea Consul Democracy](https://help.github.com/articles/fork-a-repo/) usando el botón de **fork** en la esquina superior derecha de 10 | 11 | 4. [Clona el repositorio de tu fork](https://help.github.com/articles/cloning-a-repository/) en tu ordenador 12 | 13 | ****ADVERTENCIA IMPORTANTE**: No hagas un fork de `https://github.com/AyuntamientoMadrid/consul`, es una equivocación frecuente que conlleva múltiples y graves problemas. 14 | 15 | ## ¿Porqué hacer el código público? 16 | 17 | Recomendamos publicar el código por varias razones: 18 | 19 | - **Transparencia**: Debería ser parte de la cultura de aquellas entidades públicas que adopten Consul Democracy, así como cualquier organización o grupo. 20 | - **Soporte**: Si necesitas ayuda técnica, el resto de la comunidad o el equipo de Consul Democracy podrán entender y aconsejar mas fácilmente al ver el código implicado. 21 | - **Colaboración**: Por parte de otros profesionales, ciudadanos, etc... 22 | - Por último y no menos importante, Consul Democracy se distribuye bajo la **licencia [AGPLv3](https://github.com/consuldemocracy/consuldemocracy/blob/master/LICENSE-AGPLv3.txt)** que obliga a publicar el codigo fuente. 23 | -------------------------------------------------------------------------------- /en/installation/local_installation.md: -------------------------------------------------------------------------------- 1 | # Local installation 2 | 3 | Before installing Consul Democracy and having it up and running make sure you all [prerequisites](prerequisites.md) installed. 4 | 5 | 1. First, clone the [Consul Democracy Github repository](https://github.com/consuldemocracy/consuldemocracy/) and enter the project folder: 6 | 7 | ```bash 8 | git clone https://github.com/consuldemocracy/consuldemocracy.git 9 | cd consuldemocracy 10 | ``` 11 | 12 | 2. Install the Ruby version we need with your Ruby version manager. Here are some examples: 13 | 14 | ```bash 15 | rvm install `cat .ruby-version` # If you're using RVM 16 | rbenv install `cat .ruby-version` # If you're using rbenv 17 | asdf install ruby `cat .ruby-version` # If you're using asdf 18 | ``` 19 | 20 | 3. Check we're using the Ruby version we've just installed: 21 | 22 | ```bash 23 | ruby -v 24 | => # (it should be the same as the version in the .ruby-version file) 25 | ``` 26 | 27 | 4. Install [Bundler](http://bundler.io/): 28 | 29 | ```bash 30 | gem install bundler --version 1.17.1 31 | ``` 32 | 33 | 5. Install the required gems using Bundler: 34 | 35 | ```bash 36 | bundle 37 | ``` 38 | 39 | 6. Copy the environment example configuration files inside new readable ones: 40 | 41 | ```bash 42 | cp config/database.yml.example config/database.yml 43 | cp config/secrets.yml.example config/secrets.yml 44 | ``` 45 | 46 | And setup database credentials with your `consul` user in your new `database.yml` file. 47 | 48 | 7. Run the following [Rake tasks](https://github.com/ruby/rake) to create and fill your local database with the minimum data needed to run the application: 49 | 50 | ```bash 51 | bin/rake db:create 52 | bin/rake db:setup 53 | bin/rake db:dev_seed 54 | bin/rake db:test:prepare 55 | ``` 56 | 57 | 8. Check everything is fine by running the test suite (beware it might take more than an hour): 58 | 59 | ```bash 60 | bin/rspec 61 | ``` 62 | 63 | 9. Now you have all set, run the application: 64 | 65 | ```bash 66 | bin/rails s 67 | ``` 68 | 69 | Congratulations! Your local Consul Democracy application will be running now at `http://localhost:3000`. 70 | 71 | In case you want to access the local application as admin, a default user verified and with admin permissions was created by the seed files with **username** `admin@consul.dev` and **password** `12345678`. 72 | 73 | If you need an specific user to perform actions such as voting without admin permissions, a default verified user is also available with **username** `verified@consul.dev` and **password** `12345678`. 74 | -------------------------------------------------------------------------------- /en/customization/models.md: -------------------------------------------------------------------------------- 1 | # Models 2 | 3 | If you need to create new models or customize existent ones, you can do it so at the `app/models/custom` folder. Keep in mind that for old models you'll need to firstly require the dependency. 4 | 5 | For example for Madrid's City Hall fork its required to check the zip code's format (it always starts with 280 followed by 2 digits). That check is at `app/models/custom/verification/residence.rb`: 6 | 7 | ```ruby 8 | require_dependency Rails.root.join('app', 'models', 'verification', 'residence').to_s 9 | 10 | class Verification::Residence 11 | 12 | validate :postal_code_in_madrid 13 | validate :residence_in_madrid 14 | 15 | def postal_code_in_madrid 16 | errors.add(:postal_code, I18n.t('verification.residence.new.error_not_allowed_postal_code')) unless valid_postal_code? 17 | end 18 | 19 | def residence_in_madrid 20 | return if errors.any? 21 | 22 | unless residency_valid? 23 | errors.add(:residence_in_madrid, false) 24 | store_failed_attempt 25 | Lock.increase_tries(user) 26 | end 27 | end 28 | 29 | private 30 | 31 | def valid_postal_code? 32 | postal_code =~ /^280/ 33 | end 34 | 35 | end 36 | ``` 37 | 38 | Do not forget to cover your changes with a test at the `spec/models/custom` folder. Following the example we could create `spec/models/custom/residence_spec.rb`: 39 | 40 | ```ruby 41 | require 'rails_helper' 42 | 43 | describe Verification::Residence do 44 | 45 | let(:residence) { build(:verification_residence, document_number: "12345678Z") } 46 | 47 | describe "verification" do 48 | 49 | describe "postal code" do 50 | it "should be valid with postal codes starting with 280" do 51 | residence.postal_code = "28012" 52 | residence.valid? 53 | expect(residence.errors[:postal_code].size).to eq(0) 54 | 55 | residence.postal_code = "28023" 56 | residence.valid? 57 | expect(residence.errors[:postal_code].size).to eq(0) 58 | end 59 | 60 | it "should not be valid with postal codes not starting with 280" do 61 | residence.postal_code = "12345" 62 | residence.valid? 63 | expect(residence.errors[:postal_code].size).to eq(1) 64 | 65 | residence.postal_code = "13280" 66 | residence.valid? 67 | expect(residence.errors[:postal_code].size).to eq(1) 68 | expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.") 69 | end 70 | end 71 | 72 | end 73 | 74 | end 75 | ``` 76 | -------------------------------------------------------------------------------- /es/customization/models.md: -------------------------------------------------------------------------------- 1 | # Modelos 2 | 3 | Si quieres agregar modelos nuevos, o modificar o agregar métodos a uno ya existente puedes hacerlo en `app/models/custom`. En el caso de los modelos antiguos debes primero hacer un require de la dependencia. 4 | 5 | Por ejemplo en el caso del Ayuntamiento de Madrid se requiere comprobar que el código postal durante la verificación sigue un cierto formato (empieza con 280). Esto se realiza creando este fichero en `app/models/custom/verification/residence.rb`: 6 | 7 | ```ruby 8 | require_dependency Rails.root.join('app', 'models', 'verification', 'residence').to_s 9 | 10 | class Verification::Residence 11 | 12 | validate :postal_code_in_madrid 13 | validate :residence_in_madrid 14 | 15 | def postal_code_in_madrid 16 | errors.add(:postal_code, I18n.t('verification.residence.new.error_not_allowed_postal_code')) unless valid_postal_code? 17 | end 18 | 19 | def residence_in_madrid 20 | return if errors.any? 21 | 22 | unless residency_valid? 23 | errors.add(:residence_in_madrid, false) 24 | store_failed_attempt 25 | Lock.increase_tries(user) 26 | end 27 | end 28 | 29 | private 30 | 31 | def valid_postal_code? 32 | postal_code =~ /^280/ 33 | end 34 | 35 | end 36 | ``` 37 | 38 | No olvides poner los tests relevantes en `spec/models/custom`, siguiendo con el ejemplo pondriamos lo siguiente en `spec/models/custom/residence_spec.rb`: 39 | 40 | ```ruby 41 | require 'rails_helper' 42 | 43 | describe Verification::Residence do 44 | 45 | let(:residence) { build(:verification_residence, document_number: "12345678Z") } 46 | 47 | describe "verification" do 48 | 49 | describe "postal code" do 50 | it "should be valid with postal codes starting with 280" do 51 | residence.postal_code = "28012" 52 | residence.valid? 53 | expect(residence.errors[:postal_code].size).to eq(0) 54 | 55 | residence.postal_code = "28023" 56 | residence.valid? 57 | expect(residence.errors[:postal_code].size).to eq(0) 58 | end 59 | 60 | it "should not be valid with postal codes not starting with 280" do 61 | residence.postal_code = "12345" 62 | residence.valid? 63 | expect(residence.errors[:postal_code].size).to eq(1) 64 | 65 | residence.postal_code = "13280" 66 | residence.valid? 67 | expect(residence.errors[:postal_code].size).to eq(1) 68 | expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.") 69 | end 70 | end 71 | 72 | end 73 | 74 | end 75 | ``` 76 | -------------------------------------------------------------------------------- /es/installation/local_installation.md: -------------------------------------------------------------------------------- 1 | # Instalación local 2 | 3 | Antes de comenzar a instalar Consul Democracy, comprueba que tengas todos los [prerrequisitos](prerequisites.md) correctamente instalados. 4 | 5 | 1. Primero, clona el [repositorio de Consul Democracy en Github](https://github.com/consuldemocracy/consuldemocracy/) y ve a la carpeta del proyecto: 6 | 7 | ```bash 8 | git clone https://github.com/consuldemocracy/consuldemocracy.git 9 | cd consuldemocracy 10 | ``` 11 | 12 | 2. Instala la versión de Ruby necesaria con el gestor de versiones de tu elección. Algunos ejemplos: 13 | 14 | ```bash 15 | rvm install `cat .ruby-version` # Si usas RVM 16 | rbenv install `cat .ruby-version` # Si usas rbenv 17 | asdf install ruby `cat .ruby-version` # Si usas asdf 18 | ``` 19 | 20 | 3. Comprueba que estemos usando la versión de Ruby que acabamos de instalar: 21 | 22 | ```bash 23 | ruby -v 24 | => # (debería aparecer la versión mencionada en el fichero .ruby-version) 25 | ``` 26 | 27 | 4. Instala [Bundler](http://bundler.io/) 28 | 29 | ```bash 30 | gem install bundler --version 1.17.1 31 | ``` 32 | 33 | 5. Instala las gemas requeridas usando Bundler: 34 | 35 | ```bash 36 | bundle 37 | ``` 38 | 39 | 6. Copia los archivos de configuración de ejemplo del entorno dentro de unos nuevos válidos: 40 | 41 | ```bash 42 | cp config/database.yml.example config/database.yml 43 | cp config/secrets.yml.example config/secrets.yml 44 | ``` 45 | 46 | Y configura los de tu usuario de base de datos `consul` en `database.yml` 47 | 48 | 7. Ejecuta las siguientes [tareas Rake](https://github.com/ruby/rake) para crear y rellenar tu base de datos local con el mínimo de información necesaria para que la aplicación funcione correctamente: 49 | 50 | ```bash 51 | bin/rake db:create 52 | bin/rake db:setup 53 | bin/rake db:dev_seed 54 | bin/rake db:test:prepare 55 | ``` 56 | 57 | 8. Comprueba que todo funciona correctamente lanzando la suite de tests (ten en cuenta que podría tardar más de una hora): 58 | 59 | ```bash 60 | bin/rspec 61 | ``` 62 | 63 | 9. Ahora que ya está todo listo puedes ejecutar la aplicación: 64 | 65 | ```bash 66 | bin/rails s 67 | ``` 68 | 69 | ¡Felicidades! Tu aplicación Consul Democracy local estará corriendo en `http://localhost:3000`. 70 | 71 | En caso de que quieras acceder a la aplicación local como usuario administrador existe un usuario por defecto verificado y con permisos con **nombre de usuario** `admin@consul.dev` y **contraseña** `12345678`. 72 | 73 | Si necesitas un usuario específico que pueda realizar acciones como votar sin permisos de administración, dispones de otro usuario verificado con **nombre de usuario** `verified@consul.dev` y **contraseña** `12345678`. 74 | -------------------------------------------------------------------------------- /en/installation/create_deploy_user.md: -------------------------------------------------------------------------------- 1 | # Create a deploy user 2 | 3 | [The installer](https://github.com/consuldemocracy/installer) by default connects as the `root` user only to create a `deploy` user. This `deploy` user is the one who installs all libraries. If you do not have `root` access, please ask your system administrator to follow these instructions to create a user manually. 4 | 5 | You could create a user called `deploy` or any other name. As as example, we are going to create a user named `jupiter`. 6 | 7 | ``` 8 | adduser jupiter 9 | ``` 10 | 11 | I'm using jupiter as the user name, you should change that for whatever makes sense to you. Input a password when prompted, and just leave empty the rest of the options. 12 | 13 | Let's create a `wheel` group and add the user `jupiter` to this group. 14 | 15 | ``` 16 | sudo groupadd wheel 17 | sudo usermod -a -G wheel jupiter 18 | ``` 19 | 20 | Now let's give sudo privileges to the `wheel` group and allow it to not use a password, this is important so that the installer doesn't get stalled waiting for a password. 21 | 22 | First we open the sudoers file: 23 | 24 | ``` 25 | sudo visudo -f /etc/sudoers 26 | ``` 27 | 28 | And we add this line at the end: 29 | 30 | ``` 31 | %wheel ALL=(ALL) NOPASSWD: ALL 32 | ``` 33 | 34 | Now we need to give the keys of the server to the new user. Don’t close the server terminal window, because you can lock yourself out of your server if there is a mistake. 35 | 36 | Let's create the necessary directory in the server to upload the public key: 37 | 38 | ``` 39 | su jupiter 40 | cd ~ 41 | mkdir .ssh 42 | cd .ssh 43 | nano authorized_keys 44 | ``` 45 | 46 | Make sure you have [generated a public key](generating_ssh_key.md) in your local terminal. 47 | 48 | Open another local terminal window (not in the server) and type: 49 | 50 | ``` 51 | cat ~/.ssh/id_rsa.pub 52 | ``` 53 | 54 | Copy the content of your public key to the file authorized_keys that should still be open in the server. 55 | 56 | Test that your user can log in by typing: 57 | 58 | ``` 59 | ssh jupiter@your-copied-ip-address 60 | ``` 61 | 62 | You should see the server welcome page and a prompt like this: 63 | 64 | ``` 65 | jupiter@consuldemocracyserver:~$ 66 | ``` 67 | 68 | Note the username at the prompt is not "root", but your username. So everything is fine and we can now block the root account from outside access and also stop allowing password access so only people with SSH keys can log in. 69 | 70 | Type the following command to edit the SSH config file of the server: 71 | 72 | ``` 73 | sudo nano /etc/ssh/sshd_config 74 | ``` 75 | 76 | Look for the "PasswordAuthentication yes" line and change it to "PasswordAuthentication no". Type Control-K to close the nano editor and type: 77 | 78 | ``` 79 | sudo service ssh restart 80 | ``` 81 | -------------------------------------------------------------------------------- /en/installation/ubuntu.md: -------------------------------------------------------------------------------- 1 | # Configuration for development and test environments (Ubuntu 18.04) 2 | 3 | ## System update 4 | 5 | Run a general system update: 6 | 7 | ```bash 8 | sudo apt update 9 | ``` 10 | 11 | ## Git 12 | 13 | Git is officially maintained in Ubuntu: 14 | 15 | ```bash 16 | sudo apt install git 17 | ``` 18 | 19 | ## Ruby version manager 20 | 21 | Ruby versions packaged in official repositories are not suitable to work with Consul Democracy, so we'll have to install it manually. 22 | 23 | First, we need to install Ruby's development dependencies: 24 | 25 | ```bash 26 | sudo apt install libssl-dev autoconf bison build-essential libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev 27 | ``` 28 | 29 | The next step is installing a Ruby version manager, like rbenv: 30 | 31 | ```bash 32 | wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash 33 | echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc 34 | echo 'eval "$(rbenv init -)"' >> ~/.bashrc 35 | source ~/.bashrc 36 | ``` 37 | 38 | ## Node.js 39 | 40 | To compile the assets, you'll need a JavaScript runtime. Node.js is the preferred option. 41 | 42 | Run the following command on your terminal: 43 | 44 | ```bash 45 | sudo apt install nodejs 46 | ``` 47 | 48 | ## PostgreSQL 49 | 50 | Install postgresql and its development dependencies with: 51 | 52 | ```bash 53 | sudo apt install postgresql libpq-dev 54 | ``` 55 | 56 | You also need to configure a user for your database. As an example, we'll choose the username "consul": 57 | 58 | ```bash 59 | sudo -u postgres createuser consul --createdb --superuser --pwprompt 60 | ``` 61 | 62 | To make sure the UTF-8 enconding is used, create a file: 63 | 64 | ``` 65 | sudo nano /etc/profile.d/lang.sh 66 | ``` 67 | 68 | Add the following: 69 | 70 | ``` 71 | export LANGUAGE="en_US.UTF-8" 72 | export LANG="en_US.UTF-8" 73 | export LC_ALL="en_US.UTF-8" 74 | ``` 75 | 76 | Reconfigure Postgres to use the UTF-8 encoding: 77 | 78 | ````` 79 | sudo su - postgres 80 | psql 81 | 82 | update pg_database set datistemplate=false where datname='template1'; 83 | drop database Template1; 84 | create database template1 with owner=postgres encoding='UTF-8' 85 | lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; 86 | update pg_database set datistemplate=true where datname='template1'; 87 | 88 | \q 89 | exit 90 | ````` 91 | 92 | ## Imagemagick 93 | 94 | Install Imagemagick: 95 | 96 | ```bash 97 | sudo apt install imagemagick 98 | ``` 99 | 100 | ## ChromeDriver 101 | 102 | To run E2E integration tests, we use Selenium along with Headless Chrome. 103 | 104 | To get it working, install the chromium-chromedriver package and make sure it's available on your shell's PATH: 105 | 106 | ```bash 107 | sudo apt install chromium-chromedriver 108 | sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/ 109 | ``` 110 | 111 | Now you're ready to go [get Consul Democracy installed](local_installation.md)! 112 | -------------------------------------------------------------------------------- /es/customization/translations.md: -------------------------------------------------------------------------------- 1 | # Traducciones y Textos 2 | 3 | ## Traducciones 4 | 5 | Actualmente Consul Democracy esta traducido total o parcialmente a multiples idiomas, visita el proyecto en [Crowdin](https://translate.consuldemocracy.org/) 6 | 7 | [Únete a los traductores](https://crwd.in/consul) para ayudar a completar los existentes, o contacta con nosotros a través del [gitter de Consul Democracy](https://gitter.im/consul/consul) para convertirte en Revisor y validar las contribuciones de los traductores. 8 | 9 | En el caso de que tu lenguage no este presente en el proyecto de Crowdin, por favor [abre una incicencia](https://github.com/consuldemocracy/consuldemocracy/issues/new?title=New language&body=Hello I would like to have my language INSERT YOUR LANGUAGE NAME added to Consul Democracy) y lo añadiremos rápidamente. 10 | 11 | Si quieres ver las traducciones de los textos de la web, puedes encontrarlos en los ficheros formato YML disponibles en `config/locales/`. Puedes leer la [guía de internacionalización](http://guides.rubyonrails.org/i18n.html) de Ruby on Rails sobre como funciona este sistema. 12 | 13 | ## Textos personalizados 14 | 15 | Dado que Consul Democracy está en evolución continua con nuevas funcionalidades, y para que mantener tu fork actualizado sea más sencillo, recomendamos no modificar los ficheros de traducciones, es una mejor idea "sobreescribirlos" usando ficheros personalizados en caso de necesidad de alterar un texto. 16 | 17 | Así pues las adaptaciones las debes poner en el directorio `config/locales/custom/`, recomendamos poner solo los textos que quieras personalizar. Por ejemplo si quieres personalizar el texto de "Ayuntamiento de Madrid, 2016" que se encuentra en el footer en todas las páginas, primero debemos ubicar en que plantilla se encuentra (`app/views/layouts/_footer.html.erb`), vemos que en el código pone lo siguiente: 18 | 19 | ```ruby 20 | <%= t("layouts.footer.copyright", year: Time.current.year) %> 21 | ``` 22 | 23 | Y que en el fichero `config/locales/es/general.yml` sigue esta estructura (solo ponemos lo relevante para este caso): 24 | 25 | ```yml 26 | es: 27 | layouts: 28 | footer: 29 | copyright: Ayuntamiento de Madrid, %{year} 30 | 31 | ``` 32 | 33 | Si creamos el fichero `config/locales/custom/es/general.yml` y modificamos "Ayuntamiento de Madrid" por el nombre de la organización que se este haciendo la modificación. Recomendamos directamente copiar los ficheros `config/locales/` e ir revisando y corrigiendo las que querramos, borrando las líneas que no querramos traducir. 34 | 35 | ## Mantener tus Textos Personalizados y Lenguajes 36 | 37 | Consul Democracy tiene la gema [i18n-tasks](https://github.com/glebm/i18n-tasks), es una herramienta estupenda para gestionar textos i18n. Prueba en tu consola `i18n-tasks health` para ver un reporte de estado. 38 | 39 | Si tienes un lenguaje propio diferente al Inglés, deberias añadirlo al fichero de configuración [i18n-tasks.yml para las variables `base_locale` y `locales`](https://github.com/consuldemocracy/consuldemocracy/blob/master/config/i18n-tasks.yml#L4-L7) de forma que los ficheros de tu idioma también sean comprobados. 40 | -------------------------------------------------------------------------------- /es/installation/create_deploy_user.md: -------------------------------------------------------------------------------- 1 | # Crear un usuario para hacer la instalación 2 | 3 | [El instalador](https://github.com/consuldemocracy/installer) de forma predeterminada se conecta como el usuario `root` sólo para crear un usuario `deploy`. Este usuario `deploy` es el que instala todas las librerías. Si no tiene acceso `root`, por favor pídale a su administrador de sistemas que siga estas instrucciones para crear un usuario manualmente. 4 | 5 | Puede crear un usuario llamado `deploy` o utilizar cualquier otro nombre. Como ejemplo, vamos a crear un usuario llamado `jupiter`. 6 | 7 | ``` 8 | adduser jupiter 9 | ``` 10 | 11 | Estoy usando jupiter como nombre de usuario, debería cambiar eso por lo que sea que tenga sentido para usted. Introduzca una contraseña cuando se le pida y deje vacías el resto de las opciones. 12 | 13 | Creemos un grupo `wheel` y añadamos al usuario `jupiter` al grupo. 14 | 15 | ``` 16 | sudo groupadd wheel 17 | sudo usermod -a -G wheel jupiter 18 | ``` 19 | 20 | **Recuerde cambiar jupiter** por cualquier nombre de usuario que haya elegido en el paso anterior. 21 | 22 | Ahora démosle al grupo `wheel` derechos de superadministración sin necesidad de usar contraseña, esto es importante para que el instalador no se quede parado esperando una contraseña. 23 | 24 | Primero debemos abrir el archivo `sudoers`: 25 | 26 | ``` 27 | sudo visudo -f /etc/sudoers 28 | ``` 29 | 30 | Y añadimos esta línea al final del archivo: 31 | 32 | ``` 33 | %wheel ALL=(ALL) NOPASSWD: ALL 34 | ``` 35 | 36 | Ahora tenemos que dar las claves del servidor al nuevo usuario. No cierre la ventana de la terminal del servidor, porque puede bloquearse si hay un error. 37 | 38 | Y escriba los siguientes comandos para crear el archivo necesario donde subir la clave pública: 39 | 40 | ``` 41 | su jupiter 42 | cd ~ 43 | mkdir .ssh 44 | cd .ssh 45 | nano authorized_keys 46 | ``` 47 | 48 | Asegúrese que ha [generado una clave pública](generating_ssh_key.md) en su terminal local. 49 | 50 | Abra otra ventana de terminal local (no en el servidor) y escriba: 51 | 52 | ``` 53 | cat ~/.ssh/id_rsa.pub 54 | ``` 55 | 56 | Copie el contenido de ese comando al archivo `authorized_keys` que debería seguir abierto en el servidor. 57 | 58 | Compruebe que su usuario puede iniciar sesión escribiendo: 59 | 60 | ``` 61 | ssh jupiter@your-copied-ip-address 62 | ``` 63 | 64 | Debería ver la página de bienvenida del servidor y un mensaje como este: 65 | 66 | ``` 67 | jupiter@consuldemocracyserver:~$ 68 | ``` 69 | 70 | Note que el nombre de usuario en el prompt no es "root", sino su nombre de usuario. Así que todo está bien y ahora podemos bloquear la cuenta root del acceso externo y también dejar de permitir el acceso con contraseña para que sólo las personas con claves SSH puedan iniciar sesión. 71 | 72 | Escriba el siguiente comando para editar el archivo de configuración SSH del servidor: 73 | 74 | ``` 75 | sudo nano /etc/ssh/sshd_config 76 | ``` 77 | 78 | Busque la línea "PasswordAuthentication yes" y cámbiela por "PasswordAuthentication no". Escriba Control-K para cerrar el editor nano y escriba: 79 | 80 | ``` 81 | sudo service ssh restart 82 | ``` 83 | -------------------------------------------------------------------------------- /en/customization/translations.md: -------------------------------------------------------------------------------- 1 | # Translations and Texts 2 | 3 | ## Translations 4 | 5 | Currently, Consul Democracy is totally or partially translated to multiple languages. You can find the translations at the [Crowdin project](https://translate.consuldemocracy.org/). 6 | 7 | Please [join the translators](https://crwd.in/consul) to help us complete existing ones, or contact us through [Consul Democracy's gitter](https://gitter.im/consul/consul) to become a proofreader and validate translators' contributions. 8 | 9 | If your language isn't already present in the Crowdin project, please [open an issue](https://github.com/consuldemocracy/consuldemocracy/issues/new?title=New language&body=Hello I would like to have my language INSERT YOUR LANGUAGE NAME added to Consul Democracy) and we'll set it up in a breeze. 10 | 11 | If you want to check existing translations of the user-facing texts you can find them organized in YML files under `config/locales/` folder. Take a look at the official Ruby on Rails [internationalization guide](http://guides.rubyonrails.org/i18n.html) to better understand the translations system. 12 | 13 | ## Custom Texts 14 | 15 | Since Consul Democracy is always evolving with new features, and in order to make your fork easier to be updated, we strongly recommend translation files not to be modified, but instead "overwritten" with custom translation files in case a text needs to be customized for you. 16 | 17 | So if you just want to change some of the existing texts, you can just drop your changes at the `config/locales/custom/` folder. We strongly recommend to include only those texts that you want to change instead of a whole copy of the original file. For example if you want to customize the text "Ayuntamiento de Madrid, 2016" that appears on every page's footer, firstly you want to locate where it's used (`app/views/layouts/_footer.html.erb`) and look at the locale identifier inside the code: 18 | 19 | ```ruby 20 | <%= t("layouts.footer.copyright", year: Time.current.year) %> 21 | ``` 22 | 23 | Then find the file where this identifier will be located (in that case `config/locales/es/general.yml`) following this structure (we're only displaying the relevant parts in the following snippet): 24 | 25 | ```yml 26 | es: 27 | layouts: 28 | footer: 29 | copyright: Ayuntamiento de Madrid, %{year} 30 | ``` 31 | 32 | In order to customize it, you should create a new file `config/locales/custom/es/general.yml` with just that content, and change "Ayuntamiento de Madrid" with our organization name. We strongly recommend to make copies from `config/locales/` and modify or delete the lines as needed to keep the indentation structure and avoid issues. 33 | 34 | ## Maintaining your Custom Texts & Languages 35 | 36 | Consul Democracy has the [i18n-tasks](https://github.com/glebm/i18n-tasks) gem, it's an awesome helping tool to manage i18n translations. Just check `i18n-tasks health` for a nice report. 37 | 38 | If you have a custom language different than English, you should add it to the [i18n-tasks.yml config file both `base_locale` and `locales`](https://github.com/consuldemocracy/consuldemocracy/blob/master/config/i18n-tasks.yml#L4-L7) variables so your language files will be checked as well. 39 | -------------------------------------------------------------------------------- /en/getting_started/update.md: -------------------------------------------------------------------------------- 1 | # Keeping your fork updated 2 | 3 | ## Configuring your git remotes 4 | 5 | If you created your fork correctly and cloned it locally, running: 6 | 7 | ```bash 8 | git remote -v 9 | ``` 10 | 11 | it should output something alike: 12 | 13 | > origin git@github.com:your_user_name/consuldemocracy.git (fetch)\ 14 | > origin git@github.com:your_user_name/consuldemocracy.git (push) 15 | 16 | Now we have to add Consul Democracy's github as upstream remote with: 17 | 18 | ```bash 19 | git remote add upstream git@github.com:consuldemocracy/consuldemocracy.git 20 | ``` 21 | 22 | and to check everything is fine with 23 | 24 | ```bash 25 | git remote -v 26 | ``` 27 | 28 | again you should get: 29 | 30 | > upstream git@github.com:consuldemocracy/consuldemocracy.git (fetch)\ 31 | > upstream git@github.com:consuldemocracy/consuldemocracy.git (push)\ 32 | > origin git@github.com:your_user_name/consuldemocracy.git (fetch)\ 33 | > origin git@github.com:your_user_name/consuldemocracy.git (push) 34 | 35 | ## Pulling changes from Consul Democracy 36 | 37 | Start by creating a branch named **upstream** from your **master** branch to apply Consul Democracy changes: 38 | 39 | ```bash 40 | git checkout master 41 | git pull 42 | git checkout -b upstream 43 | ``` 44 | 45 | Then we can fetch all changes from the **Consul Democracy** remote server with: 46 | 47 | ```bash 48 | git fetch upstream 49 | ``` 50 | 51 | And then you can choose to either: 52 | 53 | A. Get all the latest changes on Consul Democracy's **master** branch with `git merge upstream/master`. 54 | 55 | B. Just update up to an specific release tag (so you can do incremental updates if you're more than one release behind). For example to update up to [v0.9](https://github.com/consuldemocracy/consuldemocracy/releases/tag/v0.9) release just: `git merge v0.9`. 56 | 57 | ## Merging changes 58 | 59 | After the previous section `merge` command, there are three possible outcomes: 60 | 61 | A. You get a nice `Already up-to-date.` response. That means your fork is up to date with Consul Democracy 😊👌. 62 | 63 | B. You get a screen on your git configured editor showing the commit message `Merge remote-tracking branch 'upstream/master' into upstream`. That means git was able to grab latest changes from Consul Democracy's master branch, and it can merge them without code change conflicts. Finish the commit. 64 | 65 | C. You get some git errors along with a `Automatic merge failed; fix conflicts and then commit the result.` message. That means there are conflicts between the code changes you did and the ones done on Consul Democracy repository since the last time you update it. That's the main reason we strongly recommend often updates of your fork (think at least monthly). Resolve merge conflicts carefully and commit them. 66 | 67 | Now you can just simply push your **upstream** branch to github and create a Pull Request so you can easily check all changes going into your repo, and see your tests suite runs. 68 | 69 | Remember you can always quickly check changes that will come from Consul Democracy to your fork by replacing **your_org_name** on the url: . 70 | -------------------------------------------------------------------------------- /es/installation/ubuntu.md: -------------------------------------------------------------------------------- 1 | # Configuración para los entornos de desarrollo y pruebas (Ubuntu 18.04) 2 | 3 | ## Actualización de sistema 4 | 5 | Ejecuta una actualización general de las librerías de sistema: 6 | 7 | ```bash 8 | sudo apt update 9 | ``` 10 | 11 | ## Git 12 | 13 | Git es mantenido oficialmente en Ubuntu: 14 | 15 | ```bash 16 | sudo apt install git 17 | ``` 18 | 19 | ## Gestor de versiones de Ruby 20 | 21 | Las versiones de Ruby empaquetadas en repositorios oficiales no son aptas para trabajar con Consul Democracy, así que debemos instalarlo manualmente. 22 | 23 | En primer lugar, necesitamos los siguiente paquetes para poder instalar Ruby: 24 | 25 | ```bash 26 | sudo apt install libssl-dev autoconf bison build-essential libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev 27 | ``` 28 | 29 | A continuación instalaremos un gestor de versiones de Ruby, como rbenv: 30 | 31 | ```bash 32 | wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash 33 | echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc 34 | echo 'eval "$(rbenv init -)"' >> ~/.bashrc 35 | source ~/.bashrc 36 | ``` 37 | 38 | ## Node.js 39 | 40 | Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. Node.js es la opción recomendada. 41 | 42 | Ejecuta en tu terminal: 43 | 44 | ```bash 45 | sudo apt install nodejs 46 | ``` 47 | 48 | ## PostgreSQL 49 | 50 | Instala postgresql y sus dependencias de desarrollo con: 51 | 52 | ```bash 53 | sudo apt install postgresql libpq-dev 54 | ``` 55 | 56 | Para el correcto funcionamiento de Consul Democracy, necesitas confgurar un usuario para tu base de datos. Como ejemplo, crearemos un usuario llamado "consul": 57 | 58 | ```bash 59 | sudo -u postgres createuser consul --createdb --superuser --pwprompt 60 | ``` 61 | 62 | Para asegurarse que se utiliza la codificación con UTF-8, crea un archivo: 63 | 64 | ``` 65 | sudo nano /etc/profile.d/lang.sh 66 | ``` 67 | 68 | Añade las siguientes líneas: 69 | 70 | ``` 71 | export LANGUAGE="en_US.UTF-8" 72 | export LANG="en_US.UTF-8" 73 | export LC_ALL="en_US.UTF-8" 74 | ``` 75 | 76 | Reconfigura Postgres para utilizar la codificación UTF-8: 77 | 78 | ````` 79 | sudo su - postgres 80 | psql 81 | 82 | update pg_database set datistemplate=false where datname='template1'; 83 | drop database Template1; 84 | create database template1 with owner=postgres encoding='UTF-8' 85 | lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; 86 | update pg_database set datistemplate=true where datname='template1'; 87 | 88 | \q 89 | exit 90 | ````` 91 | 92 | ## Imagemagick 93 | 94 | Instala Imagemagick: 95 | 96 | ```bash 97 | sudo apt install imagemagick 98 | ``` 99 | 100 | ## ChromeDriver 101 | 102 | Para realizar pruebas de integración, usamos Selenium junto a Headless Chrome. 103 | 104 | Para poder utilizarlo, instala el paquete chromium-chromedrive y asegúrate de que se encuentre enlazado en algún directorio que esté en la variable de entorno PATH: 105 | 106 | ```bash 107 | sudo apt install chromium-chromedriver 108 | sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/ 109 | ``` 110 | 111 | ¡Ya estás listo para [instalar Consul Democracy](local_installation.md)! 112 | -------------------------------------------------------------------------------- /en/installation/manual_installation_production.md: -------------------------------------------------------------------------------- 1 | # Manual installation for production 2 | 3 | **WARNING:** This method is *not recommended* and not officially supported, since you should use the [installer](https://github.com/consuldemocracy/installer) instead. Use this method if the installer isn't an option and you can already deal with PostgreSQL, puma or passenger, NGNIX and SSL (with letsencrypt, for instance). 4 | 5 | This guide assumes you've already [installed all the necessary packages](prerequisites.md) on your system. 6 | 7 | The created directory structure herein is to be used with [capistrano](https://capistranorb.com/documentation/getting-started/structure/). 8 | 9 | ## Folder structure 10 | 11 | First, create the main folder, clone the repo to a repo directory, and create the needed folders: 12 | 13 | ``` 14 | mkdir consul 15 | cd consul 16 | git clone --mirror https://github.com/consuldemocracy/consuldemocracy.git repo 17 | mkdir releases shared 18 | mkdir shared/log shared/tmp shared/config shared/public shared/storage 19 | mkdir -p shared/public/assets shared/public/system shared/public/ckeditor_assets shared/public/machine_learning/data 20 | ``` 21 | 22 | ## Initial release 23 | 24 | Extract from the repo the first release to the respective directory, and create the symbolic link of the current release (replace `` with the latest version number, like 1.3.1 or 1.4.1): 25 | 26 | ``` 27 | cd repo 28 | git archive | tar -x -f - -C ../releases/first 29 | cd .. 30 | ln -s releases/first current 31 | ``` 32 | 33 | ## Gems installation 34 | 35 | Install the gems Consul Democracy depends on: 36 | 37 | ``` 38 | cd releases/first 39 | bundle install --path ../../shared/bundle --without development test 40 | cd ../.. 41 | ``` 42 | 43 | ## Configuration files 44 | 45 | Generate the `database.yml` and `secrets.yml` files: 46 | 47 | ``` 48 | cp current/config/secrets.yml.example shared/config/secrets.yml 49 | cp current/config/database.yml.example shared/config/database.yml 50 | cd releases/first/config 51 | ln -s ../../../shared/config/database.yml 52 | ln -s ../../../shared/config/secrets.yml 53 | cd ../../.. 54 | ``` 55 | 56 | Edit the `shared/config/database.yml` file, filling in `username` and `password` with the data generated during the [PostgreSQL setup](debian.md#postgresql-94). 57 | 58 | We now need to generate a secret key: 59 | 60 | ``` 61 | cd current 62 | bin/rake secret RAILS_ENV=production 63 | cd .. 64 | ``` 65 | 66 | Copy that generated key, and edit the `shared/config/secrets.yml` file; under the section `production`, change the following data: 67 | 68 | ``` 69 | secret_key_base: enter_the_secret_key_you_have_just_generated 70 | server_name: enter_your_domain 71 | ``` 72 | 73 | If you aren't using a SSL certificate, replace the line saying `force_ssl: true` with `force_ssl: false`. 74 | 75 | ## Database setup 76 | 77 | Create a database, load the seeds and compile the assets: 78 | 79 | ``` 80 | cd current 81 | bin/rake db:migrate RAILS_ENV=production 82 | bin/rake db:seed RAILS_ENV=production 83 | bin/rake assets:precompile RAILS_ENV=production 84 | ``` 85 | 86 | ## Starting the application 87 | 88 | And, finally, start the Rails server: 89 | 90 | ``` 91 | bin/rails s -e production 92 | ``` 93 | 94 | Congratulations! Your server is now running in the production environment :smile:. 95 | -------------------------------------------------------------------------------- /en/open_source/code_of_conduct.md: -------------------------------------------------------------------------------- 1 | # Code of conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language. 12 | * Being respectful of differing viewpoints and experiences. 13 | * Gracefully accepting constructive criticism. 14 | * Focusing on what is best for the community. 15 | * Showing empathy towards other community members. 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances. 20 | * Trolling, insulting/derogatory comments, and personal or political attacks. 21 | * Public or private harassment. 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission. 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting. 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [consul@madrid.es](mailto:consul@madrid.es). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]. 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /es/getting_started/update.md: -------------------------------------------------------------------------------- 1 | # Manten tu fork actualizado 2 | 3 | ## Configura tus servidores remotos de git 4 | 5 | Si creaste correctamente tu fork y lo clonaste localmente, usando: 6 | 7 | ```bash 8 | git remote -v 9 | ``` 10 | 11 | deberías ver algo como: 12 | 13 | > origin git@github.com:your_user_name/consuldemocracy.git (fetch)\ 14 | > origin git@github.com:your_user_name/consuldemocracy.git (push) 15 | 16 | Ahora debes añadir el repositorio git de Consul Democracy como servidor remoto con: 17 | 18 | ```bash 19 | git remote add upstream git@github.com:consuldemocracy/consuldemocracy.git 20 | ``` 21 | 22 | comprueba de nuevo que con: 23 | 24 | ```bash 25 | git remote -v 26 | ``` 27 | 28 | deberías recibir algo como: 29 | 30 | > upstream git@github.com:consuldemocracy/consuldemocracy.git (fetch)\ 31 | > upstream git@github.com:consuldemocracy/consuldemocracy.git (push)\ 32 | > origin git@github.com:your_user_name/consuldemocracy.git (fetch)\ 33 | > origin git@github.com:your_user_name/consuldemocracy.git (push) 34 | 35 | ## Obteniendo cambios de Consul Democracy 36 | 37 | Empieza creando una rama **upstream** a partir de tu rama **master** sobre la que trabajar: 38 | 39 | ```bash 40 | git checkout master 41 | git pull 42 | git checkout -b upstream 43 | ``` 44 | 45 | Y actualiza la información del repositorio de Consul Democracy con las referencias a las ramas, tags, etc..: 46 | 47 | ```bash 48 | git fetch upstream 49 | ``` 50 | 51 | Y por fin puedes elegir entre: 52 | 53 | A. Actualizar con los últimos cambios de la rama **master** usando `git merge upstream/master` 54 | 55 | B. Sólo actualizar hasta cierta versión (en el caso de que prefieras actualizar de forma incremental, si estas varias versiones por detrás). Por ejemplo para actualizarte a la versión [v0.9](https://github.com/consuldemocracy/consuldemocracy/releases/tag/v0.9) utilizamos el tag asociado: `git merge v0.9` 56 | 57 | ## Fusionando cambios 58 | 59 | Tras el `merge` de la anterior sección, hay tres posibles escenarios: 60 | 61 | A. Obtienes una respuesta `Already up-to-date.`. Eso significa que tu fork esta al dia con los cambios de Consul Democracy 😊👌 62 | 63 | B. Se abre una ventana del editor que tengas configurado en git, mostrando el mensaje de commit `Merge remote-tracking branch 'upstream/master' into upstream`. Esto significa que git fue capaz de mezclar los cambios de Consul Democracy sobre tu código sin encontrar problemas o conflictos. Termina el commit. 64 | 65 | C. Recibes mensajes de error de git junto con un `Automatic merge failed; fix conflicts and then commit the result.`. Esto significa que se han encontrado conflictos entre los cambios en tu código y los cambios que se realizaron en Consul Democracy desde la última vez que actualizaste tu fork. Esta es una de las principales razones para intentar mantener tu fork lo más al dia posible, realizando este proceso al menos mensualmente. Resuelve manualmente los conflictos para terminar el merge y haz un commit. 66 | 67 | Ahora simplemente sube la rama **upstream** a github y crea un Pull Request, así podrás ver de manera sencilla todos los cambios que se han realizado en el repositorio y verás también como arranca la suite de tests. 68 | 69 | Recuerda que siempre puedes comprobar rápidamente los cambios que tienes pendientes de integrar de Consul Democracy a tu fork sustituyendo **your_org_name** en la url: 70 | -------------------------------------------------------------------------------- /es/open_source/code_of_conduct.md: -------------------------------------------------------------------------------- 1 | # Código de conducta 2 | 3 | ## Nuestro compromiso 4 | 5 | En el interés de fomentar una comunidad abierta y acogedora, nosotros como contribuyentes y administradores nos comprometemos a hacer de la participación en nuestro proyecto y nuestra comunidad una experiencia libre de acoso para todos, independientemente de la edad, dimensión corporal, discapacidad, etnia, identidad y expresión de género, nivel de experiencia, nacionalidad, apariencia física, raza, religión, identidad u orientación sexual. 6 | 7 | ## Nuestros estándares 8 | 9 | Ejemplos de comportamiento que contribuyen a crear un ambiente positivo: 10 | 11 | * Uso de lenguaje amable e inclusivo. 12 | * Respeto a diferentes puntos de vista y experiencias. 13 | * Aceptación de críticas constructivas. 14 | * Enfocarse en lo que es mejor para la comunidad. 15 | * Mostrar empatía a otros miembros de la comunidad. 16 | 17 | Ejemplos de comportamiento inaceptable por participantes: 18 | 19 | * Uso de lenguaje o imágenes sexuales y atención sexual no deseada. 20 | * Comentarios insultantes o despectivos (*trolling*) y ataques personales o políticos. 21 | * Acoso público o privado. 22 | * Publicación de información privada de terceros sin su consentimiento, como direcciones físicas o electrónicas. 23 | * Otros tipos de conducta que pudieran considerarse inapropiadas en un entorno profesional.. 24 | 25 | ## Nuestras responsabilidades 26 | 27 | Los administradores del proyecto son responsables de clarificar los estándares de comportamiento aceptable y se espera que tomen medidas correctivas y apropiadas en respuesta a situaciones de conducta inaceptable. 28 | 29 | Los administradores del proyecto tienen el derecho y la responsabilidad de eliminar, editar o rechazar comentarios, *commits*, código, ediciones de documentación, *issues*, y otras contribuciones que no estén alineadas con este Código de Conducta, o de prohibir temporal o permanentemente a cualquier colaborador cuyo comportamiento sea inapropiado, amenazante, ofensivo o perjudicial. 30 | 31 | ## Alcance 32 | 33 | Este código de conducta aplica tanto a espacios del proyecto como a espacios públicos donde un individuo esté en representación del proyecto o comunidad. Ejemplos de esto incluye el uso de la cuenta oficial de correo electrónico, publicaciones a través de las redes sociales oficiales, o presentaciones con personas designadas en eventos *online* u *offline*. La representación del proyecto puede ser clarificada explicitamente por los administradores del proyecto. 34 | 35 | ## Aplicación 36 | 37 | Ejemplos de abuso, acoso u otro tipo de comportamiento inaceptable puede ser reportado al equipo del proyecto en [consul@madrid.es](mailto:consul@madrid.es). Todas las quejas serán revisadas e investigadas, generando un resultado apropiado a las circunstancias. El equipo del proyecto está obligado a mantener confidencialidad de la persona que reportó el incidente. Detalles específicos acerca de las políticas de aplicación pueden ser publicadas por separado. 38 | 39 | Administradores que no sigan o que no hagan cumplir este Código de Conducta pueden ser eliminados de forma temporal o permanente del equipo administrador. 40 | 41 | ## Atribución 42 | 43 | Este Código de Conducta es una adaptación del [Contributor Covenant][homepage], versión 1.4, disponible en [http://contributor-covenant.org/version/1/4/es/][version]. 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/es/ 47 | -------------------------------------------------------------------------------- /en/open_source/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We appreciate you want to help us by contributing to Consul Democracy. Here's a guide we made describing how to contribute changes to the project. 4 | 5 | ## Reporting an issue 6 | 7 | If you have seen anything wrong in the platform performance or directly in the code, we encourage you to [open an issue in the Consul Democracy Github repository](https://github.com/consuldemocracy/consuldemocracy/issues/new). 8 | 9 | Before doing it, **please take some time to check the [existing issues](https://github.com/consuldemocracy/consuldemocracy/issues) and make sure what you are about to report isn't already reported** by another person. In case someone else reported the same problem before, if you have more details about it you can write a comment in the issue page -a little more help can make a huge difference! 10 | 11 | In order to write a new issue, take into account these few tips to make it easy to read and comprehend: 12 | 13 | - Try to use a descriptive and to-the-point title. 14 | - It's a good idea to include some sections -in case they're needed- such as: steps to reproduce the bug, expected behaviour/response, actual response or screenshots. 15 | - Also it could be helpful to provide your operating system, browser version and installed plugins. 16 | 17 | ## Resolving an issue 18 | 19 | [Issues in Consul Democracy](https://github.com/consuldemocracy/consuldemocracy/issues) labeled with `PRs-welcome` are well defined features ready to be implemented by whoever wants to do it. In the other hand, the `not-ready` label marks features or changes not well defined yet or subject to an internal decision, so we recommend not to try to resolve them until the admins come to a resolution. 20 | 21 | We suggest to follow these steps to keep a good track of the changes you're about to make: 22 | 23 | - First of all, add a comment to the issue to make everyone know you are going to work on it. If the issue has someone assigned it means that person is already solving it. 24 | - Fork the project. 25 | - Create a feature branch based on the `master` branch. To make it easier to identify, you can name it with the issue number followed by a concise and descriptive name (e.g. `123-fix_proposals_link`). 26 | - Work in your branch committing there your changes. 27 | - Make sure all tests are passing. In case you're extending or creating a new feature, consider adding its own specs. 28 | - Once you've finished, send a **pull request** to the [Consul Democracy repository](https://github.com/consuldemocracy/consuldemocracy/) describing your solution to help us understand it. It's also important to tell what issue you're addressing, so specify it in the pull request description's first line (e.g. `Fixes #123`). 29 | - Our core team will review your PR and suggest changes if necessary. If everything looks good, your changes will be merged :) 30 | 31 | > **Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). 32 | 33 | ## Other ways of contributing 34 | 35 | We'll appreciate any kind of contribution to Consul Democracy. Even if you can't contribute to it coding, you still can: 36 | 37 | - Create issues about any problem or error you've encountered. 38 | - Help translate the platform to other languages you master at [Consul Democracy's Crowdin](https://crwd.in/consul). 39 | - Help with [Consul Democracy's documentation](https://github.com/consuldemocracy/docs). 40 | -------------------------------------------------------------------------------- /es/installation/manual_installation_production.md: -------------------------------------------------------------------------------- 1 | # Instalación manual en producción 2 | 3 | **AVISO:** Recomendamos *no usar* este sistema, para el que no damos soporte oficial, ya que siempre que sea posible debe utilizarse el [instalador](https://github.com/consuldemocracy/installer). Utiliza este método si usar el instalador no es una opción y si tienes experiencia configurando PostgreSQL, puma o passenger, NGNIX y SSL (con letsencrypt, por ejemplo). 4 | 5 | Esta guía asume que ya has [instalado todas las dependencias necesarias](prerequisites.md) en tu sistema. 6 | 7 | La estructura de directorios que se crea a continuación está pensada para usarse con [capistrano](https://capistranorb.com/documentation/getting-started/structure/). 8 | 9 | ## Estructura de directorios 10 | 11 | En primer lugar, crea el directorio principal, clona el repositorio y crea los subdirectorios necesarios: 12 | 13 | ``` 14 | mkdir consul && cd consul 15 | git clone --mirror https://github.com/consuldemocracy/consuldemocracy.git repo 16 | mkdir releases shared 17 | mkdir shared/log shared/tmp shared/config shared/public shared/storage 18 | mkdir -p shared/public/assets shared/public/system shared/public/ckeditor_assets shared/public/machine_learning/data 19 | ``` 20 | 21 | ## Versión inicial 22 | 23 | Crea una primera carpeta en "releases" a partir del repositorio, junto con un enlace simbólico a la versión actual (sustituye `` por el número de la última versión estable de Consul Democracy, como 1.3.1 o 1.4.1): 24 | 25 | ``` 26 | cd repo 27 | git archive | tar -x -f - -C ../releases/first 28 | cd .. 29 | ln -s releases/first current 30 | ``` 31 | 32 | ## Instalación de gemas 33 | 34 | Instala las gemas de las que depende Consul Democracy: 35 | 36 | ``` 37 | cd releases/first 38 | bundle install --path ../../shared/bundle --without development test 39 | cd ../.. 40 | ``` 41 | 42 | ## Ficheros de configuración 43 | 44 | Genera los ficheros `database.yml` y `secrets.yml`: 45 | 46 | ``` 47 | cp current/config/secrets.yml.example shared/config/secrets.yml 48 | cp current/config/database.yml.example shared/config/database.yml 49 | cd releases/first/config 50 | ln -s ../../../shared/config/database.yml 51 | ln -s ../../../shared/config/secrets.yml 52 | cd ../../.. 53 | ``` 54 | 55 | Edita el fichero `shared/config/database.yml`, rellenando `username` y `password` con los datos generador durante la [configuración de PostgreSQL](debian.md#postgresql-94). 56 | 57 | Ahora generamos una clave secreta: 58 | 59 | ``` 60 | cd current 61 | bin/rake secret RAILS_ENV=production 62 | cd .. 63 | ``` 64 | 65 | Copia la clave generada y edita el fichero `shared/config/secrets.yml`; en la sección `production`, cambia los siguientes datos: 66 | 67 | ``` 68 | secret_key_base: introduce_la_clave_secreta_que_acabas_de_generar 69 | server_name: introduce_tu_dominio 70 | ``` 71 | 72 | Si no tienes un certificado SSL, cambia además `force_ssl: true` por `force_ssl: false`. 73 | 74 | ## Base de datos 75 | 76 | Crea una base de datos, genera los datos necesarios para que la aplicación funcione y compila los ficheros de CSS y JavaScript: 77 | 78 | ``` 79 | cd current 80 | bin/rake db:migrate RAILS_ENV=production 81 | bin/rake db:seed RAILS_ENV=production 82 | bin/rake assets:precompile RAILS_ENV=production 83 | ``` 84 | 85 | ## Arranque de la aplicación 86 | 87 | Y, por último, inicia el servidor de Rails: 88 | 89 | ``` 90 | bin/rails s -e production 91 | ``` 92 | 93 | ¡Enhorabuena! Ahora tu servidor está funcionando en el entorno de producción :smile:. 94 | -------------------------------------------------------------------------------- /en/installation/digital_ocean.md: -------------------------------------------------------------------------------- 1 | # Installing Consul Democracy on a Digital Ocean VPS 2 | 3 | These instructions will help you register and buy a server in Digital Ocean to install Consul Democracy. 4 | 5 | First you need to [sign up](https://cloud.digitalocean.com/registrations/new) and provide your personal information. 6 | 7 | Once you are logged in, you need to create a Droplet (that’s the name that Digital Ocean uses for a Virtual Server). Click on the “Create” green button at the top of the page and select "Droplets": 8 | 9 | ![Digital Ocean Droplets](../../img/digital_ocean/droplets.png) 10 | 11 | In the next page, you need to select Ubuntu (it should be pre-selected) and change the version **from 18.04 x64 to 16.04 x64**. 12 | 13 | ![Digital Ocean Choose an image](../../img/digital_ocean/image.png) 14 | 15 | In the "Choose a size" section select the **$80/mo 16GB/6CPUs** option if this is going to be a production server. If you are just setting up a test system with a few users the cheapest $5/mo option can be enough. 16 | 17 | ![Digital Ocean Choose a size](../../img/digital_ocean/size.png) 18 | 19 | Leave the rest of the options with their defaults until “Choose a datacenter”. Select the one that will be geographically closer to your users. If you are in the EU, select either Frankfurt or Amsterdam data centers. 20 | 21 | ![Digital Ocean Choose a region](../../img/digital_ocean/region.png) 22 | 23 | In the "Add you SSH keys" section click "New SSH Key" button. 24 | 25 | ![Digital Ocean Add your SSH Keys](../../img/digital_ocean/ssh_keys.png) 26 | 27 | In the pop up window that appears you need to copy and paste the public key that we [generated in the previous step](generating_ssh_key.md). To see the content of this key in the terminal window type: 28 | 29 | ``` 30 | cat ~/.ssh/id_rsa.pub 31 | ``` 32 | 33 | You should see a text like this: 34 | 35 | ``` 36 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDy/BXU0OsK8KLLXpd7tVnqDU+d4ZS2RHQmH+hv0BFFdP6PmUbKdBDigRqG6W3QBexB2DpVcb/bmHlfhzDlIHJn/oki+SmUYLSWWTWuSeF/1N7kWf9Ebisk6hiBkh5+i0oIJYvAUsNm9wCayQ+i3U3NjuB25HbgtyjR3jDPIhmg1xv0KZ8yeVcU+WJth0pIvwq+t4vlZbwhm/t2ah8O7hWnbaGV/MZUcj0/wFuiad98yk2MLGciV6XIIq+MMIEWjrrt933wAgzEB8vgn9acrDloJNvqx25uNMpDbmoNXJ8+/P3UDkp465jmejVd/6bRaObXplu2zTv9wDO48ZpsaACP your_username@your_computer_name 37 | ``` 38 | 39 | Select and copy all the text and paste it in the pop-up window like this: 40 | 41 | ![Digital Ocean New SSH Key](../../img/digital_ocean/new_ssh.png) 42 | 43 | Please note that there will be two little green checks. If they are not there, retry copying the text because you probably left something out. Give your key a meaningful name, like **Consul_Democracy_key** and click "Add SSH Key" button. 44 | 45 | By using an SSH key instead of a user/password combination to access your server, it will be much more secure, as only someone with the private SSH key can access the server. 46 | 47 | Now in the "Choose a hostname" section change the default for something more meaningful, like **consuldemocracyserver** for example. 48 | 49 | ![Digital Ocean hostname](../../img/digital_ocean/hostname.png) 50 | 51 | At the bottom of the page you’ll see a summary of your options. Check that everything is OK and click the big green "Create" button. 52 | 53 | ![Digital Ocean create](../../img/digital_ocean/create.png) 54 | 55 | It will take a few minutes, and at the end you will have a shiny new server. It will look like this in the Digital Ocean page: 56 | 57 | ![Digital Ocean server](../../img/digital_ocean/server.png) 58 | 59 | Next to setup Consul Democracy in the server check the [installer's README](https://github.com/consuldemocracy/installer) 60 | -------------------------------------------------------------------------------- /en/installation/macos.md: -------------------------------------------------------------------------------- 1 | # Configuration for development and test environments (macOS) 2 | 3 | ## Homebrew 4 | 5 | Homebrew is a very popular package manager for OS X. It's advised to use it since it makes the installation of some of the dependencies much easier. 6 | 7 | You can find the installation instructions at: [brew.sh](http://brew.sh) 8 | 9 | ## XCode and XCode Command Line Tools 10 | 11 | To install *git* you'll first need to install *Xcode* (download it from the Mac App Store) and its *Xcode Command Line Tools* (you can install them from the Xcode's app menu) 12 | 13 | ## Git and Github 14 | 15 | You can download git from: [git-scm.com/download/mac](https://git-scm.com/download/mac) 16 | 17 | ## Ruby version manager 18 | 19 | OS X already comes with a preinstalled Ruby version, but it's quite old and we need a newer one. One of the multiple ways of installing Ruby in OS X is through *rbenv*. The installation instructions are in its GitHub repository and are pretty straight-forward: 20 | 21 | [github.com/rbenv/rbenv](https://github.com/rbenv/rbenv) 22 | 23 | ## Node.js 24 | 25 | To compile the assets, you'll need a JavaScript runtime. OS X comes with an integrated runtime called `Apple JavaScriptCore` but Node.js is the preferred option. 26 | 27 | To install it, you can use [n](https://github.com/tj/n) 28 | 29 | Run the following command on your terminal: 30 | 31 | ``` 32 | curl -L https://git.io/n-install | bash -s -- -y lts 33 | ``` 34 | 35 | And it will install the latest LTS (Long Term Support) Node version on your `$HOME` folder automatically (This makes use of [n-install](https://github.com/mklement0/n-install)) 36 | 37 | ## PostgreSQL (>=9.4) 38 | 39 | ``` 40 | brew install postgres 41 | ``` 42 | 43 | Once installed, we need to *initialize* it: 44 | 45 | ``` 46 | initdb /usr/local/var/postgres 47 | ``` 48 | 49 | Now we're going to configure some things related to the *default user*. First we start postgres server with: 50 | 51 | ``` 52 | postgres -D /usr/local/var/postgres 53 | ``` 54 | 55 | At this point we're supposed to have postgres correctly installed and a default user will automatically be created (whose name will match our username). This user hasn't got a password yet. 56 | 57 | If we run `psql` we'll login into the postgres console with the default user. Probably it will fail since its required that a default database exists for that user. We can create it by typing: 58 | 59 | ``` 60 | createdb 'your_username' 61 | ``` 62 | 63 | If we run `psql` again we should now get access to postgres console. With `\du` you can see the current users list. 64 | 65 | In case you want to set a password for your user you can make it through postgres console by: 66 | 67 | ``` 68 | ALTER USER your_username WITH PASSWORD 'your_password'; 69 | ``` 70 | 71 | Now we'll create the *consul* user, the one the application is using. Run in postgres console: 72 | 73 | ``` 74 | CREATE ROLE consul WITH PASSWORD '000'; 75 | ALTER ROLE consul WITH SUPERUSER; 76 | ALTER ROLE consul WITH login; 77 | ``` 78 | 79 | If at any point during PostgreSQL installation you feel you have messed things up, you can uninstall it and start again by running: 80 | 81 | ``` 82 | brew uninstall postgres 83 | ``` 84 | 85 | You'll have to delete also this directory (otherwise the new installation will generate conflicts, source: [gist.github.com/lxneng/741932](https://gist.github.com/lxneng/741932)): 86 | 87 | ``` 88 | rm -rf /usr/local/var/postgres 89 | ``` 90 | 91 | ## ChromeDriver 92 | 93 | ``` 94 | brew install chromedriver 95 | ``` 96 | 97 | ## Imagemagick 98 | 99 | ``` 100 | brew install imagemagick 101 | ``` 102 | 103 | Now that we have all the dependencies installed we can go ahead and [install Consul Democracy](local_installation.md). 104 | -------------------------------------------------------------------------------- /es/installation/digital_ocean.md: -------------------------------------------------------------------------------- 1 | # Instalando Consul Democracy en un VPS de Digital Ocean 2 | 3 | Estas instrucciones le ayudaran a registrarse y comprar un servidor en Digital Ocean para instalar Consul Democracy. 4 | 5 | Primero necesita [registrarse](https://cloud.digitalocean.com/registrations/new) y proporcionar su información personal. 6 | 7 | Una vez que haya iniciado sesión, deberá crear un Droplet (ese es el nombre que Digital Ocean utiliza para un Servidor Virtual). Haga clic en el botón verde "Crear" en la parte superior de la página y seleccione "Droplets": 8 | 9 | ![Digital Ocean Droplets](../../img/digital_ocean/droplets.png) 10 | 11 | En la página siguiente, debe seleccionar Ubuntu (debería estar preseleccionado) y cambiar la versión **de 18.04 x64 a 16.04 x64**. 12 | 13 | ![Digital Ocean Choose an image](../../img/digital_ocean/image.png) 14 | 15 | En la sección "Elegir un tamaño" seleccione la opción **$80/mo 16GB/6CPUs** si va a ser un servidor de producción. Si está configurando un sistema de prueba con unos pocos usuarios, la opción más barata de $5/mes puede ser suficiente. 16 | 17 | ![Digital Ocean Choose a size](../../img/digital_ocean/size.png) 18 | 19 | Deje el resto de las opciones con sus valores por defecto hasta "Elegir un centro de datos". Seleccione el que esté geográficamente más cerca de sus usuarios. Si se encuentra en la UE, seleccione los centros de datos de Frankfurt o Amsterdam. 20 | 21 | ![Digital Ocean Choose a region](../../img/digital_ocean/region.png) 22 | 23 | En la sección "Añadir claves SSH" pulse el botón "Nueva clave SSH". 24 | 25 | ![Digital Ocean Add your SSH Keys](../../img/digital_ocean/ssh_keys.png) 26 | 27 | En la ventana emergente que aparece es necesario copiar y pegar la clave pública que [generamos en el paso anterior](generating_ssh_key.md). Para ver el contenido de esta clave en la ventana del terminal, escriba: 28 | 29 | ``` 30 | cat ~/.ssh/id_rsa.pub 31 | ``` 32 | 33 | Debería ver un texto como este: 34 | 35 | ``` 36 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDy/BXU0OsK8KLLXpd7tVnqDU+d4ZS2RHQmH+hv0BFFdP6PmUbKdBDigRqG6W3QBexB2DpVcb/bmHlfhzDlIHJn/oki+SmUYLSWWTWuSeF/1N7kWf9Ebisk6hiBkh5+i0oIJYvAUsNm9wCayQ+i3U3NjuB25HbgtyjR3jDPIhmg1xv0KZ8yeVcU+WJth0pIvwq+t4vlZbwhm/t2ah8O7hWnbaGV/MZUcj0/wFuiad98yk2MLGciV6XIIq+MMIEWjrrt933wAgzEB8vgn9acrDloJNvqx25uNMpDbmoNXJ8+/P3UDkp465jmejVd/6bRaObXplu2zTv9wDO48ZpsaACP your_username@your_computer_name 37 | ``` 38 | 39 | Seleccione y copie todo el texto y péguelo en la ventana emergente de la siguiente manera: 40 | 41 | ![Digital Ocean New SSH Key](../../img/digital_ocean/new_ssh.png) 42 | 43 | Tenga en cuenta que habrá dos pequeños checks verdes. Si no están ahí, vuelva a intentar copiar el texto porque probablemente omitió algo. Dé a su clave un nombre significativo, como **Consul_Democracy_key** y haga clic en el botón "Add SSH Key" (Añadir clave SSH). 44 | 45 | Al utilizar una clave SSH en lugar de una combinación de usuario/contraseña para acceder a su servidor, será mucho más seguro, ya que sólo alguien con la clave privada SSH puede acceder al servidor. 46 | 47 | Ahora en la sección "Choose a hostname" cambie el valor por defecto por algo más significativo, como **consuldemocracyserver** por ejemplo. 48 | 49 | ![Digital Ocean hostname](../../img/digital_ocean/hostname.png) 50 | 51 | En la parte inferior de la página verás un resumen de tus opciones. Compruebe que todo está bien y haga clic en el botón grande verde "Crear". 52 | 53 | ![Digital Ocean create](../../img/digital_ocean/create.png) 54 | 55 | Tardará unos minutos, y al final tendrá un brillante nuevo servidor. Se verá así en la página de Digital Ocean: 56 | 57 | ![Digital Ocean server](../../img/digital_ocean/server.png) 58 | 59 | Lo siguiente es configurar Consul Democracy en el servidor. Por favor [leer estas instrucciones](https://github.com/consuldemocracy/installer) 60 | -------------------------------------------------------------------------------- /es/open_source/contributing.md: -------------------------------------------------------------------------------- 1 | # Contribuciones 2 | 3 | Te agradecemos que quieras colaborar contribuyendo a Consul Democracy. Aquí tienes una guía donde consultar cómo sugerir cambios y mejoras al proyecto. 4 | 5 | ## Reportar un issue 6 | 7 | Si has visto algún error en la plataforma o directamente en el código, te animamos a [abrir un issue en el repositorio en Github de Consul Democracy](https://github.com/consuldemocracy/consuldemocracy/issues/new). 8 | 9 | Antes de hacerlo, **por favor tómate un tiempo para comprobar los [issues ya existentes](https://github.com/consuldemocracy/consuldemocracy/issues) y asegúrate de que lo que estás a punto de reportar no ha sido reportado previamente** por otra persona. De ser así, si tienes más detalles acerca de la incidencia puedes escribir un comentario en la página del issue ‑¡un poco de ayuda puede marcar una gran diferencia! 10 | 11 | Para escribir un nuevo issue, ten en cuenta estas recomendaciones para hacerlo más fácil de leer y comprender: 12 | 13 | - Intenta usar un título descriptivo. 14 | - Es buena idea incluir algunas secciones -en caso de que sean necesarias- como los pasos para reproducir el error, el comportamiento o respuesta que cabría esperar, la respuesta que devuelve o capturas de pantalla. 15 | - También puede ser de ayuda incluir en la descripción tu sistema operativo, versión del navegador que usaste y posibles plugins instalados. 16 | 17 | ## Resolver un issue 18 | 19 | [Los issues en Consul Democracy](https://github.com/consuldemocracy/consuldemocracy/issues) con la etiqueta `PRs-welcome` son funcionalidades bien definidas que están listas para ser implementadas por cualquiera que se ofrezca a ello. Por otra parte, la etiqueta `not-ready` indica las funcionalidades o cambios que aún están pendientes de concretar, por lo que recomendamos no intentar resolverlos hasta que los/as administradores/as lleguen a una resolución. 20 | 21 | Te sugerimos seguir los siguientes pasos para facilitar el seguimiento de los cambios que vayas a hacer: 22 | 23 | - Primero, añade un comentario en el issue para notificar que vas resolverlo. Si el issue tiene a alguien asignado significa que ya hay alguien encargado de él. 24 | - Crea un fork del proyecto. 25 | - Crea una rama de funcionalidad basada en la rama `master`. Para identificarla más fácilmente, puedes nombrarla con el número del issue seguido de un nombre conciso y descriptivo (por ejemplo: `123-fix_proposals_link`). 26 | - Desarrolla los cambios haciendo commits en tu nueva rama. 27 | - Asegúrate de que todos los tests pasan. Si estás extendiendo una funcionalidad o creando una nueva, considera añadir sus propios tests. 28 | - Cuando hayas terminado, envía un **pull request** al [repositorio de Consul Democracy](https://github.com/consuldemocracy/consuldemocracy/) describiendo la solución que propones para ayudarnos a entenderlo. También es importante que especifiques qué issue estás resolviendo al principio de la descripción del PR (por ejemplo, `Fixes #123`). 29 | - El equipo de Consul Democracy revisará tu PR y podrá sugerir cambios si son necesarios. Una vez esté todo bien, tus cambios serán introducidos en el proyecto :) 30 | 31 | > **¿Es tu primer Pull Request?** Puedes aprender cómo contribuir a un proyecto en Github siguiendo los tutoriales [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) (en inglés). 32 | 33 | ## Otras formas de contribuir 34 | 35 | Agradecemos cualquier tipo de contribución a Consul Democracy. Incluso si no puedes contribuir al código del proyecto, puedes: 36 | 37 | - Crear issues sobre cualquier problema o error que hayas encontrado. 38 | - Ayudar a traducir la plataforma a otros idiomas que domines en el proyecto de [Consul Democracy en Crowdin](https://crwd.in/consul). 39 | - Ayudar con la [documentación de Consul Democracy](https://github.com/consuldemocracy/docs). 40 | -------------------------------------------------------------------------------- /en/installation/using-aws-s3-as-storage.md: -------------------------------------------------------------------------------- 1 | # Using AWS S3 as file storage 2 | 3 | While Consul Democracy keeps most of its data in a PostgreSQL database, all the files such as documents or images have to be stored elsewhere. 4 | 5 | To take care of them, Consul Democracy uses the [Paperclip gem](https://github.com/thoughtbot/paperclip) (Warning: this gem is now deprecated and Consul Democracy will probably migrate to ActiveStorage in the future. Check that this is not already the case before using this guide). 6 | 7 | By default, the attachments are stored on the filesystem. However, with services such as Heroku, there is no persistent storage which means that these files are periodically erased. 8 | 9 | This tutorial explains how to configure Paperclip to use [AWS S3](https://aws.amazon.com/fr/s3/). It doesn't recommend S3 or the use of Amazon services and will hopefully be expanded to include configuration for [fog storage](http://fog.io/storage/). 10 | 11 | ## Adding the gem *aws-sdk-s3* 12 | 13 | First, add the following line in your *Gemfile_custom* 14 | 15 | ``` 16 | gem 'aws-sdk-s3', '~> 1' 17 | ``` 18 | 19 | Make sure to have a recent version of paperclip (Consul Democracy is currently using 5.2.1, which doesn't recognize *aws-sdk-s3*). In your Gemfile, the line should be: 20 | 21 | ``` 22 | gem 'paperclip', '~> 6.1.0' 23 | ``` 24 | 25 | Run `bundle install` to apply your changes. 26 | 27 | ## Adding your credentials in *secrets.yml* 28 | 29 | This guide will assume that you have an Amazon account configured to use S3 and that you created a bucket for your instance of Consul Democracy. It is highly recommended to use a different bucket for each instance (production, preproduction, staging). 30 | 31 | You will need the following information: 32 | 33 | - the **name** of the S3 bucket 34 | - the **region** of the S3 bucket (`eu-central-1` for UE-Francfort for example) 35 | - the **hostname** of the S3 bucket (`s3.eu-central-1.amazonaws.com` for Francfort, for example) 36 | - an **access key id** and a **secret access key** with read/write permission to that bucket 37 | 38 | **WARNING:** It is recommended to create IAM users that will only have read/write permission to the bucket you want to use for that specific instance of Consul Democracy. 39 | 40 | Once you have these pieces of information, you can save them as environment variables of the instance running Consul Democracy. In this tutorial, we save them respectively as *AWS_S3_BUCKET*, *AWS_S3_REGION*, *AWS_S3_HOSTNAME*, *AWS_ACCESS_KEY_ID* and *AWS_SECRET_ACCESS_KEY*. 41 | 42 | Add the following block in your *secrets.yml* file: 43 | 44 | ``` 45 | aws: &aws 46 | aws_s3_region: <%= ENV["AWS_S3_REGION"] %> 47 | aws_access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %> 48 | aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %> 49 | aws_s3_bucket: <%= ENV["AWS_S3_BUCKET"] %> 50 | aws_s3_host_name: <%= ENV["AWS_S3_HOST_NAME"] %> 51 | ``` 52 | 53 | and `<<: *aws` under the environments which you want to use S3 with, for example: 54 | 55 | ``` 56 | production: 57 | [...] 58 | <<: *aws 59 | ``` 60 | 61 | ## Configuring Paperclip 62 | 63 | First, activate Paperclip's URI adapter by creating the file *config/initializers/paperclip.rb* with the following content: 64 | 65 | ``` 66 | Paperclip::UriAdapter.register 67 | ``` 68 | 69 | Finally, add the following lines in the environment file of the instance which you want to use S3 with. In production, you should for example edit *config/environments/production.rb*. 70 | 71 | ``` 72 | # Paperclip settings to store images and documents on S3 73 | config.paperclip_defaults = { 74 | storage: :s3, 75 | preserve_files: true, 76 | s3_host_name: Rails.application.secrets.aws_s3_host_name, 77 | s3_protocol: :https, 78 | s3_credentials: { 79 | bucket: Rails.application.secrets.aws_s3_bucket, 80 | access_key_id: Rails.application.secrets.aws_access_key_id, 81 | secret_access_key: Rails.application.secrets.aws_secret_access_key, 82 | s3_region: Rails.application.secrets.aws_s3_region, 83 | } 84 | } 85 | ``` 86 | 87 | You will need to restart to apply the changes. 88 | -------------------------------------------------------------------------------- /es/installation/macos.md: -------------------------------------------------------------------------------- 1 | # Configuración para los entornos de desarrollo y pruebas (Mac OS X) 2 | 3 | ## Homebrew 4 | 5 | Homebrew es un gestor de paquetes para OS X muy popular. Es recomendable usarlo pues facilita enormemente la instalación de algunos de los paquetes necesarios. 6 | 7 | Puedes encontrar las instrucciones de instalación en: [brew.sh](http://brew.sh) 8 | 9 | ## XCode y XCode Command Line Tools 10 | 11 | Para utilizar git necesitarás instalar *Xcode* (está en la Mac App Store) y las *Xcode Command Line Tools* (se instalan desde el menú de Xcode). 12 | 13 | ## Git y Github 14 | 15 | Puedes descargar git desde: [git-scm.com/download/mac](https://git-scm.com/download/mac) 16 | 17 | ## Gestor de versiones de Ruby 18 | 19 | OS X ya viene con una versión preinstalada de ruby, pero es bastante vieja y en nuestro caso no nos sirve. Una de las formas de instalar Ruby es a través de rbenv. Las instrucciones de instalación están en su GitHub y son bastante claras: 20 | 21 | [github.com/rbenv/rbenv](https://github.com/rbenv/rbenv) 22 | 23 | ## Bundler 24 | 25 | ``` 26 | gem install bundler 27 | ``` 28 | 29 | ## Node.js 30 | 31 | Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. OS X viene con un _runtime_ integrado llamado `Apple JavaScriptCore` pero Node.js es la opción recomendada. 32 | 33 | Para instalar Node, puedes usar [n](https://github.com/tj/n) 34 | 35 | Ejecuta el siguiente comando en tu terminal: 36 | 37 | ``` 38 | curl -L https://git.io/n-install | bash -s -- -y lts 39 | ``` 40 | 41 | Y este instalará automáticamente la versión LTS (_Long Term Support_, inglés para "Soporte a largo plazo") más reciente de Node en tu directorio `$HOME` (Este comando hace uso de [n-install](https://github.com/mklement0/n-install)) 42 | 43 | ## PostgreSQL (>=9.4) 44 | 45 | ``` 46 | brew install postgres 47 | ``` 48 | 49 | Una vez instalado es necesario *inicializar* la instalación: 50 | 51 | ``` 52 | initdb /usr/local/var/postgres 53 | ``` 54 | 55 | Ahora vamos a configurar algunos aspectos del usuario por defecto. Primero iniciamos el servidor de postgres con: 56 | 57 | ``` 58 | postgres -D /usr/local/var/postgres 59 | ``` 60 | 61 | Llegados a este punto se supone que tenemos postgres correctamente instalado y se nos habrá creado un usuario por defecto (cuyo nombre es nuestro nombre de usuario), y que (todavía) no tiene contraseña. 62 | 63 | Si ejecutamos `psql` accederemos a la consola de postgres con el usuario por defecto. Probablemente fallará porque es necesario que de antemano exista una base de datos por defecto para dicho usuario. Podemos crearla ejecutando sobre la terminal: 64 | 65 | ``` 66 | createdb 'tu_nombre_de_usuario' 67 | ``` 68 | 69 | Si ahora ejecutamos `psql` de nuevo deberíamos poder acceder correctamente a la consola de postgres. Si sobre la consola de postgres ejecutas `\du` puede ver la lista de usuarios actual. 70 | 71 | En el caso de que quieras asignarte una contraseña puedes hacerlo desde la consola de postgres con: 72 | 73 | ``` 74 | ALTER USER tu_nombre_usuario WITH PASSWORD 'tu_contraseña'; 75 | ``` 76 | 77 | Ahora vamos a crear el usuario *consul*, que es el que utiliza la aplicación. Ejecuta sobre la consola de postgres: 78 | 79 | ``` 80 | CREATE ROLE consul WITH PASSWORD '000'; 81 | ALTER ROLE consul WITH SUPERUSER; 82 | ALTER ROLE consul WITH login; 83 | ``` 84 | 85 | Si en algún momento durante la instalación de PostgreSQL y sospechas que te has equivocado y deseas desinstalarlo y volver a empezar desde cero: 86 | 87 | ``` 88 | brew uninstall postgres 89 | ``` 90 | 91 | También tendrás que borrar el siguiente directorio para que no de conflictos cuando intentes volver a instalarlo (fuente: [gist.github.com/lxneng/741932](https://gist.github.com/lxneng/741932)): 92 | 93 | ``` 94 | rm -rf /usr/local/var/postgres 95 | ``` 96 | 97 | ## ChromeDriver 98 | 99 | ``` 100 | brew install chromedriver 101 | ``` 102 | 103 | ## Imagemagick 104 | 105 | ``` 106 | brew install imagemagick 107 | ``` 108 | 109 | Ahora que ya tenemos todas las dependencias instalado podemos proceder con la [instalación de Consul Democracy](local_installation.md) 110 | -------------------------------------------------------------------------------- /en/installation/debian.md: -------------------------------------------------------------------------------- 1 | # Configuration for development and test environments (Debian GNU/Linux 9.8) 2 | 3 | ## Superuser 4 | 5 | Note that 'sudo' is not installed by default in Debian. It's possible to install and configure it, you can find information [here](https://wiki.debian.org/sudo). But we don't recommend it cause you may have other problems. We recommend running the following commands as a superuser, so make sure the very first command you run is: 6 | 7 | ``` 8 | su 9 | ``` 10 | 11 | > For [Vagrant](/en/installation/vagrant.md) run: 12 | > ``` 13 | > sudo su - 14 | > ``` 15 | 16 | ## System update 17 | 18 | Run a general system update: 19 | 20 | ```bash 21 | apt-get update 22 | ``` 23 | 24 | ## Git 25 | 26 | Git is officially maintained in Debian: 27 | 28 | ``` 29 | apt-get install git 30 | ``` 31 | 32 | ## Curl 33 | 34 | Curl is officially maintained in Debian: 35 | 36 | ``` 37 | apt-get install curl 38 | ``` 39 | 40 | ## Ruby version manager 41 | 42 | Ruby versions packaged in official repositories are not suitable to work with Consul Democracy, so we'll have to install it manually. 43 | 44 | One possible tool is rvm: 45 | 46 | ### As a local user 47 | 48 | ``` 49 | command curl -sSL https://rvm.io/mpapis.asc | gpg --import - 50 | command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - 51 | curl -L https://get.rvm.io | bash -s stable 52 | ``` 53 | 54 | then add rvm script source to user's bash (~/.bashrc) (this step is only necessary if you can't execute the rvm command) 55 | 56 | ``` 57 | [[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm 58 | ``` 59 | 60 | and finally, reload .bashrc to be able to run RVM 61 | 62 | ``` 63 | source ~/.bashrc 64 | ``` 65 | 66 | ## Node.js 67 | 68 | To compile the assets, you'll need a JavaScript runtime. Node.js is the preferred option. As with Ruby, we don't recommend installing Node from your distro's repositories. 69 | 70 | To install it, you can use [n](https://github.com/tj/n) 71 | 72 | Run the following command on your terminal: 73 | 74 | ``` 75 | curl -L https://git.io/n-install | bash -s -- -y lts 76 | ``` 77 | 78 | And it will install the latest LTS (Long Term Support) Node version on your `$HOME` folder automatically (This makes use of [n-install](https://github.com/mklement0/n-install)) 79 | 80 | Reload .bashrc to be able to run node 81 | 82 | ``` 83 | source /root/.bashrc 84 | ``` 85 | 86 | Check it's correctly installed by running: 87 | 88 | ``` 89 | node -v 90 | ``` 91 | 92 | ## PostgreSQL (>=9.4) 93 | 94 | PostgreSQL version 9.4 is not official in debian 9. 95 | 96 | So you have to add a repository, the official postgresql works fine. 97 | 98 | Add the repository to apt, for example creating file */etc/apt/sources.list.d/pgdg.list* with: 99 | 100 | ``` 101 | deb http://security.debian.org/debian-security jessie/updates main 102 | ``` 103 | 104 | afterwards you'll have to download the key, and install it, by: 105 | 106 | ``` 107 | wget https://www.postgresql.org/media/keys/ACCC4CF8.asc 108 | apt-key add ACCC4CF8.asc 109 | ``` 110 | 111 | and install postgresql 112 | 113 | ``` 114 | apt-get update 115 | apt-get install postgresql-9.4 postgresql-server-dev-9.4 postgresql-contrib-9.4 116 | ``` 117 | 118 | You also need to configure a user for your database. As an example, we'll choose the username "consul": 119 | 120 | ``` 121 | su - postgres 122 | 123 | createuser consul --createdb --superuser --pwprompt 124 | 125 | exit 126 | ``` 127 | 128 | ## Imagemagick 129 | 130 | Install Imagemagick: 131 | 132 | ```bash 133 | apt-get install imagemagick 134 | ``` 135 | 136 | ## ChromeDriver 137 | 138 | To run E2E integration tests, we use Selenium along with Headless Chrome. 139 | 140 | To get it working, install the chromedriver package: 141 | 142 | ```bash 143 | apt-get install chromedriver 144 | ln -s /usr/lib/chromedriver /usr/local/bin/ 145 | ``` 146 | 147 | Make sure it's working as expected by running the following command: 148 | 149 | ```bash 150 | chromedriver --version 151 | ``` 152 | 153 | You should receive an output with the latest version of ChromeDriver. If that's the case, you're good to go! 154 | 155 | If you are using an Arch-based distro, installing `chromium` from the `extra` repository should be sufficient. 156 | 157 | You also have the option of just installing ChromeDriver from AUR. If you use `pacaur`, run the following command: 158 | 159 | ```bash 160 | pacaur -S chromedriver 161 | ``` 162 | 163 | Now you're ready to go get Consul Democracy [installed](local_installation.md)!! 164 | -------------------------------------------------------------------------------- /es/README.md: -------------------------------------------------------------------------------- 1 | ![Logotipo de CONSUL DEMOCRACY](../img/consul_logo.png) 2 | 3 | # CONSUL DEMOCRACY 4 | 5 | Aplicación de Participación Ciudadana y Gobierno Abierto 6 | 7 | ![Estado de los tests](https://github.com/consuldemocracy/consuldemocracy/workflows/tests/badge.svg) 8 | [![Code Climate](https://codeclimate.com/github/consuldemocracy/consuldemocracy/badges/gpa.svg)](https://codeclimate.com/github/consuldemocracy/consuldemocracy) 9 | [![Coverage Status](https://coveralls.io/repos/github/consuldemocracy/consuldemocracy/badge.svg?branch=master)](https://coveralls.io/github/consuldemocracy/consuldemocracy?branch=master) 10 | [![Crowdin](https://d322cqt584bo4o.cloudfront.net/consul/localized.svg)](https://translate.consuldemocracy.org/) 11 | [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0) 12 | 13 | [![Accessibility conformance](https://img.shields.io/badge/accessibility-WAI:AA-green.svg)](https://www.w3.org/WAI/eval/Overview) 14 | [![A11y issues checked with Rocket Validator](https://rocketvalidator.com/badges/checked_with_rocket_validator.svg?url=https://rocketvalidator.com)](https://rocketvalidator.com/opensource) 15 | 16 | [![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 17 | [![Help wanted](https://img.shields.io/badge/help-wanted-brightgreen.svg?style=flat-square)](https://github.com/consuldemocracy/consuldemocracy/issues?q=is%3Aopen+label%3A"help+wanted") 18 | 19 | Este es el repositorio de código abierto de la Aplicación de Participación Ciudadana CONSUL DEMOCRACY, creada originariamente por el Ayuntamiento de Madrid. 20 | 21 | ## Documentación 22 | 23 | Por favor visita la documentación que está siendo completada en [https://docs.consuldemocracy.org](https://docs.consuldemocracy.org) para conocer más sobre este proyecto, cómo comenzar tu propio fork, instalarlo, personalizarlo y usarlo como administrador/mantenedor. 24 | 25 | ## Web CONSUL DEMOCRACY Project 26 | 27 | Puedes acceder a la página principal del proyecto en [http://consuldemocracy.org](http://consuldemocracy.org) donde puedes encontrar documentación sobre el uso de la plataforma, videos y enlaces al espacio de la comunidad. 28 | 29 | ## Configuración para desarrollo y tests 30 | 31 | **NOTA**: para unas instrucciones más detalladas consulta la [documentación](https://docs.consuldemocracy.org) 32 | 33 | Prerequisitos: tener instalado git, Ruby 3.0.6, CMake, pkg-config, shared-mime-info, Node.js y PostgreSQL (9.5 o superior). 34 | 35 | ```bash 36 | git clone https://github.com/consuldemocracy/consuldemocracy.git 37 | cd consuldemocracy 38 | bundle install 39 | cp config/database.yml.example config/database.yml 40 | cp config/secrets.yml.example config/secrets.yml 41 | bin/rake db:create 42 | bin/rake db:migrate 43 | bin/rake db:dev_seed 44 | RAILS_ENV=test rake db:setup 45 | ``` 46 | 47 | Para ejecutar la aplicación en local: 48 | 49 | ``` 50 | bin/rails s 51 | ``` 52 | 53 | Para ejecutar los tests: 54 | 55 | ``` 56 | bin/rspec 57 | ``` 58 | 59 | Puedes usar el usuario administrador por defecto del fichero seeds: 60 | 61 | **user:** admin@consul.dev 62 | **pass:** 12345678 63 | 64 | Pero para ciertas acciones, como apoyar, necesitarás un usuario verificado, el fichero seeds proporciona uno: 65 | 66 | **user:** verified@consul.dev 67 | **pass:** 12345678 68 | 69 | ## Estado del proyecto 70 | 71 | El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/consuldemocracy/consuldemocracy/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6) y el código fue puesto en producción el día 7 de Septiembre de 2015 en [decide.madrid.es](https://decide.madrid.es). Desde entonces se le añaden mejoras y funcionalidades constantemente. Las funcionalidades actuales se pueden consultar en la [la página del projecto](http://consuldemocracy.org/es) y las futuras funcionalidades en el [Roadmap](https://github.com/consuldemocracy/consuldemocracy/projects/6) y [el listado de issues](https://github.com/consuldemocracy/consuldemocracy/issues). 72 | 73 | ## Licencia 74 | 75 | El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver [LICENSE-AGPLv3.txt](open_source/license.md)) 76 | 77 | ## Contribuciones 78 | 79 | Ver fichero [CONTRIBUTING_ES.md](https://github.com/consuldemocracy/consuldemocracy/blob/master/CONTRIBUTING_ES.md) 80 | 81 | ## Desarrollo en local con Docker 82 | 83 | Puedes leer la guía en [https://consul_docs.gitbooks.io/docs/content/es/getting_started/docker.html](https://consul_docs.gitbooks.io/docs/content/es/getting_started/docker.html) 84 | -------------------------------------------------------------------------------- /en/README.md: -------------------------------------------------------------------------------- 1 | ![CONSUL DEMOCRACY logo](../img/consul_logo.png) 2 | 3 | # CONSUL DEMOCRACY 4 | 5 | Citizen Participation and Open Government Application 6 | 7 | ![Build status](https://github.com/consuldemocracy/consuldemocracy/workflows/tests/badge.svg) 8 | [![Code Climate](https://codeclimate.com/github/consuldemocracy/consuldemocracy/badges/gpa.svg)](https://codeclimate.com/github/consuldemocracy/consuldemocracy) 9 | [![Coverage Status](https://coveralls.io/repos/github/consuldemocracy/consuldemocracy/badge.svg)](https://coveralls.io/github/consuldemocracy/consuldemocracy?branch=master) 10 | [![Crowdin](https://d322cqt584bo4o.cloudfront.net/consul/localized.svg)](https://translate.consuldemocracy.org/) 11 | [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0) 12 | 13 | [![Accessibility conformance](https://img.shields.io/badge/accessibility-WAI:AA-green.svg)](https://www.w3.org/WAI/eval/Overview) 14 | [![A11y issues checked with Rocket Validator](https://rocketvalidator.com/badges/checked_with_rocket_validator.svg?url=https://rocketvalidator.com)](https://rocketvalidator.com/opensource) 15 | 16 | [![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 17 | [![Help wanted](https://img.shields.io/badge/help-wanted-brightgreen.svg?style=flat-square)](https://github.com/consuldemocracy/consuldemocracy/issues?q=is%3Aopen+label%3A"help+wanted") 18 | 19 | [![Knapsack Pro Parallel CI builds for RSpec tests](https://img.shields.io/badge/Knapsack%20Pro-Parallel%20/%20RSpec%20tests-%230074ff)](https://knapsackpro.com/dashboard/organizations/176/projects/202/test_suites/318/builds?utm_campaign=organization-id-176&utm_content=test-suite-id-318&utm_medium=readme&utm_source=knapsack-pro-badge&utm_term=project-id-202) 20 | 21 | This is the opensource code repository of the eParticipation website CONSUL DEMOCRACY, originally developed for the Madrid City government eParticipation website 22 | 23 | ## Documentation 24 | 25 | Check the ongoing documentation at [https://docs.consuldemocracy.org](https://docs.consuldemocracy.org) to learn more about how to start your own CONSUL DEMOCRACY fork, install it, customize it and learn to use it from an administrator/maintainer perspective. 26 | 27 | ## CONSUL DEMOCRACY Project main website 28 | 29 | You can access the main website of the project at [http://consuldemocracy.org](http://consuldemocracy.org) where you can find documentation about the use of the platform, videos, and links to the community space. 30 | 31 | ## Configuration for development and test environments 32 | 33 | **NOTE**: For more detailed instructions check the [docs](https://docs.consuldemocracy.org) 34 | 35 | Prerequisites: install git, Ruby 3.0.6, CMake, pkg-config, shared-mime-info, Node.js and PostgreSQL (>=9.5). 36 | 37 | ```bash 38 | git clone https://github.com/consuldemocracy/consuldemocracy.git 39 | cd consuldemocracy 40 | bundle install 41 | cp config/database.yml.example config/database.yml 42 | cp config/secrets.yml.example config/secrets.yml 43 | bin/rake db:create 44 | bin/rake db:migrate 45 | bin/rake db:dev_seed 46 | RAILS_ENV=test rake db:setup 47 | ``` 48 | 49 | Run the app locally: 50 | 51 | ```bash 52 | bin/rails s 53 | ``` 54 | 55 | Run the tests with: 56 | 57 | ```bash 58 | bin/rspec 59 | ``` 60 | 61 | You can use the default admin user from the seeds file: 62 | 63 | **user:** admin@consul.dev 64 | **pass:** 12345678 65 | 66 | But for some actions like voting, you will need a verified user, the seeds file also includes one: 67 | 68 | **user:** verified@consul.dev 69 | **pass:** 12345678 70 | 71 | ## Configuration for production environments 72 | 73 | See [installer](https://github.com/consuldemocracy/installer) 74 | 75 | ## Current state 76 | 77 | Development started on [2015 July 15th](https://github.com/consuldemocracy/consuldemocracy/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6). Code was deployed to production on 2015 september 7th to [decide.madrid.es](https://decide.madrid.es). Since then new features are added often. You can take a look at the current features at the [project's website](http://consuldemocracy.org/) and future features at the [Roadmap](https://github.com/orgs/consuldemocracy/projects/1) and [open issues list](https://github.com/consuldemocracy/consuldemocracy/issues). 78 | 79 | ## License 80 | 81 | Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](open_source/license.md)) 82 | 83 | ## Contributions 84 | 85 | See [CONTRIBUTING.md](https://github.com/consuldemocracy/consuldemocracy/blob/master/CONTRIBUTING.md) 86 | -------------------------------------------------------------------------------- /es/installation/debian.md: -------------------------------------------------------------------------------- 1 | # Configuración para los entornos de desarrollo y pruebas (Debian GNU/Linux 9.8) 2 | 3 | ## Super usuario 4 | 5 | El programa 'sudo' no viene instalado en Debian por defecto. Su instalación y configuración es posible, se puede encontrar información al respecto [aquí](https://wiki.debian.org/es/sudo). Pero no lo recomendamos porque puede causar otros problemas. Recomendamos que se ejecuten las siguientes instrucciones como un super usuario, así que asegúrate de que la primera instrucción que ejecutes sea: 6 | 7 | ``` 8 | su 9 | ``` 10 | 11 | > Para [Vagrant](/es/installation/vagrant.md) ejecutar: 12 | > ``` 13 | > sudo su - 14 | > ``` 15 | 16 | ## Actualización de sistema 17 | 18 | Ejecuta una actualización general de las librerías de sistema: 19 | 20 | ```bash 21 | apt-get update 22 | ``` 23 | 24 | ## Git 25 | 26 | Git es mantenido oficialmente en Debian: 27 | 28 | ``` 29 | apt-get install git 30 | ``` 31 | 32 | ## Curl 33 | 34 | Curl es mantenido oficialmente en Debian: 35 | 36 | ``` 37 | apt-get install curl 38 | ``` 39 | 40 | ## Gestor de versiones de Ruby 41 | 42 | Las versiones de Ruby empaquetadas en repositorios oficiales no son aptas para trabajar con Consul Democracy, así que debemos instalar manualmente. 43 | 44 | Una opción es utilizar rvm: 45 | 46 | ### Como usuario local 47 | 48 | ``` 49 | command curl -sSL https://rvm.io/mpapis.asc | gpg --import - 50 | command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - 51 | curl -L https://get.rvm.io | bash -s stable 52 | ``` 53 | 54 | después añadimos el script rvm a nuestro bash (~/.bashrc) (este paso sólo es necesario si no puedes ejecutar el comando rvm) 55 | 56 | ``` 57 | [[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm 58 | ``` 59 | 60 | por úlitmo, volvemos a cargar el .bashrc para poder ejecutar RVM 61 | 62 | ``` 63 | source ~/.bashrc 64 | ``` 65 | 66 | ## Node.js 67 | 68 | Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. Node.js es la opción recomendada. Al igual que como ocurre con Ruby, no es recomendable instalar Node directamente de los repositorios de tu distribución Linux. 69 | 70 | Para instalar Node, puedes usar [n](https://github.com/tj/n) 71 | 72 | Ejecuta el siguiente comando en tu terminal: 73 | 74 | ``` 75 | curl -L https://git.io/n-install | bash -s -- -y lts 76 | ``` 77 | 78 | Y este instalará automáticamente la versión LTS (_Long Term Support_, inglés para "Soporte a largo plazo") más reciente de Node en tu directorio `$HOME` (Este comando hace uso de [n-install](https://github.com/mklement0/n-install)) 79 | 80 | vuelve a cargar el .bashrc para poder ejecutar node 81 | 82 | ``` 83 | source /root/.bashrc 84 | ``` 85 | 86 | Comprueba que está correctamente instalado ejecutando: 87 | 88 | ``` 89 | node -v 90 | ``` 91 | 92 | ## PostgreSQL (>=9.4) 93 | 94 | La versión 9.4 de PostgreSQL no es oficial en Debian 9. 95 | 96 | Así que debemos añadir el respositorio oficial de postgresql a apt, por ejemplo creando el fichero */etc/apt/sources.list.d/pgdg.list* con: 97 | 98 | ``` 99 | deb http://security.debian.org/debian-security jessie/updates main 100 | ``` 101 | 102 | después deberás descargar la key e instalarla: 103 | 104 | ``` 105 | wget https://www.postgresql.org/media/keys/ACCC4CF8.asc 106 | apt-key add ACCC4CF8.asc 107 | ``` 108 | 109 | y finalmente instalar postgresql 110 | 111 | ``` 112 | apt-get update 113 | apt-get install postgresql-9.4 postgresql-server-dev-9.4 postgresql-contrib-9.4 114 | ``` 115 | 116 | Para el correcto funcionamiento de Consul Democracy, necesitas confgurar un usuario para tu base de datos. Como ejemplo, crearemos un usuario llamado "consul": 117 | 118 | ``` 119 | su - postgres 120 | 121 | createuser consul --createdb --superuser --pwprompt 122 | 123 | exit 124 | ``` 125 | 126 | ## Imagemagick 127 | 128 | Instala Imagemagick: 129 | 130 | ```bash 131 | apt-get install imagemagick 132 | ``` 133 | 134 | ## ChromeDriver 135 | 136 | Para realizar pruebas de integración, usamos Selenium junto a Headless Chrome. 137 | 138 | Para ello, primero instala el siguiente paquete: 139 | 140 | ```bash 141 | apt-get install chromedriver 142 | ln -s /usr/lib/chromedriver /usr/local/bin/ 143 | ``` 144 | 145 | Asegúrate de que todo funciona como es debido ejecutando el siguiente comando: 146 | 147 | ```bash 148 | chromedriver --version 149 | ``` 150 | 151 | Deberías recibir un mensaje indicando la última versión de ChromeDriver. Si ese es el caso, está todo listo 152 | 153 | Si te encuentras usando una distro basada en Arch, instalando `chromium` desde el repositorio `extra` debería ser suficiente 154 | 155 | También tienes la opción de solo instalar ChromeDriver desde AUR. Si usas `pacaur`, ejecuta el siguiente comando: 156 | 157 | ```bash 158 | pacaur -S chromedriver 159 | ``` 160 | 161 | Ya estás listo para [instalar Consul Democracy](local_installation.md)!! 162 | -------------------------------------------------------------------------------- /en/installation/docker.md: -------------------------------------------------------------------------------- 1 | # Using Docker for local development 2 | 3 | You can use Docker to have a local Consul Democracy installation for development if: 4 | 5 | - You're having troubles having [prerequisites](prerequisites.md) installed. 6 | - You want to do a quick local installation just to try Consul Democracy or make a demo. 7 | - You prefer not to interfere with other rails installations. 8 | 9 | ## Prerequisites 10 | 11 | You should have installed Docker and Docker Compose in your machine: 12 | 13 | ### macOS 14 | 15 | You can follow the [official docker install](https://docs.docker.com/docker-for-mac/install/) 16 | 17 | Or if you have [homebrew](http://brew.sh) and [cask](https://caskroom.github.io/) installed you can just: 18 | 19 | ```bash 20 | brew install docker 21 | brew install docker-compose 22 | brew cask install docker 23 | open -a docker 24 | ``` 25 | 26 | You'll be asked to give Docker app permissions and type your password, then you're set. 27 | 28 | ### Linux 29 | 30 | 1. Install Docker: 31 | 32 | ```bash 33 | sudo apt-get update 34 | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D 35 | sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' 36 | sudo apt-get update 37 | apt-cache policy docker-engine 38 | sudo apt-get install -y docker-engine 39 | ``` 40 | 41 | 2. Install Docker Compose 42 | 43 | ```bash 44 | sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" 45 | sudo chmod +x /usr/local/bin/docker-compose 46 | ``` 47 | 48 | ### Windows 49 | 50 | Go to the [https://www.docker.com/get-started](Get Started with Docker) page. Under Docker Desktop, select Download for Windows with default options checked, and run. Should take about 5 minutes. 51 | 52 | If you encounter the "WSL 2 installation incomplete" error: 53 | 54 | 1. Start PowerShell as Administrator 55 | 1. Run `dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart` 56 | 1. Run `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart` 57 | 1. Install [WSL2 Linux kernel update package for x64 machines](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) 58 | 1. Run `wsl --set-default-version 2` 59 | 1. Restart your PC 60 | 1. The Docker Enginer will start up. Give it a few minutes. You now have the option of using the docker desktop app (GUI) and `docker` PowerShell/Bash commands 61 | 62 | ## Installation 63 | 64 | Clone the repo on your computer and enter the folder: 65 | 66 | ```bash 67 | git clone https://github.com/consuldemocracy/consuldemocracy.git 68 | cd consuldemocracy 69 | ``` 70 | 71 | ### macOS & Linux 72 | 73 | Then lets create our secrets and database config files based on examples: 74 | 75 | ```bash 76 | cp config/secrets.yml.example config/secrets.yml 77 | cp config/database-docker.yml.example config/database.yml 78 | ``` 79 | 80 | Then you'll have to build the container with: 81 | 82 | ```bash 83 | POSTGRES_PASSWORD=password docker-compose build 84 | ``` 85 | 86 | Start the database service: 87 | 88 | ```bash 89 | POSTGRES_PASSWORD=password docker-compose up -d database 90 | ``` 91 | 92 | You can now initialize your development DB and populate it with: 93 | 94 | ``` 95 | POSTGRES_PASSWORD=password docker-compose run app rake db:create db:migrate 96 | POSTGRES_PASSWORD=password docker-compose run app rake db:dev_seed 97 | ``` 98 | 99 | ### Windows 100 | 101 | Pending to be completed... Contributions Welcome! 102 | 103 | ## Running local Consul Democracy with Docker 104 | 105 | ### macOS & Linux 106 | 107 | Now we can finally run the application with: 108 | 109 | ```bash 110 | POSTGRES_PASSWORD=password docker-compose up 111 | ``` 112 | 113 | And you'll be able to access it at your browser visiting [http://localhost:3000](http://localhost:3000) 114 | 115 | Additionally, if you want to run the rails console just run in another terminal: 116 | 117 | ```bash 118 | POSTGRES_PASSWORD=password docker-compose run app rails console 119 | ``` 120 | 121 | To verify the containers are up execute: 122 | 123 | ```bash 124 | docker ps . 125 | ``` 126 | 127 | You should see output similar to this: 128 | ![docker ps](https://i.imgur.com/ASvzXrd.png) 129 | 130 | ### Windows 131 | 132 | Pending to be completed... Contributions Welcome! 133 | 134 | ## Having trouble? 135 | 136 | Run these commands at **Consul Democracy's directory**, to erase all your previous Consul Democracy's Docker images and containers. Then restart the Docker [installation process](#installation): 137 | 138 | 1. Remove all Consul Democracy images: 139 | 140 | ```bash 141 | docker-compose down --rmi all -v --remove-orphans 142 | ``` 143 | 144 | 2. Remove all Consul Democracy containers 145 | 146 | ```bash 147 | docker-compose rm -f -s -v 148 | ``` 149 | 150 | 3. Verify if there is some container yet: 151 | 152 | ```bash 153 | docker ps -a 154 | ``` 155 | 156 | Case positive, remove each one manually: 157 | 158 | ```bash 159 | docker container rm 160 | ``` 161 | -------------------------------------------------------------------------------- /es/installation/docker.md: -------------------------------------------------------------------------------- 1 | # Usando Docker para desarrollo en local 2 | 3 | Puedes usar Docker para tener una instalación local de Consul Democracy si: 4 | 5 | - Estás teniendo problemas para instalar los [prerrequisitos](prerequisites.md) correctamente. 6 | - Quieres tener una instalación local rápidamente para probar o hacer una demo. 7 | - Prefieres no interferir con instalaciones de apps Rails existentes. 8 | 9 | ## Prerrequisitos 10 | 11 | Debes tener instalador Docker y Docker Compose en tu ordenador: 12 | 13 | ### macOS 14 | 15 | Puedes seguir la [guía oficial de docker](https://docs.docker.com/docker-for-mac/install/) 16 | 17 | O si tienes instalado [homebrew](http://brew.sh) y [cask](https://caskroom.github.io/) puedes ejecutar: 18 | 19 | ```bash 20 | brew install docker 21 | brew install docker-compose 22 | brew cask install docker 23 | open -a docker 24 | ``` 25 | 26 | La aplicación de Docker te pedirá darle permisos e intrudocir tu contraseña. 27 | 28 | ### Linux 29 | 30 | 1. Instala Docker: 31 | 32 | ```bash 33 | sudo apt-get update 34 | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D 35 | sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' 36 | sudo apt-get update 37 | apt-cache policy docker-engine 38 | sudo apt-get install -y docker-engine 39 | ``` 40 | 41 | 2. Instala Docker Compose 42 | 43 | ```bash 44 | sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" 45 | sudo chmod +x /usr/local/bin/docker-compose 46 | ``` 47 | 48 | ### Windows 49 | 50 | En la página de [https://www.docker.com/get-started](Empezando con Docker), en la sección "Docker Desktop", selecciona "Download for Windows", y ejecútalo. Debería tardar unos 5 minutos. 51 | 52 | Si encuentras el error "WSL 2 installation incomplete": 53 | 54 | 1. Ejecuta PowerShell como administrator 55 | 1. Ejecuta `dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart` 56 | 1. Ejecuta `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart` 57 | 1. Instala el [paquete de actualización de WSL2 para 64 bits](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) 58 | 1. Ejecuta `wsl --set-default-version 2` 59 | 1. Reinicia el sistema 60 | 1. Se iniciará Docker Enginer. tardará unos minutos. Tras esto, tendrás la opción de usar la applicación de Docker Desktop y la orden `docker` de PowerShell/Bash 61 | 62 | ## Instalación 63 | 64 | Clona el repositorio en tu ordenador y entra en el directorio: 65 | 66 | ```bash 67 | git clone https://github.com/consuldemocracy/consuldemocracy.git 68 | cd consuldemocracy 69 | ``` 70 | 71 | ### macOS & Linux 72 | 73 | Creamos nuestros ficheros de secrets y database basados en los ejemplos: 74 | 75 | ```bash 76 | cp config/secrets.yml.example config/secrets.yml 77 | cp config/database-docker.yml.example config/database.yml 78 | ``` 79 | 80 | Y generamos el contenedor: 81 | 82 | ```bash 83 | POSTGRES_PASSWORD=password docker-compose build 84 | ``` 85 | 86 | Arrancamos el servicio de base de datos: 87 | 88 | ```bash 89 | POSTGRES_PASSWORD=password docker-compose up -d database 90 | ``` 91 | 92 | Ahora podemos crear la base de datos e introducir datos de prueba: 93 | 94 | ``` 95 | POSTGRES_PASSWORD=password docker-compose run app rake db:create db:migrate 96 | POSTGRES_PASSWORD=password docker-compose run app rake db:dev_seed 97 | ``` 98 | 99 | ### Windows 100 | 101 | Pendiente de ser completado... ¡Se agradecen las Contribuciones! 102 | 103 | ## Corriendo Consul Democracy en local con Docker 104 | 105 | ### macOS & Linux 106 | 107 | Una vez instalado, puedes lanzar la aplicación con: 108 | 109 | ```bash 110 | POSTGRES_PASSWORD=password docker-compose up 111 | ``` 112 | 113 | Y podrás acceder a la aplicación desde tu navegador visitando [http://localhost:3000](http://localhost:3000) 114 | 115 | Adicionalmente, si quieres lanzar por ejemplo la consola de rails: 116 | 117 | ```bash 118 | POSTGRES_PASSWORD=password docker-compose run app rails console 119 | ``` 120 | 121 | Para verificar que los contenedores estan corriendo usa: 122 | 123 | ```bash 124 | docker ps . 125 | ``` 126 | 127 | Deberías obtener algo similar a: 128 | ![docker ps](https://i.imgur.com/ASvzXrd.png) 129 | 130 | ### Windows 131 | 132 | Pendiente de ser completado... ¡Se agradecen las Contribuciones! 133 | 134 | ## ¿Tienes problemas? 135 | 136 | Ejecute los comandos en el **directorio de Consul Democracy**, para borrar todas las imágenes y contenedores anteriores del Docker de Consul Democracy. Luego, reinicie el [proceso de instalación](#instalacion) de Docker: 137 | 138 | 1. Quitar todas las imágenes de Consul Democracy: 139 | 140 | ```bash 141 | docker-compose down --rmi all -v --remove-orphans 142 | ``` 143 | 144 | 2. Quitar todos los contenedores de Consul Democracy 145 | 146 | ```bash 147 | docker-compose rm -f -s -v 148 | ``` 149 | 150 | 3. Verificar si todavía hay algún contenedor: 151 | 152 | ```bash 153 | docker ps -a 154 | ``` 155 | 156 | Caso positivo, eliminar cada uno de forma manual: 157 | 158 | ```bash 159 | docker container rm 160 | ``` 161 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | ## ENGLISH Documentation 4 | 5 | * [Getting started](en/getting_started/getting_started.md) 6 | * [Fork Consul Democracy](en/getting_started/create.md) 7 | * [Configure your fork](en/getting_started/configuration.md) 8 | * [Keep your fork updated](en/getting_started/update.md) 9 | * [Communication](en/getting_started/communication.md) 10 | 11 | * [Installation](en/installation/introduction.md) 12 | * [Local installation](en/installation/local_installation.md) 13 | * [Prerequisites](en/installation/prerequisites.md) 14 | * [Ubuntu Linux](en/installation/ubuntu.md) 15 | * [Debian Linux](en/installation/debian.md) 16 | * [MacOS](en/installation/macos.md) 17 | * [Windows](en/installation/windows.md) 18 | * [Vagrant](en/installation/vagrant.md) 19 | * [Production and Staging servers](en/installation/servers.md) 20 | * [Installer](en/installation/installer.md) 21 | * [Create a deploy user](en/installation/create_deploy_user.md) 22 | * [Generating SSH Key](en/installation/generating_ssh_key.md) 23 | * [Manual installation (not recommended)](en/installation/manual_installation_production.md) 24 | * [Digital Ocean](en/installation/digital_ocean.md) 25 | * [Heroku](en/installation/deploying-on-heroku.md) 26 | * [Docker](en/installation/docker.md) 27 | * [Mail Server Configuration](en/installation/mail_server_configuration.md) 28 | * [Basic configuration](en/installation/basic_configuration.md) 29 | * [Consul Democracy Documentation and guides](en/installation/documentation_and_guides.md) 30 | 31 | * [Customization](en/customization/customization.md) 32 | * [Introduction](en/customization/introduction.md) 33 | * [Translations and Texts](en/customization/translations.md) 34 | * [Images](en/customization/images.md) 35 | * [Views and Styles](en/customization/views_and_styles.md) 36 | * [Javascript](en/customization/javascript.md) 37 | * [Models](en/customization/models.md) 38 | * [Components](en/customization/components.md) 39 | * [Gems](en/customization/gems.md) 40 | * [Overwriting Application](en/customization/overwriting.md) 41 | 42 | * [Technical Features](en/features/features.md) 43 | * [OAuth](en/features/oauth.md) 44 | * [GraphQL](en/features/graphql.md) 45 | * [Recommendations](en/features/recommendations.md) 46 | * [Configure Census Connection](en/features/census_configuration.md) 47 | * [Local Census](en/features/local_census.md) 48 | * [Multitenancy](en/features/multitenancy.md) 49 | 50 | * [Open Source project](en/open_source/open_source.md) 51 | * [Code of conduct](en/open_source/code_of_conduct.md) 52 | * [Contributing](en/open_source/contributing.md) 53 | * [License](es/open_source/license.md) 54 | 55 | ## SPANISH Documentation 56 | 57 | * [Introducción](es/README.md) 58 | * [Primeros pasos](es/getting_started/getting_started.md) 59 | * [Crea tu fork](es/getting_started/create.md) 60 | * [Configura tu fork](es/getting_started/configuration.md) 61 | * [Manten tu fork actualizado](es/getting_started/update.md) 62 | * [Comunicación](es/getting_started/communication.md) 63 | 64 | * [Instalación](es/installation/introduction.md) 65 | * [Instalación local](es/installation/local_installation.md) 66 | * [Prerrequisitos](es/installation/prerequisites.md) 67 | * [Ubuntu Linux](es/installation/ubuntu.md) 68 | * [Debian Linux](es/installation/debian.md) 69 | * [MacOS](es/installation/macos.md) 70 | * [Windows](es/installation/windows.md) 71 | * [Vagrant](es/installation/vagrant.md) 72 | * [Servidores de producción y pruebas](es/installation/servers.md) 73 | * [Instalador](es/installation/installer.md) 74 | * [Crear usuario](es/installation/create_deploy_user.md) 75 | * [Generación de claves SSH](es/installation/generating_ssh_key.md) 76 | * [Instalación manual (no recomendada)](es/installation/manual_installation_production.md) 77 | * [Digital Ocean](es/installation/digital_ocean.md) 78 | * [Heroku](es/installation/deploying-on-heroku.md) 79 | * [Docker](es/installation/docker.md) 80 | * [Configuración del servidor de correo](es/installation/mail_server_configuration.md) 81 | * [Configuración básica](es/installation/basic_configuration.md) 82 | * [Documentación y guías sobre Consul Democracy](es/installation/documentation_and_guides.md) 83 | 84 | * [Personalización](es/customization/customization.md) 85 | * [Introducción](es/customization/introduction.md) 86 | * [Traducciones y Textos](es/customization/translations.md) 87 | * [Imágenes](es/customization/images.md) 88 | * [Vistas y Estilos](es/customization/views_and_styles.md) 89 | * [Javascript](es/customization/javascript.md) 90 | * [Modelos](es/customization/models.md) 91 | * [Componentes](es/customization/components.md) 92 | * [Gemas](es/customization/gems.md) 93 | * [Adaptar la aplicación](es/customization/overwriting.md) 94 | 95 | * [Funcionalidades Técnicas](es/features/features.md) 96 | * [OAuth](es/features/oauth.md) 97 | * [GraphQL](es/features/graphql.md) 98 | * [Recomendaciones](es/features/recommendations.md) 99 | * [Configurar conexión con el Censo](es/features/census_configuration.md) 100 | * [Local Census](es/features/local_census.md) 101 | * [Multitenancy](es/features/multitenancy.md) 102 | 103 | * [Proyecto Open Source](es/open_source/open_source.md) 104 | * [Código de conducta](es/open_source/code_of_conduct.md) 105 | * [Contribuciones](es/open_source/contributing.md) 106 | * [Licencia](es/open_source/license.md) 107 | -------------------------------------------------------------------------------- /en/features/globalize.md: -------------------------------------------------------------------------------- 1 | # Globalize 2 | 3 | Follow this steps to add [Globalize](https://github.com/globalize/globalize) to a model (the gem [`globalize_accessors`](https://github.com/globalize/globalize-accessors) is also used). 4 | 5 | ## 1. Define the attributes to be translated 6 | 7 | We should add in the model the attributes that are going to be translated. To do that, use the `translates` option followed by the attribute names. 8 | 9 | We also need to add the option `globalize_accessors` to include all the locales we want to support. This gem generates all the methods needed by the application (`title_en`, `title_es`, etc.). If you want to include **all** the translated fields in **all** the defined languages in your application, just call `globalize_accessors` without any option (as the [documentation](https://github.com/globalize/globalize-accessors#example) says). 10 | 11 | ``` 12 | # Supposing a model Post with title and text attributes 13 | 14 | class Post < ActiveRecord::Base 15 | translates :title, :text 16 | globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br] 17 | end 18 | ``` 19 | 20 | ## 2. Create the migration to generate the translations table 21 | 22 | We must create a migration to generate the table where the translations are going to be stored. The table must have a column for each attribute we want to translate. To migrate the stored data in the original table, add the option `:migrate_data => true` in the migration. 23 | 24 | ``` 25 | class AddTranslatePost < ActiveRecord::Migration 26 | def self.up 27 | Post.create_translation_table!({ 28 | title: :string, 29 | text: :text 30 | }, { 31 | :migrate_data => true 32 | }) 33 | end 34 | 35 | def self.down 36 | Post.drop_translation_table! :migrate_data => true 37 | end 38 | end 39 | ``` 40 | 41 | ## 3. Add the `Translatable` module 42 | 43 | Add the `Translatable` module in the controller that will handle the translations. 44 | 45 | ``` 46 | class PostController < Admin::BaseController 47 | include Translatable 48 | ... 49 | ``` 50 | 51 | Make sure that the controller has the functions `resource_model` and `resource`, which return the name of the model and the object we want to save the translations for, respectively. 52 | 53 | ``` 54 | ... 55 | def resource_model 56 | Post 57 | end 58 | 59 | def resource 60 | @post = Post.find(params[:id]) 61 | end 62 | ... 63 | ``` 64 | 65 | ## 4. Add the translation params to the permitted params 66 | 67 | Add as permitted params those dedicated to translations. To do that, the module `Translatable` owns a function called `translation_params(params)`, which will receive the object param and will return those keys with a value. It takes into account the languages defined for that model. 68 | 69 | ``` 70 | # Following the example, we pass the params[:post] because is the one that has the information. 71 | 72 | attributes = [:title, :description] 73 | params.require(:post).permit(*attributes, translation_params(params[:post])) 74 | ``` 75 | 76 | ## 5. Add the fields in the form 77 | 78 | Add the fields to the form for creating and editing the translations. Remember that, to do this, there is a function in the helper that encapsules the `Globalize.with_locale` logic in a block called `globalize(locale) do`. 79 | 80 | The fields that are going to be translated should be named `_`, for example `title_en`, so when that information arrives to the server, it can classify the parameters. 81 | 82 | Remember that, to avoid errors when using locales like `pt-BR`, `es-ES`, etc. (those whose region is specified by a '-'), we must use a function called `neutral_locale(locale)`, defined in the `GlobalizeHelper`. This function converts this type of locales in lower case and underscored, so `pt-BR` will transform in `pt_br`. This format is compatible with `globalize_accessors`, whereas the official is not because the method names like `title_pt-BR` are not allowed. When using this function, the method will call `title_pt_br` and it will not generate conflicts when comparing `pt-BR` with `pt_br`. 83 | 84 | ## 6. Add hidden parameters to delete translations 85 | 86 | Add the hidden parameters to the form to delete translations: 87 | 88 | ``` 89 | <%= hidden_field_tag "delete_translations[#{locale}]", 0 %> 90 | ``` 91 | 92 | We must add the link "Remove translation" to delete translations, which should have: 93 | 94 | - an id with this format: `delete-`, where "neutral locale" is the result of the function `neutral_locale(locale)`. 95 | - an attribute `data-locale` with the value of `neutral_locale(locale)`. 96 | - the class `delete-language`. 97 | 98 | ``` 99 | <%= link_to t("admin.milestones.form.remove_language"), "#", 100 | id: "delete-#{neutral_locale(locale)}", 101 | class: 'delete-language', 102 | data: { locale: neutral_locale(locale) } %> 103 | ``` 104 | 105 | The CSS styles and the rest of the classes will depend on the designed UI for that translations (if the link should show or hide, for example). 106 | 107 | ## 7. Add the translations for the new model to the `dev_seed` 108 | 109 | So that they will be generated when the DB is restored. For example, to create a post whose description is translated. 110 | 111 | ``` 112 | section "Creating post with translations" do 113 | post = Post.new(title: title) 114 | I18n.available_locales.map do |locale| 115 | neutral_locale = locale.to_s.downcase.underscore.to_sym 116 | Globalize.with_locale(neutral_locale) do 117 | post.description = "Description for locale #{locale}" 118 | post.save 119 | end 120 | end 121 | end 122 | ``` -------------------------------------------------------------------------------- /es/features/globalize.md: -------------------------------------------------------------------------------- 1 | # Globalize 2 | 3 | Sigue estos pasos para añadir [Globalize](https://github.com/globalize/globalize) a un modelo de la aplicación (también se hace uso de la gema [`globalize_accessors`](https://github.com/globalize/globalize-accessors)). 4 | 5 | ## 1. Definir los atributos a traducir 6 | 7 | Hay que definir los atributos que se quieran traducir en el modelo. Para ello, hay que añadir la opción `translates` seguida de los nombres de los atributos. 8 | 9 | También deberemos añadir la opción `globalize_accessors` con todos aquellos locales a los que queramos tener acceso. Esta gema generará los métodos `title_en`, `title_es`, etc., y que se usan en la aplicación. Si lo que quieres es incluir **todos** los campos traducidos en **todos** los idiomas definidos en tu aplicación, puedes llamar a `globalize_accessors` sin ninguna opción (tal y como se explica en la [documentación](https://github.com/globalize/globalize-accessors#example)). 10 | 11 | ``` 12 | # Suponiendo un modelo Post con attributos title y text 13 | 14 | class Post < ActiveRecord::Base 15 | translates :title, :text 16 | globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br] 17 | end 18 | ``` 19 | 20 | ## 2. Crear la migración para generar la tabla de traducciones 21 | 22 | Hay que crear una migración para generar la tabla donde se almacenarán todas las traducciones de ese modelo. La tabla deberá tener una columna por cada atributo que queramos traducir. Para migrar los datos ya almacenados (en la tabla original), hay que añadir la opción `:migrate_data => true` en la propia migración: 23 | 24 | ``` 25 | class AddTranslatePost < ActiveRecord::Migration 26 | def self.up 27 | Post.create_translation_table!({ 28 | title: :string, 29 | text: :text 30 | }, { 31 | :migrate_data => true 32 | }) 33 | end 34 | 35 | def self.down 36 | Post.drop_translation_table! :migrate_data => true 37 | end 38 | end 39 | ``` 40 | 41 | ## 3. Añadir el módulo `Translatable` 42 | 43 | Añadir el módulo `Translatable` en el controlador que vaya a gestionar las traducciones. 44 | 45 | ``` 46 | class Post < Admin::BaseController 47 | include Translatable 48 | ... 49 | ``` 50 | 51 | Hay que asegurarse de que este controlador tiene las funciones `resource_model` y `resource`, que devuelven el nombre del modelo y el objeto para el que se van a gestionar las traducciones, respectivamente. 52 | 53 | ``` 54 | ... 55 | def resource_model 56 | Post 57 | end 58 | 59 | def resource 60 | @post = Post.find(params[:id]) 61 | end 62 | ... 63 | ``` 64 | 65 | ## 4. Añadir los parámetros de las traducciones a los parámetros permitidos 66 | 67 | Añadir como parámetros permitidos aquellos que estén dedicados a las traducciones. Para eso, el módulo `Translatable` posee una función llamada `translation_params(params)`, a la que se le pasan el parámetro del objeto. A partir de esos parámetros, y teniendo en cuenta los idiomas definidos para ese modelo, la función devuelve aquellos parámetros que contengan un valor. 68 | 69 | ``` 70 | # Siguiendo con el ejemplo, en este caso se le pasarían los parámetros params[:post], porque es el 71 | # hash que contiene toda la información. 72 | 73 | attributes = [:title, :description] 74 | params.require(:post).permit(*attributes, translation_params(params[:post])) 75 | ``` 76 | 77 | ## 5. Añadir los campos a traducir en los formularios 78 | 79 | Añadir los campos a los formularios de creación y edición para poder crear las traducciones. Recordar que, para esto, existe una función en el helper que engloba la lógica de `Globalize.with_locale` en un bloque llamado `globalize(locale) do`. 80 | 81 | Los campos que vayan a editar la información a traducir deberán llamarse `_`, por ejemplo `title_en`, de manera que, cuando esa información llegue al servidor, el helper pueda clasificar los parametros. 82 | 83 | Recuerda que, para evitar errores al usar locales como `pt-BR`, `es-ES`, etc. (aquellos cuya región está especificada por '-'), hay que utilizar la función `neutral_locale(locale)`, definida en el `GlobalizeHelper`. Esta función convierte este tipo de locales en minúsculas con guiones bajos, con lo que `pt-BR` pasará a ser `pt_br`. Este formato es compatible con `globalize_accessor`, al contrario que el oficial, puesto que los métodos generados tendrían el nombre `title_pt-BR`, que es un formato erróneo. Al usar esa función, el método pasará a llamarse `title_pt_br`, que es correcto, y, además, no genera conflictos en las vistas a la hora de comparar el locale `pt-BR` con el modificado `pt_br`. Se usará siempre el segundo. 84 | 85 | ## 6. Añadir los parámetros ocultos para borrar traducciones 86 | 87 | Al formulario que se use para editar las traducciones se le deberá añadir el parámetro oculto que las marca para que se borren: 88 | 89 | ``` 90 | <%= hidden_field_tag "delete_translations[#{locale}]", 0 %> 91 | ``` 92 | 93 | También habrá que añadir el link de "Eliminar idioma", que deberá tener: 94 | 95 | - un id con el formato `delete-`, siendo "locale neutro" el resultado de la función `neutral_locale(locale)`. 96 | - un atributo `data-locale` con el valor de `neutral_locale(locale)`. 97 | - la clase `delete-language`. 98 | 99 | ``` 100 | <%= link_to t("admin.milestones.form.remove_language"), "#", 101 | id: "delete-#{neutral_locale(locale)}", 102 | class: 'delete-language', 103 | data: { locale: neutral_locale(locale) } %> 104 | ``` 105 | 106 | Los estilos de CSS y el resto de clases que se le quieran añadir dependerán de la interfaz que se haya diseñado para gestionar esas traducciones (si se debe ocultar o no dependiendo del idioma seleccionado, por ejemplo). 107 | 108 | ## 7. Añadir al `dev_seed` las traducciones del nuevo modelo 109 | 110 | Para que se generen cuando se restablezca la base de datos. Por ejemplo, para crear un post cuya descripción está traducida: 111 | 112 | ``` 113 | section "Creating post with translations" do 114 | post = Post.new(title: title) 115 | I18n.available_locales.map do |locale| 116 | neutral_locale = locale.to_s.downcase.underscore.to_sym 117 | Globalize.with_locale(neutral_locale) do 118 | post.description = "Description for locale #{locale}" 119 | post.save 120 | end 121 | end 122 | end 123 | ``` -------------------------------------------------------------------------------- /en/installation/deploying-on-heroku.md: -------------------------------------------------------------------------------- 1 | # Deploying on Heroku 2 | 3 | ## Manual deployment 4 | 5 | This tutorial assumes that you have already managed to clone Consul Democracy on your machine and gotten it to work. 6 | 7 | 1. First, create a [Heroku](https://www.heroku.com) account if it isn't already done. 8 | 2. Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) and sign in using 9 | 10 | ```bash 11 | heroku login 12 | ``` 13 | 14 | 3. Go to your Consul Democracy repository and instantiate the process 15 | 16 | ```bash 17 | cd consuldemocracy 18 | heroku create your-app-name 19 | ``` 20 | 21 | You can add the flag `--region eu` if you want to use their European servers instead of the US ones. 22 | 23 | If _your-app-name_ is not already taken, Heroku should now create your app. 24 | 25 | 4. Create a database using 26 | 27 | ```bash 28 | heroku addons:create heroku-postgresql 29 | ``` 30 | 31 | You should now have access to an empty Postgres database whose address was automatically saved as an environment variable named _DATABASE\_URL_. Consul Democracy will automatically connect to it when deployed. 32 | 33 | 5. **(Not needed)** Add a file name _heroku.yml_ at the root of your project and paste the following in it 34 | 35 | ```yml 36 | build: 37 | languages: 38 | - ruby 39 | packages: 40 | - imagemagick 41 | run: 42 | web: bundle exec rails server -e ${RAILS_ENV:-production} 43 | ``` 44 | 45 | 6. Now, generate a secret key and save it to an ENV variable named SECRET\_KEY\_BASE using 46 | 47 | ```bash 48 | heroku config:set SECRET_KEY_BASE=$(rails secret) 49 | ``` 50 | 51 | Also add your server address: 52 | 53 | ```bash 54 | heroku config:set SERVER_NAME=myserver.address.com 55 | ``` 56 | 57 | You need to let the app know where the configuration variables are stored by adding a link to the ENV variables in _config/secrets.yml_ 58 | 59 | ```yml 60 | production: 61 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 62 | server_name: <%= ENV["SERVER_NAME"] %> 63 | ``` 64 | 65 | and commit this file in the repo by commenting out the corresponding line in the _.gitignore_. 66 | 67 | ```gitignore 68 | #/config/secrets.yml 69 | ``` 70 | 71 | **Remember not to commit the file if you have any sensitive information in it!** 72 | 73 | 7. You can now push your app using 74 | 75 | ```bash 76 | git push heroku your-branch:master 77 | ``` 78 | 79 | 8. It won't work straight away because the database doesn't contain the tables needed. To create them, run 80 | 81 | ```bash 82 | heroku run rake db:migrate 83 | heroku run rake db:seed 84 | ``` 85 | 86 | If you want to add the test data in the database, move `gem 'faker', '~> 1.8.7'` outside of `group :development` and run 87 | 88 | ```bash 89 | heroku config:set DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true 90 | heroku config:set DATABASE_CLEANER_ALLOW_PRODUCTION=true 91 | heroku run rake db:dev_seed 92 | ``` 93 | 94 | 9. Your app should now be ready to use. You can open it with 95 | 96 | ```bash 97 | heroku open 98 | ``` 99 | 100 | You also can run the console on heroku using 101 | 102 | ```bash 103 | heroku console --app your-app-name 104 | ``` 105 | 106 | 10. Heroku doesn't allow to save images or documents in its servers, so it's necessary to setup a permanent storage space. 107 | 108 | See [our S3 guide](./using-aws-s3-as-storage.md) for more details about configuring Paperclip with S3. 109 | 110 | ### Configure Sendgrid 111 | 112 | Add the SendGrid add-on in Heroku. It will create a SendGrid account for you with `ENV["SENDGRID_USERNAME"]` and `ENV["SENDGRID_PASSWORD"]`. 113 | 114 | Add this to `config/secrets.yml`, under the `production:` section: 115 | 116 | ``` 117 | mailer_delivery_method: :smtp 118 | smtp_settings: 119 | :address: "smtp.sendgrid.net" 120 | :port: 587 121 | :domain: "heroku.com" 122 | :user_name: ENV["SENDGRID_USERNAME"] 123 | :password: ENV["SENDGRID_PASSWORD"] 124 | :authentication: "plain" 125 | :enable_starttls_auto: true 126 | ``` 127 | 128 | Important: Turn on one worker dyno so that emails get sent. 129 | 130 | ## Optional but recommended 131 | 132 | ### Install rails\_12factor and specify the Ruby version 133 | 134 | **The rails\_12factor is only useful if you use a version of Consul Democracy older than 1.0.0. The latter uses Rails 5 which includes the changes.** 135 | 136 | As recommended by Heroku, you can add the gem rails\_12factor and specify the version of Ruby you want to use. You can do so by adding 137 | 138 | ```ruby 139 | gem 'rails_12factor' 140 | 141 | ruby 'x.y.z' 142 | ``` 143 | 144 | in the file _Gemfile\_custom_, where `x.y.z` is the version defined in the `.ruby-version` file in the Consul Democracy repository. Don't forget to run 145 | 146 | ```bash 147 | bundle install 148 | ``` 149 | 150 | to generate _Gemfile.lock_ before committing and pushing to the server. 151 | 152 | ### Use Puma as a web server 153 | 154 | Heroku recommends to use Puma to improve the responsiveness of your app on [a number of levels](http://blog.scoutapp.com/articles/2017/02/10/which-ruby-app-server-is-right-for-you). 155 | 156 | If you want to allow more concurrency, uncomment the line: 157 | 158 | ```ruby 159 | workers ENV.fetch("WEB_CONCURRENCY") { 2 } 160 | ``` 161 | 162 | You can find an explanation for each of these settings in the [Heroku tutorial](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server). 163 | 164 | The last part is to change the _web_ task to use Puma by changing it to this in your _heroku.yml_ file: 165 | 166 | ```yml 167 | web: bundle exec puma -C config/puma.rb 168 | ``` 169 | 170 | ### Add configuration variables to tune your app from the dashboard 171 | 172 | The free and hobby versions of Heroku are barely enough to run an app like Consul Democracy. To optimise the response time and make sure the app doesn't run out of memory, you can [change the number of workers and threads](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#workers) that Puma uses. 173 | 174 | My recommended settings are one worker and three threads. You can set it by running these two commands: 175 | 176 | ```bash 177 | heroku config:set WEB_CONCURRENCY=1 178 | heroku config:set RAILS_MAX_THREADS=3 179 | ``` 180 | 181 | I also recommend to set the following: 182 | 183 | ```bash 184 | heroku config:set RAILS_SERVE_STATIC_FILES=enabled 185 | heroku config:set RAILS_ENV=production 186 | ``` 187 | -------------------------------------------------------------------------------- /es/installation/deploying-on-heroku.md: -------------------------------------------------------------------------------- 1 | # Instalación en Heroku 2 | 3 | ## Instalación manual 4 | 5 | Este tutorial asume que ya has conseguido clonar Consul Democracy en tu máquina y conseguir que funcione. 6 | 7 | 1. En primer lugar, necesitas crear una cuenta en [Heroku](https://www.heroku.com) si no lo has hecho ya. 8 | 2. Instala [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) e inicia sesión con: 9 | 10 | ```bash 11 | heroku login 12 | ``` 13 | 14 | 3. Accede a tu repositorio de Consul Democracy y crea una instancia 15 | 16 | ```bash 17 | cd consuldemocracy 18 | heroku create your-app-name 19 | ``` 20 | 21 | Puedes añadir `--region eu` si quieres utilizar servidores europeos en lugar de los estadounidenses. 22 | 23 | Si _your-app-name_ no existe aún, Heroku creará tu aplicación. 24 | 25 | 4. Crea la base de datos con 26 | 27 | ```bash 28 | heroku addons:create heroku-postgresql 29 | ``` 30 | 31 | Ahora deberías tener acceso a una base de datos Postgres vacía cuya dirección se guardó automáticamente como una variable de entorno llamada _DATABASE\_URL_. Consul Democracy se conectará automáticamente a ella durante la instalación. 32 | 33 | 5. **(No es necesario)** Crea un archivo con el nombre _heroku.yml_ en la raíz del proyecto y añade el siguiente código 34 | 35 | ```yml 36 | build: 37 | languages: 38 | - ruby 39 | packages: 40 | - imagemagick 41 | run: 42 | web: bundle exec rails server -e ${RAILS_ENV:-production} 43 | ``` 44 | 45 | 6. Ahora, genera una clave secreta y guárdala en la variable de entorno SECRET\_KEY\_BASE de la siguinte manera 46 | 47 | ```bash 48 | heroku config:set SECRET_KEY_BASE=$(rails secret) 49 | ``` 50 | 51 | Añade también la dirección de tu servidor: 52 | 53 | ```bash 54 | heroku config:set SERVER_NAME=myserver.address.com 55 | ``` 56 | 57 | Es necesario que la aplicación sepa dónde se almacenan las variables de configuración añadiendo un enlace a las variables de entorno en _config/secrets.yml_ 58 | 59 | ```yml 60 | production: 61 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 62 | server_name: <%= ENV["SERVER_NAME"] %> 63 | ``` 64 | 65 | y añade este archivo en el repositorio comentando la línea correspondiente en el _.gitignore_. 66 | 67 | ```gitignore 68 | #/config/secrets.yml 69 | ``` 70 | 71 | **¡Recuerda no añadir el archivo si tienes información sensible en él!** 72 | 73 | 7. Ahora ya puedes subir tu aplicación utilizando: 74 | 75 | ```bash 76 | git push heroku your-branch:master 77 | ``` 78 | 79 | 8. No funcionará de inmediato porque la base de datos no contiene las tablas necesarias. Para crearlas, ejecuta 80 | 81 | ```bash 82 | heroku run rake db:migrate 83 | heroku run rake db:seed 84 | ``` 85 | 86 | Si quieres añadir los datos de prueba en la base de datos, mueve `gem 'faker', '~> 1.8.7'` fuera del `group :development` y ejecuta: 87 | 88 | ```bash 89 | heroku config:set DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true 90 | heroku config:set DATABASE_CLEANER_ALLOW_PRODUCTION=true 91 | heroku run rake db:dev_seed 92 | ``` 93 | 94 | 9. Ahora tu aplicación debería estar ya opertaiva. Puedes abrirla con 95 | 96 | ```bash 97 | heroku open 98 | ``` 99 | 100 | También puedes arrancar la consola en heroku utilizando 101 | 102 | ```bash 103 | heroku console --app your-app-name 104 | ``` 105 | 106 | 10. Heroku no permite guardar imágenes o documentos en sus servidores, por lo que es necesario configurar un nuevo espacio de almacenamiento. 107 | 108 | Consulta [nuestra guía de S3](./using-aws-s3-as-storage.md) para más detalles sobre la configuración de Paperclip con S3. 109 | 110 | ### Configurar Sendgrid 111 | 112 | Añade el complemento (add-on) de SendGrid en Heroku. Esto creará una cuenta de SendGrid para la aplicación con `ENV["SENDGRID_USERNAME"]` y `ENV["SENDGRID_PASSWORD"]`. 113 | 114 | Añade el siguiente código a `config/secrets.yml`, en la sección `production:`: 115 | 116 | ``` 117 | mailer_delivery_method: :smtp 118 | smtp_settings: 119 | :address: "smtp.sendgrid.net" 120 | :port: 587 121 | :domain: "heroku.com" 122 | :user_name: ENV["SENDGRID_USERNAME"] 123 | :password: ENV["SENDGRID_PASSWORD"] 124 | :authentication: "plain" 125 | :enable_starttls_auto: true 126 | ``` 127 | 128 | Importante: Activa un "worker dyno" para que se envíen los correos electrónicos. 129 | 130 | ### Opcional (pero recomendado) 131 | 132 | ### Instalar rails\_12factor y especificar la versión de Ruby 133 | 134 | **Instalar rails\_12factor sólo es útil si utilizas una versión de Consul Democracy anterior a la 1.0.0. La última versión utiliza Rails 5 que ya incluye los cambios.** 135 | 136 | Como nos recomienda Heroku, puedes añadir la gema rails\_12factor y especificar la versión de Ruby a utilizar. Puedes hacerlo añadiendo: 137 | 138 | ```ruby 139 | gem 'rails_12factor' 140 | 141 | ruby 'x.y.z' 142 | ``` 143 | 144 | en el archivo _Gemfile\_custom_, donde `x.y.z` es la versión definida en el fichero `.ruby-version` del repositorio de Consul Democracy. No olvides ejecutar 145 | 146 | ```bash 147 | bundle install 148 | ``` 149 | 150 | para generar el _Gemfile.lock_ antes de añadir los cambios y subirlos al servidor. 151 | 152 | ### Utilizar Puma como servidor web 153 | 154 | Heroku recomienda utilizar Puma para mejorar el [rendimiento](http://blog.scoutapp.com/articles/2017/02/10/which-ruby-app-server-is-right-for-you) de la aplicación. 155 | 156 | Si quieres permitir más concurrencia, descomenta la siguiente linea: 157 | 158 | ```ruby 159 | workers ENV.fetch("WEB_CONCURRENCY") { 2 } 160 | ``` 161 | 162 | Puedes encontrar una explicación para diferentes configuraciones en el siguiente [tutorial de Heroku](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server). 163 | 164 | Por último hay que cambiar la tarea _web_ para usar Puma cambiándola en el archivo _heroku.yml_ con el siguiente código: 165 | 166 | ```yml 167 | web: bundle exec puma -C config/puma.rb 168 | ``` 169 | 170 | ### Añadir variables de configuración desde el panel de control 171 | 172 | Las versiones gratuita y hobby de Heroku no son suficientes para ejecutar una aplicación como Consul Democracy. Para optimizar el tiempo de respuesta y asegurarte de que la aplicación no se quede sin memoria, puedes [cambiar el número de "workers" e hilos](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#workers) que utiliza Puma. 173 | 174 | La configuración recomendada es un "worker" y tres hilos. Puedes configurarlo ejecutando estos dos comandos: 175 | 176 | ```bash 177 | heroku config:set WEB_CONCURRENCY=1 178 | heroku config:set RAILS_MAX_THREADS=3 179 | ``` 180 | 181 | También es recomendable configurar las siguientes variables: 182 | 183 | ```bash 184 | heroku config:set RAILS_SERVE_STATIC_FILES=enabled 185 | heroku config:set RAILS_ENV=production 186 | ``` 187 | -------------------------------------------------------------------------------- /en/installation/basic_configuration.md: -------------------------------------------------------------------------------- 1 | # Basic Configuration 2 | 3 | Once you have Consul Democracy running on the server, there are some basic configuration options that you probably want to define in order to start using it. To do this you will need to open your Consul Democracy installation through any internet browser and log in with the administration user \(initially it is the `admin@consul.dev` user with the password `12345678`\). 4 | 5 | Once you have logged in you will see on the top right of the screen the "Admin" link that will take you to the administration interface. From this interface you can configure the following basic options: 6 | 7 | ## Global configuration parameters 8 | 9 | In the side menu you will find the option "Settings" and then the submenu "Global Settings". Here you will find many interesting parameters, but at the moment we recommend you to define some of the most basic ones. Later, when you are more familiar with the tool, you will be able to reconfigure other parameters: 10 | 11 | * Site name. This name will appear in the subject of emails, help pages... 12 | * Sender email name. This name will appear as the name of the sender in the emails sent from the application. As for example the email that the users receive to confirm that they have created their account. 13 | * Sender email address. This email address will appear in the emails sent from the application. 14 | * Main URL. Main URL of your website 15 | * Minimum age needed to participate. If you use a user verification system this will be the minimum age that users will be required to be. The user verification system will be discussed in more detail later. 16 | * Number of supports necessary for approval of a Proposal. If you use the citizen proposals section, you can define a minimum number of supports that the proposals need in order to be considered. Any user will be able to create proposals but only those that reach that value will be taken into account. 17 | * Level x public official. Consul Democracy allows some user accounts to be marked as "official accounts" and their interventions on the platform are highlighted. This for example is used in a city if you want to define accounts for the Mayor, Councillors, etc. This public official option will allow you to define the official label that appears next to the user names of these accounts from most important \(level 1\) to least \(level 5\). 18 | 19 | ## Categories of proposals 20 | 21 | When users create proposals on the platform, a few general categories are suggested to help organize the proposals. To define these categories you can go to the "Global Settings" menu and then to the "Proposal Topics" submenu. At the top you can write topics and create them with the button below. 22 | 23 | ## Definition of Geozones 24 | 25 | Geozones are smaller territorial areas than the area in which you use Consul Democracy \(e.g. districts in a city in which Consul Democracy is used\). If the geozones are activated, it will allow for example that the citizen proposals are assigned to a specific area, or that the votings are restricted to people living in some area. 26 | 27 | In the side menu you will find the option "Settings" and then the submenu "Manage geozones". To the right the button "Create geozone" will allow you to create new geozones. Only the name is necessary to define them, but you can add other data that are useful in certain sections. Initially we recommend that you start by defining only the names of the zones. 28 | 29 | Once defined if you create a citizen proposal you will see how one of the options in the proposal creation form allows you to choose if your proposal refers to a specific geozone. 30 | 31 | If you activate the geozones you can also display an image that represents the area with the zones. You can change this image in the "Global settings" menu in the "Customize images" submenu. The default image you can change is the one titled "map". 32 | 33 | ## Map to geolocate proposals 34 | 35 | You can allow users to place proposals on a map when creating proposals. To do this you have to define which map you want to show. 36 | First go to the "Settings" menu and to the "Global Settings" submenu. There you will find three parameters that you will have to fill in: 37 | 38 | * Latitude. Latitude to show the map position 39 | * Length. Length to show the map position 40 | * Zoom. Zoom to show the position of the map. You can try an initial value and then change it later. 41 | 42 | At the top of this page you will find three tabs: "Configuration settings", "Features", "Map configuration". Now go to the second tab "Features". 43 | 44 | On this page you will find one of the functionalities titled "Proposals and budget investments geolocation ". The message "Functionality enabled" should appear on your right. If not, click on the "Enable" button. 45 | 46 | Then, at the top of this page, go to the "Map configuration" tab. If everything has been configured correctly you will see here the map centered on the latitude and longitude you entered before. You can correctly center the map and change the zoom level directly on the map by clicking on the "Update" button below it. 47 | 48 | ## Emails to users 49 | 50 | Consul Democracy sends a series of emails to users by default. For example when creating a user account, trying to recover a password, receiving a message from another user, etc. 51 | 52 | All emails sent can be viewed in the menu "Messages to users" in the submenu "System Emails". There you will be able to preview each email and see the file where the content of the email is in case you want to change it. 53 | 54 | ## Basic information pages 55 | 56 | Consul Democracy has a number of basic information pages that will be shown to users, e.g. "Privacy Policy", "Frequently Asked Questions", "Congratulations you have just created your user account", etc. 57 | 58 | You can see the pages that exist by default and modify them in the menu "Site Content" in the submenu "Custom Pages". 59 | 60 | ## Main page of the site 61 | 62 | When users open your Consul Democracy installation they will see the home page of the platform. This page is fully configurable, so that you can show the content that seems most relevant to you. You can modify it from the menu "Site content" in the submenu "Homepage". 63 | 64 | Try creating "Headers" and "Cards" and activating the different functionalities you will find below to see the effect they have on your homepage. 65 | 66 | ## Platform texts 67 | 68 | If you access the menu "Site content" and the submenu "Custom information texts" you will see different tabs with a series of texts. These are all the texts displayed on the platform. By default you can use the existing ones, but at any time you can access this section to modify any of the texts. 69 | 70 | For more information on how to add new translations to your version of Consul Democracy access the "Texts and translations" section of this documentation. 71 | 72 | ## Channels of participation 73 | 74 | By default you will find in Consul Democracy different ways of participation for users. To begin with and familiarise yourself with the tool, we recommend that you have all of them activated, but you can deactivate the ones that do not seem necessary to you. To do this, go to the "Settings" menu and then to the "Global Settings" submenu. At the top of this page you will find three tabs: "Configuration settings", "Features", "Map configuration". Go to the second tab "Features". 75 | 76 | You will find different functionalities with the names of the different participation channels "Debates", "Proposals", "Voting", "Collaborative Legislation" and "Participatory Budgets". You can deactivate any of the functionalities and it will no longer be shown in your Consul Democracy installation. 77 | 78 | ### More information and detailed documentation 79 | 80 | These options above will allow you to have a basic version of Consul Democracy to start using. We recommend that you access the [Consul Democracy Documentation and Guides](documentation_and_guides.md) section where you can find more detailed documentation. 81 | --------------------------------------------------------------------------------