decidim 0.17.2 → 0.18.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: cfe79cbe411a84aeaa12896a3d388a498fc1474adb4667d046ddff504fe91599
4
- data.tar.gz: b15b76c3f808faf7427312eb0e04a77baa1b1fcc605af0eb2fa2745e32e7332d
3
+ metadata.gz: d7eaef47e4a596b3f4a5531613250ef045c7702f1df6ed181840b235186872e4
4
+ data.tar.gz: 68f661b9f6ef5cbb5f32f32446e32c9c67286c67ea658d46887c7f50c232bc5a
5
5
  SHA512:
6
- metadata.gz: 0b7b3c207d322f1cf7079046e67867d84d3b9dfe26b31da54d5393506d5b91361f4a52f09acd72f5ed0c7cdc04e0cb5ca36fe706e0a3af8aeab3d4ba5122c14f
7
- data.tar.gz: 59fdd4a510684bcd6b4207e0be11eb1a7e77ea3782048c5962072a846a1cffb4518a63cdef9984786e55832278f37a6e917a482cf1516802b39a31666934f28f
6
+ metadata.gz: c7e436c65da61e882b7c535c990f61b45948db2024b0c9e4de6e39c5696d425aa0554da0b96e8d91b22a9e938e93103d23a35cb48ac9ade23e365c9ef84d2564
7
+ data.tar.gz: adbd14b024ac57a0791ccd6cb809218288e54239b79f6221c6a2dbe1675af8ef0103bf6436268555ac233a5d015241cf4dfae42e4e2b41a454c529ee9e548db4
data/README.md CHANGED
@@ -164,5 +164,8 @@ Since Decidim is a ruby gem, you can check out the [dependent repositories](http
164
164
  * [Vilanova Participa](http://participa.vilanova.cat) - [View code](https://github.com/vilanovailageltru/decidim-vilanova)
165
165
  * [Erabaki Pamplona](https://erabaki.pamplona.es) - [View code](https://github.com/ErabakiPamplona/erabaki)
166
166
  * [Decidim Mataró](https://www.decidimmataro.cat) - [View code](https://github.com/AjuntamentDeMataro/decidim-mataro)
167
- * [Commission Nationale du Débat Public (France)](https://cndp.opensourcepolitics.eu/)
168
167
  * [MetaDecidim](https://meta.decidim.barcelona/) - [View Code](https://github.com/decidim/metadecidim)
168
+
169
+ ## Security
170
+
171
+ Security is very important to us. If you have any issue regarding security, please disclose the information responsibly by sending an email to security [at] decidim [dot] org and not by creating a github/metadecidim issue. We appreciate your effort to make Decidim more secure.
@@ -15,7 +15,7 @@ Decidim uses [Crowdin](https://crowdin.com/) to manage the translations.
15
15
  - Translate at least one key from every engine, so, your _yaml_ files are not empty. The easiest way to do this is to automatically translate and sync all the content. Later you'll be able to fix the content that wasn't properly translated.
16
16
  - Add [Foundation Datepicker](https://github.com/najlepsiwebdesigner/foundation-datepicker/tree/master/js/locales)'s translations ([PR](https://github.com/decidim/decidim/pull/2039)).
17
17
  - Add the new language to `available_locales` ([PR](https://github.com/decidim/decidim/pull/1991)).
18
- - Announce the new language in the Readme ([PR](https://github.com/decidim/decidim/pull/2125)).
18
+ - Add the language in [decidim-core/spec/lib/available_locales_spec.rb](https://github.com/decidim/decidim/pull/5080/files#diff-9c9dc1c8c25dcecdfb8ce555d5ef5e47R15).
19
19
 
20
20
  ## Test the new language
21
21
 
@@ -21,34 +21,96 @@ Metrics calculations must be executed everyday. Some `rake task` have been added
21
21
  bundle exec rake decidim:metrics:one["<metric name>","YYYY-MM-DD"]
22
22
  ```
23
23
 
24
- ## Current available metric names
25
-
26
- - *users*, created `Users`
27
- - *proposals*, published, not withdrawn and not *hidden* `Proposals`
28
- - *accepted_proposals*, accepted `Proposals`
29
- - *supports*, supports in `Proposals`
30
- - *assemblies*, published `Assemblies`
31
- - *participatory_processes*, published `ParticipatoryProcesses`
32
- - *results*, `Results` in `Accountability`
33
- - *comment*, `Comments` generated by users, related to public elements and not *hidden*
34
- - *meetings*, public `Meetings`
24
+ - It is possible to rebuild one or all metrics since some specific day. This is useful in case current metrics are no generated or corrupt. **Depending on the size of the database this can take a long time!**. The command will execute the same calculations as the commands above for **each** day between *today* and the date specified.
25
+
26
+ - To rebuild metrics since a given date (all or an specific one)
27
+
28
+ ```ruby
29
+ bundle exec rake decidim:metrics:rebuild["YYYY-MM-DD"]
30
+ bundle exec rake decidim:metrics:rebuild["<metric name>","YYYY-MM-DD"]
31
+ ```
32
+
33
+ ## Available metrics
34
+
35
+ - Use the command `decidim:metrics:list` to list all available metrics using the console:
36
+
37
+ ```ruby
38
+ bundle exec rake decidim:metrics:list
39
+ ```
40
+ Currently, available metrics are:
41
+
42
+ - **users**, created `Users`
43
+ - **proposals**, published, not withdrawn and not *hidden* `Proposals`
44
+ - **accepted_proposals**, accepted `Proposals`
45
+ - **supports**, supports given to `Proposals`
46
+ - **assemblies**, published `Assemblies`
47
+ - **participatory_processes**, published `ParticipatoryProcesses`
48
+ - **results**, `Results` in `Accountability`
49
+ - **comments**, `Comments` generated by users, related to public elements and not *hidden*
50
+ - **meetings**, public `Meetings`
35
51
 
36
52
  Only available for `ParticipatorySpaces` (restricted to `ParticipatoryProcesses`)
37
53
 
38
- - *participants*: unique users who make at least one of the following actions
39
- - Create a proposal
40
- - Create a debate
54
+ - **participants**, unique users who make at least one of the following actions:
41
55
  - Answer a survey
56
+ - Create a debate
57
+ - Create a proposal
58
+ - Endorse a proposal
42
59
  - Leave a comment
43
- - Give support to a proposal
44
- - Endorse
60
+ - Support a proposal
45
61
  - Vote a participatory budgeting project
46
- - *followers*: unique users who follow any participatory element in a `ParticipatorySpace`
47
- - *endorsements*: number of `Endorsements` in `Proposals`, within a `ParticipatorySpace`
48
- - *debates*: number of `Debates` within a `ParticipatorySpace`
49
- - *survey_answers*: number of answered `Surveys` by users within a `ParticipatorySpace`
62
+ - **followers**, unique users who follow any participatory element in a `ParticipatorySpace`
63
+ - **endorsements**, number of `Endorsements` in `Proposals`, within a `ParticipatorySpace`
64
+ - **debates**, number of `Debates` within a `ParticipatorySpace`
65
+ - **survey_answers**, number of answered `Surveys` by users within a `ParticipatorySpace`
50
66
 
51
- ## To configure it correctly
67
+ ## Configuration
52
68
 
53
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
54
70
  - An **ActiveJob** queue, like [Sidekiq](https://github.com/mperham/sidekiq) or [DelayedJob](https://github.com/collectiveidea/delayed_job/)
71
+
72
+ ## Persistence
73
+
74
+ The metrics module percomutes calculations and persists them into
75
+ `decidim_metrics` database table. So this module only uses one single table to
76
+ persist metrics from all times and types.
77
+
78
+ The `decidim_metrics` table has the following fields:
79
+
80
+ - `day`: the day for which the metric has been computed.
81
+ - `metric_type`: the type of the metric. One of: users, proposals,
82
+ accepted_proposals, supports, assemblies.
83
+ - `cumulative`: quantity accumulated to day ”day”.
84
+ - `quantity`: quantity for the current day, ”day”.
85
+ - `decidim_organization_id`: the FK to the organization to which this Metric
86
+ belongs to.
87
+ - `participatory_space_type` + `participatory_space_id`: the FK to the
88
+ participatory space to which this Metric belongs to, if any.
89
+ - `related_object_type` + `related_object_id`: the FK to the object to which
90
+ this Metric belongs to, if any.
91
+ - `decidim_category_id`: the FK to the category for this Metric, if any.
92
+
93
+ Relations around `decidim_metrics` table:
94
+ ```
95
+ +------------------------+
96
+ +--------------+ | ParticipatoryProcesses |
97
+ | Organization | +----+------------------------+
98
+ +------+-------+ |
99
+ | +--------------------+ | +------------+
100
+ | | | +----+ Assemblies |
101
+ | +----->+ ParticipatorySpace +<----+ +------------+
102
+ | | | | | +-------------+
103
+ | | +--------------------+ +----+ Initiatives |
104
+ | | | +-------------+
105
+ | | |
106
+ | | | +---------------+
107
+ +-----+-------+---+ +----+ Consultations |
108
+ | | +---------------+
109
+ | decidim_metrics |
110
+ | |
111
+ +--------+--------+ +----------------+
112
+ | | related_object |
113
+ +--------------->+ |
114
+ | [polymorphic] |
115
+ +----------------+
116
+ ```
@@ -8,6 +8,18 @@ You need to create a dummy application to run your tests. Run the following comm
8
8
  bundle exec rake test_app
9
9
  ```
10
10
 
11
+ ## Running a specific test file or just a single spec
12
+
13
+ If you are writing new specs, you can run the tests contained in a single file by opening a console window in the corresponding module and calling `rspec`on the file. For example:
14
+ ```bash
15
+ cd decidim-participatory_processes
16
+ bundle exec rspec spec/forms/participatory_process_form_spec.rb
17
+ ```
18
+ You can also run a single test by appending its start line number to the command:
19
+ ```bash
20
+ bundle exec rspec spec/forms/participatory_process_form_spec.rb:134
21
+ ```
22
+
11
23
  ## Running tests for a specific component
12
24
 
13
25
  A Decidim engine can be tested running the rake task named after it. For
@@ -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.17.2"
6
+ "0.18.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.17.2
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -18,266 +18,266 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.17.2
21
+ version: 0.18.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.17.2
28
+ version: 0.18.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.17.2
35
+ version: 0.18.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.17.2
42
+ version: 0.18.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.17.2
49
+ version: 0.18.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.17.2
56
+ version: 0.18.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.17.2
63
+ version: 0.18.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.17.2
70
+ version: 0.18.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.17.2
77
+ version: 0.18.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.17.2
84
+ version: 0.18.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.17.2
91
+ version: 0.18.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.17.2
98
+ version: 0.18.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.17.2
105
+ version: 0.18.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.17.2
112
+ version: 0.18.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.17.2
119
+ version: 0.18.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.17.2
126
+ version: 0.18.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.17.2
133
+ version: 0.18.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.17.2
140
+ version: 0.18.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.17.2
147
+ version: 0.18.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.17.2
154
+ version: 0.18.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.17.2
161
+ version: 0.18.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.17.2
168
+ version: 0.18.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.17.2
175
+ version: 0.18.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.17.2
182
+ version: 0.18.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.17.2
189
+ version: 0.18.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.17.2
196
+ version: 0.18.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.17.2
203
+ version: 0.18.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.17.2
210
+ version: 0.18.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.17.2
217
+ version: 0.18.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.17.2
224
+ version: 0.18.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.17.2
231
+ version: 0.18.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.17.2
238
+ version: 0.18.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.17.2
245
+ version: 0.18.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.17.2
252
+ version: 0.18.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.17.2
259
+ version: 0.18.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.17.2
266
+ version: 0.18.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.17.2
273
+ version: 0.18.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.17.2
280
+ version: 0.18.0
281
281
  - !ruby/object:Gem::Dependency
282
282
  name: bundler
283
283
  requirement: !ruby/object:Gem::Requirement