decidim 0.20.1 → 0.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5d00b44c1f5145d252db9ca86af081280117eac208280ddcd60a8203224a18c
4
- data.tar.gz: 93e824fac9313e6ee4d2999deba32d3e79f0528ba5c547345838029458eb2c4a
3
+ metadata.gz: 97d410258149c9479d08c4c0a5cab0576f8e575b8b2b99b87a0b2ec079aeaa46
4
+ data.tar.gz: de5dac8b18a31f81fc81102de483e43d8ae844e709715e41366f2eb662c15231
5
5
  SHA512:
6
- metadata.gz: 48f12dc081c1d74b06b517afcfffab81dace4bbc9c2b1f308d73c0d3a3ae9af25db5feb511160f39d41bfcbca799896c75ed1caf34beaebe6e29697ef86a8bc1
7
- data.tar.gz: bba6785887f5ae6c7806127e67fa57a4576311edea2afc34fcfacfbaa42223b04aca719bfb29f4ec0c70af1b7386c8840e9ca93c947aaefb711800d0ba2aad81
6
+ metadata.gz: 8dc887b951003179d5ac662ebf96979877792f763c7afe8d3c4fd3d07b47e18d95974428db7fb1f33964d97dd2e9b7934cbdc7fbf5180ef88a8cf75b5eb43891
7
+ data.tar.gz: e2381ca71618c8db78e5f1675fd3e8da69b1da0ed1cfb01601075e4f2fb671def840c562dfda3caba9fc642d982e5a49a51365e1e8aad05b2b835a1ff4446ed8
data/README.md CHANGED
@@ -18,13 +18,45 @@ All members of the Decidim community agree with [Decidim Social Contract or Code
18
18
 
19
19
  Code quality
20
20
 
21
- [![Build Status](https://img.shields.io/circleci/project/github/decidim/decidim/master.svg)](https://circleci.com/gh/decidim/decidim)
21
+ [![codecov](https://codecov.io/gh/decidim/decidim/branch/develop/graph/badge.svg)](https://codecov.io/gh/decidim/decidim)
22
22
  [![Maintainability](https://api.codeclimate.com/v1/badges/ad8fa445086e491486b6/maintainability)](https://codeclimate.com/github/decidim/decidim/maintainability)
23
23
  [![Crowdin](https://d322cqt584bo4o.cloudfront.net/decidim/localized.svg)](https://crowdin.com/project/decidim)
24
24
  [![Inline docs](http://inch-ci.org/github/decidim/decidim.svg?branch=master)](http://inch-ci.org/github/decidim/decidim)
25
25
  [![Accessibility issues](https://rocketvalidator.com/badges/a11y_issues.svg?url=http://staging.decidim.codegram.com/)](https://rocketvalidator.com/badges/link?url=http://staging.decidim.codegram.com/&report=a11y)
26
26
  [![HTML issues](https://rocketvalidator.com/badges/html_issues.svg?url=http://staging.decidim.codegram.com/)](https://rocketvalidator.com/badges/link?url=http://staging.decidim.codegram.com/&report=html)
27
27
 
28
+ Test suite
29
+
30
+ <details>
31
+ <summary>See all</summary>
32
+
33
+ [![Accountability](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Accountability/develop.svg?label=%5BCI%5D%20Accountability)](https://github.com/decidim/decidim/actions)
34
+ [![Admin](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Admin/develop.svg?label=%5BCI%5D%20Admin)](https://github.com/decidim/decidim/actions)
35
+ [![Api](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Api/develop.svg?label=%5BCI%5D%20Api)](https://github.com/decidim/decidim/actions)
36
+ [![Assemblies](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Assemblies/develop.svg?label=%5BCI%5D%20Assemblies)](https://github.com/decidim/decidim/actions)
37
+ [![Blogs](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Blogs/develop.svg?label=%5BCI%5D%20Blogs)](https://github.com/decidim/decidim/actions)
38
+ [![Budgets](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Budgets/develop.svg?label=%5BCI%5D%20Budgets)](https://github.com/decidim/decidim/actions)
39
+ [![Comments](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Comments/develop.svg?label=%5BCI%5D%20Comments)](https://github.com/decidim/decidim/actions)
40
+ [![Conferences](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Conferences/develop.svg?label=%5BCI%5D%20Conferences)](https://github.com/decidim/decidim/actions)
41
+ [![Consultations](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Consultations/develop.svg?label=%5BCI%5D%20Consultations)](https://github.com/decidim/decidim/actions)
42
+ [![Core](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Core/develop.svg?label=%5BCI%5D%20Core)](https://github.com/decidim/decidim/actions)
43
+ [![Debates](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Debates/develop.svg?label=%5BCI%5D%20Debates)](https://github.com/decidim/decidim/actions)
44
+ [![Forms](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Forms/develop.svg?label=%5BCI%5D%20Forms)](https://github.com/decidim/decidim/actions)
45
+ [![Generators](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Generators/develop.svg?label=%5BCI%5D%20Generators)](https://github.com/decidim/decidim/actions)
46
+ [![Initiatives](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Initiatives/develop.svg?label=%5BCI%5D%20Initiatives)](https://github.com/decidim/decidim/actions)
47
+ [![Main](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Main%20folder/develop.svg?label=%5BCI%5D%20Main)](https://github.com/decidim/decidim/actions)
48
+ [![Meetings](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Meetings/develop.svg?label=%5BCI%5D%20Meetings)](https://github.com/decidim/decidim/actions)
49
+ [![Pages](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Pages/develop.svg?label=%5BCI%5D%20Pages)](https://github.com/decidim/decidim/actions)
50
+ [![Participatory processes](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Participatory%20processes/develop.svg?label=%5BCI%5D%20Participatory%20processes)](https://github.com/decidim/decidim/actions)
51
+ [![Proposals (system admin)](<https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Proposals%20(system%20admin)/develop.svg?label=%5BCI%5D%20Proposals%20(system%20admin)>)](https://github.com/decidim/decidim/actions)
52
+ [![Proposals (system public)](<https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Proposals%20(system%20public)/develop.svg?label=%5BCI%5D%20Proposals%20(system%20public)>)](https://github.com/decidim/decidim/actions)
53
+ [![Proposals (unit tests)](<https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Proposals%20(unit%20tests)/develop.svg?label=%5BCI%5D%20Proposals%20(unit%20tests)>)](https://github.com/decidim/decidim/actions)
54
+ [![Sortitions](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Sortitions/develop.svg?label=%5BCI%5D%20Sortitions)](https://github.com/decidim/decidim/actions)
55
+ [![Surveys](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Surveys/develop.svg?label=%5BCI%5D%20Surveys)](https://github.com/decidim/decidim/actions)
56
+ [![System](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20System/develop.svg?label=%5BCI%5D%20System)](https://github.com/decidim/decidim/actions)
57
+ [![Verifications](https://img.shields.io/github/workflow/status/decidim/decidim/%5BCI%5D%20Verifications/develop.svg?label=%5BCI%5D%20Verifications)](https://github.com/decidim/decidim/actions)
58
+
59
+ </details>
28
60
 
29
61
  ---
30
62
 
@@ -0,0 +1,15 @@
1
+ # API
2
+
3
+ Decidim comes with a powerful API in read-only mode based in the GraphQL specification.
4
+
5
+ Documentation for this API is auto-generated in each instance of Decidim, usually under the URL:
6
+
7
+ `some_domain/api/docs`
8
+
9
+ Accessing that URL will give a full details of all the objects that can be requested and how.
10
+
11
+ For a quick introduction about how to use the Decidim API, please refer to this document:
12
+
13
+ [Using the Decidim GraphQL API](../../decidim-api/docs/usage.md)
14
+
15
+ Note that this document is available under the `api/docs` URL nicely formatted as well. It also includes the full field types reference.
@@ -0,0 +1,19 @@
1
+ # Embeddable
2
+
3
+ `Decidim` allows you to share a information box related to some spaces as:
4
+ - **Assemblies**
5
+ - **Conferences**
6
+ - **Initiatives**
7
+ - **Participatory processes**
8
+
9
+ or even `Meetings` component in an easy way with the `embeddable` option that offers the platform.
10
+
11
+ ## How to ##
12
+
13
+ All that you have to do, is to enter into whathever space/component you want to share info to, and look for down right part of the page to find embeddable share option.
14
+
15
+ If it's embeddable, you'll see `embed <\>` option there.
16
+
17
+ Then you can click there, and following that, a new window will pop up showing you the necessary code to embed that space's info into where you want through the html given code in form of a card view.
18
+
19
+ That's all!
@@ -0,0 +1,225 @@
1
+ # How to fix metrics
2
+
3
+ At the request of some instances, we have analyzed the issues related to metrics and looked for possible solutions.
4
+
5
+ ## Problems
6
+
7
+ We have identified two main problems:
8
+ - Metrics generation crashing, which cause `MetricJob`s to run again and again.
9
+ - Peaks in generated metrics, sudden changes from day to day when displaying metrics.
10
+
11
+ **Metrics generation crashing**
12
+
13
+ We have identified only one culprit here: "orphans" records, meaning records whose related component or participatory space cannot be found in the database. This is because in a previous decidim release `PartipatorySpaces` could be deleted but they were not deleted properly. So any application that has deleted a participatory space in the past, will probably have unrelated records that will make some metrics calculation crash.
14
+
15
+ **Peaks in generated metrics**
16
+
17
+ If somehow the metrics jobs fail to execute for a period of time, big differences can appear in metrics. So first make sure that you have metrics for every day, if not [generate them](https://github.com/decidim/decidim/blob/master/docs/advanced/metrics.md).
18
+
19
+ If you have metrics generated for almost everyday and still see drastic changes from day to day, take into account that changing the visibility of a component or participatory space (making them private or unpublishing them) will naturally cause big differences in generated metrics.
20
+
21
+ Finally, if you see that the differences in some days are multiples of a previous generated metric, meaning suddenly you have exactly the double or the triple of a calculated metric, it's very likely that you have duplicate generated metrics. We have only seen this problem with instances using Sidekiq, not Delayed Job. We do not know the cause of this, but it seems to be a known issue [Avoiding duplicate jobs in Sidekiq](https://blog.francium.tech/avoiding-duplicate-jobs-in-sidekiq-dcbb1aca1e20).
22
+
23
+ ## Solutions
24
+
25
+ We cannot offer a definitive solution for duplicate metrics, other than to delete old duplicate metrics and generate them again. If this problem persists, however, consider using Delayed Job.
26
+ For a given metric type (`rake decidim:metrics:list`) that has duplicates:
27
+ - Option 1: Remove individually each metric record per day.
28
+ - Option 2: Delete all metric records and recalculate them. [CHANGELOG](https://github.com/decidim/decidim/blob/0.18-stable/CHANGELOG.md#participants-metrics) of decidim version 0.18 has an example for "participants".
29
+
30
+ For orphan records, you can do the following:
31
+ - Back up the database.
32
+ - Delete orphan records fromt the console (code is below).
33
+ - Delete "comments" metrics and recalculate them following the [aforementioned example](https://github.com/decidim/decidim/blob/0.18-stable/CHANGELOG.md#participants-metrics).
34
+
35
+ ### Some queries that may help
36
+
37
+ ```ruby
38
+ GROUP_BY_FIELDS= %w(
39
+ day
40
+ metric_type
41
+ decidim_organization_id
42
+ participatory_space_type
43
+ participatory_space_id
44
+ related_object_type
45
+ related_object_id
46
+ decidim_category_id).join(', ')
47
+
48
+ def remove_duplicates
49
+ sql= <<~EOSQL.strip
50
+ DELETE FROM decidim_metrics WHERE decidim_metrics.id NOT IN
51
+ (SELECT id FROM (
52
+ SELECT DISTINCT ON (#{GROUP_BY_FIELDS}) * FROM decidim_metrics));
53
+ EOSQL
54
+ end
55
+
56
+ # DELETE FROM decidim_metrics WHERE decidim_metrics.id NOT IN \n (SELECT id FROM (\n SELECT DISTINCT ON (day, metric_type, decidim_organization_id, participatory_space_type, participatory_space_id, related_object_type, related_object_id, decidim_category_id) * FROM decidim_metrics));
57
+ def count_duplicates
58
+ sql= <<~EOSQL.strip
59
+ SELECT count(1), #{GROUP_BY_FIELDS} FROM decidim_metrics GROUP BY #{GROUP_BY_FIELDS} HAVING COUNT(1) > 1;
60
+ EOSQL
61
+ end
62
+ ```
63
+
64
+ ### Delete orphan records
65
+ "proposals", "meetings", "accountability", "debates", "pages", "budgets", "surveys"
66
+
67
+ #### Proposals
68
+ Delete proposals whose component does not have a participatory space and delete components of a proposal type that do not have a participatory space
69
+
70
+ ```
71
+ Decidim::Component.where(manifest_name: "proposals").find_each(batch_size: 100) { |c|
72
+ if c.participatory_space.blank?
73
+ Decidim::Proposals::Proposal.where(component: c).destroy_all
74
+ c.destroy
75
+ end
76
+ }
77
+ ```
78
+
79
+ Delete proposals that do not have a component
80
+ ```
81
+ Decidim::Proposals::Proposal.find_each(batch_size: 100) { |proposal|
82
+ proposal.delete if proposal.component.blank?
83
+ }
84
+ ````
85
+
86
+ #### Meetings
87
+
88
+ Delete meetings whose component has no participatory space and delete components of meeting type that do not have a participatory space
89
+
90
+ ```
91
+ Decidim::Component.where(manifest_name: "meetings").find_each(batch_size: 100) { |c|
92
+ if c.participatory_space.blank?
93
+ Decidim::Meetings::Meeting.where(component: c).destroy_all
94
+ c.destroy
95
+ end
96
+ }
97
+ ```
98
+
99
+ Delete meetings that do not have a component
100
+ ```
101
+ Decidim::Meetings::Meeting.find_each(batch_size: 100) { |meeting|
102
+ meeting.delete if meeting.component.blank?
103
+ }
104
+ ````
105
+
106
+ #### Debates
107
+ Delete debates that its component has no participatory space and the debate components that do not have a participatory space
108
+
109
+ ```
110
+ Decidim::Component.where(manifest_name: "debates").find_each(batch_size: 100) { |c|
111
+ if c.participatory_space.blank?
112
+ Decidim::Debates::Debate.where(component: c).destroy_all
113
+ c.destroy
114
+ end
115
+ }
116
+ ```
117
+
118
+ Destroy debates that do not have a component
119
+ ```
120
+ Decidim::Debates::Debate.find_each(batch_size: 100) { |debate|
121
+ debate.delete if debate.component.blank?
122
+ }
123
+ ```
124
+
125
+ #### Posts
126
+
127
+ Destroy posts whose component has no participatory space and blog components that do not have a participatory space
128
+ ```
129
+ Decidim::Component.where(manifest_name: "blogs").find_each(batch_size: 100) { |c|
130
+ if c.participatory_space.blank?
131
+ Decidim::Blogs::Post.where(component: c).destroy_all
132
+ c.destroy
133
+ end
134
+ }
135
+ ```
136
+
137
+ Destroy posts that do not have a component
138
+ ```
139
+ Decidim::Blogs::Post.find_each(batch_size: 100) { |post|
140
+ post.delete if post.component.blank?
141
+ }
142
+ ```
143
+
144
+ #### Accountability
145
+
146
+ Destroy results whose component has no participatory space and components of accountability type that do not have a participatory space
147
+
148
+ ```
149
+ Decidim::Component.where(manifest_name: "accountability").find_each(batch_size: 100) { |c|
150
+ if c.participatory_space.blank?
151
+ Decidim::Accountability::Result.where(component: c).destroy_all
152
+ c.destroy
153
+ end
154
+ }
155
+ ```
156
+
157
+ Destroy results that do not have a component
158
+
159
+ ```
160
+ Decidim::Accountability::Result.find_each(batch_size: 100) { |result|
161
+ result.delete if result.component.blank?
162
+ }
163
+ ```
164
+
165
+ #### Pages
166
+
167
+ Destroy page components that do not have a participatory space
168
+ ```
169
+ Decidim::Component.where(manifest_name: "pages").find_each(batch_size: 100) { |c|
170
+ if c.participatory_space.blank?
171
+ c.destroy
172
+ end
173
+ }
174
+ ```
175
+
176
+ #### Budgets
177
+
178
+ Destroy projects whose component has no participatory space and budget components that do not have a participatory space
179
+
180
+ ```
181
+ Decidim::Component.where(manifest_name: "budgets").find_each(batch_size: 100) { |c|
182
+ if c.participatory_space.blank?
183
+ Decidim::Budgets::Project.where(component: c).destroy_all
184
+ c.destroy
185
+ end
186
+ }
187
+ ```
188
+
189
+ Destroy results that do not have a component
190
+ ```
191
+ Decidim::Budgets::Project.find_each(batch_size: 100) { |project|
192
+ project.delete if project.component.blank?
193
+ }
194
+ ```
195
+
196
+ #### Surveys
197
+
198
+ ```
199
+ Decidim::Component.where(manifest_name: "surveys").find_each(batch_size: 100) { |c|
200
+ if c.participatory_space.blank?
201
+ Decidim::Surveys::Survey.where(component: c).destroy_all
202
+ c.destroy
203
+ end
204
+ }
205
+ ```
206
+
207
+ Destroy surveys that do not have a component
208
+ ```
209
+ Decidim::Surveys::Survey.find_each(batch_size: 100) { |survey|
210
+ survey.delete if survey.component.blank?
211
+ }
212
+ ```
213
+
214
+
215
+ #### Comments
216
+
217
+ Destroy comments whose commentable root is a proposal that does not have a participatory space.
218
+
219
+ ```
220
+ proposal_ids = Decidim::Comments::Comment.where(decidim_root_commentable_type: "Decidim::Proposals::Proposal").pluck(:decidim_root_commentable_id)
221
+
222
+ proposal_ids_without_space = Decidim::Proposals::Proposal.where(id: proposal_ids).find_all{|p| p.participatory_space.blank? }.pluck(:id)
223
+
224
+ Decidim::Comments::Comment.where(decidim_root_commentable_type: "Decidim::Proposals::Proposal", decidim_root_commentable_id: proposal_ids_without_space).destroy_all
225
+ ```
@@ -66,7 +66,7 @@ Only available for `ParticipatorySpaces` (restricted to `ParticipatoryProcesses`
66
66
 
67
67
  ## Configuration
68
68
 
69
- - 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
69
+ - 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. You probably want to schedule a `bundle exec rake decidim:metrics:all` every night.
70
70
  - An **ActiveJob** queue, like [Sidekiq](https://github.com/mperham/sidekiq) or [DelayedJob](https://github.com/collectiveidea/delayed_job/)
71
71
 
72
72
  ## Persistence
@@ -30,6 +30,26 @@ Once created you are ready to:
30
30
 
31
31
  - `bin/rails s`
32
32
 
33
+ ## Gitflow Branching model
34
+
35
+ The Decidim respository follows the Gitflow branching model. There are good documentations on it at:
36
+
37
+ - the original post: https://nvie.com/posts/a-successful-git-branching-model/
38
+ - provided by Atlassian: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow.
39
+
40
+ This model introduces the `develop` branch as a kind of queue for new features to enter into the next release.
41
+
42
+ In summary, Decidim developers that work on `feature/...` or `fix/...` branches will branch off from `develop` and must be merged back into `develop`.
43
+
44
+ Then, to start a new feature branch off from `develop` in the following way:
45
+
46
+ ```
47
+ git checkout develop
48
+ git checkout -b feature/xxx
49
+ ```
50
+
51
+ Implement the feature, and open a Pull Request as normal, but against `develop` branch. As this is the most common operation, `develop` is the default branch instead of `master`.
52
+
33
53
  ## During development
34
54
 
35
55
  When creating new migrations in Decidim's modules, you will need to "apply" this migrations to your development_app. The way to do this is by copying the migration from your module into the db/migrate dir of your development_app. Luckily we already have a script that automates this: it copies all missing migrations in development_app/db/migrate. The command is:
@@ -38,6 +58,8 @@ When creating new migrations in Decidim's modules, you will need to "apply" this
38
58
  bin/rails decidim:upgrade
39
59
  ```
40
60
 
61
+ Anyway we recommend re-creating your development_app every once in a while.
62
+
41
63
  ## Useful commands
42
64
 
43
65
  ### erb-lint
@@ -103,8 +103,15 @@ Visit [http://localhost:3000](http://localhost:3000) to see your app running.
103
103
 
104
104
  Decidim comes pre-configured with some safe defaults, but can be changed through the `config/initializers/decidim.rb` file in your app. Check the comments there or read the comments in [the source file](https://github.com/decidim/decidim/blob/master/decidim-core/lib/decidim/core.rb) (the part with the `config_accessor` calls) for more up-to-date info.
105
105
 
106
- If you want to run the automatic rake task to delete data portability files, write in `crontab -e`
107
- `0 0 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production decidim:delete_data_portability_files`
106
+ ### Scheduled tasks
107
+
108
+ For Decidim to function as expected, there are some background tasks that should be scheduled to be executed regularly.
109
+
110
+ - Expired *data portability* files should be removed. To do it, write a `crontab -e` line like: `0 0 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production decidim:delete_data_portability_files`
111
+ - *Metrics* also require a cron to be computed nightly. Find more information in the [related documentation](https://github.com/decidim/decidim/blob/master/docs/advanced/mertics.md#Configuration).
112
+ - *Open Data* is also produced nightly via a scheduled job. Find more information in the [open-data documentation](https://github.com/decidim/decidim/blob/master/docs/advanced/open-data.md).
113
+
114
+ ### Further configuration
108
115
 
109
116
  We also have other guides on how to configure some extra components:
110
117
 
@@ -1,6 +1,10 @@
1
1
  # Etherpad
2
2
 
3
- Decidim can be integrated with Etherpad so meetings can have their own pads.
3
+ On some cases, users need to have near real time collaborative writing, for instance for having the minutes on a physical meeting.
4
+
5
+ To ease online/offline participation, Decidim can be integrated with Etherpad so meetings can have their own pads.
6
+
7
+ ## Integration
4
8
 
5
9
  In order to use it you need to have your own Etherpad deployment, you can do it
6
10
  with the Docker compose using the provided `docker-compose-etherpad.yml`.
@@ -13,5 +17,36 @@ docker swarm init # just one time
13
17
  docker stack deploy --compose-file docker-compose-etherpad.yml decidim-etherpad
14
18
  ```
15
19
 
16
- After deploying it, you should set the Etherpad host and API Key at
20
+ After deploying Etherpad, you should get back to Decidim's server and set the Etherpad host and API Key at
17
21
  `config/initializers/decidim.rb` and `config/secrets.yml`
22
+
23
+ An example snippet in `config/initializers/decidim.rb` may be:
24
+
25
+ ```ruby
26
+ config.etherpad = {
27
+ server: Rails.application.secrets.etherpad[:server],
28
+ api_key: Rails.application.secrets.etherpad[:api_key],
29
+ api_version: Rails.application.secrets.etherpad[:api_version]
30
+ }
31
+ ```
32
+
33
+ and then in `config/secrets.yml`:
34
+
35
+ ```
36
+ etherpad:
37
+ server: <%= ENV["ETHERPAD_SERVER"] %>
38
+ api_key: <%= ENV["ETHERPAD_API_KEY"] %>
39
+ api_version: <%= ENV["ETHERPAD_API_VERSION"] %>
40
+ ```
41
+
42
+ ## How is Etherpad Lite integrated in Meetings?
43
+
44
+ To better understand this feature, the final idea is to have the three moments of a meeting covered on Decidim itself by default:
45
+
46
+ - **Before the meeting**, you let know that the meeting is going to happen, where, when and what is going to be discussed
47
+ - **During the meeting**, notes can be taken on a collaborative way
48
+ - **After the meeting**, you upload the notes, minutes, metadata and/or pictures to have a record on what was discussed
49
+
50
+ Pad creation can be enabled by administrators in each `Meetings` component. When enabled, the public view of a Meeting renders an iframe which encapsulates the integrated Pad. This Pad is automatically created before rendering, so there's nothing the user or the administrators has to do to see the Pad.
51
+
52
+ The pad iframe is only accessible for 24 hours before and 72 hours after the meeting. After the meeting only the read only URL for this pad is shown.
@@ -1,6 +1,18 @@
1
1
  # Social providers integration
2
2
 
3
- If you want to enable sign up through social providers like Facebook you will need to generate app credentials and write them into the Rails secrets file: `config/secrets.yml`.
3
+ If you want to enable sign up through social providers like Facebook you will need to generate app credentials and store them in one of the following places:
4
+
5
+ - In the Rails secrets file: `config/secrets.yml`. This configuration will be shared by all tenants.
6
+ - In the site configuration (ex. system/organizations/1/edit). This configuration overrides the one in `config/secrets.yml`.
7
+
8
+ Take into account that for a social provider integration appearing in the organization form, it must also be defined in `config/secrets.yml` (but the values are optional). For example:
9
+
10
+ ```yaml
11
+ twitter:
12
+ enabled: false # disabled by default, unless activated in the organization
13
+ api_key:
14
+ api_secret:
15
+ ```
4
16
 
5
17
  ## Facebook
6
18
 
@@ -12,7 +24,7 @@ If you want to enable sign up through social providers like Facebook you will ne
12
24
  1. Validate the captcha.
13
25
  1. Ignore the source code and fill in the URL field with `https://YOUR_DECIDIM_HOST/users/auth/facebook/callback`
14
26
  1. Navigate to the application dashboard and copy the APP_ID and APP_SECRET
15
- 1. Paste credentials in `config/secrets.yml`. Ensure the `enabled` attribute is `true`.
27
+ 1. Paste credentials in `config/secrets.yml` or in the organization configuration. Ensure the `enabled` attribute is `true`.
16
28
 
17
29
  ## Twitter
18
30
 
@@ -24,7 +36,7 @@ If you want to enable sign up through social providers like Facebook you will ne
24
36
  1. Check the 'Developer Agreement' checkbox and click the 'Create your Twitter application' button.
25
37
  1. Navigate to the "Keys and Access Tokens" tab and copy the API_KEY and API_SECRET.
26
38
  1. (Optional) Navigate to the "Permissions" tab and check the "Request email addresses from users" checkbox.
27
- 1. Paste credentials in `config/secrets.yml`. Ensure the `enabled` attribute is `true`.
39
+ 1. Paste credentials in `config/secrets.yml` or in the organization configuration. Ensure the `enabled` attribute is `true`.
28
40
 
29
41
  ## Google
30
42
 
@@ -38,7 +50,7 @@ If you want to enable sign up through social providers like Facebook you will ne
38
50
  1. Click on `Credentials` tab and click on "Create credentials" button. Select `OAuth client ID`.
39
51
  1. Select `Web applications`. Fill in the `Authorized Javascript origins` with your url. Then fill in the `Authorized redirect URIs` with your url and append the path `/users/auth/google_oauth2/callback`.
40
52
  1. Copy the CLIENT_ID AND CLIENT_SECRET
41
- 1. Paste credentials in `config/secrets.yml`. Ensure the `enabled` attribute is `true`.
53
+ 1. Paste credentials in `config/secrets.yml` or in the organization configuration. Ensure the `enabled` attribute is `true`.
42
54
 
43
55
  ## Custom providers
44
56
 
@@ -46,7 +58,7 @@ If you want to enable sign up through social providers like Facebook you will ne
46
58
  * The provider should implement an [OmniAuth](https://github.com/omniauth/omniauth) strategy.
47
59
  * You can use any of the [existing OnmiAuth strategies](https://github.com/omniauth/omniauth/wiki/List-of-Strategies).
48
60
  * Or you can create a new strategy, as the [Decidim OmniAuth Strategy](https://github.com/decidim/omniauth-decidim). This strategy allow users from a Decidim instance to login in other Decidim instance. For example, this strategy is used to allow [decidim.barcelona](https://decidim.barcelona) users to log into [meta.decidim.barcelona](https://meta.decidim.barcelona).
49
- * Once you have defined your strategy, you can configure it in the `config/secrets.yml`, as it is done for the built-in providers.
61
+ * Once you have defined your strategy, you can configure it in the `config/secrets.yml` or in the organization configuration, as it is done for the built-in providers.
50
62
  * By default, Decidim will search in its icons library for an icon named as the provider. You can change this adding an `icon` or `icon_path` attribute to the provider configuration. The `icon` attribute sets the icon name to look for in the Decidim's icons library. The `icon_path` attribute sets the route to the image that should be used.
51
63
  * Here is an example of the configuration section for the Decidim strategy, using an icon located on the application's `app/assets/images` folder:
52
64
 
@@ -157,7 +157,7 @@ module Decidim
157
157
  end
158
158
 
159
159
  def semver_friendly_version
160
- version.gsub(/\.pre/, "-pre").gsub(/\.dev/, "-dev")
160
+ version.gsub(/\.pre/, "-pre").gsub(/\.dev/, "-dev").gsub(/.rc(\d*)/, "-rc\\1")
161
161
  end
162
162
 
163
163
  def version_file
@@ -3,6 +3,6 @@
3
3
  # This holds the decidim version and the faker version it uses.
4
4
  module Decidim
5
5
  def self.version
6
- "0.20.1"
6
+ "0.21.0"
7
7
  end
8
8
  end
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.20.1
4
+ version: 0.21.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: 2020-03-27 00:00:00.000000000 Z
13
+ date: 2020-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-accountability
@@ -18,266 +18,266 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.20.1
21
+ version: 0.21.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.20.1
28
+ version: 0.21.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.20.1
35
+ version: 0.21.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.20.1
42
+ version: 0.21.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.20.1
49
+ version: 0.21.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.20.1
56
+ version: 0.21.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.20.1
63
+ version: 0.21.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.20.1
70
+ version: 0.21.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.20.1
77
+ version: 0.21.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.20.1
84
+ version: 0.21.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.20.1
91
+ version: 0.21.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.20.1
98
+ version: 0.21.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.20.1
105
+ version: 0.21.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.20.1
112
+ version: 0.21.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.20.1
119
+ version: 0.21.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.20.1
126
+ version: 0.21.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.20.1
133
+ version: 0.21.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.20.1
140
+ version: 0.21.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-forms
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.20.1
147
+ version: 0.21.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.20.1
154
+ version: 0.21.0
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: decidim-generators
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.20.1
161
+ version: 0.21.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.20.1
168
+ version: 0.21.0
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: decidim-meetings
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - '='
174
174
  - !ruby/object:Gem::Version
175
- version: 0.20.1
175
+ version: 0.21.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.20.1
182
+ version: 0.21.0
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: decidim-pages
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - '='
188
188
  - !ruby/object:Gem::Version
189
- version: 0.20.1
189
+ version: 0.21.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.20.1
196
+ version: 0.21.0
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: decidim-participatory_processes
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - '='
202
202
  - !ruby/object:Gem::Version
203
- version: 0.20.1
203
+ version: 0.21.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.20.1
210
+ version: 0.21.0
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: decidim-proposals
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
215
  - - '='
216
216
  - !ruby/object:Gem::Version
217
- version: 0.20.1
217
+ version: 0.21.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.20.1
224
+ version: 0.21.0
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: decidim-sortitions
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - '='
230
230
  - !ruby/object:Gem::Version
231
- version: 0.20.1
231
+ version: 0.21.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.20.1
238
+ version: 0.21.0
239
239
  - !ruby/object:Gem::Dependency
240
240
  name: decidim-surveys
241
241
  requirement: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - '='
244
244
  - !ruby/object:Gem::Version
245
- version: 0.20.1
245
+ version: 0.21.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.20.1
252
+ version: 0.21.0
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: decidim-system
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
257
  - - '='
258
258
  - !ruby/object:Gem::Version
259
- version: 0.20.1
259
+ version: 0.21.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.20.1
266
+ version: 0.21.0
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: decidim-verifications
269
269
  requirement: !ruby/object:Gem::Requirement
270
270
  requirements:
271
271
  - - '='
272
272
  - !ruby/object:Gem::Version
273
- version: 0.20.1
273
+ version: 0.21.0
274
274
  type: :runtime
275
275
  prerelease: false
276
276
  version_requirements: !ruby/object:Gem::Requirement
277
277
  requirements:
278
278
  - - '='
279
279
  - !ruby/object:Gem::Version
280
- version: 0.20.1
280
+ version: 0.21.0
281
281
  - !ruby/object:Gem::Dependency
282
282
  name: bundler
283
283
  requirement: !ruby/object:Gem::Requirement
@@ -335,14 +335,17 @@ files:
335
335
  - docs/advanced/activity_log.md
336
336
  - docs/advanced/add_authorizable_action.md
337
337
  - docs/advanced/adding_fixtures_aka_dummy_content.md
338
+ - docs/advanced/api.md
338
339
  - docs/advanced/authorship.md
339
340
  - docs/advanced/components.md
340
341
  - docs/advanced/content_blocks.md
341
342
  - docs/advanced/content_processors.md
342
343
  - docs/advanced/data-picker.md
343
344
  - docs/advanced/deploy.md
345
+ - docs/advanced/embeddable.md
344
346
  - docs/advanced/followers.md
345
347
  - docs/advanced/how_to_create_a_module.md
348
+ - docs/advanced/how_to_fix_metrics.md
346
349
  - docs/advanced/managing_translations_i18n.md
347
350
  - docs/advanced/metrics.md
348
351
  - docs/advanced/modules.md