decidim-reporting_proposals 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e09da39084f0d106aee8dae0c376bf2de7dbd8235051204bac2dfc8fb1467dc5
4
- data.tar.gz: 867ab11fb6da868bc1063638ab5e15943170a1ca0996a2e8071a64335c8b4f56
3
+ metadata.gz: 24d235e0ffe6047fa5840f4c677920aed90c171361929f192216ca2d75fb42c8
4
+ data.tar.gz: 7f4ab41f24187645451483c4c9a94daa3d922e97f311b4967f4f71fbe35112a8
5
5
  SHA512:
6
- metadata.gz: 9d43b839d4ca7e0b3bcd6ad0533a98eb44e7960b6b79043363c0e3ea3afd2cd732155c635f05f4684f87f78ce84a72a22c449cac75fd18409447ab0f9d9573f2
7
- data.tar.gz: 3bcd59b1118db7482d21236a6bd7253bafd8ae60509df745e33a7c09aa886a3dbf10878590f150eb83e16e1ac20aad52b7aae9db68daade063f0982b3e77401f
6
+ metadata.gz: ac856b84ed1c61d2727928ff6a17b5ae04111b4dd21e6c81e986755fd25090a46b76280236d850af4420a83a5e10a64add24bb2a488a06dd38b0922f86816099
7
+ data.tar.gz: 2ccf6510a8b3cc297024a469b1b3c08960149ff9db6abf8702debd1e5334c7e29ce37e4953d2eeed41ba5b870269b382d129ab2bf25d94ddfbd6d3cad3e8f887
@@ -145,12 +145,21 @@ jobs:
145
145
  run: bundle exec rspec spec/system/${{ matrix.rspec }}
146
146
 
147
147
  - name: Upload coverage reports to Codecov
148
- uses: codecov/codecov-action@v3
148
+ uses: codecov/codecov-action@v5
149
149
  with:
150
150
  token: ${{ secrets.CODECOV_TOKEN }}
151
+ slug: openpoke/decidim-module-reporting-proposals
151
152
 
152
153
  - uses: actions/upload-artifact@v4
153
154
  if: always()
154
155
  with:
155
156
  name: screenshots-${{ matrix.name }}
156
157
  path: ./spec/decidim_dummy_app/tmp/screenshots
158
+
159
+ - uses: actions/upload-artifact@v4
160
+ if: always()
161
+ with:
162
+ name: test-logs-${{ matrix.name }}
163
+ path: ./spec/decidim_dummy_app/log/test.log
164
+ if-no-files-found: ignore
165
+
@@ -4,13 +4,20 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
+ - release/*
7
8
  pull_request:
8
9
 
9
10
  env:
10
- CI: "true"
11
- SIMPLECOV: "true"
12
- RUBY_VERSION: 3.2.6
11
+ CI: 1
12
+ SIMPLECOV: 1
13
13
  NODE_VERSION: 18.17.1
14
+ RUBY_VERSION: 3.2.6
15
+ DISPLAY: ":99"
16
+ RUBYOPT: '-W:no-deprecated'
17
+ RAILS_ENV: test
18
+ NODE_ENV: test
19
+ DISABLE_SPRING: 1
20
+
14
21
 
15
22
  jobs:
16
23
  test-unit:
@@ -68,6 +75,15 @@ jobs:
68
75
  run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb'
69
76
 
70
77
  - name: Upload coverage reports to Codecov
71
- uses: codecov/codecov-action@v3
78
+ uses: codecov/codecov-action@v5
72
79
  with:
73
80
  token: ${{ secrets.CODECOV_TOKEN }}
81
+ slug: openpoke/decidim-module-reporting-proposals
82
+
83
+ - uses: actions/upload-artifact@v4
84
+ if: always()
85
+ with:
86
+ name: test-logs-unit
87
+ path: ./spec/decidim_dummy_app/log/test.log
88
+ if-no-files-found: ignore
89
+
data/Gemfile CHANGED
@@ -17,6 +17,8 @@ gem "decidim-reporting_proposals", path: "."
17
17
 
18
18
  gem "bootsnap", "~> 1.7"
19
19
  gem "puma", ">= 6.3.1"
20
+ # seems that rexml 3.4.1 have issues generating some XMLs and codecov compatibility
21
+ gem "rexml", "3.4.1"
20
22
 
21
23
  group :development, :test do
22
24
  gem "byebug", "~> 11.0", platform: :mri
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim-reporting_proposals (0.7.1)
4
+ decidim-reporting_proposals (0.7.3)
5
5
  decidim-admin (>= 0.29.3, < 0.30)
6
6
  decidim-core (>= 0.29.3, < 0.30)
7
7
  decidim-participatory_processes (>= 0.29.3, < 0.30)
@@ -11,47 +11,48 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (7.0.8.7)
15
- actionpack (= 7.0.8.7)
16
- activesupport (= 7.0.8.7)
14
+ actioncable (7.0.10)
15
+ actionpack (= 7.0.10)
16
+ activesupport (= 7.0.10)
17
17
  nio4r (~> 2.0)
18
18
  websocket-driver (>= 0.6.1)
19
- actionmailbox (7.0.8.7)
20
- actionpack (= 7.0.8.7)
21
- activejob (= 7.0.8.7)
22
- activerecord (= 7.0.8.7)
23
- activestorage (= 7.0.8.7)
24
- activesupport (= 7.0.8.7)
19
+ actionmailbox (7.0.10)
20
+ actionpack (= 7.0.10)
21
+ activejob (= 7.0.10)
22
+ activerecord (= 7.0.10)
23
+ activestorage (= 7.0.10)
24
+ activesupport (= 7.0.10)
25
25
  mail (>= 2.7.1)
26
26
  net-imap
27
27
  net-pop
28
28
  net-smtp
29
- actionmailer (7.0.8.7)
30
- actionpack (= 7.0.8.7)
31
- actionview (= 7.0.8.7)
32
- activejob (= 7.0.8.7)
33
- activesupport (= 7.0.8.7)
29
+ actionmailer (7.0.10)
30
+ actionpack (= 7.0.10)
31
+ actionview (= 7.0.10)
32
+ activejob (= 7.0.10)
33
+ activesupport (= 7.0.10)
34
34
  mail (~> 2.5, >= 2.5.4)
35
35
  net-imap
36
36
  net-pop
37
37
  net-smtp
38
38
  rails-dom-testing (~> 2.0)
39
- actionpack (7.0.8.7)
40
- actionview (= 7.0.8.7)
41
- activesupport (= 7.0.8.7)
39
+ actionpack (7.0.10)
40
+ actionview (= 7.0.10)
41
+ activesupport (= 7.0.10)
42
+ racc
42
43
  rack (~> 2.0, >= 2.2.4)
43
44
  rack-test (>= 0.6.3)
44
45
  rails-dom-testing (~> 2.0)
45
46
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
- actiontext (7.0.8.7)
47
- actionpack (= 7.0.8.7)
48
- activerecord (= 7.0.8.7)
49
- activestorage (= 7.0.8.7)
50
- activesupport (= 7.0.8.7)
47
+ actiontext (7.0.10)
48
+ actionpack (= 7.0.10)
49
+ activerecord (= 7.0.10)
50
+ activestorage (= 7.0.10)
51
+ activesupport (= 7.0.10)
51
52
  globalid (>= 0.6.0)
52
53
  nokogiri (>= 1.8.5)
53
- actionview (7.0.8.7)
54
- activesupport (= 7.0.8.7)
54
+ actionview (7.0.10)
55
+ activesupport (= 7.0.10)
55
56
  builder (~> 3.1)
56
57
  erubi (~> 1.4)
57
58
  rails-dom-testing (~> 2.0)
@@ -59,45 +60,53 @@ GEM
59
60
  active_link_to (1.0.5)
60
61
  actionpack
61
62
  addressable
62
- activejob (7.0.8.7)
63
- activesupport (= 7.0.8.7)
63
+ activejob (7.0.10)
64
+ activesupport (= 7.0.10)
64
65
  globalid (>= 0.3.6)
65
- activemodel (7.0.8.7)
66
- activesupport (= 7.0.8.7)
67
- activerecord (7.0.8.7)
68
- activemodel (= 7.0.8.7)
69
- activesupport (= 7.0.8.7)
70
- activestorage (7.0.8.7)
71
- actionpack (= 7.0.8.7)
72
- activejob (= 7.0.8.7)
73
- activerecord (= 7.0.8.7)
74
- activesupport (= 7.0.8.7)
66
+ activemodel (7.0.10)
67
+ activesupport (= 7.0.10)
68
+ activerecord (7.0.10)
69
+ activemodel (= 7.0.10)
70
+ activesupport (= 7.0.10)
71
+ activestorage (7.0.10)
72
+ actionpack (= 7.0.10)
73
+ activejob (= 7.0.10)
74
+ activerecord (= 7.0.10)
75
+ activesupport (= 7.0.10)
75
76
  marcel (~> 1.0)
76
77
  mini_mime (>= 1.1.0)
77
- activesupport (7.0.8.7)
78
+ activesupport (7.0.10)
79
+ base64
80
+ benchmark (>= 0.3)
81
+ bigdecimal
78
82
  concurrent-ruby (~> 1.0, >= 1.0.2)
83
+ drb
79
84
  i18n (>= 1.6, < 2)
85
+ logger (>= 1.4.2)
80
86
  minitest (>= 5.1)
87
+ mutex_m
88
+ securerandom (>= 0.3)
81
89
  tzinfo (~> 2.0)
82
- acts_as_list (1.2.4)
90
+ acts_as_list (1.2.6)
83
91
  activerecord (>= 6.1)
84
92
  activesupport (>= 6.1)
85
- addressable (2.8.7)
86
- public_suffix (>= 2.0.2, < 7.0)
93
+ addressable (2.8.8)
94
+ public_suffix (>= 2.0.2, < 8.0)
87
95
  ast (2.4.3)
88
- base64 (0.2.0)
96
+ base64 (0.3.0)
89
97
  batch-loader (1.5.0)
90
98
  bcrypt (3.1.20)
91
- better_html (2.1.1)
92
- actionview (>= 6.0)
93
- activesupport (>= 6.0)
99
+ benchmark (0.5.0)
100
+ better_html (2.2.0)
101
+ actionview (>= 7.0)
102
+ activesupport (>= 7.0)
94
103
  ast (~> 2.0)
95
104
  erubi (~> 1.4)
96
105
  parser (>= 2.4)
97
106
  smart_properties
98
- bigdecimal (3.1.9)
107
+ bigdecimal (3.3.1)
99
108
  bindex (0.8.1)
100
- bootsnap (1.18.4)
109
+ bootsnap (1.19.0)
101
110
  msgpack (~> 1.2)
102
111
  brakeman (6.2.2)
103
112
  racc
@@ -133,67 +142,67 @@ GEM
133
142
  codecov (0.2.12)
134
143
  json
135
144
  simplecov
136
- commonmarker (0.23.11)
145
+ commonmarker (0.23.12)
137
146
  concurrent-ruby (1.3.4)
138
- crack (1.0.0)
147
+ crack (1.0.1)
139
148
  bigdecimal
140
149
  rexml
141
150
  crass (1.0.6)
142
151
  css_parser (1.21.1)
143
152
  addressable
144
- csv (3.3.4)
153
+ csv (3.3.5)
145
154
  dartsass (1.49.8)
146
- date (3.4.1)
155
+ date (3.5.1)
147
156
  date_validator (0.12.0)
148
157
  activemodel (>= 3)
149
158
  activesupport (>= 3)
150
- decidim (0.29.3)
151
- decidim-accountability (= 0.29.3)
152
- decidim-admin (= 0.29.3)
153
- decidim-api (= 0.29.3)
154
- decidim-assemblies (= 0.29.3)
155
- decidim-blogs (= 0.29.3)
156
- decidim-budgets (= 0.29.3)
157
- decidim-comments (= 0.29.3)
158
- decidim-core (= 0.29.3)
159
- decidim-debates (= 0.29.3)
160
- decidim-forms (= 0.29.3)
161
- decidim-generators (= 0.29.3)
162
- decidim-meetings (= 0.29.3)
163
- decidim-pages (= 0.29.3)
164
- decidim-participatory_processes (= 0.29.3)
165
- decidim-proposals (= 0.29.3)
166
- decidim-sortitions (= 0.29.3)
167
- decidim-surveys (= 0.29.3)
168
- decidim-system (= 0.29.3)
169
- decidim-verifications (= 0.29.3)
170
- decidim-accountability (0.29.3)
171
- decidim-comments (= 0.29.3)
172
- decidim-core (= 0.29.3)
173
- decidim-admin (0.29.3)
159
+ decidim (0.29.7)
160
+ decidim-accountability (= 0.29.7)
161
+ decidim-admin (= 0.29.7)
162
+ decidim-api (= 0.29.7)
163
+ decidim-assemblies (= 0.29.7)
164
+ decidim-blogs (= 0.29.7)
165
+ decidim-budgets (= 0.29.7)
166
+ decidim-comments (= 0.29.7)
167
+ decidim-core (= 0.29.7)
168
+ decidim-debates (= 0.29.7)
169
+ decidim-forms (= 0.29.7)
170
+ decidim-generators (= 0.29.7)
171
+ decidim-meetings (= 0.29.7)
172
+ decidim-pages (= 0.29.7)
173
+ decidim-participatory_processes (= 0.29.7)
174
+ decidim-proposals (= 0.29.7)
175
+ decidim-sortitions (= 0.29.7)
176
+ decidim-surveys (= 0.29.7)
177
+ decidim-system (= 0.29.7)
178
+ decidim-verifications (= 0.29.7)
179
+ decidim-accountability (0.29.7)
180
+ decidim-comments (= 0.29.7)
181
+ decidim-core (= 0.29.7)
182
+ decidim-admin (0.29.7)
174
183
  active_link_to (~> 1.0)
175
- decidim-core (= 0.29.3)
184
+ decidim-core (= 0.29.7)
176
185
  devise (~> 4.7)
177
186
  devise-i18n (~> 1.2)
178
187
  devise_invitable (~> 2.0, >= 2.0.9)
179
- decidim-api (0.29.3)
180
- decidim-core (= 0.29.3)
188
+ decidim-api (0.29.7)
189
+ decidim-core (= 0.29.7)
181
190
  graphql (~> 2.2.6)
182
191
  graphql-docs (~> 4.0)
183
192
  rack-cors (~> 1.0)
184
- decidim-assemblies (0.29.3)
185
- decidim-core (= 0.29.3)
186
- decidim-blogs (0.29.3)
187
- decidim-admin (= 0.29.3)
188
- decidim-comments (= 0.29.3)
189
- decidim-core (= 0.29.3)
190
- decidim-budgets (0.29.3)
191
- decidim-comments (= 0.29.3)
192
- decidim-core (= 0.29.3)
193
- decidim-comments (0.29.3)
194
- decidim-core (= 0.29.3)
193
+ decidim-assemblies (0.29.7)
194
+ decidim-core (= 0.29.7)
195
+ decidim-blogs (0.29.7)
196
+ decidim-admin (= 0.29.7)
197
+ decidim-comments (= 0.29.7)
198
+ decidim-core (= 0.29.7)
199
+ decidim-budgets (0.29.7)
200
+ decidim-comments (= 0.29.7)
201
+ decidim-core (= 0.29.7)
202
+ decidim-comments (0.29.7)
203
+ decidim-core (= 0.29.7)
195
204
  redcarpet (~> 3.5, >= 3.5.1)
196
- decidim-core (0.29.3)
205
+ decidim-core (0.29.7)
197
206
  active_link_to (~> 1.0)
198
207
  acts_as_list (~> 1.0)
199
208
  batch-loader (~> 1.2)
@@ -244,14 +253,14 @@ GEM
244
253
  valid_email2 (~> 4.0)
245
254
  web-push (~> 3.0)
246
255
  wisper (~> 2.0)
247
- decidim-debates (0.29.3)
248
- decidim-comments (= 0.29.3)
249
- decidim-core (= 0.29.3)
250
- decidim-dev (0.29.3)
256
+ decidim-debates (0.29.7)
257
+ decidim-comments (= 0.29.7)
258
+ decidim-core (= 0.29.7)
259
+ decidim-dev (0.29.7)
251
260
  bullet (~> 7.1.6)
252
261
  byebug (~> 11.0)
253
262
  capybara (~> 3.39)
254
- decidim (= 0.29.3)
263
+ decidim (= 0.29.7)
255
264
  erb_lint (~> 0.4.0)
256
265
  factory_bot_rails (~> 6.2)
257
266
  faker (~> 3.2)
@@ -283,43 +292,43 @@ GEM
283
292
  w3c_rspec_validators (~> 0.3.0)
284
293
  webmock (~> 3.18)
285
294
  wisper-rspec (~> 1.0)
286
- decidim-forms (0.29.3)
287
- decidim-core (= 0.29.3)
295
+ decidim-forms (0.29.7)
296
+ decidim-core (= 0.29.7)
288
297
  wicked_pdf (~> 2.1)
289
- decidim-generators (0.29.3)
290
- decidim-core (= 0.29.3)
291
- decidim-meetings (0.29.3)
292
- decidim-core (= 0.29.3)
293
- decidim-forms (= 0.29.3)
298
+ decidim-generators (0.29.7)
299
+ decidim-core (= 0.29.7)
300
+ decidim-meetings (0.29.7)
301
+ decidim-core (= 0.29.7)
302
+ decidim-forms (= 0.29.7)
294
303
  icalendar (~> 2.5)
295
- decidim-pages (0.29.3)
296
- decidim-core (= 0.29.3)
297
- decidim-participatory_processes (0.29.3)
298
- decidim-core (= 0.29.3)
299
- decidim-proposals (0.29.3)
300
- decidim-comments (= 0.29.3)
301
- decidim-core (= 0.29.3)
304
+ decidim-pages (0.29.7)
305
+ decidim-core (= 0.29.7)
306
+ decidim-participatory_processes (0.29.7)
307
+ decidim-core (= 0.29.7)
308
+ decidim-proposals (0.29.7)
309
+ decidim-comments (= 0.29.7)
310
+ decidim-core (= 0.29.7)
302
311
  doc2text (~> 0.4.7)
303
312
  redcarpet (~> 3.5, >= 3.5.1)
304
- decidim-sortitions (0.29.3)
305
- decidim-admin (= 0.29.3)
306
- decidim-comments (= 0.29.3)
307
- decidim-core (= 0.29.3)
308
- decidim-proposals (= 0.29.3)
309
- decidim-surveys (0.29.3)
310
- decidim-core (= 0.29.3)
311
- decidim-forms (= 0.29.3)
312
- decidim-system (0.29.3)
313
+ decidim-sortitions (0.29.7)
314
+ decidim-admin (= 0.29.7)
315
+ decidim-comments (= 0.29.7)
316
+ decidim-core (= 0.29.7)
317
+ decidim-proposals (= 0.29.7)
318
+ decidim-surveys (0.29.7)
319
+ decidim-core (= 0.29.7)
320
+ decidim-forms (= 0.29.7)
321
+ decidim-system (0.29.7)
313
322
  active_link_to (~> 1.0)
314
- decidim-core (= 0.29.3)
323
+ decidim-core (= 0.29.7)
315
324
  devise (~> 4.7)
316
325
  devise-i18n (~> 1.2)
317
326
  devise_invitable (~> 2.0, >= 2.0.9)
318
- decidim-templates (0.29.3)
319
- decidim-core (= 0.29.3)
320
- decidim-forms (= 0.29.3)
321
- decidim-verifications (0.29.3)
322
- decidim-core (= 0.29.3)
327
+ decidim-templates (0.29.7)
328
+ decidim-core (= 0.29.7)
329
+ decidim-forms (= 0.29.7)
330
+ decidim-verifications (0.29.7)
331
+ decidim-core (= 0.29.7)
323
332
  declarative-builder (0.2.0)
324
333
  trailblazer-option (~> 0.1.0)
325
334
  declarative-option (0.1.0)
@@ -337,11 +346,11 @@ GEM
337
346
  warden (~> 1.2.3)
338
347
  devise-i18n (1.11.0)
339
348
  devise (>= 4.9.0)
340
- devise_invitable (2.0.10)
349
+ devise_invitable (2.0.11)
341
350
  actionmailer (>= 5.0)
342
351
  devise (>= 4.6)
343
352
  diff-lcs (1.6.2)
344
- diffy (3.4.3)
353
+ diffy (3.4.4)
345
354
  doc2text (0.4.8)
346
355
  nokogiri (>= 1.18.2)
347
356
  rubyzip (~> 2.3.0)
@@ -349,6 +358,7 @@ GEM
349
358
  doorkeeper (5.8.2)
350
359
  railties (>= 5)
351
360
  doorkeeper-i18n (4.0.1)
361
+ drb (2.2.3)
352
362
  erb_lint (0.4.0)
353
363
  activesupport
354
364
  better_html (>= 2.0.1)
@@ -360,23 +370,23 @@ GEM
360
370
  temple
361
371
  erubi (1.13.1)
362
372
  escape_utils (1.3.0)
363
- excon (1.2.5)
373
+ excon (1.3.2)
364
374
  logger
365
375
  extended-markdown-filter (0.7.0)
366
376
  html-pipeline (~> 2.9)
367
- factory_bot (6.5.3)
377
+ factory_bot (6.5.6)
368
378
  activesupport (>= 6.1.0)
369
- factory_bot_rails (6.4.4)
379
+ factory_bot_rails (6.5.1)
370
380
  factory_bot (~> 6.5)
371
- railties (>= 5.0.0)
372
- faker (3.5.1)
381
+ railties (>= 6.1.0)
382
+ faker (3.5.3)
373
383
  i18n (>= 1.8.11, < 2)
374
- faraday (2.13.0)
384
+ faraday (2.14.0)
375
385
  faraday-net_http (>= 2.0, < 3.5)
376
386
  json
377
387
  logger
378
- faraday-net_http (3.4.0)
379
- net-http (>= 0.5.0)
388
+ faraday-net_http (3.4.2)
389
+ net-http (~> 0.5)
380
390
  ffi (1.17.2)
381
391
  file_validators (3.0.0)
382
392
  activemodel (>= 3.2)
@@ -388,17 +398,18 @@ GEM
388
398
  mime-types
389
399
  fog-local (0.9.0)
390
400
  fog-core (>= 1.27, < 3.0)
391
- formatador (1.1.0)
401
+ formatador (1.2.3)
402
+ reline
392
403
  foundation_rails_helper (4.0.1)
393
404
  actionpack (>= 4.1, < 7.1)
394
405
  activemodel (>= 4.1, < 7.1)
395
406
  activesupport (>= 4.1, < 7.1)
396
407
  railties (>= 4.1, < 7.1)
397
408
  gemoji (3.0.1)
398
- geocoder (1.8.5)
409
+ geocoder (1.8.6)
399
410
  base64 (>= 0.1.0)
400
411
  csv (>= 3.0.0)
401
- globalid (1.2.1)
412
+ globalid (1.3.0)
402
413
  activesupport (>= 6.1)
403
414
  graphql (2.2.17)
404
415
  base64
@@ -410,28 +421,29 @@ GEM
410
421
  gemoji (~> 3.0)
411
422
  graphql (~> 2.0)
412
423
  html-pipeline (~> 2.14, >= 2.14.3)
413
- hashdiff (1.1.2)
424
+ hashdiff (1.2.1)
414
425
  hashie (5.0.0)
415
426
  highline (3.1.2)
416
427
  reline
417
428
  html-pipeline (2.14.3)
418
429
  activesupport (>= 2)
419
430
  nokogiri (>= 1.4)
420
- htmlentities (4.3.4)
431
+ htmlentities (4.4.2)
421
432
  i18n (1.14.7)
422
433
  concurrent-ruby (~> 1.0)
423
- i18n-tasks (1.0.15)
434
+ i18n-tasks (1.1.2)
424
435
  activesupport (>= 4.0.2)
425
436
  ast (>= 2.1.0)
426
437
  erubi
427
- highline (>= 2.0.0)
438
+ highline (>= 3.0.0)
428
439
  i18n
429
440
  parser (>= 3.2.2.1)
441
+ prism
430
442
  rails-i18n
431
443
  rainbow (>= 2.2.2, < 4.0)
432
444
  ruby-progressbar (~> 1.8, >= 1.8.1)
433
445
  terminal-table (>= 1.5.1)
434
- icalendar (2.11.0)
446
+ icalendar (2.12.1)
435
447
  base64
436
448
  ice_cube (~> 0.16)
437
449
  logger
@@ -442,9 +454,9 @@ GEM
442
454
  ruby-vips (>= 2.0.17, < 3)
443
455
  invisible_captcha (0.13.0)
444
456
  rails (>= 3.2.0)
445
- io-console (0.8.0)
446
- json (2.11.0)
447
- jwt (2.10.1)
457
+ io-console (0.8.1)
458
+ json (2.17.1)
459
+ jwt (3.1.2)
448
460
  base64
449
461
  kaminari (1.2.2)
450
462
  activesupport (>= 4.1.0)
@@ -459,9 +471,10 @@ GEM
459
471
  kaminari-core (= 1.2.2)
460
472
  kaminari-core (1.2.2)
461
473
  language_server-protocol (3.17.0.5)
462
- launchy (3.0.1)
474
+ launchy (3.1.1)
463
475
  addressable (~> 2.8)
464
476
  childprocess (~> 5.0)
477
+ logger (~> 1.6)
465
478
  letter_opener (1.10.0)
466
479
  launchy (>= 2.2, < 4)
467
480
  letter_opener_web (2.0.0)
@@ -473,31 +486,33 @@ GEM
473
486
  rb-fsevent (~> 0.10, >= 0.10.3)
474
487
  rb-inotify (~> 0.9, >= 0.9.10)
475
488
  logger (1.7.0)
476
- loofah (2.24.0)
489
+ loofah (2.24.1)
477
490
  crass (~> 1.0.2)
478
491
  nokogiri (>= 1.12.0)
479
- mail (2.8.1)
492
+ mail (2.9.0)
493
+ logger
480
494
  mini_mime (>= 0.1.1)
481
495
  net-imap
482
496
  net-pop
483
497
  net-smtp
484
- marcel (1.0.4)
485
- matrix (0.4.2)
498
+ marcel (1.1.0)
499
+ matrix (0.4.3)
486
500
  method_source (1.1.0)
487
- mime-types (3.6.2)
501
+ mime-types (3.7.0)
488
502
  logger
489
- mime-types-data (~> 3.2015)
490
- mime-types-data (3.2025.0422)
503
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
504
+ mime-types-data (3.2025.0924)
491
505
  mini_magick (4.13.2)
492
506
  mini_mime (1.1.5)
493
- mini_portile2 (2.8.8)
494
- minitest (5.25.5)
495
- msgpack (1.7.3)
496
- multi_xml (0.7.1)
507
+ mini_portile2 (2.8.9)
508
+ minitest (5.26.2)
509
+ msgpack (1.8.0)
510
+ multi_xml (0.7.2)
497
511
  bigdecimal (~> 3.1)
498
- net-http (0.6.0)
499
- uri
500
- net-imap (0.5.7)
512
+ mutex_m (0.3.0)
513
+ net-http (0.8.0)
514
+ uri (>= 0.11.1)
515
+ net-imap (0.5.12)
501
516
  date
502
517
  net-protocol
503
518
  net-pop (0.1.2)
@@ -506,25 +521,28 @@ GEM
506
521
  timeout
507
522
  net-smtp (0.3.4)
508
523
  net-protocol
509
- nio4r (2.7.4)
510
- nokogiri (1.18.8)
524
+ nio4r (2.7.5)
525
+ nokogiri (1.18.10)
511
526
  mini_portile2 (~> 2.8.2)
512
527
  racc (~> 1.4)
513
- oauth (1.1.0)
514
- oauth-tty (~> 1.0, >= 1.0.1)
528
+ oauth (1.1.3)
529
+ base64 (~> 0.1)
530
+ oauth-tty (~> 1.0, >= 1.0.6)
515
531
  snaky_hash (~> 2.0)
516
- version_gem (~> 1.1)
517
- oauth-tty (1.0.5)
518
- version_gem (~> 1.1, >= 1.1.1)
519
- oauth2 (2.0.9)
520
- faraday (>= 0.17.3, < 3.0)
521
- jwt (>= 1.0, < 3.0)
532
+ version_gem (~> 1.1, >= 1.1.9)
533
+ oauth-tty (1.0.6)
534
+ version_gem (~> 1.1, >= 1.1.9)
535
+ oauth2 (2.0.18)
536
+ faraday (>= 0.17.3, < 4.0)
537
+ jwt (>= 1.0, < 4.0)
538
+ logger (~> 1.2)
522
539
  multi_xml (~> 0.5)
523
540
  rack (>= 1.2, < 4)
524
- snaky_hash (~> 2.0)
525
- version_gem (~> 1.1)
526
- omniauth (2.1.3)
541
+ snaky_hash (~> 2.0, >= 2.0.3)
542
+ version_gem (~> 1.1, >= 1.1.9)
543
+ omniauth (2.1.4)
527
544
  hashie (>= 3.4.6)
545
+ logger
528
546
  rack (>= 2.2.3)
529
547
  rack-protection
530
548
  omniauth-facebook (5.0.0)
@@ -547,16 +565,16 @@ GEM
547
565
  omniauth-twitter (1.4.0)
548
566
  omniauth-oauth (~> 1.1)
549
567
  rack
550
- openssl (3.3.0)
568
+ openssl (3.3.2)
551
569
  orm_adapter (0.5.0)
552
- ostruct (0.6.1)
570
+ ostruct (0.6.3)
553
571
  paper_trail (12.3.0)
554
572
  activerecord (>= 5.2)
555
573
  request_store (~> 1.1)
556
- parallel (1.26.3)
557
- parallel_tests (4.7.2)
574
+ parallel (1.27.0)
575
+ parallel_tests (4.10.1)
558
576
  parallel
559
- parser (3.3.8.0)
577
+ parser (3.3.10.0)
560
578
  ast (~> 2.4.1)
561
579
  racc
562
580
  pg (1.4.6)
@@ -572,15 +590,15 @@ GEM
572
590
  actionmailer (>= 3)
573
591
  net-smtp
574
592
  premailer (~> 1.7, >= 1.7.9)
575
- prism (1.4.0)
593
+ prism (1.6.0)
576
594
  psych (4.0.6)
577
595
  stringio
578
- public_suffix (6.0.1)
579
- puma (6.4.3)
596
+ public_suffix (7.0.0)
597
+ puma (6.6.1)
580
598
  nio4r (~> 2.0)
581
599
  racc (1.8.1)
582
- rack (2.2.13)
583
- rack-attack (6.7.0)
600
+ rack (2.2.21)
601
+ rack-attack (6.8.0)
584
602
  rack (>= 1.0, < 4)
585
603
  rack-cors (1.1.1)
586
604
  rack (>= 2.0.0)
@@ -591,25 +609,25 @@ GEM
591
609
  rack
592
610
  rack-test (2.2.0)
593
611
  rack (>= 1.3)
594
- rails (7.0.8.7)
595
- actioncable (= 7.0.8.7)
596
- actionmailbox (= 7.0.8.7)
597
- actionmailer (= 7.0.8.7)
598
- actionpack (= 7.0.8.7)
599
- actiontext (= 7.0.8.7)
600
- actionview (= 7.0.8.7)
601
- activejob (= 7.0.8.7)
602
- activemodel (= 7.0.8.7)
603
- activerecord (= 7.0.8.7)
604
- activestorage (= 7.0.8.7)
605
- activesupport (= 7.0.8.7)
612
+ rails (7.0.10)
613
+ actioncable (= 7.0.10)
614
+ actionmailbox (= 7.0.10)
615
+ actionmailer (= 7.0.10)
616
+ actionpack (= 7.0.10)
617
+ actiontext (= 7.0.10)
618
+ actionview (= 7.0.10)
619
+ activejob (= 7.0.10)
620
+ activemodel (= 7.0.10)
621
+ activerecord (= 7.0.10)
622
+ activestorage (= 7.0.10)
623
+ activesupport (= 7.0.10)
606
624
  bundler (>= 1.15.0)
607
- railties (= 7.0.8.7)
625
+ railties (= 7.0.10)
608
626
  rails-controller-testing (1.0.5)
609
627
  actionpack (>= 5.0.1.rc1)
610
628
  actionview (>= 5.0.1.rc1)
611
629
  activesupport (>= 5.0.1.rc1)
612
- rails-dom-testing (2.2.0)
630
+ rails-dom-testing (2.3.0)
613
631
  activesupport (>= 5.0.0)
614
632
  minitest
615
633
  nokogiri (>= 1.6)
@@ -619,15 +637,15 @@ GEM
619
637
  rails-i18n (7.0.10)
620
638
  i18n (>= 0.7, < 2)
621
639
  railties (>= 6.0.0, < 8)
622
- railties (7.0.8.7)
623
- actionpack (= 7.0.8.7)
624
- activesupport (= 7.0.8.7)
640
+ railties (7.0.10)
641
+ actionpack (= 7.0.10)
642
+ activesupport (= 7.0.10)
625
643
  method_source
626
644
  rake (>= 12.2)
627
645
  thor (~> 1.0)
628
646
  zeitwerk (~> 2.5)
629
647
  rainbow (3.1.1)
630
- rake (13.2.1)
648
+ rake (13.3.1)
631
649
  ransack (3.2.1)
632
650
  activerecord (>= 6.1.5)
633
651
  activesupport (>= 6.1.5)
@@ -637,23 +655,23 @@ GEM
637
655
  ffi (~> 1.0)
638
656
  redcarpet (3.6.1)
639
657
  redis (4.8.1)
640
- regexp_parser (2.10.0)
641
- reline (0.6.1)
658
+ regexp_parser (2.11.3)
659
+ reline (0.6.3)
642
660
  io-console (~> 0.5)
643
661
  request_store (1.5.1)
644
662
  rack (>= 1.4)
645
- responders (3.1.1)
646
- actionpack (>= 5.2)
647
- railties (>= 5.2)
648
- rexml (3.3.8)
649
- rspec (3.13.1)
663
+ responders (3.2.0)
664
+ actionpack (>= 7.0)
665
+ railties (>= 7.0)
666
+ rexml (3.4.1)
667
+ rspec (3.13.2)
650
668
  rspec-core (~> 3.13.0)
651
669
  rspec-expectations (~> 3.13.0)
652
670
  rspec-mocks (~> 3.13.0)
653
671
  rspec-cells (0.3.10)
654
672
  cells (>= 4.0.0, < 6.0.0)
655
673
  rspec-rails (>= 3.0.0)
656
- rspec-core (3.13.4)
674
+ rspec-core (3.13.6)
657
675
  rspec-support (~> 3.13.0)
658
676
  rspec-expectations (3.13.5)
659
677
  diff-lcs (>= 1.2.0, < 2.0)
@@ -661,7 +679,7 @@ GEM
661
679
  rspec-html-matchers (0.10.0)
662
680
  nokogiri (~> 1)
663
681
  rspec (>= 3.0.0.a)
664
- rspec-mocks (3.13.5)
682
+ rspec-mocks (3.13.7)
665
683
  diff-lcs (>= 1.2.0, < 2.0)
666
684
  rspec-support (~> 3.13.0)
667
685
  rspec-rails (6.1.5)
@@ -674,7 +692,7 @@ GEM
674
692
  rspec-support (~> 3.13)
675
693
  rspec-retry (0.6.2)
676
694
  rspec-core (> 3.3)
677
- rspec-support (3.13.4)
695
+ rspec-support (3.13.6)
678
696
  rspec_junit_formatter (0.6.0)
679
697
  rspec-core (>= 2, < 4, != 2.12.0)
680
698
  rubocop (1.65.1)
@@ -688,7 +706,7 @@ GEM
688
706
  rubocop-ast (>= 1.31.1, < 2.0)
689
707
  ruby-progressbar (~> 1.7)
690
708
  unicode-display_width (>= 2.4.0, < 3.0)
691
- rubocop-ast (1.44.1)
709
+ rubocop-ast (1.48.0)
692
710
  parser (>= 3.3.7.2)
693
711
  prism (~> 1.4)
694
712
  rubocop-capybara (2.21.0)
@@ -714,18 +732,19 @@ GEM
714
732
  rubocop-rubycw (0.1.6)
715
733
  rubocop (~> 1.0)
716
734
  ruby-progressbar (1.13.0)
717
- ruby-vips (2.2.3)
735
+ ruby-vips (2.2.5)
718
736
  ffi (~> 1.12)
719
737
  logger
720
738
  rubyXL (3.4.33)
721
739
  nokogiri (>= 1.10.8)
722
740
  rubyzip (>= 1.3.0)
723
741
  rubyzip (2.3.2)
724
- selenium-webdriver (4.33.0)
742
+ securerandom (0.4.1)
743
+ selenium-webdriver (4.39.0)
725
744
  base64 (~> 0.2)
726
745
  logger (~> 1.4)
727
746
  rexml (~> 3.2, >= 3.2.5)
728
- rubyzip (>= 1.2.2, < 3.0)
747
+ rubyzip (>= 1.2.2, < 4.0)
729
748
  websocket (~> 1.0)
730
749
  semantic_range (3.1.0)
731
750
  shakapacker (7.1.0)
@@ -740,34 +759,34 @@ GEM
740
759
  simplecov-cobertura (2.1.0)
741
760
  rexml
742
761
  simplecov (~> 0.19)
743
- simplecov-html (0.13.1)
762
+ simplecov-html (0.13.2)
744
763
  simplecov_json_formatter (0.1.4)
745
764
  smart_properties (1.17.0)
746
- snaky_hash (2.0.1)
747
- hashie
748
- version_gem (~> 1.1, >= 1.1.1)
749
- spring (4.3.0)
765
+ snaky_hash (2.0.3)
766
+ hashie (>= 0.1.0, < 6)
767
+ version_gem (>= 1.1.8, < 3)
768
+ spring (4.4.0)
750
769
  spring-watcher-listen (2.1.0)
751
770
  listen (>= 2.7, < 4.0)
752
771
  spring (>= 4)
753
- stringio (3.1.7)
754
- temple (0.10.3)
772
+ stringio (3.1.9)
773
+ temple (0.10.4)
755
774
  terminal-table (4.0.0)
756
775
  unicode-display_width (>= 1.1.1, < 4)
757
- thor (1.3.2)
758
- tilt (2.6.0)
759
- timeout (0.4.3)
776
+ thor (1.4.0)
777
+ tilt (2.6.1)
778
+ timeout (0.5.0)
760
779
  trailblazer-option (0.1.2)
761
780
  tzinfo (2.0.6)
762
781
  concurrent-ruby (~> 1.0)
763
782
  uber (0.1.0)
764
783
  unicode-display_width (2.6.0)
765
- uniform_notifier (1.17.0)
766
- uri (1.0.3)
784
+ uniform_notifier (1.18.0)
785
+ uri (1.1.1)
767
786
  valid_email2 (4.0.6)
768
787
  activemodel (>= 3.2)
769
788
  mail (~> 2.5)
770
- version_gem (1.1.7)
789
+ version_gem (1.1.9)
771
790
  w3c_rspec_validators (0.3.0)
772
791
  rails
773
792
  rspec
@@ -783,15 +802,15 @@ GEM
783
802
  activemodel (>= 6.0.0)
784
803
  bindex (>= 0.4.0)
785
804
  railties (>= 6.0.0)
786
- web-push (3.0.1)
787
- jwt (~> 2.0)
805
+ web-push (3.0.2)
806
+ jwt (~> 3.0)
788
807
  openssl (~> 3.0)
789
- webmock (3.25.1)
808
+ webmock (3.26.1)
790
809
  addressable (>= 2.8.0)
791
810
  crack (>= 0.3.2)
792
811
  hashdiff (>= 0.4.0, < 2.0.0)
793
812
  websocket (1.2.11)
794
- websocket-driver (0.7.7)
813
+ websocket-driver (0.8.0)
795
814
  base64
796
815
  websocket-extensions (>= 0.1.0)
797
816
  websocket-extensions (0.1.5)
@@ -802,7 +821,7 @@ GEM
802
821
  wisper-rspec (1.1.0)
803
822
  xpath (3.2.0)
804
823
  nokogiri (~> 1.8)
805
- zeitwerk (2.7.2)
824
+ zeitwerk (2.7.3)
806
825
 
807
826
  PLATFORMS
808
827
  ruby
@@ -812,14 +831,15 @@ DEPENDENCIES
812
831
  brakeman (~> 6.1)
813
832
  byebug (~> 11.0)
814
833
  codecov
815
- decidim (= 0.29.3)
816
- decidim-dev (= 0.29.3)
834
+ decidim (= 0.29.7)
835
+ decidim-dev (= 0.29.7)
817
836
  decidim-reporting_proposals!
818
- decidim-templates (= 0.29.3)
837
+ decidim-templates (= 0.29.7)
819
838
  letter_opener_web (~> 2.0)
820
839
  listen (~> 3.1)
821
840
  parallel_tests (~> 4.2)
822
841
  puma (>= 6.3.1)
842
+ rexml (= 3.4.1)
823
843
  web-console (~> 4.2)
824
844
 
825
845
  RUBY VERSION
data/README.md CHANGED
@@ -33,6 +33,15 @@ bin/rails decidim:upgrade
33
33
  bin/rails db:migrate
34
34
  ```
35
35
 
36
+ > **MIGRATION FROM v0.28:**
37
+ > Decidim version 0.29 introduced custom proposal states.
38
+ > In order to apply them to the existing reporting proposals,
39
+ > you must also run the following task to migrate proposal statuses:
40
+ >
41
+ > ```bash
42
+ > bin/rails reporting_proposals:migrate_statuses
43
+ > ```
44
+
36
45
  > **IMPORTANT:**
37
46
  >
38
47
  > This module makes use of the [Deface](https://github.com/spree/deface) gem.
@@ -0,0 +1,8 @@
1
+ <!-- insert_after 'td:contains("proposal.published_at")' -->
2
+
3
+ <td>
4
+ <% if proposal.category %>
5
+ <%= icon "price-tag-3-line", class: "fill-gray w-4 h-4" %>
6
+ <%= translated_attribute proposal.category.name %>
7
+ <% end %>
8
+ </td>
@@ -0,0 +1,3 @@
1
+ <!-- insert_after 'td:first-child' -->
2
+
3
+ <td><%= proposal.id %></td>
@@ -1,3 +1,3 @@
1
- <!-- replace_contents "td[3]" -->
1
+ <!-- replace_contents "td:contains('present(proposal).title')" -->
2
2
 
3
3
  <%= render "decidim/reporting_proposals/admin/proposals/proposal_td_title", proposal: proposal %>
@@ -0,0 +1,3 @@
1
+ <!-- insert_after 'th:contains(":published_at")' -->
2
+
3
+ <th><%= t("decidim.proposals.admin.proposals.index.categories") %></th>
@@ -0,0 +1,3 @@
1
+ <!-- insert_after 'th:first-child' -->
2
+
3
+ <th><%= t("decidim.proposals.admin.proposals.index.id") %></th>
@@ -3,13 +3,14 @@
3
3
  <div id="photos" class="gallery grid grid-cols-1 md:grid-cols-4 gap-6 proposal-<%= proposal.id %>">
4
4
  <% proposal.photos.each do |photo| %>
5
5
  <div class="proposal-photo gallery__item" id="photo-<%= photo.id %>">
6
- <%= link_to photo.big_url, target: "_blank", rel: "noopener" do %>
6
+ <%= link_to photo.big_url, target: "_blank", rel: "noopener", "data-external-link" => "false" do %>
7
7
  <%= image_tag photo.thumbnail_url, class: "thumbnail", alt: strip_tags(translated_attribute(photo.title)) %>
8
8
  <% if admin_allowed_to? :edit_photos, :proposals, extra_context = { proposal: proposal }, chain = [::Decidim::ReportingProposals::Admin::Permissions] %>
9
9
  <%= icon_link_to "close-line",
10
10
  decidim_admin_reporting_proposals.remove_photo_path(id: proposal.id, photo_id: photo.id),
11
11
  t(".delete_image"),
12
12
  method: :delete,
13
+ data: { confirm: t(".are_you_sure") },
13
14
  class: "delete-proposal__button" %>
14
15
  <% end %>
15
16
  <% end %>
@@ -7,10 +7,11 @@
7
7
  <% end %>
8
8
  </span>
9
9
  <div class="table__list-title">
10
- <%= link_to(
11
- decidim_html_escape(present(proposal).title).html_safe,
12
- proposal_path(proposal)
13
- ) %>
10
+ <% if allowed_to? :edit, :proposal, proposal: proposal %>
11
+ <%= link_to present(proposal).title(html_escape: true), proposal_path(proposal) %><br>
12
+ <% else %>
13
+ <%= present(proposal).title(html_escape: true) %><br>
14
+ <% end %>
14
15
  <% if unanswered_proposals_overdue?(proposal) %>
15
16
  <div class="help-text-overdue text-alert">
16
17
  <%= time_ago_in_words(last_day_to_answer(proposal),
@@ -234,6 +234,9 @@ en:
234
234
  proposals:
235
235
  address:
236
236
  geolocated_at: Geolocated at
237
+ index:
238
+ categories: Categories
239
+ id: ID
237
240
  send_email_button:
238
241
  send_mail: Send an email to user
239
242
  show:
@@ -415,6 +418,7 @@ en:
415
418
  title: Photos
416
419
  upload_msg: No files selected
417
420
  photo_gallery:
421
+ are_you_sure: Are you sure you want to delete this image?
418
422
  delete_image: Delete image
419
423
  photos: Photos
420
424
  photos:
@@ -14,6 +14,11 @@ Decidim.register_component(:reporting_proposals) do |component|
14
14
  raise "Can't destroy this component when there are proposals" if Decidim::Proposals::Proposal.where(component: instance).any?
15
15
  end
16
16
 
17
+ component.on(:create) do |instance|
18
+ admin_user = GlobalID::Locator.locate(instance.versions.first.whodunnit)
19
+ Decidim::Proposals.create_default_states!(instance, admin_user)
20
+ end
21
+
17
22
  component.data_portable_entities = ["Decidim::Proposals::Proposal"]
18
23
 
19
24
  component.newsletter_participant_entities = ["Decidim::Proposals::Proposal"]
@@ -19,7 +19,6 @@ module Decidim
19
19
  Decidim::FormBuilder.include(Decidim::ReportingProposals::FormBuilderOverride)
20
20
  Decidim::ResourceHelper.include(Decidim::ReportingProposals::ResourceHelperOverride)
21
21
  Decidim::Map::Autocomplete::Builder.include(Decidim::ReportingProposals::MapBuilderOverride)
22
- Decidim::CreateReport.include(Decidim::ReportingProposals::CreateReportOverride)
23
22
  Decidim::LinkedResourcesForCell.include(Decidim::ReportingProposals::LinkedResourcesForCellOverride)
24
23
  Decidim::Proposals::ProposalSerializer.include(Decidim::ReportingProposals::ProposalSerializerOverride)
25
24
  Decidim::Proposals::ProposalsPickerCell.include(Decidim::ReportingProposals::ProposalsPickerCellOverride)
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Decidim
4
4
  module ReportingProposals
5
- VERSION = "0.7.1"
6
- DECIDIM_VERSION = "0.29.3"
5
+ VERSION = "0.7.3"
6
+ DECIDIM_VERSION = "0.29.7"
7
7
  COMPAT_DECIDIM_VERSION = [">= 0.29.3", "< 0.30"].freeze
8
8
  end
9
9
  end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :reporting_proposals do
4
+ def create_default_states!(component)
5
+ colors = Decidim::Proposals.proposal_states_colors
6
+
7
+ locale = Decidim.default_locale
8
+ default_states = {
9
+ evaluating: {
10
+ token: :evaluating,
11
+ bg_color: colors[:orange][:background],
12
+ text_color: colors[:orange][:foreground],
13
+ announcement_title: { locale => I18n.with_locale(locale) { I18n.t("proposal_in_evaluation_reason", scope: "decidim.proposals.proposals.show") } },
14
+ title: { locale => I18n.with_locale(locale) { I18n.t(:evaluating, scope: "decidim.proposals.answers") } }
15
+ },
16
+ accepted: {
17
+ token: :accepted,
18
+ bg_color: colors[:green][:background],
19
+ text_color: colors[:green][:foreground],
20
+ announcement_title: { locale => I18n.with_locale(locale) { I18n.t("proposal_accepted_reason", scope: "decidim.proposals.proposals.show") } },
21
+ title: { locale => I18n.with_locale(locale) { I18n.t(:accepted, scope: "decidim.proposals.answers") } }
22
+ },
23
+ rejected: {
24
+ token: :rejected,
25
+ bg_color: colors[:red][:background],
26
+ text_color: colors[:red][:foreground],
27
+ announcement_title: { locale => I18n.with_locale(locale) { I18n.t("proposal_rejected_reason", scope: "decidim.proposals.proposals.show") } },
28
+ title: { locale => I18n.with_locale(locale) { I18n.t(:rejected, scope: "decidim.proposals.answers") } }
29
+ }
30
+ }
31
+ default_states.each_key do |key|
32
+ default_states[key][:object] = Decidim::Proposals::ProposalState.find_or_create_by(component:, **default_states[key])
33
+ end
34
+ default_states.merge(not_answered: { token: :not_answered })
35
+ end
36
+
37
+ desc "Migrate statuses tables"
38
+ task migrate_statuses: :environment do
39
+ STATES = { 0 => :not_answered, 10 => :evaluating, 20 => :accepted, -10 => :rejected }.freeze
40
+ Decidim::Component.where(manifest_name: "reporting_proposals").find_each do |component|
41
+ puts "Creating default states for component ##{component.id} \"#{component.name.values.first}\""
42
+ default_states = create_default_states!(component)
43
+
44
+ Decidim::Proposals::Proposal.where(decidim_component_id: component.id).find_each do |proposal|
45
+ next if proposal.old_state.zero?
46
+
47
+ puts "Migrating proposal ##{proposal.id} from state #{proposal.old_state} (#{STATES[proposal.old_state]}) to #{default_states.dig(STATES[proposal.old_state], :token)}"
48
+ proposal.update!(proposal_state: default_states.dig(STATES[proposal.old_state], :object))
49
+ end
50
+ end
51
+ end
52
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-reporting_proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-19 00:00:00.000000000 Z
11
+ date: 2025-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -246,7 +246,6 @@ files:
246
246
  - app/commands/concerns/decidim/reporting_proposals/admin/update_result_override.rb
247
247
  - app/commands/concerns/decidim/reporting_proposals/close_meeting_override.rb
248
248
  - app/commands/concerns/decidim/reporting_proposals/create_project_override.rb
249
- - app/commands/concerns/decidim/reporting_proposals/create_report_override.rb
250
249
  - app/commands/concerns/decidim/reporting_proposals/publish_proposal_override.rb
251
250
  - app/commands/decidim/reporting_proposals/admin/update_proposal.rb
252
251
  - app/commands/decidim/reporting_proposals/admin/update_proposal_note.rb
@@ -293,10 +292,14 @@ files:
293
292
  - app/overrides/decidim/admin/categories/index/add_valuators.html.erb.deface
294
293
  - app/overrides/decidim/proposals/admin/proposal_notes/_proposal_notes/add_edit_link.html.erb.deface
295
294
  - app/overrides/decidim/proposals/admin/proposal_notes/_proposal_notes/add_links_to_note.html.erb.deface
295
+ - app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_categories_column.html.erb.deface
296
+ - app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_id_column.html.erb.deface
296
297
  - app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_td_hide_action.html.erb.deface
297
298
  - app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_valuators_name.html.erb.deface
298
299
  - app/overrides/decidim/proposals/admin/proposals/_proposal-tr/replace_td_title.html.erb.deface
300
+ - app/overrides/decidim/proposals/admin/proposals/index/add_categories.html.erb.deface
299
301
  - app/overrides/decidim/proposals/admin/proposals/index/add_form_default_class.html.erb.deface
302
+ - app/overrides/decidim/proposals/admin/proposals/index/add_id_column_header.html.erb.deface
300
303
  - app/overrides/decidim/proposals/admin/proposals/show/add_address.html.erb.deface
301
304
  - app/overrides/decidim/proposals/admin/proposals/show/add_photo_management.html.erb.deface
302
305
  - app/overrides/decidim/proposals/admin/proposals/show/add_send_email_btn.html.erb.deface
@@ -318,7 +321,6 @@ files:
318
321
  - app/overrides/decidim/proposals/proposals/preview/add_css.html.erb.deface
319
322
  - app/overrides/decidim/proposals/proposals/show/add_additional_button.html.erb.deface
320
323
  - app/overrides/decidim/reported_mailer/report/add_link_to_admin.html.erb.deface
321
- - app/overrides/layouts/decidim/_process_header_steps/always_show_new_proposals.html.erb.deface
322
324
  - app/packs/entrypoints/decidim_reporting_proposals.js
323
325
  - app/packs/entrypoints/decidim_reporting_proposals_camera.js
324
326
  - app/packs/entrypoints/decidim_reporting_proposals_geocoding.js
@@ -393,6 +395,7 @@ files:
393
395
  - lib/decidim/reporting_proposals/engine.rb
394
396
  - lib/decidim/reporting_proposals/test/factories.rb
395
397
  - lib/decidim/reporting_proposals/version.rb
398
+ - lib/tasks/reporting_proposals_statuses.rake
396
399
  - lib/tasks/reporting_proposals_upgrade.rake
397
400
  - package-lock.json
398
401
  - package.json
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ReportingProposals
5
- module CreateReportOverride
6
- extend ActiveSupport::Concern
7
-
8
- included do
9
- def send_hide_notification_to_moderators
10
- participatory_space_moderators.each do |moderator|
11
- next unless moderator.email_on_moderations
12
-
13
- ReportedMailer.hide(moderator, @report).deliver_later unless form.current_user == moderator
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,3 +0,0 @@
1
- <!-- replace "erb[loud]:contains('button small button--sc show-for-medium')" -->
2
-
3
- <%= link_to(cta_text, step_cta_url(participatory_process), class: "button small button--sc") %>