decidim-proposals 0.28.0 → 0.28.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +1 -1
  3. data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +2 -2
  4. data/app/controllers/decidim/proposals/admin/participatory_texts_controller.rb +1 -1
  5. data/app/models/decidim/proposals/proposal.rb +2 -14
  6. data/app/models/decidim/proposals/valuation_assignment.rb +2 -1
  7. data/app/packs/src/decidim/proposals/admin/proposals.js +7 -0
  8. data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +2 -2
  9. data/app/views/decidim/proposals/admin/participatory_texts/new_import.html.erb +3 -3
  10. data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +1 -1
  11. data/app/views/decidim/proposals/admin/proposals/edit.html.erb +2 -2
  12. data/app/views/decidim/proposals/admin/proposals/index.html.erb +2 -2
  13. data/app/views/decidim/proposals/admin/proposals/new.html.erb +2 -2
  14. data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +2 -1
  15. data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +2 -2
  16. data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +1 -1
  17. data/app/views/decidim/proposals/proposals/preview.html.erb +1 -1
  18. data/app/views/decidim/proposals/proposals/show.html.erb +2 -2
  19. data/config/locales/ar.yml +1 -4
  20. data/config/locales/bg.yml +23 -2
  21. data/config/locales/ca.yml +25 -25
  22. data/config/locales/cs.yml +3 -3
  23. data/config/locales/de.yml +5 -5
  24. data/config/locales/el.yml +0 -3
  25. data/config/locales/es-MX.yml +5 -5
  26. data/config/locales/es-PY.yml +6 -6
  27. data/config/locales/es.yml +17 -17
  28. data/config/locales/eu.yml +3 -3
  29. data/config/locales/fi-plain.yml +5 -5
  30. data/config/locales/fi.yml +4 -4
  31. data/config/locales/fr-CA.yml +6 -6
  32. data/config/locales/fr.yml +6 -6
  33. data/config/locales/gl.yml +1 -3
  34. data/config/locales/he-IL.yml +14 -0
  35. data/config/locales/hu.yml +10 -8
  36. data/config/locales/id-ID.yml +1 -3
  37. data/config/locales/is-IS.yml +4 -3
  38. data/config/locales/it.yml +3 -5
  39. data/config/locales/ja.yml +23 -17
  40. data/config/locales/lt.yml +0 -3
  41. data/config/locales/lv.yml +1 -3
  42. data/config/locales/nl.yml +4 -6
  43. data/config/locales/no.yml +1 -3
  44. data/config/locales/pl.yml +65 -4
  45. data/config/locales/pt-BR.yml +41 -4
  46. data/config/locales/pt.yml +1 -3
  47. data/config/locales/ro-RO.yml +1 -3
  48. data/config/locales/ru.yml +6 -3
  49. data/config/locales/sk.yml +5 -7
  50. data/config/locales/sv.yml +3 -6
  51. data/config/locales/tr-TR.yml +7 -6
  52. data/config/locales/uk.yml +6 -3
  53. data/config/locales/zh-CN.yml +1 -3
  54. data/config/locales/zh-TW.yml +0 -3
  55. data/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb +16 -0
  56. data/decidim-proposals.gemspec +47 -0
  57. data/lib/decidim/proposals/engine.rb +2 -2
  58. data/lib/decidim/proposals/proposal_serializer.rb +1 -0
  59. data/lib/decidim/proposals/test/factories.rb +62 -84
  60. data/lib/decidim/proposals/valuatable.rb +2 -1
  61. data/lib/decidim/proposals/version.rb +1 -1
  62. metadata +29 -28
  63. data/config/brakeman.ignore +0 -63
  64. data/config/environment.rb +0 -3
@@ -7,9 +7,12 @@ require "decidim/meetings/test/factories"
7
7
 
8
8
  FactoryBot.define do
9
9
  factory :proposal_component, parent: :component do
10
- name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :proposals).i18n_name }
10
+ transient do
11
+ skip_injection { false }
12
+ end
13
+ name { generate_component_name(participatory_space.organization.available_locales, :proposals) }
11
14
  manifest_name { :proposals }
12
- participatory_space { create(:participatory_process, :with_steps, organization:) }
15
+ participatory_space { create(:participatory_process, :with_steps, organization:, skip_injection:) }
13
16
 
14
17
  trait :with_endorsements_enabled do
15
18
  step_settings do
@@ -251,40 +254,16 @@ FactoryBot.define do
251
254
  skip_injection { false }
252
255
  end
253
256
 
254
- title do
255
- if skip_injection
256
- Decidim::Faker::Localized.localized { generate(:title) }
257
- else
258
- Decidim::Faker::Localized.localized { "<script>alert(\"Proposal TITLE\");</script> #{generate(:title)}" }
259
- end
260
- end
261
- body do
262
- if skip_injection
263
- Decidim::Faker::Localized.localized { Faker::Lorem.sentences(number: 3).join("\n") }
264
- else
265
- Decidim::Faker::Localized.localized { "<script>alert(\"Proposal BODY\");</script> #{Faker::Lorem.sentences(number: 3).join("\n")}" }
266
- end
267
- end
268
- component { create(:proposal_component) }
257
+ title { generate_localized_title(:proposal_title, skip_injection:) }
258
+ body { generate_localized_description(:proposal_body, skip_injection:) }
259
+ component { create(:proposal_component, skip_injection:) }
269
260
  published_at { Time.current }
270
261
  address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
271
262
  latitude { Faker::Address.latitude }
272
263
  longitude { Faker::Address.longitude }
273
264
  cost { 20_000 }
274
- cost_report do
275
- if skip_injection
276
- Decidim::Faker::Localized.localized { generate(:title) }
277
- else
278
- Decidim::Faker::Localized.localized { "<script>alert(\"Proposal cost report\")</script> #{generate(:title)}" }
279
- end
280
- end
281
- execution_period do
282
- if skip_injection
283
- Decidim::Faker::Localized.localized { generate(:title) }
284
- else
285
- Decidim::Faker::Localized.localized { "<script>alert(\"Proposal execution period\")</script> #{generate(:title)}" }
286
- end
287
- end
265
+ cost_report { generate_localized_title(:proposal_cost_report, skip_injection:) }
266
+ execution_period { generate_localized_title(:proposal_execution_period, skip_injection:) }
288
267
 
289
268
  after(:build) do |proposal, evaluator|
290
269
  proposal.title = if evaluator.title.is_a?(String)
@@ -302,7 +281,7 @@ FactoryBot.define do
302
281
  proposal.body = Decidim::ContentProcessor.parse_with_processor(:hashtag, proposal.body, current_organization: proposal.organization).rewrite
303
282
 
304
283
  if proposal.component
305
- users = evaluator.users || [create(:user, :confirmed, organization: proposal.component.participatory_space.organization)]
284
+ users = evaluator.users || [create(:user, :confirmed, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection)]
306
285
  users.each_with_index do |user, idx|
307
286
  user_group = evaluator.user_groups[idx]
308
287
  proposal.coauthorships.build(author: user, user_group:)
@@ -319,18 +298,18 @@ FactoryBot.define do
319
298
  end
320
299
 
321
300
  trait :participant_author do
322
- after :build do |proposal|
301
+ after :build do |proposal, evaluator|
323
302
  proposal.coauthorships.clear
324
- user = build(:user, organization: proposal.component.participatory_space.organization)
303
+ user = build(:user, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection)
325
304
  proposal.coauthorships.build(author: user)
326
305
  end
327
306
  end
328
307
 
329
308
  trait :user_group_author do
330
- after :build do |proposal|
309
+ after :build do |proposal, evaluator|
331
310
  proposal.coauthorships.clear
332
- user = create(:user, organization: proposal.component.participatory_space.organization)
333
- user_group = create(:user_group, :verified, organization: user.organization, users: [user])
311
+ user = create(:user, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection)
312
+ user_group = create(:user_group, :verified, organization: user.organization, users: [user], skip_injection: evaluator.skip_injection)
334
313
  proposal.coauthorships.build(author: user, user_group:)
335
314
  end
336
315
  end
@@ -343,10 +322,10 @@ FactoryBot.define do
343
322
  end
344
323
 
345
324
  trait :official_meeting do
346
- after :build do |proposal|
325
+ after :build do |proposal, evaluator|
347
326
  proposal.coauthorships.clear
348
- component = build(:meeting_component, participatory_space: proposal.component.participatory_space)
349
- proposal.coauthorships.build(author: build(:meeting, component:))
327
+ component = build(:meeting_component, participatory_space: proposal.component.participatory_space, skip_injection: evaluator.skip_injection)
328
+ proposal.coauthorships.build(author: build(:meeting, component:, skip_injection: evaluator.skip_injection))
350
329
  end
351
330
  end
352
331
 
@@ -395,78 +374,89 @@ FactoryBot.define do
395
374
  end
396
375
 
397
376
  trait :hidden do
398
- after :create do |proposal|
399
- create(:moderation, hidden_at: Time.current, reportable: proposal)
377
+ after :create do |proposal, evaluator|
378
+ create(:moderation, hidden_at: Time.current, reportable: proposal, skip_injection: evaluator.skip_injection)
400
379
  end
401
380
  end
402
381
 
403
382
  trait :with_votes do
404
- after :create do |proposal|
405
- create_list(:proposal_vote, 5, proposal:)
383
+ after :create do |proposal, evaluator|
384
+ create_list(:proposal_vote, 5, proposal:, skip_injection: evaluator.skip_injection)
406
385
  end
407
386
  end
408
387
 
409
388
  trait :with_endorsements do
410
- after :create do |proposal|
389
+ after :create do |proposal, evaluator|
411
390
  5.times.collect do
412
- create(:endorsement, resource: proposal, author: build(:user, organization: proposal.participatory_space.organization))
391
+ create(:endorsement, resource: proposal, author: build(:user, organization: proposal.participatory_space.organization, skip_injection: evaluator.skip_injection),
392
+ skip_injection: evaluator.skip_injection)
413
393
  end
414
394
  end
415
395
  end
416
396
 
417
397
  trait :with_amendments do
418
- after :create do |proposal|
419
- create_list(:proposal_amendment, 5, amendable: proposal)
398
+ after :create do |proposal, evaluator|
399
+ create_list(:proposal_amendment, 5, amendable: proposal, skip_injection: evaluator.skip_injection)
420
400
  end
421
401
  end
422
402
 
423
403
  trait :with_photo do
424
- after :create do |proposal|
425
- proposal.attachments << create(:attachment, :with_image, attached_to: proposal)
404
+ after :create do |proposal, evaluator|
405
+ proposal.attachments << create(:attachment, :with_image, attached_to: proposal, skip_injection: evaluator.skip_injection)
426
406
  end
427
407
  end
428
408
 
429
409
  trait :with_document do
430
- after :create do |proposal|
431
- proposal.attachments << create(:attachment, :with_pdf, attached_to: proposal)
410
+ after :create do |proposal, evaluator|
411
+ proposal.attachments << create(:attachment, :with_pdf, attached_to: proposal, skip_injection: evaluator.skip_injection)
432
412
  end
433
413
  end
434
414
  end
435
415
 
436
416
  factory :proposal_vote, class: "Decidim::Proposals::ProposalVote" do
437
- proposal { build(:proposal) }
438
- author { build(:user, organization: proposal.organization) }
417
+ transient do
418
+ skip_injection { false }
419
+ end
420
+ proposal { build(:proposal, skip_injection:) }
421
+ author { build(:user, organization: proposal.organization, skip_injection:) }
439
422
  end
440
423
 
441
424
  factory :proposal_amendment, class: "Decidim::Amendment" do
442
- amendable { build(:proposal) }
443
- emendation { build(:proposal, component: amendable.component) }
444
- amender { build(:user, organization: amendable.component.participatory_space.organization) }
425
+ transient do
426
+ skip_injection { false }
427
+ end
428
+ amendable { build(:proposal, skip_injection:) }
429
+ emendation { build(:proposal, component: amendable.component, skip_injection:) }
430
+ amender { build(:user, organization: amendable.component.participatory_space.organization, skip_injection:) }
445
431
  state { Decidim::Amendment::STATES.keys.sample }
446
432
  end
447
433
 
448
434
  factory :proposal_note, class: "Decidim::Proposals::ProposalNote" do
435
+ transient do
436
+ skip_injection { false }
437
+ end
449
438
  body { Faker::Lorem.sentences(number: 3).join("\n") }
450
- proposal { build(:proposal) }
451
- author { build(:user, organization: proposal.organization) }
439
+ proposal { build(:proposal, skip_injection:) }
440
+ author { build(:user, organization: proposal.organization, skip_injection:) }
452
441
  end
453
442
 
454
443
  factory :collaborative_draft, class: "Decidim::Proposals::CollaborativeDraft" do
455
444
  transient do
445
+ skip_injection { false }
456
446
  users { nil }
457
447
  # user_groups correspondence to users is by sorting order
458
448
  user_groups { [] }
459
449
  end
460
450
 
461
- title { "<script>alert(\"TITLE\");</script> #{generate(:title)}" }
462
- body { "<script>alert(\"BODY\");</script>\n#{Faker::Lorem.sentences(number: 3).join("\n")}" }
463
- component { create(:proposal_component) }
451
+ title { generate_localized_title(:collaborative_draft_title, skip_injection:)["en"] }
452
+ body { generate_localized_description(:collaborative_draft_body, skip_injection:)["en"] }
453
+ component { create(:proposal_component, skip_injection:) }
464
454
  address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
465
455
  state { "open" }
466
456
 
467
457
  after(:build) do |collaborative_draft, evaluator|
468
458
  if collaborative_draft.component
469
- users = evaluator.users || [create(:user, organization: collaborative_draft.component.participatory_space.organization)]
459
+ users = evaluator.users || [create(:user, organization: collaborative_draft.component.participatory_space.organization, skip_injection: evaluator.skip_injection)]
470
460
  users.each_with_index do |user, idx|
471
461
  user_group = evaluator.user_groups[idx]
472
462
  collaborative_draft.coauthorships.build(author: user, user_group:)
@@ -475,9 +465,9 @@ FactoryBot.define do
475
465
  end
476
466
 
477
467
  trait :participant_author do
478
- after :build do |draft|
468
+ after :build do |draft, evaluator|
479
469
  draft.coauthorships.clear
480
- user = build(:user, organization: draft.component.participatory_space.organization)
470
+ user = build(:user, organization: draft.component.participatory_space.organization, skip_injection: evaluator.skip_injection)
481
471
  draft.coauthorships.build(author: user)
482
472
  end
483
473
  end
@@ -501,32 +491,20 @@ FactoryBot.define do
501
491
  skip_injection { false }
502
492
  end
503
493
 
504
- title do
505
- if skip_injection
506
- Decidim::Faker::Localized.localized { generate(:title) }
507
- else
508
- Decidim::Faker::Localized.localized { "<script>alert(\"Meetings TITLE\")</script> #{generate(:title)}" }
509
- end
510
- end
511
-
512
- description do
513
- Decidim::Faker::Localized.wrapped("<p>", "</p>") do
514
- if skip_injection
515
- Decidim::Faker::Localized.localized { Faker::Lorem.sentences(number: 3).join("\n") }
516
- else
517
- Decidim::Faker::Localized.localized { "<script>alert(\"Meetings description\");</script> #{Faker::Lorem.sentences(number: 3).join("\n")}" }
518
- end
519
- end
520
- end
521
- component { create(:proposal_component) }
494
+ title { generate_localized_title(:participatory_text_title, skip_injection:) }
495
+ description { generate_localized_description(:participatory_text_description, skip_injection:) }
496
+ component { create(:proposal_component, skip_injection:) }
522
497
  end
523
498
 
524
499
  factory :valuation_assignment, class: "Decidim::Proposals::ValuationAssignment" do
500
+ transient do
501
+ skip_injection { false }
502
+ end
525
503
  proposal
526
504
  valuator_role do
527
505
  space = proposal.component.participatory_space
528
506
  organization = space.organization
529
- build :participatory_process_user_role, role: :valuator, user: build(:user, organization:)
507
+ build :participatory_process_user_role, role: :valuator, skip_injection:, user: build(:user, organization:, skip_injection:)
530
508
  end
531
509
  end
532
510
  end
@@ -8,7 +8,8 @@ module Decidim
8
8
  include Decidim::Comments::Commentable
9
9
 
10
10
  included do
11
- has_many :valuation_assignments, foreign_key: "decidim_proposal_id", dependent: :destroy
11
+ has_many :valuation_assignments, foreign_key: "decidim_proposal_id", dependent: :destroy,
12
+ counter_cache: :valuation_assignments_count, class_name: "Decidim::Proposals::ValuationAssignment"
12
13
 
13
14
  def valuators
14
15
  valuator_role_ids = valuation_assignments.where(proposal: self).pluck(:valuator_role_id)
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.28.0"
7
+ "0.28.1"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-12-20 00:00:00.000000000 Z
13
+ date: 2024-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.28.0
21
+ version: 0.28.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.28.0
28
+ version: 0.28.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-core
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.28.0
35
+ version: 0.28.1
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.28.0
42
+ version: 0.28.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: doc2text
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -80,98 +80,98 @@ dependencies:
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.28.0
83
+ version: 0.28.1
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - '='
89
89
  - !ruby/object:Gem::Version
90
- version: 0.28.0
90
+ version: 0.28.1
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: decidim-assemblies
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 0.28.0
97
+ version: 0.28.1
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.28.0
104
+ version: 0.28.1
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: decidim-budgets
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.28.0
111
+ version: 0.28.1
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 0.28.0
118
+ version: 0.28.1
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: decidim-conference
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 0.28.0
125
+ version: 0.28.1
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 0.28.0
132
+ version: 0.28.1
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: decidim-dev
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 0.28.0
139
+ version: 0.28.1
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - '='
145
145
  - !ruby/object:Gem::Version
146
- version: 0.28.0
146
+ version: 0.28.1
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: decidim-meetings
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: 0.28.0
153
+ version: 0.28.1
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - '='
159
159
  - !ruby/object:Gem::Version
160
- version: 0.28.0
160
+ version: 0.28.1
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: decidim-participatory_processes
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - '='
166
166
  - !ruby/object:Gem::Version
167
- version: 0.28.0
167
+ version: 0.28.1
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - '='
173
173
  - !ruby/object:Gem::Version
174
- version: 0.28.0
174
+ version: 0.28.1
175
175
  description: A proposals component for decidim's participatory spaces.
176
176
  email:
177
177
  - josepjaume@gmail.com
@@ -441,8 +441,6 @@ files:
441
441
  - app/views/decidim/proposals/proposals/show.html.erb
442
442
  - app/views/decidim/proposals/versions/show.html.erb
443
443
  - config/assets.rb
444
- - config/brakeman.ignore
445
- - config/environment.rb
446
444
  - config/locales/am-ET.yml
447
445
  - config/locales/ar-SA.yml
448
446
  - config/locales/ar.yml
@@ -475,6 +473,7 @@ files:
475
473
  - config/locales/ga-IE.yml
476
474
  - config/locales/gl.yml
477
475
  - config/locales/gn-PY.yml
476
+ - config/locales/he-IL.yml
478
477
  - config/locales/hr-HR.yml
479
478
  - config/locales/hr.yml
480
479
  - config/locales/hu.yml
@@ -579,6 +578,8 @@ files:
579
578
  - db/migrate/20210318082934_fix_counters_for_copied_proposals.rb
580
579
  - db/migrate/20230427105700_change_states_on_collaborative_drafts.rb
581
580
  - db/migrate/20230427105700_change_states_on_proposals.rb
581
+ - db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
582
+ - decidim-proposals.gemspec
582
583
  - lib/decidim/api/proposal_input_filter.rb
583
584
  - lib/decidim/api/proposal_input_sort.rb
584
585
  - lib/decidim/api/proposal_type.rb
@@ -617,23 +618,23 @@ metadata:
617
618
  funding_uri: https://opencollective.com/decidim
618
619
  homepage_uri: https://decidim.org
619
620
  source_code_uri: https://github.com/decidim/decidim
620
- post_install_message:
621
+ post_install_message:
621
622
  rdoc_options: []
622
623
  require_paths:
623
624
  - lib
624
625
  required_ruby_version: !ruby/object:Gem::Requirement
625
626
  requirements:
626
- - - ">="
627
+ - - "~>"
627
628
  - !ruby/object:Gem::Version
628
- version: '3.1'
629
+ version: 3.1.0
629
630
  required_rubygems_version: !ruby/object:Gem::Requirement
630
631
  requirements:
631
632
  - - ">="
632
633
  - !ruby/object:Gem::Version
633
634
  version: '0'
634
635
  requirements: []
635
- rubygems_version: 3.4.22
636
- signing_key:
636
+ rubygems_version: 3.5.9
637
+ signing_key:
637
638
  specification_version: 4
638
639
  summary: Decidim proposals module
639
640
  test_files: []
@@ -1,63 +0,0 @@
1
- {
2
- "ignored_warnings": [
3
- {
4
- "warning_type": "Mass Assignment",
5
- "warning_code": 70,
6
- "fingerprint": "8eeee9ad33162a80c7cf7a87d597f4cc108b0874d40ddabd1f5241f460a9519a",
7
- "check_name": "MassAssignment",
8
- "message": "Specify exact keys allowed for mass assignment instead of using `permit!` which allows any keys",
9
- "file": "app/controllers/decidim/proposals/admin/participatory_texts_controller.rb",
10
- "line": 50,
11
- "link": "https://brakemanscanner.org/docs/warning_types/mass_assignment/",
12
- "code": "params.require(:preview_participatory_text).permit!",
13
- "render_path": null,
14
- "location": {
15
- "type": "method",
16
- "class": "Decidim::Proposals::Admin::ParticipatoryTextsController",
17
- "method": "update"
18
- },
19
- "user_input": null,
20
- "confidence": "Medium",
21
- "cwe_id": [
22
- 915
23
- ],
24
- "note": ""
25
- },
26
- {
27
- "warning_type": "Cross-Site Scripting",
28
- "warning_code": 2,
29
- "fingerprint": "ee8cfc06595219681fe264fb8977fb9b0bab6750e694ec9dea82324c02fbc5f4",
30
- "check_name": "CrossSiteScripting",
31
- "message": "Unescaped parameter value",
32
- "file": "app/views/decidim/proposals/proposals/show.html.erb",
33
- "line": 53,
34
- "link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
35
- "code": "cell(\"decidim/proposals/proposal_metadata\", Proposal.published.not_hidden.where(:component => current_component).find_by(:id => params[:id])).state_item.dig(:text).html_safe",
36
- "render_path": [
37
- {
38
- "type": "controller",
39
- "class": "Decidim::Proposals::ProposalsController",
40
- "method": "show",
41
- "line": 69,
42
- "file": "app/controllers/decidim/proposals/proposals_controller.rb",
43
- "rendered": {
44
- "name": "decidim/proposals/proposals/show",
45
- "file": "app/views/decidim/proposals/proposals/show.html.erb"
46
- }
47
- }
48
- ],
49
- "location": {
50
- "type": "template",
51
- "template": "decidim/proposals/proposals/show"
52
- },
53
- "user_input": "params[:id]",
54
- "confidence": "Weak",
55
- "cwe_id": [
56
- 79
57
- ],
58
- "note": ""
59
- }
60
- ],
61
- "updated": "2023-07-27 19:05:49 +0200",
62
- "brakeman_version": "5.4.1"
63
- }
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Empty line for playing nice with tpope/vim-rails