Skip to content

Commit

Permalink
Merge pull request #442 from OpenSourcePolitics/rc-0.26
Browse files Browse the repository at this point in the history
fix: Add module and fix notifications on proposal answers import
  • Loading branch information
Quentinchampenois authored Oct 2, 2023
2 parents 1cd3102 + 801fbf7 commit 8068b42
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 38 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolit
gem "decidim-ludens", git: "https://github.com/OpenSourcePolitics/decidim-ludens.git", branch: DECIDIM_BRANCH
gem "decidim-phone_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler", branch: DECIDIM_BRANCH
gem "decidim-spam_detection"
gem "decidim-survey_multiple_answers"
gem "decidim-term_customizer", git: "https://github.com/armandfardeau/decidim-module-term_customizer.git", branch: "fix/precompile-on-docker-0.26"

# Omniauth gems
Expand Down
59 changes: 34 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ GEM
zeitwerk (~> 2.2, >= 2.2.2)
acts_as_list (0.9.19)
activerecord (>= 3.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
ast (2.4.2)
Expand Down Expand Up @@ -165,6 +165,7 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.1.1)
batch-loader (1.5.0)
bcrypt (3.1.19)
better_html (1.0.16)
Expand Down Expand Up @@ -230,7 +231,7 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
css_parser (1.14.0)
css_parser (1.16.0)
addressable
dalli (3.2.4)
date (3.3.3)
Expand Down Expand Up @@ -410,6 +411,11 @@ GEM
decidim-proposals (= 0.26.7)
decidim-spam_detection (3.1.0)
decidim-core (~> 0.26.0)
decidim-survey_multiple_answers (0.26.1)
decidim-admin (>= 0.26.0, < 0.28.0)
decidim-core (>= 0.26.0, < 0.28.0)
decidim-forms (>= 0.26.0, < 0.28.0)
decidim-surveys (>= 0.26.0, < 0.28.0)
decidim-surveys (0.26.7)
decidim-core (= 0.26.7)
decidim-forms (= 0.26.7)
Expand Down Expand Up @@ -476,22 +482,23 @@ GEM
erubi (1.12.0)
et-orbi (1.2.7)
tzinfo
excon (0.100.0)
execjs (2.8.1)
excon (0.103.0)
execjs (2.9.1)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.10)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.2)
file_validators (2.3.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
Expand Down Expand Up @@ -607,12 +614,12 @@ GEM
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mime-types-data (3.2023.0808)
mini_magick (4.12.0)
mini_mime (1.1.2)
minitest (5.18.1)
mini_mime (1.1.5)
minitest (5.20.0)
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
Expand All @@ -622,14 +629,14 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
mustache (1.1.1)
net-imap (0.3.6)
net-imap (0.3.7)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.13.4-arm64-darwin)
Expand Down Expand Up @@ -716,9 +723,9 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.7.1)
rack (2.2.7)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack (2.2.8)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-oauth2 (1.21.3)
Expand All @@ -727,9 +734,9 @@ GEM
httpclient
json-jwt (>= 1.11.0)
rack (>= 2.1.0)
rack-protection (3.0.6)
rack
rack-proxy (0.7.6)
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.7)
rack
rack-test (2.1.0)
rack (>= 1.3)
Expand All @@ -752,7 +759,7 @@ GEM
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.1.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
Expand Down Expand Up @@ -904,14 +911,14 @@ GEM
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.2.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
ssrf_filter (1.1.1)
ssrf_filter (1.1.2)
swd (1.3.0)
activesupport (>= 3)
attr_required (>= 0.0.5)
Expand All @@ -925,7 +932,7 @@ GEM
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.2.0)
tilt (2.3.0)
timeout (0.4.0)
tomlrb (2.0.3)
tzinfo (1.2.11)
Expand Down Expand Up @@ -975,23 +982,24 @@ GEM
railties (>= 5.2)
semantic_range (>= 2.3.0)
webrick (1.8.1)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked_pdf (2.6.3)
wicked_pdf (2.7.0)
activesupport
wisper (2.0.1)
wisper-rspec (1.1.0)
wkhtmltopdf-binary (0.12.6.6)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.8)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -1013,6 +1021,7 @@ DEPENDENCIES
decidim-ludens!
decidim-phone_authorization_handler!
decidim-spam_detection
decidim-survey_multiple_answers
decidim-templates (~> 0.26.0)
decidim-term_customizer!
deepl-rb
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ It includes **official modules** supported by the community and **community-base

You can find below an exhaustive list of modules with their repository links and latest version available :

| Decidim Module | Version | Brief description |
|-------------------------------------|---------|------------------------------------------------------------------|
| decidim-core | v0.26.2 |
| decidim-conferences | v0.26.2 |
| [decidim-cache_cleaner](https://github.com/OpenSourcePolitics/decidim-module-cache_cleaner) ||Allow admins to clear cache of the application in the back-office|
| [decidim-decidim_awesome](https://github.com/decidim-ice/decidim-module-decidim_awesome) ||An awesome module that allows (among others) : adding extra-fields for proposals creation, fullscreen iframe component, image in rich text editor, customs redirections etc. |
| [decidim-friendly_signup](https://github.com/OpenSourcePolitics/decidim-module-friendly_signup) ||Module that drastically simplify the registration process of users by deleting some registration fields|
| [decidim-homepage_interactive_map](https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map) ||Module that allow the adding of a content-block on the homepage diplaying a map of assemblies in order to allow geo-located participation |
| [decidim-ludens](https://github.com/OpenSourcePolitics/decidim-ludens) ||Gamified tutorial in the admin back-office to help admins understand how Decidim works|
| [decidim-phone_authorization_handler](https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler) ||Module allowing gathering phone number on a particular participant action|
| [decidim-spam_detection](https://github.com/OpenSourcePolitics/decidim-spam_detection) ||Module adding a spam detection algorithm that runs periodically detecting spam accounts|
| [decidim-term_customizer](https://github.com/mainio/decidim-module-term_customizer) ||Module allowing the change of translated strings |
| [decidim-gallery](https://github.com/alecslupu-pfa/decidim-module-gallery)||Module allowing the creation of galleries |
| Decidim Module | Version | Brief description |
|-------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| decidim-core | v0.26.7 |
| decidim-conferences | v0.26.7 |
| [decidim-cache_cleaner](https://github.com/OpenSourcePolitics/decidim-module-cache_cleaner) || Allow admins to clear cache of the application in the back-office |
| [decidim-decidim_awesome](https://github.com/decidim-ice/decidim-module-decidim_awesome) || An awesome module that allows (among others) : adding extra-fields for proposals creation, fullscreen iframe component, image in rich text editor, customs redirections etc. |
| [decidim-friendly_signup](https://github.com/OpenSourcePolitics/decidim-module-friendly_signup) || Module that drastically simplify the registration process of users by deleting some registration fields |
| [decidim-homepage_interactive_map](https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map) || Module that allow the adding of a content-block on the homepage diplaying a map of assemblies in order to allow geo-located participation |
| [decidim-ludens](https://github.com/OpenSourcePolitics/decidim-ludens) || Gamified tutorial in the admin back-office to help admins understand how Decidim works |
| [decidim-phone_authorization_handler](https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler) || Module allowing gathering phone number on a particular participant action |
| [decidim-spam_detection](https://github.com/OpenSourcePolitics/decidim-spam_detection) || Module adding a spam detection algorithm that runs periodically detecting spam accounts |
| [decidim-survey_multiple_answers](https://github.com/alecslupu-pfa/decidim-module-survey_multiple_answers) || Module allowing users to answer surveys several times |
| [decidim-term_customizer](https://github.com/mainio/decidim-module-term_customizer) || Module allowing the change of translated strings |
| [decidim-gallery](https://github.com/alecslupu-pfa/decidim-module-gallery)|| Module allowing the creation of galleries |


Some non-official customizations can be found see [OVERLOADS.MD](./OVERLOADS.md).
Expand Down
1 change: 1 addition & 0 deletions config/initializers/extends.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
require "extends/cells/decidim/content_blocks/hero_cell_extends"
require "extends/helpers/decidim/forms/application_helper_extends"
require "extends/uploaders/decidim/application_uploader_extends"
require "extends/lib/decidim/proposals/imports/proposal_answer_creator_extends"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

module ProposalAnswerCreatorExtends
def notify
# If the initial state is set to nil, then it will be set to "" as it is a non-answered proposal.
# We still want to use further in the process and cannot read nil values.
state = initial_state || ""
::Decidim::Proposals::Admin::NotifyProposalAnswer.call(resource, state)
end
end

Decidim::Proposals::Import::ProposalAnswerCreator.class_eval do
prepend(ProposalAnswerCreatorExtends)
end
Loading

0 comments on commit 8068b42

Please sign in to comment.