Skip to content

Commit

Permalink
Upgrade to Decidim 0.28.1 (#85)
Browse files Browse the repository at this point in the history
* update versions

* remove unnecessary patches

* fix specs

* fix valuator test

* fix valuators name override

---------

Co-authored-by: Anna Topalidi <[email protected]>
  • Loading branch information
microstudi and antopalidi authored May 9, 2024
1 parent 5527b48 commit 6e54fad
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 209 deletions.
183 changes: 90 additions & 93 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PATH
remote: .
specs:
decidim-reporting_proposals (0.6.0)
decidim-admin (>= 0.28, < 0.29)
decidim-core (>= 0.28, < 0.29)
decidim-participatory_processes (>= 0.28, < 0.29)
decidim-proposals (>= 0.28, < 0.29)
decidim-reporting_proposals (0.6.1)
decidim-admin (>= 0.28.1, < 0.29)
decidim-core (>= 0.28.1, < 0.29)
decidim-participatory_processes (>= 0.28.1, < 0.29)
decidim-proposals (>= 0.28.1, < 0.29)
deface (>= 1.9)

GEM
Expand Down Expand Up @@ -143,60 +143,61 @@ GEM
date_validator (0.12.0)
activemodel (>= 3)
activesupport (>= 3)
decidim (0.28.0)
decidim-accountability (= 0.28.0)
decidim-admin (= 0.28.0)
decidim-api (= 0.28.0)
decidim-assemblies (= 0.28.0)
decidim-blogs (= 0.28.0)
decidim-budgets (= 0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-debates (= 0.28.0)
decidim-forms (= 0.28.0)
decidim-generators (= 0.28.0)
decidim-meetings (= 0.28.0)
decidim-pages (= 0.28.0)
decidim-participatory_processes (= 0.28.0)
decidim-proposals (= 0.28.0)
decidim-sortitions (= 0.28.0)
decidim-surveys (= 0.28.0)
decidim-system (= 0.28.0)
decidim-templates (= 0.28.0)
decidim-verifications (= 0.28.0)
decidim-accountability (0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-admin (0.28.0)
decidim (0.28.1)
decidim-accountability (= 0.28.1)
decidim-admin (= 0.28.1)
decidim-api (= 0.28.1)
decidim-assemblies (= 0.28.1)
decidim-blogs (= 0.28.1)
decidim-budgets (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-debates (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-generators (= 0.28.1)
decidim-meetings (= 0.28.1)
decidim-pages (= 0.28.1)
decidim-participatory_processes (= 0.28.1)
decidim-proposals (= 0.28.1)
decidim-sortitions (= 0.28.1)
decidim-surveys (= 0.28.1)
decidim-system (= 0.28.1)
decidim-templates (= 0.28.1)
decidim-verifications (= 0.28.1)
decidim-accountability (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-admin (0.28.1)
active_link_to (~> 1.0)
decidim-core (= 0.28.0)
decidim-core (= 0.28.1)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-api (0.28.0)
decidim-api (0.28.1)
commonmarker (~> 0.23.0, >= 0.23.9)
decidim-core (= 0.28.1)
graphql (~> 2.0.0)
graphql-docs (~> 3.0.1)
rack-cors (~> 1.0)
decidim-assemblies (0.28.0)
decidim-core (= 0.28.0)
decidim-blogs (0.28.0)
decidim-admin (= 0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-budgets (0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-assemblies (0.28.1)
decidim-core (= 0.28.1)
decidim-blogs (0.28.1)
decidim-admin (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-budgets (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-bulletin_board (0.24.4)
byebug (~> 11.0)
graphlient (~> 0.5.0)
jwt (~> 2.5.0)
rails (>= 5.0.0, < 7.1)
wisper (~> 2.0.0)
decidim-comments (0.28.0)
decidim-core (= 0.28.0)
decidim-comments (0.28.1)
decidim-core (= 0.28.1)
redcarpet (~> 3.5, >= 3.5.1)
decidim-core (0.28.0)
decidim-core (0.28.1)
active_link_to (~> 1.0)
acts_as_list (~> 1.0)
batch-loader (~> 1.2)
Expand All @@ -206,7 +207,6 @@ GEM
cells-rails (~> 0.1.3)
charlock_holmes (~> 0.7)
date_validator (~> 0.12.0)
decidim-api (= 0.28.0)
devise (~> 4.7)
devise-i18n (~> 1.2, < 1.11.1)
diffy (~> 3.3)
Expand All @@ -222,7 +222,6 @@ GEM
loofah (~> 2.19, >= 2.19.1)
mime-types (>= 1.16, < 4.0)
mini_magick (~> 4.9)
mustache (~> 1.1.0)
net-smtp (~> 0.3.1)
omniauth (~> 2.0)
omniauth-facebook (~> 5.0)
Expand All @@ -248,14 +247,14 @@ GEM
valid_email2 (~> 4.0)
web-push (~> 3.0)
wisper (~> 2.0)
decidim-debates (0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-dev (0.28.0)
decidim-debates (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-dev (0.28.1)
bullet (~> 7.0)
byebug (~> 11.0)
capybara (~> 3.39)
decidim (= 0.28.0)
decidim (= 0.28.1)
erb_lint (~> 0.4.0)
factory_bot_rails (~> 6.2)
faker (~> 3.2)
Expand All @@ -280,53 +279,52 @@ GEM
w3c_rspec_validators (~> 0.3.0)
webmock (~> 3.18)
wisper-rspec (~> 1.0)
decidim-elections (0.28.0)
decidim-elections (0.28.1)
decidim-bulletin_board (~> 0.24.4)
decidim-core (= 0.28.0)
decidim-forms (= 0.28.0)
decidim-proposals (= 0.28.0)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-proposals (= 0.28.1)
rack-attack (~> 6.0)
voting_schemes-dummy (~> 0.24.4)
voting_schemes-electionguard (~> 0.24.4)
decidim-forms (0.28.0)
decidim-core (= 0.28.0)
decidim-forms (0.28.1)
decidim-core (= 0.28.1)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
decidim-generators (0.28.0)
decidim-core (= 0.28.0)
decidim-meetings (0.28.0)
decidim-core (= 0.28.0)
decidim-forms (= 0.28.0)
decidim-generators (0.28.1)
decidim-core (= 0.28.1)
decidim-meetings (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
icalendar (~> 2.5)
decidim-pages (0.28.0)
decidim-core (= 0.28.0)
decidim-participatory_processes (0.28.0)
decidim-core (= 0.28.0)
decidim-proposals (0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-pages (0.28.1)
decidim-core (= 0.28.1)
decidim-participatory_processes (0.28.1)
decidim-core (= 0.28.1)
decidim-proposals (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
doc2text (~> 0.4.6)
redcarpet (~> 3.5, >= 3.5.1)
decidim-sortitions (0.28.0)
decidim-admin (= 0.28.0)
decidim-comments (= 0.28.0)
decidim-core (= 0.28.0)
decidim-proposals (= 0.28.0)
decidim-surveys (0.28.0)
decidim-core (= 0.28.0)
decidim-forms (= 0.28.0)
decidim-templates (= 0.28.0)
decidim-system (0.28.0)
decidim-sortitions (0.28.1)
decidim-admin (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-proposals (= 0.28.1)
decidim-surveys (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-system (0.28.1)
active_link_to (~> 1.0)
decidim-core (= 0.28.0)
decidim-core (= 0.28.1)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-templates (0.28.0)
decidim-core (= 0.28.0)
decidim-forms (= 0.28.0)
decidim-verifications (0.28.0)
decidim-core (= 0.28.0)
decidim-templates (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-verifications (0.28.1)
decidim-core (= 0.28.1)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
Expand Down Expand Up @@ -515,7 +513,6 @@ GEM
msgpack (1.7.2)
multi_xml (0.6.0)
multipart-post (2.4.0)
mustache (1.1.1)
net-imap (0.4.10)
date
net-protocol
Expand Down Expand Up @@ -574,7 +571,7 @@ GEM
activerecord (>= 5.2)
request_store (~> 1.1)
parallel (1.24.0)
parallel_tests (4.6.1)
parallel_tests (4.7.1)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down Expand Up @@ -718,7 +715,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.1)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand All @@ -738,7 +735,7 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
selenium-webdriver (4.19.0)
selenium-webdriver (4.20.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
Expand Down Expand Up @@ -839,11 +836,11 @@ DEPENDENCIES
bootsnap (~> 1.7)
byebug (~> 11.0)
codecov
decidim (= 0.28)
decidim-dev (= 0.28)
decidim-elections (= 0.28)
decidim (= 0.28.1)
decidim-dev (= 0.28.1)
decidim-elections (= 0.28.1)
decidim-reporting_proposals!
decidim-templates (= 0.28)
decidim-templates (= 0.28.1)
faker (~> 3.2)
letter_opener_web
listen (~> 3.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ def avaliablity_options
@avaliablity_options.prepend [t("global_scope", scope: "decidim.templates.admin.proposal_answer_templates.index"), 0]
end

# This is overriden because a bug in decidim templates that prevents valuators to use templates
# This can be removed after https://github.com/decidim/decidim/pull/12765 is merge & backported
def fetch
enforce_permission_to(:read, :template, template:, proposal:)

response_object = {
state: template.field_values["internal_state"],
template: populate_template_interpolations(proposal)
}

respond_to do |format|
format.json do
render json: response_object.to_json
end
end
end

private

def accepted_components
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- replace "erb[loud]:contains('proposal.valuation_assignments.count')" -->
<!-- replace "erb[loud]:contains('proposal.valuation_assignments.size')" -->

<% count = proposal.valuation_assignments.count %>
<% count = proposal.valuation_assignments.size %>
<% if count.zero? %>
0
<% else %>
Expand Down
51 changes: 0 additions & 51 deletions app/permissions/decidim/templates/admin/permissions.rb

This file was deleted.

6 changes: 3 additions & 3 deletions lib/decidim/reporting_proposals/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module Decidim
module ReportingProposals
VERSION = "0.6.0"
DECIDIM_VERSION = "0.28"
COMPAT_DECIDIM_VERSION = [">= 0.28", "< 0.29"].freeze
VERSION = "0.6.1"
DECIDIM_VERSION = "0.28.1"
COMPAT_DECIDIM_VERSION = [">= 0.28.1", "< 0.29"].freeze
end
end
Loading

0 comments on commit 6e54fad

Please sign in to comment.