decidim-reporting_proposals 0.6.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 +4 -4
- data/.github/workflows/lint.yml +8 -6
- data/.github/workflows/test_integration.yml +34 -12
- data/.github/workflows/test_unit.yml +27 -7
- data/.rubocop.yml +21 -1
- data/.ruby-version +1 -1
- data/Gemfile +6 -8
- data/Gemfile.lock +418 -427
- data/README.md +10 -0
- data/app/cells/concerns/decidim/reporting_proposals/proposals_picker_cell_override.rb +4 -4
- data/app/commands/concerns/decidim/reporting_proposals/admin/assign_proposals_to_valuator_override.rb +3 -1
- data/app/commands/concerns/decidim/reporting_proposals/admin/create_category_override.rb +5 -11
- data/app/commands/concerns/decidim/reporting_proposals/admin/create_proposal_answer_template_override.rb +24 -0
- data/app/commands/concerns/decidim/reporting_proposals/admin/has_result_command_override.rb +21 -0
- data/app/commands/concerns/decidim/reporting_proposals/admin/update_category_override.rb +8 -11
- data/app/commands/concerns/decidim/reporting_proposals/admin/update_imported_result_override.rb +30 -0
- data/app/commands/concerns/decidim/reporting_proposals/admin/update_result_override.rb +0 -4
- data/app/commands/concerns/decidim/reporting_proposals/create_project_override.rb +1 -1
- data/app/controllers/concerns/decidim/reporting_proposals/admin/proposal_answer_templates_controller_override.rb +4 -5
- data/app/controllers/concerns/decidim/reporting_proposals/admin/valuation_assignments_controller_override.rb +10 -4
- data/app/controllers/concerns/decidim/reporting_proposals/proposals_controller_override.rb +23 -31
- data/app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb +1 -1
- data/app/forms/concerns/decidim/reporting_proposals/form_builder_override.rb +4 -1
- data/app/helpers/concerns/decidim/reporting_proposals/admin/proposal_bulk_actions_helper_override.rb +23 -0
- data/app/helpers/concerns/decidim/reporting_proposals/admin/proposals_helper_override.rb +18 -0
- data/app/helpers/concerns/decidim/reporting_proposals/proposal_wizard_helper_override.rb +17 -3
- data/app/jobs/decidim/reporting_proposals/assign_proposal_valuators_job.rb +1 -1
- data/app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_categories_column.html.erb.deface +8 -0
- data/app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_id_column.html.erb.deface +3 -0
- data/app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_valuators_name.html.erb.deface +5 -5
- data/app/overrides/decidim/proposals/admin/proposals/_proposal-tr/replace_td_title.html.erb.deface +1 -1
- data/app/overrides/decidim/proposals/admin/proposals/index/add_categories.html.erb.deface +3 -0
- data/app/overrides/decidim/proposals/admin/proposals/index/add_form_default_class.html.erb.deface +5 -0
- data/app/overrides/decidim/proposals/admin/proposals/index/add_id_column_header.html.erb.deface +3 -0
- data/app/overrides/decidim/proposals/admin/proposals/show/add_valuators_form.html.erb.deface +1 -24
- data/app/overrides/decidim/proposals/proposals/edit_draft/replace_partial_edit_form_fields.html.erb.deface +0 -1
- data/app/overrides/decidim/proposals/proposals/new/replace_partial_edit_form_fields.html.erb.deface +3 -0
- data/app/packs/entrypoints/decidim_reporting_proposals.js +1 -0
- data/app/packs/src/decidim/reporting_proposals/assign_valuators_select.js +25 -0
- data/app/packs/src/decidim/reporting_proposals/user_camera_inputs.js +1 -1
- data/app/packs/stylesheets/decidim/reporting_proposals/list_component_admin.scss +6 -0
- data/app/permissions/concerns/decidim/reporting_proposals/admin/permissions_override.rb +12 -2
- data/app/queries/decidim/reporting_proposals/nearby_proposals.rb +1 -3
- data/app/views/decidim/proposals/admin/proposals/_assign_to_valuator.html.erb +31 -0
- data/app/views/decidim/proposals/proposals/compare.html.erb +34 -0
- data/app/views/decidim/reporting_proposals/admin/categories/_valuators_field.html.erb +1 -1
- data/app/views/decidim/reporting_proposals/admin/proposals/_photo_form.html.erb +2 -2
- data/app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb +2 -1
- data/app/views/decidim/reporting_proposals/admin/proposals/_photos.html.erb +4 -1
- data/app/views/decidim/reporting_proposals/admin/proposals/_proposal_td_hide.html.erb +1 -9
- data/app/views/decidim/reporting_proposals/admin/proposals/_proposal_td_title.html.erb +5 -4
- data/app/views/decidim/reporting_proposals/proposals/_camera_button.html.erb +4 -2
- data/app/views/decidim/reporting_proposals/proposals/_reporting_proposal_fields.html.erb +66 -65
- data/bin/bundle +62 -0
- data/bin/rspec +26 -0
- data/bin/test +47 -0
- data/bin/test-legacy +3 -0
- data/config/locales/ca.yml +22 -34
- data/config/locales/de.yml +22 -36
- data/config/locales/en.yml +20 -1
- data/config/locales/es.yml +22 -36
- data/decidim-reporting_proposals.gemspec +1 -2
- data/lib/decidim/reporting_proposals/component.rb +31 -17
- data/lib/decidim/reporting_proposals/engine.rb +16 -12
- data/lib/decidim/reporting_proposals/version.rb +3 -3
- data/lib/tasks/reporting_proposals_statuses.rake +52 -0
- data/package-lock.json +120 -85
- data/package.json +7 -7
- metadata +61 -79
- data/.rubocop-disabled.yml +0 -11
- data/.rubocop_rails.yml +0 -90
- data/.rubocop_ruby.yml +0 -1767
- data/app/commands/concerns/decidim/reporting_proposals/admin/create_answer_override.rb +0 -17
- data/app/commands/concerns/decidim/reporting_proposals/admin/create_result_override.rb +0 -17
- data/app/commands/concerns/decidim/reporting_proposals/create_report_override.rb +0 -19
- data/app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb +0 -18
- data/app/overrides/decidim/proposals/proposals/compare/add_css.html.erb.deface +0 -5
- data/app/overrides/decidim/proposals/proposals/compare/add_distance_badge.html.erb.deface +0 -10
- data/app/overrides/decidim/proposals/proposals/edit/add_user_group.html.erb.deface +0 -3
- data/app/overrides/decidim/proposals/proposals/new/remove_body.html.erb.deface +0 -1
- data/app/overrides/decidim/proposals/proposals/new/replace_body.html.erb.deface +0 -3
- data/app/overrides/layouts/decidim/_process_header_steps/always_show_new_proposals.html.erb.deface +0 -3
- data/app/views/decidim/reporting_proposals/proposals/_new_proposal_fields.html.erb +0 -9
- data/app/views/decidim/reporting_proposals/proposals/_user_group.html.erb +0 -5
- data/babel.config.json +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24d235e0ffe6047fa5840f4c677920aed90c171361929f192216ca2d75fb42c8
|
|
4
|
+
data.tar.gz: 7f4ab41f24187645451483c4c9a94daa3d922e97f311b4967f4f71fbe35112a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac856b84ed1c61d2727928ff6a17b5ae04111b4dd21e6c81e986755fd25090a46b76280236d850af4420a83a5e10a64add24bb2a488a06dd38b0922f86816099
|
|
7
|
+
data.tar.gz: 2ccf6510a8b3cc297024a469b1b3c08960149ff9db6abf8702debd1e5334c7e29ce37e4953d2eeed41ba5b870269b382d129ab2bf25d94ddfbd6d3cad3e8f887
|
data/.github/workflows/lint.yml
CHANGED
|
@@ -8,8 +8,10 @@ on:
|
|
|
8
8
|
|
|
9
9
|
env:
|
|
10
10
|
CI: "true"
|
|
11
|
-
|
|
11
|
+
SIMPLECOV: "true"
|
|
12
|
+
RUBY_VERSION: 3.2.6
|
|
12
13
|
NODE_VERSION: 18.17.1
|
|
14
|
+
SHAKAPACKER_RUNTIME_COMPILE: "false"
|
|
13
15
|
|
|
14
16
|
jobs:
|
|
15
17
|
lint-report:
|
|
@@ -21,6 +23,11 @@ jobs:
|
|
|
21
23
|
with:
|
|
22
24
|
fetch-depth: 1
|
|
23
25
|
|
|
26
|
+
- uses: ruby/setup-ruby@v1
|
|
27
|
+
with:
|
|
28
|
+
ruby-version: ${{ env.RUBY_VERSION }}
|
|
29
|
+
bundler-cache: true
|
|
30
|
+
|
|
24
31
|
- uses: actions/setup-node@master
|
|
25
32
|
with:
|
|
26
33
|
node-version: ${{ env.NODE_VERSION }}
|
|
@@ -34,11 +41,6 @@ jobs:
|
|
|
34
41
|
- run: npm run stylelint
|
|
35
42
|
name: Lint SCSS files
|
|
36
43
|
|
|
37
|
-
- uses: ruby/setup-ruby@v1
|
|
38
|
-
with:
|
|
39
|
-
ruby-version: ${{ env.RUBY_VERSION }}
|
|
40
|
-
bundler-cache: true
|
|
41
|
-
|
|
42
44
|
- run: bundle exec rubocop -P
|
|
43
45
|
name: Lint Ruby files
|
|
44
46
|
|
|
@@ -9,12 +9,13 @@ on:
|
|
|
9
9
|
env:
|
|
10
10
|
CI: "true"
|
|
11
11
|
SIMPLECOV: "true"
|
|
12
|
-
RUBY_VERSION: 3.
|
|
12
|
+
RUBY_VERSION: 3.2.6
|
|
13
13
|
NODE_VERSION: 18.17.1
|
|
14
14
|
RAILS_ENV: test
|
|
15
15
|
DATABASE_USERNAME: postgres
|
|
16
16
|
DATABASE_PASSWORD: postgres
|
|
17
17
|
DATABASE_HOST: localhost
|
|
18
|
+
DISABLE_SPRING: "1"
|
|
18
19
|
jobs:
|
|
19
20
|
build:
|
|
20
21
|
name: Build & Precompile
|
|
@@ -22,7 +23,7 @@ jobs:
|
|
|
22
23
|
|
|
23
24
|
services:
|
|
24
25
|
postgres:
|
|
25
|
-
image: postgres:
|
|
26
|
+
image: postgres:14
|
|
26
27
|
ports: ["5432:5432"]
|
|
27
28
|
options: >-
|
|
28
29
|
--health-cmd pg_isready
|
|
@@ -33,17 +34,19 @@ jobs:
|
|
|
33
34
|
POSTGRES_PASSWORD: postgres
|
|
34
35
|
|
|
35
36
|
steps:
|
|
36
|
-
|
|
37
37
|
- uses: actions/checkout@v4
|
|
38
38
|
with:
|
|
39
39
|
fetch-depth: 1
|
|
40
40
|
|
|
41
|
+
- name: Install additional tools
|
|
42
|
+
run: sudo apt-get update; sudo apt-get -f install wkhtmltopdf imagemagick
|
|
43
|
+
|
|
41
44
|
- uses: ruby/setup-ruby@v1
|
|
42
45
|
with:
|
|
43
46
|
ruby-version: ${{ env.RUBY_VERSION }}
|
|
44
47
|
bundler-cache: true
|
|
45
48
|
|
|
46
|
-
- uses: actions/setup-node@
|
|
49
|
+
- uses: actions/setup-node@v4
|
|
47
50
|
with:
|
|
48
51
|
node-version: ${{ env.NODE_VERSION }}
|
|
49
52
|
cache: 'npm'
|
|
@@ -55,13 +58,17 @@ jobs:
|
|
|
55
58
|
- name: Setup Database
|
|
56
59
|
run: bundle exec rake test_app
|
|
57
60
|
|
|
61
|
+
- name: Fix autocomplete
|
|
62
|
+
run: npm i @tarekraafat/autocomplete.js@10.2.7
|
|
63
|
+
working-directory: ./spec/decidim_dummy_app
|
|
64
|
+
|
|
58
65
|
- name: Precompile test app assets
|
|
59
66
|
run: bundle exec rake assets:precompile
|
|
60
67
|
working-directory: ./spec/decidim_dummy_app
|
|
61
68
|
|
|
62
69
|
- run: tar -zcf /tmp/testapp-env.tar.gz ./spec/decidim_dummy_app
|
|
63
70
|
|
|
64
|
-
- uses: actions/upload-artifact@
|
|
71
|
+
- uses: actions/upload-artifact@v4
|
|
65
72
|
with:
|
|
66
73
|
name: workspace
|
|
67
74
|
path: /tmp/testapp-env.tar.gz
|
|
@@ -94,13 +101,16 @@ jobs:
|
|
|
94
101
|
POSTGRES_PASSWORD: postgres
|
|
95
102
|
|
|
96
103
|
steps:
|
|
97
|
-
- uses: actions/checkout@
|
|
104
|
+
- uses: actions/checkout@v4
|
|
98
105
|
with:
|
|
99
106
|
fetch-depth: 1
|
|
100
107
|
|
|
108
|
+
- name: Install additional tools
|
|
109
|
+
run: sudo apt-get update; sudo apt-get -f install wkhtmltopdf imagemagick
|
|
110
|
+
|
|
101
111
|
- uses: nanasess/setup-chromedriver@v2
|
|
102
112
|
with:
|
|
103
|
-
chromedriver-version:
|
|
113
|
+
chromedriver-version: 126.0.6478.182
|
|
104
114
|
|
|
105
115
|
- name: List Chrome
|
|
106
116
|
run: apt list --installed | grep chrome
|
|
@@ -110,18 +120,21 @@ jobs:
|
|
|
110
120
|
|
|
111
121
|
- uses: browser-actions/setup-chrome@v1
|
|
112
122
|
with:
|
|
113
|
-
chrome-version:
|
|
123
|
+
chrome-version: 126.0.6478.182
|
|
114
124
|
|
|
115
125
|
- uses: ruby/setup-ruby@v1
|
|
116
126
|
with:
|
|
117
127
|
ruby-version: ${{ env.RUBY_VERSION }}
|
|
118
128
|
bundler-cache: true
|
|
129
|
+
|
|
130
|
+
- name: Install imagemagick
|
|
131
|
+
run: sudo apt install -y imagemagick
|
|
119
132
|
|
|
120
|
-
- uses: actions/download-artifact@
|
|
133
|
+
- uses: actions/download-artifact@v4
|
|
121
134
|
with:
|
|
122
135
|
name: workspace
|
|
123
136
|
path: /tmp
|
|
124
|
-
|
|
137
|
+
|
|
125
138
|
- run: ls
|
|
126
139
|
- run: tar -zxf /tmp/testapp-env.tar.gz
|
|
127
140
|
- run: ls
|
|
@@ -132,12 +145,21 @@ jobs:
|
|
|
132
145
|
run: bundle exec rspec spec/system/${{ matrix.rspec }}
|
|
133
146
|
|
|
134
147
|
- name: Upload coverage reports to Codecov
|
|
135
|
-
uses: codecov/codecov-action@
|
|
148
|
+
uses: codecov/codecov-action@v5
|
|
136
149
|
with:
|
|
137
150
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
151
|
+
slug: openpoke/decidim-module-reporting-proposals
|
|
138
152
|
|
|
139
|
-
- uses: actions/upload-artifact@
|
|
153
|
+
- uses: actions/upload-artifact@v4
|
|
140
154
|
if: always()
|
|
141
155
|
with:
|
|
142
156
|
name: screenshots-${{ matrix.name }}
|
|
143
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:
|
|
11
|
-
SIMPLECOV:
|
|
12
|
-
RUBY_VERSION: 3.1.1
|
|
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:
|
|
@@ -19,7 +26,7 @@ jobs:
|
|
|
19
26
|
|
|
20
27
|
services:
|
|
21
28
|
postgres:
|
|
22
|
-
image: postgres:
|
|
29
|
+
image: postgres:14
|
|
23
30
|
ports: ["5432:5432"]
|
|
24
31
|
options: >-
|
|
25
32
|
--health-cmd pg_isready
|
|
@@ -32,15 +39,19 @@ jobs:
|
|
|
32
39
|
DATABASE_USERNAME: postgres
|
|
33
40
|
DATABASE_PASSWORD: postgres
|
|
34
41
|
DATABASE_HOST: localhost
|
|
42
|
+
DISABLE_SPRING: "1"
|
|
35
43
|
|
|
36
44
|
steps:
|
|
37
45
|
- uses: actions/checkout@v4
|
|
38
46
|
with:
|
|
39
47
|
fetch-depth: 1
|
|
40
48
|
|
|
49
|
+
- name: Install additional tools
|
|
50
|
+
run: sudo apt-get update; sudo apt-get -f install wkhtmltopdf imagemagick
|
|
51
|
+
|
|
41
52
|
- uses: nanasess/setup-chromedriver@v2
|
|
42
53
|
with:
|
|
43
|
-
chromedriver-version:
|
|
54
|
+
chromedriver-version: 126.0.6478.182
|
|
44
55
|
|
|
45
56
|
- name: List Chrome
|
|
46
57
|
run: apt list --installed | grep chrome
|
|
@@ -50,7 +61,7 @@ jobs:
|
|
|
50
61
|
|
|
51
62
|
- uses: browser-actions/setup-chrome@v1
|
|
52
63
|
with:
|
|
53
|
-
chrome-version:
|
|
64
|
+
chrome-version: 126.0.6478.182
|
|
54
65
|
|
|
55
66
|
- uses: ruby/setup-ruby@v1
|
|
56
67
|
with:
|
|
@@ -64,6 +75,15 @@ jobs:
|
|
|
64
75
|
run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb'
|
|
65
76
|
|
|
66
77
|
- name: Upload coverage reports to Codecov
|
|
67
|
-
uses: codecov/codecov-action@
|
|
78
|
+
uses: codecov/codecov-action@v5
|
|
68
79
|
with:
|
|
69
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/.rubocop.yml
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
|
|
1
2
|
inherit_from:
|
|
2
|
-
- https://raw.githubusercontent.com/decidim/decidim/release/0.
|
|
3
|
+
- https://raw.githubusercontent.com/decidim/decidim/release/0.29-stable/.rubocop.yml
|
|
4
|
+
|
|
5
|
+
# Offense count: 8
|
|
6
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
7
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
8
|
+
Style/ReturnNilInPredicateMethodDefinition:
|
|
9
|
+
Enabled: false
|
|
10
|
+
|
|
11
|
+
# Offense count: 5
|
|
12
|
+
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
|
|
13
|
+
# SupportedStyles: Gemfile, gems.rb, gemspec
|
|
14
|
+
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
|
|
15
|
+
Gemspec/DevelopmentDependencies:
|
|
16
|
+
Enabled: false
|
|
17
|
+
|
|
18
|
+
AllCops:
|
|
19
|
+
Exclude:
|
|
20
|
+
- "spec/decidim_dummy_app*/**/*"
|
|
21
|
+
- "development_app/**/*"
|
|
22
|
+
- "node_modules/**/*"
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.2.6
|
data/Gemfile
CHANGED
|
@@ -16,25 +16,23 @@ gem "decidim", DECIDIM_VERSION
|
|
|
16
16
|
gem "decidim-reporting_proposals", path: "."
|
|
17
17
|
|
|
18
18
|
gem "bootsnap", "~> 1.7"
|
|
19
|
-
gem "faker", "~> 3.2"
|
|
20
19
|
gem "puma", ">= 6.3.1"
|
|
21
|
-
|
|
20
|
+
# seems that rexml 3.4.1 have issues generating some XMLs and codecov compatibility
|
|
21
|
+
gem "rexml", "3.4.1"
|
|
22
22
|
|
|
23
23
|
group :development, :test do
|
|
24
24
|
gem "byebug", "~> 11.0", platform: :mri
|
|
25
25
|
|
|
26
|
+
gem "brakeman", "~> 6.1"
|
|
26
27
|
gem "decidim-dev", DECIDIM_VERSION
|
|
27
|
-
gem "decidim-elections", DECIDIM_VERSION
|
|
28
28
|
gem "decidim-templates", DECIDIM_VERSION
|
|
29
|
+
gem "parallel_tests", "~> 4.2"
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
group :development do
|
|
32
|
-
gem "letter_opener_web"
|
|
33
|
+
gem "letter_opener_web", "~> 2.0"
|
|
33
34
|
gem "listen", "~> 3.1"
|
|
34
|
-
gem "
|
|
35
|
-
gem "spring", "~> 2.0"
|
|
36
|
-
gem "spring-watcher-listen", "~> 2.0"
|
|
37
|
-
gem "web-console"
|
|
35
|
+
gem "web-console", "~> 4.2"
|
|
38
36
|
end
|
|
39
37
|
|
|
40
38
|
group :test do
|