decidim 0.14.4 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +69 -33
- data/docs/advanced/metrics.md +39 -0
- data/docs/advanced/testing.md +4 -0
- data/docs/advanced/view_models_aka_cells.md +12 -7
- data/docs/development_guide.md +1 -1
- data/docs/getting_started.md +24 -7
- data/docs/manual-installation.md +4 -1
- data/docs/possible_flows_for_proposal.png +0 -0
- data/lib/decidim/gem_manager.rb +1 -0
- data/lib/decidim/version.rb +1 -1
- metadata +40 -40
- data/docs/advanced/migrate_to_0.8.0.md +0 -141
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44845ad6ce7c4502dddf3e0446843cb1ad1fc5a3d99c4cce38e73f66196d8776
|
4
|
+
data.tar.gz: d842597994a82a74f2e7aafbc944dcec649fe82a8a61652a4cbc7980d4f758f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceccf88c484945492c973fc1bc0d3edd1bcdfdbdc5aaa61dbc97a34ced79e87c6e4e6623b491f7156e4b6404548fe6ea9b71e44be0d420890bd92098f14f24a9
|
7
|
+
data.tar.gz: 6369b7ef179ca0b7187b408dc2bef739d81f1c9171b9b9e093abc80e62f9b583667396a0505ff57152fa6bd3514dc78425884646aa6f7e68d4106db48c34dedf
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Project management [[See on Waffle.io]](https://waffle.io/decidim/decidim)
|
|
37
37
|
|
38
38
|
# What do you need to do?
|
39
39
|
|
40
|
-
* [
|
40
|
+
* [Getting started with Decidim](#getting-started-with-decidim)
|
41
41
|
* [Contribute to the project](#how-to-contribute)
|
42
42
|
* [Modules](#modules)
|
43
43
|
* [Create & browse development app](#browse-decidim)
|
@@ -77,41 +77,77 @@ Also, if you want to verify yourself against the default authorization handler u
|
|
77
77
|
|
78
78
|
### Official (stable)
|
79
79
|
|
80
|
-
| Module | Description
|
81
|
-
| --------------------------------------------------------------------------------------------------------- |
|
82
|
-
| [
|
83
|
-
| [
|
84
|
-
| [
|
85
|
-
| [Assemblies](https://github.com/decidim/decidim/tree/master/decidim-assemblies) | Permanent participatory spaces.
|
86
|
-
| [
|
87
|
-
| [
|
88
|
-
| [
|
89
|
-
| [
|
90
|
-
| [
|
91
|
-
| [
|
92
|
-
| [
|
93
|
-
| [
|
94
|
-
| [
|
95
|
-
| [
|
96
|
-
| [
|
97
|
-
| [
|
98
|
-
| [
|
99
|
-
| [
|
100
|
-
| [
|
80
|
+
| Module | Description |
|
81
|
+
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
82
|
+
| [API](https://github.com/decidim/decidim/tree/master/decidim-api) | Exposes a GraphQL API to programatically interact with the Decidim platform via HTTP. |
|
83
|
+
| [Accountability](https://github.com/decidim/decidim/tree/master/decidim-accountability) | Adds an accountability section to any participatory space so users can follow along the state of the accepted proposals. |
|
84
|
+
| [Admin](https://github.com/decidim/decidim/tree/master/decidim-admin) | Adds an administration dashboard so users can manage their organization and all other entities. |
|
85
|
+
| [Assemblies](https://github.com/decidim/decidim/tree/master/decidim-assemblies) | Permanent participatory spaces. |
|
86
|
+
| [Blogs](https://github.com/decidim/decidim/tree/master/decidim-blogs) | This component makes possible to add posts ordered by publication time to spaces. |
|
87
|
+
| [Budgets](https://github.com/decidim/decidim/tree/master/decidim-budgets) | Adds a participatory budgets system to any participatory space. |
|
88
|
+
| [Comments](https://github.com/decidim/decidim/tree/master/decidim-comments) | The Comments module adds the ability to include comments to any resource which can be commentable by users. |
|
89
|
+
| [Conferences](https://github.com/decidim/decidim/tree/master/decidim-conferences) | This module will be a configurator and generator of Conference pages, understood as a collection of Meetings, with program, inscriptions and categories |
|
90
|
+
| [Consultations](https://github.com/decidim/decidim/tree/master/decidim-consultations) | This module creates a new space for decidim to host consultations: debates around critical questions and a proxy for eVoting |
|
91
|
+
| [Core](https://github.com/decidim/decidim/tree/master/decidim-core) | The basics of Decidim: users, organizations, etc. This is the only required engine to run Decidim, all the others are optional. |
|
92
|
+
| [Debates](https://github.com/decidim/decidim/tree/master/decidim-debates) | The Debates module adds debate to any participatory process. It adds a CRUD engine to the admin and public view scoped inside the participatory process. |
|
93
|
+
| [Dev](https://github.com/decidim/decidim/tree/master/decidim-dev) | Aids the local development of Decidim's components. |
|
94
|
+
| [Generators](https://github.com/decidim/decidim/tree/master/decidim-generators) | It helps you with generating decidim applications & new components. It provides the `decidim` executable. |
|
95
|
+
| [Initiatives](https://github.com/decidim/decidim/tree/master/decidim-initiatives) | Initiatives is the place on Decidim's where citizens can promote a civic initiative. Unlike participatory processes that must be created by an administrator, Civic initiatives can be created by any user of the platform. |
|
96
|
+
| [Meetings](https://github.com/decidim/decidim/tree/master/decidim-meetings) | The Meeting module adds meeting to any participatory space. It adds a CRUD engine to the admin and public view scoped inside the participatory space. |
|
97
|
+
| [Pages](https://github.com/decidim/decidim/tree/master/decidim-pages) | The Pages module adds static page capabilities to any participatory space. It basically provides an interface to include arbitrary HTML content to any step. |
|
98
|
+
| [Participatory Processes](https://github.com/decidim/decidim/tree/master/decidim-participatory_processes) | The main concept of a Decidim installation: participatory processes. |
|
99
|
+
| [Proposals](https://github.com/decidim/decidim/tree/master/decidim-proposals) | The Proposals module adds one of the main components of Decidim: allows users to contribute to a participatory space by creating proposals. |
|
100
|
+
| [Sortitions](https://github.com/decidim/decidim/tree/master/decidim-sortitions) | This component makes possible to select randomly a number of proposals among a set of proposals (or a category of proposals within a set) maximizing guarantees of randomness and avoiding manipulation of results by the administrator. |
|
101
|
+
| [Surveys](https://github.com/decidim/decidim/tree/master/decidim-surveys) | Adds the ability for admins to create arbitrary surveys. |
|
102
|
+
| [System](https://github.com/decidim/decidim/tree/master/decidim-system) | Multitenant Admin to manage multiple organizations in a single installation. |
|
103
|
+
| [Verifications](https://github.com/decidim/decidim/tree/master/decidim-verifications) | Offers several methods for allowing participants to get authorization to perform certain privileged actions. This module implements several of those methods and also offers a way for installation to implement their custom verification methods. |
|
101
104
|
|
102
105
|
### Community
|
103
106
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
|
109
|
-
|
|
110
|
-
| [
|
111
|
-
| [
|
112
|
-
| [
|
113
|
-
| [
|
114
|
-
| [
|
107
|
+
If you need to have some features that we don't have yet, we recommend that you make a module. This is a Ruby on Rails engine with some APIs specific to Decidim (for registering with the menus, integration with spaces like Participatory Processes or Assemblies, with /admin or /api, etc).
|
108
|
+
|
109
|
+
As a base you can use these modules, although check first that the version is compatible with your current Decidim version. Also you should know that until v1.0.0 We're under development and these internal APIs can change. We recommend that you extensively test your module.
|
110
|
+
|
111
|
+
| Module | Version | Description |
|
112
|
+
| -----------------------------------------------------------------------------------------------------------------------| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
113
|
+
| [Age Action Authorization](https://github.com/diputacioBCN/decidim-diba/tree/master/decidim-age_action_authorization) | 0.9.3 | A Decidim based action authorization to check user's age inside actions. |
|
114
|
+
| [Calendar](https://github.com/castilla-lamancha/participa-castillalamancha/tree/master/decidim-calendar) | 0.14.1 | Adds a calendar view for all the Meetings, without regarding the Participatory Process or Assembly that they belong. |
|
115
|
+
| [Crowdfunding](https://github.com/podemos-infoparticipa2/tree/master/decidim-module-crowdfundings) | 0.14.1 | This rails engine implements a Decidim component that allows to the administrators to configure crowfunding campaigns for a participatory space. |
|
116
|
+
| [DataViz](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/tree/master/decidim-dataviz) | 0.13.1 | The Dataviz module adds the PAM data visualizations to any participatory process but it is intended to be used just for the PAM participatory process. |
|
117
|
+
| [Gravity Forms](https://github.com/podemos-info/participa2/tree/master/decidim-module-gravity_forms) | 0.14.1 | A gravity forms component for Decidim. |
|
118
|
+
| [LDAP](https://github.com/diputacioBCN/decidim-diba/tree/master/decidim-ldap) | 0.9.3 | User authentication via LDAP |
|
119
|
+
| [News](https://github.com/castilla-lamancha/participa-castillalamancha/tree/master/decidim-news) | 0.14.1 | This will add an admin dashboard to manage news posts and front-end views for posts. |
|
120
|
+
| [Members](https://github.com/ElectricThings/decidim-members) | 0.13.1 | Members list and search plugin for Decidim |
|
121
|
+
| [Personal Number](https://github.com/PierreMesure/decidim-module-personal_number) | 0.11.0.pre | This module allows users to register with a personal number and to log in with it. |
|
122
|
+
| [Pol.is](https://github.com/OpenSourcePolitics/decidim-polis) | 0.7.1 | Pol.is integration on Decidim |
|
123
|
+
| [Questions](https://github.com/OpenSourcePolitics/decidim-questions) | 0.12.2 | Questions / Views / Inputs based on decidim-proposals. |
|
124
|
+
| [Riksdagen](https://github.com/DinRiksdag/decidim-module-riksdagen) | 0.11.0.pre | A Decidim module to integrate some of the open data produced by the Swedish parliament |
|
125
|
+
| [User Export](https://github.com/OpenSourcePolitics/decidim-user-export) | 0.8.3 | Allow user export |
|
126
|
+
| [Votings](https://github.com/podemos-info/participa2/tree/master/decidim-module-votings) | 0.14.1 | An administrator can add one or more votings to a participatory process or assambly |
|
127
|
+
|
128
|
+
### Authorizations Strategies
|
129
|
+
|
130
|
+
One specific thing regarding these kind of applications is the [authorization/verification](decidim-verifications/README.md) logic. Here are some examples:
|
131
|
+
|
132
|
+
* [Barcelona (City)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/blob/master/app/services/census_authorization_handler.rb)
|
133
|
+
* [Calafell](https://github.com/AjuntamentdeCalafell/decidim-calafell/blob/master/app/services/census_authorization_handler.rb)
|
134
|
+
* [DIBA (Barcelona Province)](https://github.com/diputacioBCN/decidim-diba/blob/master/decidim-diba_census_api/app/services/diba_census_api_authorization_handler.rb)
|
135
|
+
* [Gavà](https://github.com/AjuntamentDeGava/decidim-gava/blob/master/app/services/census_authorization_handler.rb)
|
136
|
+
* [Hospitalet de Llobregat](https://github.com/HospitaletDeLlobregat/decidim-hospitalet/blob/master/app/services/census_authorization_handler.rb)
|
137
|
+
* [Malgrat de Mar](https://github.com/AjMalgrat/decidim-malgrat/blob/master/app/services/carpetaciutada_handler.rb)
|
138
|
+
* [Mataró](https://github.com/AjuntamentDeMataro/decidimmataro.cat/blob/master/app/services/census_authorization_handler.rb)
|
139
|
+
* [Pamplona](https://github.com/ErabakiPamplona/erabaki/blob/master/app/services/census_authorization_handler.rb)
|
140
|
+
* [Reus](https://github.com/AjuntamentdeReus/decidim/blob/master/app/services/census_authorization_handler.rb)
|
141
|
+
* [Sabadell](https://github.com/AjuntamentDeSabadell/decidim-sabadell/blob/master/app/services/census_authorization_handler.rb)
|
142
|
+
* [Sant Cugat](https://github.com/AjuntamentdeSantCugat/decidim-sant_cugat/blob/master/app/services/census_authorization_handler.rb)
|
143
|
+
* [Terrassa](https://github.com/AjuntamentDeTerrassa/decidim-terrassa/blob/master/app/services/census_authorization_handler.rb)
|
144
|
+
* [Vilanova i la Geltrú](https://github.com/vilanovailageltru/decidim-vilanova/blob/master/app/services/vilanova_authorization_handler.rb)
|
145
|
+
|
146
|
+
Other special verifications:
|
147
|
+
|
148
|
+
* [Podemos](https://github.com/podemos-info/participa2/tree/master/decidim-module-census_connector)
|
149
|
+
* [FundAction](https://github.com/ElectricThings/fund_action/blob/master/app/services/anybody_authorization_handler.rb)
|
150
|
+
* [CSV emails](https://github.com/CodiTramuntana/decidim-verifications-csv_emails)
|
115
151
|
|
116
152
|
## Following our license
|
117
153
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Metrics
|
2
|
+
|
3
|
+
Metrics calculations must be executed everyday. Some `rake task` have been added to perform it.
|
4
|
+
|
5
|
+
- To execute all metrics at once. Related to previous date from *today*
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
bundle exec rake decidim:metrics:all
|
9
|
+
```
|
10
|
+
|
11
|
+
- To execute an specific metric. Related to previous date from *today*
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
bundle exec rake decidim:metrics:one["<metric name>"]
|
15
|
+
```
|
16
|
+
|
17
|
+
- To execute metrics for a given date (all or an specific one)
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
bundle exec rake decidim:metrics:all["YYYY-MM-DD"]
|
21
|
+
bundle exec rake decidim:metrics:one["<metric name>","YYYY-MM-DD"]
|
22
|
+
```
|
23
|
+
|
24
|
+
## Current available metric names
|
25
|
+
|
26
|
+
- *users*, confirmed Users
|
27
|
+
- *proposals*, available Proposals
|
28
|
+
- *accepted_proposals*, currently accepted Proposals
|
29
|
+
- *votes*, votes in Proposals
|
30
|
+
- *assemblies*, public Assemblies
|
31
|
+
- *participatory_processes*, public ParticipatoryProcesses
|
32
|
+
- *results*, Results in Accountabilities
|
33
|
+
- *comment*, Comments generated by users, related to public elements and not *hidden*
|
34
|
+
- *meetings*, public Meetings
|
35
|
+
|
36
|
+
## To configure it correctly
|
37
|
+
|
38
|
+
- A **crontab** line must be added to your server to maintain them updated daily. You could use [Whenever](https://github.com/javan/whenever) to manage it directly from the APP
|
39
|
+
- A **ActiveJob** queue, like [Sidekiq](https://github.com/mperham/sidekiq) or [DelayedJob](https://github.com/collectiveidea/delayed_job/)
|
data/docs/advanced/testing.md
CHANGED
@@ -36,12 +36,6 @@ The `label` option accepts this arguments:
|
|
36
36
|
s.add_dependency "cells-rails", "~> 0.0.9"
|
37
37
|
```
|
38
38
|
|
39
|
-
- **autoload** view_model to module `decidim-<module>/lib/decidim/<module>.rb`
|
40
|
-
|
41
|
-
```rb
|
42
|
-
autoload :ViewModel, "decidim/<module>/view_model"
|
43
|
-
```
|
44
|
-
|
45
39
|
- **require** cells in `decidim-<module>/lib/decidim/<module>/engine.rb`
|
46
40
|
|
47
41
|
```rb
|
@@ -61,7 +55,7 @@ The `label` option accepts this arguments:
|
|
61
55
|
attribute :card, String
|
62
56
|
```
|
63
57
|
|
64
|
-
In your `decidim-<component>/lib/decidim/<component>/component.rb` register the resource and set the card value:
|
58
|
+
In your `decidim-<component>/lib/decidim/<component>/component.rb` register the resource and set the card value. Note that the model class for your resource must include the `Decidim::Resourceable` concern for this to work:
|
65
59
|
|
66
60
|
```rb
|
67
61
|
component.register_resource(:<my_resource>) do |resource|
|
@@ -71,6 +65,17 @@ The `label` option accepts this arguments:
|
|
71
65
|
end
|
72
66
|
```
|
73
67
|
|
68
|
+
```rb
|
69
|
+
module Decidim
|
70
|
+
module <Component>
|
71
|
+
class <MyResource> < Decidim::ApplicationRecord
|
72
|
+
include Decidim::Resourceable
|
73
|
+
# ...
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
74
79
|
- The **Cell Class**, following the convention, will reside in `decidim-<component>/app/cells/decidim/<component>/<my_resource>_cell.rb`:
|
75
80
|
|
76
81
|
```rb
|
data/docs/development_guide.md
CHANGED
data/docs/getting_started.md
CHANGED
@@ -10,11 +10,32 @@ If you want to start your own installation of Decidim, you don't need to clone t
|
|
10
10
|
|
11
11
|
## Creating your Decidim app
|
12
12
|
|
13
|
-
### A.
|
13
|
+
### A. Recommended: manual installation
|
14
|
+
|
15
|
+
If you know Ruby and have already worked with Ruby on Rails, you
|
16
|
+
need to know that decidim is a gem and a command line that generates
|
17
|
+
an application that consumes this gem 😅.
|
18
|
+
|
19
|
+
The flow is: install gem, generate a Ruby on Rails app, enjoy.
|
20
|
+
|
21
|
+
```console
|
22
|
+
gem install decidim
|
23
|
+
decidim decidim_application
|
24
|
+
```
|
25
|
+
|
26
|
+
You can see the [official manual installation tutorial](/docs/manual-installation.md),
|
27
|
+
and also you have [another manual installation tutorial](https://github.com/Platoniq/decidim-install)
|
28
|
+
made by the nice people of [Platoniq](http://www.platoniq.net/).
|
29
|
+
|
30
|
+
### B. Using installation script [experimental]
|
14
31
|
|
15
32
|
> *Please note that this is **experimental***
|
16
33
|
|
17
|
-
We've made an script for Ubuntu 16.04 LTS and macos sierra 10.2.
|
34
|
+
We've made an script for Ubuntu 16.04 LTS and macos sierra 10.2.
|
35
|
+
It's a BETA and as such you should be aware that this could break
|
36
|
+
your environment (if you have any). It'll install rbenv, postgresql,
|
37
|
+
nodejs and install decidim on this directory. It should take 15
|
38
|
+
minutes depending on your network connection.
|
18
39
|
|
19
40
|
```console
|
20
41
|
wget http://get.decidim.org -O install_decidim.bash
|
@@ -23,7 +44,7 @@ bash install_decidim.bash
|
|
23
44
|
|
24
45
|
Read more about the [installation script](https://github.com/alabs/decidim-install).
|
25
46
|
|
26
|
-
###
|
47
|
+
### C. Using Docker [experimental]
|
27
48
|
|
28
49
|
You can also use [docker] && [docker-compose] to develop decidim. You'll
|
29
50
|
need to install those but in exchange you don't need to install any other
|
@@ -53,10 +74,6 @@ In general, to use the docker development environment, change any instruction in
|
|
53
74
|
the docs to use its equivalent docker binstub. So for example, instead of
|
54
75
|
running `bundle install`, you would run `d/bundle install`.
|
55
76
|
|
56
|
-
### C. Step by step
|
57
|
-
|
58
|
-
See our [manual installation tutorial](/docs/manual-installation.md).
|
59
|
-
|
60
77
|
## Initializing your app for local development
|
61
78
|
|
62
79
|
You should now setup your database:
|
data/docs/manual-installation.md
CHANGED
@@ -49,6 +49,8 @@ You need to change the password (on this example is "thepassword") and save it s
|
|
49
49
|
Next, we need to install the `decidim` gem:
|
50
50
|
|
51
51
|
```bash
|
52
|
+
gem install bootsnap
|
53
|
+
gem install listen
|
52
54
|
gem install decidim
|
53
55
|
```
|
54
56
|
|
@@ -103,7 +105,8 @@ git commit -m "Adds figaro configuration management"
|
|
103
105
|
We should now setup your database:
|
104
106
|
|
105
107
|
```bash
|
106
|
-
bin/rails db:create db:migrate
|
108
|
+
bin/rails db:create db:migrate
|
109
|
+
bin/rails db:seed
|
107
110
|
```
|
108
111
|
|
109
112
|
This will also create some default data so you can start testing the app:
|
Binary file
|
data/lib/decidim/gem_manager.rb
CHANGED
data/lib/decidim/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-11-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-accountability
|
@@ -18,252 +18,252 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.15.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.15.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-admin
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.15.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.15.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-api
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.15.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.15.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-assemblies
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.15.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.15.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-blogs
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.15.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.15.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-budgets
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.15.0
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
98
|
+
version: 0.15.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-comments
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
105
|
+
version: 0.15.0
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.15.0
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: decidim-core
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.15.0
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.
|
126
|
+
version: 0.15.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: decidim-debates
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - '='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.
|
133
|
+
version: 0.15.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - '='
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.
|
140
|
+
version: 0.15.0
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: decidim-generators
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - '='
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.
|
147
|
+
version: 0.15.0
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - '='
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 0.
|
154
|
+
version: 0.15.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: decidim-meetings
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
159
|
- - '='
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0.
|
161
|
+
version: 0.15.0
|
162
162
|
type: :runtime
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - '='
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.
|
168
|
+
version: 0.15.0
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: decidim-pages
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
173
|
- - '='
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 0.
|
175
|
+
version: 0.15.0
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
178
|
version_requirements: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
180
|
- - '='
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 0.
|
182
|
+
version: 0.15.0
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: decidim-participatory_processes
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - '='
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.
|
189
|
+
version: 0.15.0
|
190
190
|
type: :runtime
|
191
191
|
prerelease: false
|
192
192
|
version_requirements: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
194
|
- - '='
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.
|
196
|
+
version: 0.15.0
|
197
197
|
- !ruby/object:Gem::Dependency
|
198
198
|
name: decidim-proposals
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
201
|
- - '='
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: 0.
|
203
|
+
version: 0.15.0
|
204
204
|
type: :runtime
|
205
205
|
prerelease: false
|
206
206
|
version_requirements: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
208
|
- - '='
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version: 0.
|
210
|
+
version: 0.15.0
|
211
211
|
- !ruby/object:Gem::Dependency
|
212
212
|
name: decidim-sortitions
|
213
213
|
requirement: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - '='
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
version: 0.
|
217
|
+
version: 0.15.0
|
218
218
|
type: :runtime
|
219
219
|
prerelease: false
|
220
220
|
version_requirements: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
222
|
- - '='
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version: 0.
|
224
|
+
version: 0.15.0
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: decidim-surveys
|
227
227
|
requirement: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
229
|
- - '='
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version: 0.
|
231
|
+
version: 0.15.0
|
232
232
|
type: :runtime
|
233
233
|
prerelease: false
|
234
234
|
version_requirements: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
236
|
- - '='
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version: 0.
|
238
|
+
version: 0.15.0
|
239
239
|
- !ruby/object:Gem::Dependency
|
240
240
|
name: decidim-system
|
241
241
|
requirement: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
243
|
- - '='
|
244
244
|
- !ruby/object:Gem::Version
|
245
|
-
version: 0.
|
245
|
+
version: 0.15.0
|
246
246
|
type: :runtime
|
247
247
|
prerelease: false
|
248
248
|
version_requirements: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - '='
|
251
251
|
- !ruby/object:Gem::Version
|
252
|
-
version: 0.
|
252
|
+
version: 0.15.0
|
253
253
|
- !ruby/object:Gem::Dependency
|
254
254
|
name: decidim-verifications
|
255
255
|
requirement: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
257
|
- - '='
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version: 0.
|
259
|
+
version: 0.15.0
|
260
260
|
type: :runtime
|
261
261
|
prerelease: false
|
262
262
|
version_requirements: !ruby/object:Gem::Requirement
|
263
263
|
requirements:
|
264
264
|
- - '='
|
265
265
|
- !ruby/object:Gem::Version
|
266
|
-
version: 0.
|
266
|
+
version: 0.15.0
|
267
267
|
- !ruby/object:Gem::Dependency
|
268
268
|
name: bundler
|
269
269
|
requirement: !ruby/object:Gem::Requirement
|
@@ -329,7 +329,7 @@ files:
|
|
329
329
|
- docs/advanced/followers.md
|
330
330
|
- docs/advanced/how_to_create_a_module.md
|
331
331
|
- docs/advanced/managing_translations_i18n.md
|
332
|
-
- docs/advanced/
|
332
|
+
- docs/advanced/metrics.md
|
333
333
|
- docs/advanced/testing.md
|
334
334
|
- docs/advanced/tradeoffs.md
|
335
335
|
- docs/advanced/view_hooks.md
|
@@ -375,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
375
375
|
version: '0'
|
376
376
|
requirements: []
|
377
377
|
rubyforge_project:
|
378
|
-
rubygems_version: 2.7.
|
378
|
+
rubygems_version: 2.7.6
|
379
379
|
signing_key:
|
380
380
|
specification_version: 4
|
381
381
|
summary: Citizen participation framework for Ruby on Rails.
|
@@ -1,141 +0,0 @@
|
|
1
|
-
# Migration from 0.7.0 to 0.8.0
|
2
|
-
|
3
|
-
## Note about this guide
|
4
|
-
|
5
|
-
This is a work-in-progress guide for all those people that needs to adapt his existing source code from Decidim
|
6
|
-
0.7.0 to Decidim 0.8.0. If you find a mistake or missing parts in this document do not hesitate to make a pull request
|
7
|
-
and add your discoveries.
|
8
|
-
|
9
|
-
## Upgrading the gem
|
10
|
-
|
11
|
-
You need to alter the following files:
|
12
|
-
|
13
|
-
### Gemspec file
|
14
|
-
|
15
|
-
You must set the decidim version to 0.8.0 or higher in your gemspec.
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
...
|
19
|
-
s.add-dependency "decidim-core", "~> 0.8.0"
|
20
|
-
...
|
21
|
-
```
|
22
|
-
|
23
|
-
### Gemfile
|
24
|
-
|
25
|
-
You must adjust the decidim version in your gem file as well. You also need to add the new engine 'decidim-verifications':
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
...
|
29
|
-
gem "decidim", "~> 0.8.0"
|
30
|
-
gem "decidim-verifications"
|
31
|
-
...
|
32
|
-
```
|
33
|
-
|
34
|
-
Finally run *bundle update* to get the required gems updated.
|
35
|
-
|
36
|
-
```bash
|
37
|
-
bundle update --full-index
|
38
|
-
```
|
39
|
-
|
40
|
-
## Updating your sources
|
41
|
-
|
42
|
-
### Factories
|
43
|
-
|
44
|
-
Decidim 0.8.0 has migratied from FactoryGirl gem to FactoryBot. Cause this you need to update your factories. Usually the *factories.rb* file looks like this:
|
45
|
-
|
46
|
-
```ruby
|
47
|
-
# frozen_string_literal: true
|
48
|
-
|
49
|
-
require 'decidim/faker/localized'
|
50
|
-
require 'decidim/dev'
|
51
|
-
|
52
|
-
FactoryGirl.define do
|
53
|
-
...
|
54
|
-
end
|
55
|
-
|
56
|
-
```
|
57
|
-
|
58
|
-
You must replace FactoryGirl by FactoryBot. After the change it should look like this:
|
59
|
-
|
60
|
-
```ruby
|
61
|
-
# frozen_string_literal: true
|
62
|
-
|
63
|
-
require 'decidim/faker/localized'
|
64
|
-
require 'decidim/dev'
|
65
|
-
|
66
|
-
FactoryBot.define do
|
67
|
-
...
|
68
|
-
end
|
69
|
-
|
70
|
-
```
|
71
|
-
|
72
|
-
### Spec tests examples
|
73
|
-
|
74
|
-
Some examples have changed its name to be more descriptive. In order to have your tests up and running again you must perform the following substitions in the specs folder:
|
75
|
-
|
76
|
-
* *include_context "feature"* now is *include_context "with a feature"*
|
77
|
-
|
78
|
-
* *include_context "feature admin"* now is *include_context "when managing a feature as an admin"*
|
79
|
-
|
80
|
-
### Capybara
|
81
|
-
|
82
|
-
After I have upgraded to the last version of decidim I have realized that some test that were valid in the previous version now were failing. The reason was the following exception:
|
83
|
-
|
84
|
-
```ruby
|
85
|
-
RSpec::Core::MultipleExceptionError: unexpected alert open: {Alert text : Are you sure?}
|
86
|
-
```
|
87
|
-
|
88
|
-
That was caused by a confirmation dialog. In order to get rid of these issue I had to add the following line in the point
|
89
|
-
where the dialog was supposed to be accepted:
|
90
|
-
|
91
|
-
```ruby
|
92
|
-
accept_confirm { click_button "Submit" }
|
93
|
-
```
|
94
|
-
|
95
|
-
## Steps to do after migrating your source code
|
96
|
-
|
97
|
-
### Adapting code for an existing engine
|
98
|
-
|
99
|
-
You must remove the external test app and regenerate it:
|
100
|
-
|
101
|
-
```bash
|
102
|
-
rm -Rf spec/decidim_dummy_app
|
103
|
-
bundle exec rails decidim:generate_external_test_app
|
104
|
-
```
|
105
|
-
|
106
|
-
After regenerating the test app you should recreate the test database as well:
|
107
|
-
|
108
|
-
```bash
|
109
|
-
cd spec/decidim_dummy_app
|
110
|
-
bundle exec rails db:drop
|
111
|
-
bundle exec rails db:create
|
112
|
-
bundle exec rails db:migrate
|
113
|
-
bundle exec rails db:migrate RAILS_ENV=test
|
114
|
-
bundle exec rails db:seed
|
115
|
-
|
116
|
-
```
|
117
|
-
|
118
|
-
### Adapting code for an existing Decidim implementation
|
119
|
-
|
120
|
-
After updating the decidim gems you should import the new migrations and execute them:
|
121
|
-
|
122
|
-
```bash
|
123
|
-
rails decidim:upgraded
|
124
|
-
rails db:migrate
|
125
|
-
```
|
126
|
-
|
127
|
-
Additionally you should change the way uglifier is used in your app:
|
128
|
-
|
129
|
-
Edit the file *config/environments/production.rb* and make the following changes:
|
130
|
-
|
131
|
-
```ruby
|
132
|
-
# Original value
|
133
|
-
# config.assets.js_compressor = :uglifier
|
134
|
-
|
135
|
-
# Enable ES6 support
|
136
|
-
config.assets.js_compressor = Uglifier.new(harmony: true)
|
137
|
-
```
|
138
|
-
|
139
|
-
### To sum it up
|
140
|
-
|
141
|
-
Take a cold beer and enjoy democracy.
|