diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fc58d9..4854928 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ on: [ push ] env: CI: "true" SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.7 RAILS_ENV: test NODE_VERSION: 16.9.1 RUBYOPT: '-W:no-deprecated' diff --git a/Gemfile b/Gemfile index 8886f04..c834ca9 100644 --- a/Gemfile +++ b/Gemfile @@ -10,12 +10,11 @@ ruby RUBY_VERSION gem "decidim", "~> #{DECIDIM_VERSION}.0" gem "decidim-conferences", "~> #{DECIDIM_VERSION}.0" -# gem "acts_as_textcaptcha", "~> 4.5.1" +gem "acts_as_textcaptcha", "~> 4.5.1" gem "decidim-budgets_paper_ballots", git: "https://github.com/digidemlab/decidim-module-budgets_paper_ballots", branch: DECIDIM_BRANCH gem "decidim-decidim_awesome" -gem "decidim-half_signup", git: "https://github.com/OpenSourcePolitics/decidim-module-half_sign_up", branch: DECIDIM_BRANCH gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git", branch: DECIDIM_BRANCH -gem "decidim-homepage_proposals", git: "https://github.com/alecslupu-pfa/decidim-module_homepage_proposals", branch: "feature/reset-filters" +gem "decidim-homepage_proposals", git: "https://github.com/alecslupu-pfa/decidim-module_homepage_proposals", branch: "fix/scopes-filter" gem "decidim-phone_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler", branch: DECIDIM_BRANCH gem "decidim-slider", git: "https://github.com/alecslupu-pfa/decidim-module-slider", branch: "main" gem "decidim-spam_detection" @@ -27,7 +26,8 @@ gem "decidim-smsauth", github: "OpenSourcePolitics/decidim-module-ptp", branch: gem "decidim-sms-twilio", github: "OpenSourcePolitics/decidim-module-ptp", branch: "feature/0.26/zip-code-voting" # NOTE: Custom proposal states must be before simple_proposal -gem "decidim-custom_proposal_states", git: "https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states", branch: "chore/fix-module-dependency" +gem "decidim-custom_proposal_states", git: "https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states", branch: DECIDIM_BRANCH +gem "decidim-half_signup", git: "https://github.com/OpenSourcePolitics/decidim-module-half_sign_up", branch: "feat/budget_booth_0.26" gem "decidim-simple_proposal", git: "https://github.com/mainio/decidim-module-simple_proposal", branch: DECIDIM_BRANCH gem "dotenv-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 89c336e..5cad2ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/OpenSourcePolitics/decidim-module-half_sign_up - revision: 61ae2356689beabfd4ff9dd762f86267786a37cc - branch: release/0.26-stable + revision: f32b3a64c50e96a3ab5d157b2536434995b640a9 + branch: feat/budget_booth_0.26 specs: decidim-half_signup (0.26.0) countries (~> 5.1, >= 5.1.2) @@ -9,7 +9,7 @@ GIT GIT remote: https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git - revision: 3bbd5fff51fbfa94ff6e784baa73af190b1c679d + revision: 4e6b7a1a5fcfa0661ba93d1bedb2e09da66d5326 branch: release/0.26-stable specs: decidim-homepage_interactive_map (2.0.0) @@ -21,7 +21,7 @@ GIT GIT remote: https://github.com/OpenSourcePolitics/decidim-module-ptp.git - revision: 6148a817251256d6f536f1f3478c8be895a518b0 + revision: e299a2e963b6feebbbb95c0ce839bff7b2e09edd branch: feature/0.26/zip-code-voting specs: decidim-budgets_booth (0.26.0) @@ -44,29 +44,29 @@ GIT GIT remote: https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states - revision: 5a01dcd0c61f7760adb929d53a6ccdbe6af5b050 - branch: chore/fix-module-dependency + revision: 97fe7d5577b193098dbf9e9a97e0ffaf2e74d34e + branch: release/0.26-stable specs: - decidim-custom_proposal_states (0.26.8) - decidim-core (~> 0.26.0) - decidim-proposals (~> 0.26.0) + decidim-custom_proposal_states (0.26.9) + decidim-core (~> 0.26.9) + decidim-proposals (~> 0.26) deface (>= 1.9) GIT remote: https://github.com/alecslupu-pfa/decidim-module-slider - revision: 1004d0abff85b74e323d00bc14bd2aa35eb0fdce + revision: 63e29e03b2bc300f4941a079ecb993cab006e254 branch: main specs: - decidim-slider (0.0.2) + decidim-slider (0.0.3) decidim-core (~> 0.26.0) GIT remote: https://github.com/alecslupu-pfa/decidim-module_homepage_proposals - revision: 1e5753b2db6caaba5b38c7de7865de8cf22c11db - branch: feature/reset-filters + revision: 986382bc6c2076f17346939139d5426c5e5d0e84 + branch: fix/scopes-filter specs: decidim-homepage_proposals (1.0.2) - decidim-core (~> 0.26) + decidim-core (~> 0.26.9) GIT remote: https://github.com/digidemlab/decidim-module-budgets_paper_ballots @@ -88,7 +88,7 @@ GIT GIT remote: https://github.com/opensourcepolitics/decidim-module-term_customizer.git - revision: f5208f3cad23cb68e502e77cb0d2d3d441d09e40 + revision: 11724f312f77a0a9199d0c79538058e0e5ae10c8 branch: fix/multi-threading-compliant-0.26 specs: decidim-term_customizer (0.26.0) @@ -150,9 +150,9 @@ GEM activejob (6.0.6.1) activesupport (= 6.0.6.1) globalid (>= 0.3.6) - activejob-uniqueness (0.2.5) - activejob (>= 4.2, < 7.1) - redlock (>= 1.2, < 2) + activejob-uniqueness (0.3.1) + activejob (>= 4.2, < 7.2) + redlock (>= 2.0, < 3) activemodel (6.0.6.1) activesupport (= 6.0.6.1) activerecord (6.0.6.1) @@ -171,24 +171,25 @@ GEM zeitwerk (~> 2.2, >= 2.2.2) acts_as_list (0.9.19) activerecord (>= 3.0) - addressable (2.8.4) + acts_as_textcaptcha (4.5.2) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - aws-eventstream (1.2.0) - aws-partitions (1.769.0) - aws-sdk-core (3.173.1) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.921.0) + aws-sdk-core (3.193.0) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.64.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-kms (1.80.0) + aws-sdk-core (~> 3, >= 3.193.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.122.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.148.0) + aws-sdk-core (~> 3, >= 3.193.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) axe-core-api (4.7.0) dumb_delegator @@ -201,8 +202,9 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) + base64 (0.2.0) batch-loader (1.5.0) - bcrypt (3.1.18) + bcrypt (3.1.20) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -211,14 +213,15 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.7) bindex (0.8.1) - bootsnap (1.16.0) + bootsnap (1.18.3) msgpack (~> 1.2) brakeman (5.4.1) browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.39.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -227,7 +230,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.3) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -247,7 +250,7 @@ GEM actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (18.2.7) + chef-utils (18.4.12) concurrent-ruby childprocess (3.0.0) coercible (1.0.0) @@ -259,75 +262,76 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.1) - countries (5.4.0) + countries (5.7.2) unaccent (~> 0.3) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.14.0) + css_parser (1.17.1) addressable - dalli (3.2.4) - date (3.3.3) + dalli (3.2.8) + date (3.3.4) date_validator (0.9.0) activemodel activesupport db-query-matchers (0.10.0) activesupport (>= 4.0, < 7) rspec (~> 3.0) - decidim (0.26.7) - decidim-accountability (= 0.26.7) - decidim-admin (= 0.26.7) - decidim-api (= 0.26.7) - decidim-assemblies (= 0.26.7) - decidim-blogs (= 0.26.7) - decidim-budgets (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-debates (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-generators (= 0.26.7) - decidim-meetings (= 0.26.7) - decidim-pages (= 0.26.7) - decidim-participatory_processes (= 0.26.7) - decidim-proposals (= 0.26.7) - decidim-sortitions (= 0.26.7) - decidim-surveys (= 0.26.7) - decidim-system (= 0.26.7) - decidim-templates (= 0.26.7) - decidim-verifications (= 0.26.7) - decidim-accountability (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-admin (0.26.7) + decidim (0.26.9) + decidim-accountability (= 0.26.9) + decidim-admin (= 0.26.9) + decidim-api (= 0.26.9) + decidim-assemblies (= 0.26.9) + decidim-blogs (= 0.26.9) + decidim-budgets (= 0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-debates (= 0.26.9) + decidim-forms (= 0.26.9) + decidim-generators (= 0.26.9) + decidim-meetings (= 0.26.9) + decidim-pages (= 0.26.9) + decidim-participatory_processes (= 0.26.9) + decidim-proposals (= 0.26.9) + decidim-sortitions (= 0.26.9) + decidim-surveys (= 0.26.9) + decidim-system (= 0.26.9) + decidim-templates (= 0.26.9) + decidim-verifications (= 0.26.9) + decidim-accountability (0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-admin (0.26.9) active_link_to (~> 1.0) - decidim-core (= 0.26.7) + decidim-core (= 0.26.9) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-api (0.26.7) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-api (0.26.9) graphql (~> 1.12, < 1.13) rack-cors (~> 1.0) redcarpet (~> 3.5, >= 3.5.1) - decidim-assemblies (0.26.7) - decidim-core (= 0.26.7) - decidim-blogs (0.26.7) - decidim-admin (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-budgets (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-comments (0.26.7) - decidim-core (= 0.26.7) + decidim-assemblies (0.26.9) + decidim-core (= 0.26.9) + decidim-blogs (0.26.9) + decidim-admin (= 0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-budgets (0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-comments (0.26.9) + decidim-core (= 0.26.9) redcarpet (~> 3.5, >= 3.5.1) - decidim-conferences (0.26.7) - decidim-core (= 0.26.7) - decidim-meetings (= 0.26.7) + decidim-conferences (0.26.9) + decidim-core (= 0.26.9) + decidim-meetings (= 0.26.9) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-core (0.26.7) + decidim-core (0.26.9) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) @@ -337,7 +341,7 @@ GEM cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) date_validator (~> 0.9.0) - decidim-api (= 0.26.7) + decidim-api (= 0.26.9) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) @@ -379,19 +383,21 @@ GEM valid_email2 (~> 2.1) webpacker (= 6.0.0.rc.5) wisper (~> 2.0) - decidim-debates (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-decidim_awesome (0.9.1) + decidim-debates (0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-decidim_awesome (0.10.2) decidim-admin (>= 0.26.0, < 0.28) decidim-core (>= 0.26.0, < 0.28) + deface (>= 1.5) sassc (~> 2.3) - decidim-dev (0.26.7) + decidim-dev (0.26.9) + axe-core-api (~> 4.7.0) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.26.7) + decidim (= 0.26.9) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) @@ -414,47 +420,47 @@ GEM w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-forms (0.26.7) - decidim-core (= 0.26.7) + decidim-forms (0.26.9) + decidim-core (= 0.26.9) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.26.7) - decidim-core (= 0.26.7) - decidim-meetings (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) + decidim-generators (0.26.9) + decidim-core (= 0.26.9) + decidim-meetings (0.26.9) + decidim-core (= 0.26.9) + decidim-forms (= 0.26.9) icalendar (~> 2.5) - decidim-pages (0.26.7) - decidim-core (= 0.26.7) - decidim-participatory_processes (0.26.7) - decidim-core (= 0.26.7) - decidim-proposals (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) + decidim-pages (0.26.9) + decidim-core (= 0.26.9) + decidim-participatory_processes (0.26.9) + decidim-core (= 0.26.9) + decidim-proposals (0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) doc2text (~> 0.4.4) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.26.7) - decidim-admin (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-proposals (= 0.26.7) + decidim-sortitions (0.26.9) + decidim-admin (= 0.26.9) + decidim-comments (= 0.26.9) + decidim-core (= 0.26.9) + decidim-proposals (= 0.26.9) decidim-spam_detection (3.1.0) decidim-core (~> 0.26.0) - decidim-surveys (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-templates (= 0.26.7) - decidim-system (0.26.7) + decidim-surveys (0.26.9) + decidim-core (= 0.26.9) + decidim-forms (= 0.26.9) + decidim-templates (= 0.26.9) + decidim-system (0.26.9) active_link_to (~> 1.0) - decidim-core (= 0.26.7) + decidim-core (= 0.26.9) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-templates (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-verifications (0.26.7) - decidim-core (= 0.26.7) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-templates (0.26.9) + decidim-core (= 0.26.9) + decidim-forms (= 0.26.9) + decidim-verifications (0.26.9) + decidim-core (= 0.26.9) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -466,24 +472,24 @@ GEM rainbow (>= 2.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.9.2) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.11.0) + devise-i18n (1.12.0) devise (>= 4.9.0) - devise_invitable (2.0.8) + devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) - doc2text (0.4.6) - nokogiri (>= 1.13.2, < 1.15.0) + doc2text (0.4.7) + nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.6) + doorkeeper (5.7.0) railties (>= 5) doorkeeper-i18n (4.0.1) dotenv (2.8.1) @@ -503,10 +509,10 @@ GEM erbse (0.1.4) temple erubi (1.12.0) - et-orbi (1.2.7) + et-orbi (1.2.11) tzinfo - excon (0.99.0) - execjs (2.8.1) + excon (0.110.0) + execjs (2.9.1) factory_bot (4.11.1) activesupport (>= 3.0.0) factory_bot_rails (4.11.1) @@ -514,19 +520,20 @@ GEM railties (>= 3.0.0) faker (2.23.0) i18n (>= 1.8.11, < 2) - faraday (2.7.5) + faraday (2.8.1) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) - ffi (1.15.5) + ffi (1.16.3) file_validators (2.3.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-aws (3.19.0) + fog-aws (3.22.0) fog-core (~> 2.1) fog-json (~> 1.1) fog-xml (~> 0.1) - fog-core (2.3.0) + fog-core (2.4.0) builder excon (~> 0.71) formatador (>= 0.2, < 2.0) @@ -540,20 +547,20 @@ GEM fog-core nokogiri (>= 1.5.11, < 2.0.0) formatador (1.1.0) - fugit (1.8.1) - et-orbi (~> 1, >= 1.2.7) + fugit (1.11.0) + et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) geocoder (1.7.5) globalid (1.1.0) activesupport (>= 5.0) graphql (1.12.24) - hashdiff (1.0.1) + hashdiff (1.1.0) hashie (5.0.0) highline (2.1.0) hiredis (0.6.3) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) htmlentities (4.3.4) - i18n (1.13.0) + i18n (1.14.4) concurrent-ruby (~> 1.0) i18n-tasks (0.9.37) activesupport (>= 4.0.2) @@ -565,7 +572,7 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.8.0) + icalendar (2.10.1) ice_cube (~> 0.16) ice_cube (0.16.4) ice_nine (0.11.2) @@ -575,7 +582,7 @@ GEM invisible_captcha (0.13.0) rails (>= 3.2.0) jmespath (1.6.2) - json (2.6.3) + json (2.7.2) jwt (2.5.0) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -595,16 +602,16 @@ GEM kramdown (~> 2.0) launchy (2.5.2) addressable (~> 2.8) - letter_opener (1.8.1) - launchy (>= 2.2, < 3) + letter_opener (1.10.0) + launchy (>= 2.2, < 4) letter_opener_web (1.4.1) actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - lograge (0.12.0) + lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) railties (>= 4) @@ -617,48 +624,46 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) - mdl (0.12.0) + mdl (0.13.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) mixlib-cli (~> 2.1, >= 2.1.1) mixlib-config (>= 2.2.1, < 4) mixlib-shellout - method_source (1.0.0) - mime-types (3.4.1) + method_source (1.1.0) + mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) + mime-types-data (3.2024.0305) mini_magick (4.12.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.0) + mini_mime (1.1.5) + mini_portile2 (2.8.6) + minitest (5.22.3) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb mixlib-shellout (3.2.7) chef-utils - msgpack (1.7.1) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) mustache (1.1.1) net-http (0.4.1) uri - net-imap (0.3.4) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.0) net-protocol - nio4r (2.5.9) + nio4r (2.7.1) nokogiri (1.13.4) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.4-arm64-darwin) - racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) snaky_hash (~> 2.0) @@ -672,17 +677,17 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.1) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) + omniauth-google-oauth2 (1.1.2) jwt (>= 2.0) - oauth2 (~> 2.0.6) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) + omniauth-oauth2 (~> 1.8) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) @@ -702,10 +707,11 @@ GEM paper_trail (12.3.0) activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.23.0) - parser (3.2.2.1) + parallel (1.24.0) + parser (3.3.1.0) ast (~> 2.4.1) - passenger (6.0.17) + racc + passenger (6.0.20) rack rake (>= 0.8.1) pg (1.1.4) @@ -713,7 +719,7 @@ GEM activerecord (>= 5.2) activesupport (>= 5.2) polyglot (0.3.5) - premailer (1.21.0) + premailer (1.22.0) addressable css_parser (>= 1.12.0) htmlentities (>= 4.0.0) @@ -721,19 +727,20 @@ GEM actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) - public_suffix (5.0.1) - puma (5.6.5) + public_suffix (5.0.5) + puma (5.6.8) nio4r (~> 2.0) raabro (1.4.0) - racc (1.6.2) - rack (2.2.7) - rack-attack (6.6.1) - rack (>= 1.0, < 3) + racc (1.7.3) + rack (2.2.9) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (3.0.6) - rack - rack-proxy (0.7.6) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-proxy (0.7.7) rack rack-test (2.1.0) rack (>= 1.3) @@ -756,8 +763,9 @@ GEM actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.4.3) loofah (~> 2.3) @@ -771,7 +779,7 @@ GEM rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.1.1) - rake (13.0.6) + rake (13.2.1) ransack (2.4.2) activerecord (>= 5.2.4) activesupport (>= 5.2.4) @@ -787,37 +795,39 @@ GEM wisper (>= 1.6.1) redcarpet (3.6.0) redis (4.8.1) - redlock (1.3.2) - redis (>= 3.0.0, < 6.0) - regexp_parser (2.8.0) - repost (0.4.1) + redis-client (0.22.1) + connection_pool + redlock (2.0.6) + redis-client (>= 0.14.1, < 1.0.0) + regexp_parser (2.9.0) + repost (0.4.2) request_store (1.5.1) rack (>= 1.4) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) + rexml (3.2.6) rgeo (2.4.0) rgeo-proj4 (3.1.1) rgeo (~> 2.0) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-cells (0.3.8) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) - rspec-rails (>= 3.0.0, < 6.1.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rspec-rails (>= 3.0.0, < 6.2.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.5) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -828,7 +838,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.0) + rspec-support (3.13.1) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.92.0) @@ -840,8 +850,8 @@ GEM rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.28.1) - parser (>= 3.2.1.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-faker (1.1.0) faker (>= 2.12.0) rubocop (>= 0.82.0) @@ -855,14 +865,14 @@ GEM ruby-saml (1.14.0) nokogiri (>= 1.10.5) rexml - ruby-vips (2.1.4) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) - rubyXL (3.4.25) + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) - rufus-scheduler (3.8.2) + rufus-scheduler (3.9.1) fugit (~> 1.1, >= 1.1.6) sassc (2.4.0) ffi (~> 1.9) @@ -871,20 +881,21 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) semantic_range (3.0.0) - sentry-rails (5.9.0) + sentry-rails (5.17.3) railties (>= 5.0) - sentry-ruby (~> 5.9.0) - sentry-ruby (5.9.0) + sentry-ruby (~> 5.17.3) + sentry-ruby (5.17.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-sidekiq (5.9.0) - sentry-ruby (~> 5.9.0) + sentry-sidekiq (5.17.3) + sentry-ruby (~> 5.17.3) sidekiq (>= 3.0) seven_zip_ruby (1.3.0) - sidekiq (6.5.8) + sidekiq (6.5.12) connection_pool (>= 2.2.5, < 3) rack (~> 2.0) redis (>= 4.5.0, < 5) - sidekiq-scheduler (5.0.2) + sidekiq-scheduler (5.0.3) rufus-scheduler (~> 3.2) sidekiq (>= 6, < 8) tilt (>= 1.4.0) @@ -904,25 +915,25 @@ 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) - sys-filesystem (1.4.3) + ssrf_filter (1.1.2) + sys-filesystem (1.4.4) ffi (~> 1.1) system_test_html_screenshots (0.2.0) actionpack (>= 5.2, < 6.1.a) - temple (0.10.1) + temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.2.2) + thor (1.3.1) thread_safe (0.3.6) - tilt (2.1.0) - timeout (0.3.2) + tilt (2.3.0) + timeout (0.4.1) tomlrb (2.0.3) twilio-ruby (5.72.1) faraday (>= 0.9, < 3.0) @@ -939,7 +950,7 @@ GEM valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.2) + version_gem (1.1.4) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) @@ -960,7 +971,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.18.1) + webmock (3.23.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -969,24 +980,24 @@ GEM rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) - 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.8.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.13) PLATFORMS - arm64-darwin-22 ruby DEPENDENCIES activejob-uniqueness + acts_as_textcaptcha (~> 4.5.1) aws-sdk-s3 bootsnap (~> 1.4) brakeman (~> 5.1) diff --git a/OVERLOADS.md b/OVERLOADS.md index 0cb89b3..102ec45 100644 --- a/OVERLOADS.md +++ b/OVERLOADS.md @@ -127,3 +127,6 @@ de6d804 - fix multipart object tagging (#40) (#41), 2021-12-24 * `lib/tasks/restore_dump.rake` 705e0ad - Run rubocop, 2021-12-01 + +* `app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb` +Local backport of https://github.com/decidim/decidim/commit/420623d647d2020665cfbaa118514f5e92672c68 \ No newline at end of file diff --git a/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb b/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb new file mode 100644 index 0000000..7440b12 --- /dev/null +++ b/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +module Decidim + module Forms + module Admin + module Concerns + # Questionnaires can be related to any class in Decidim, in order to + # manage the questionnaires for a given type, you should create a new + # controller and include this concern. + # + # The only requirement is to define a `questionnaire_for` method that + # returns an instance of the model that questionnaire belongs to. + module HasQuestionnaire + extend ActiveSupport::Concern + + included do + helper Decidim::Forms::Admin::ApplicationHelper + include Decidim::TranslatableAttributes + + helper_method :questionnaire_for, :questionnaire, :blank_question, :blank_answer_option, :blank_matrix_row, + :blank_display_condition, :question_types, :display_condition_types, :update_url, :public_url, :answer_options_url, :edit_questionnaire_title + + if defined?(Decidim::Templates::Admin::Concerns::Templatable) + include Decidim::Templates::Admin::Concerns::Templatable + helper Decidim::Templates::Admin::TemplatesHelper + + def templatable_type + "Decidim::Forms::Questionnaire" + end + + def templatable + questionnaire + end + end + + def edit + enforce_permission_to :update, :questionnaire, questionnaire: questionnaire + + @form = form(Admin::QuestionnaireForm).from_model(questionnaire) + + render template: "decidim/forms/admin/questionnaires/edit" + end + + def update + enforce_permission_to :update, :questionnaire, questionnaire: questionnaire + + params["published_at"] = Time.current if params.has_key? "save_and_publish" + @form = form(Admin::QuestionnaireForm).from_params(params) + + Admin::UpdateQuestionnaire.call(@form, questionnaire) do + on(:ok) do + # i18n-tasks-use t("decidim.forms.admin.questionnaires.update.success") + flash[:notice] = I18n.t("update.success", scope: i18n_flashes_scope) + redirect_to after_update_url + end + + on(:invalid) do + # i18n-tasks-use t("decidim.forms.admin.questionnaires.update.invalid") + flash.now[:alert] = I18n.t("update.invalid", scope: i18n_flashes_scope) + render template: "decidim/forms/admin/questionnaires/edit" + end + end + end + + def answer_options + respond_to do |format| + format.json do + question_id = params["id"] + question = Question.find_by(id: question_id) + render json: question.answer_options.map { |answer_option| AnswerOptionPresenter.new(answer_option).as_json } if question.present? + end + end + end + + # Public: The only method to be implemented at the controller. You need to + # return the object that will hold the questionnaire. + def questionnaire_for + raise "#{self.class.name} is expected to implement #questionnaire_for" + end + + # You can implement this method in your controller to change the URL + # where the questionnaire will be submitted. + def update_url + url_for(questionnaire.questionnaire_for) + end + + # You can implement this method in your controller to change the URL + # where the user will be redirected after updating the questionnaire + def after_update_url + url_for(questionnaire.questionnaire_for) + end + + # Implement this method in your controller to set the URL + # where the questionnaire can be answered. + def public_url + raise "#{self.class.name} is expected to implement #public_url" + end + + # Returns the url to get the answer options json (for the display conditions form) + # for the question with id = params[:id] + def answer_options_url(params) + url_for([questionnaire.questionnaire_for, { action: :answer_options, format: :json, **params }]) + end + + # Implement this method in your controller to set the title + # of the edit form. + def edit_questionnaire_title + t(:title, scope: "decidim.forms.admin.questionnaires.form", questionnaire_for: translated_attribute(questionnaire_for.try(:title))) + end + + private + + def i18n_flashes_scope + "decidim.forms.admin.questionnaires" + end + + def questionnaire + @questionnaire ||= Questionnaire.find_by(questionnaire_for: questionnaire_for) + end + + def blank_question + @blank_question ||= Admin::QuestionForm.new + end + + def blank_answer_option + @blank_answer_option ||= Admin::AnswerOptionForm.new + end + + def blank_display_condition + @blank_display_condition ||= Admin::DisplayConditionForm.new + end + + def blank_matrix_row + @blank_matrix_row ||= Admin::QuestionMatrixRowForm.new + end + + def question_types + @question_types ||= Question::QUESTION_TYPES.map do |question_type| + [question_type, I18n.t("decidim.forms.question_types.#{question_type}")] + end + end + + def display_condition_types + @display_condition_types ||= DisplayCondition.condition_types.keys.map do |condition_type| + [condition_type, I18n.t("decidim.forms.admin.questionnaires.display_condition.condition_types.#{condition_type}")] + end + end + end + end + end + end + end +end diff --git a/app/views/decidim/budgets/projects/index.html.erb b/app/views/decidim/budgets/projects/index.html.erb deleted file mode 100644 index 82f174d..0000000 --- a/app/views/decidim/budgets/projects/index.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<%= render partial: "decidim/shared/component_announcement" %> - -<% cell("decidim/budgets/limit_announcement", budget) %> - -
"> -
- <% if voting_finished? %> -

- <%= t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %> -

- <% else %> - <%= render partial: "budget_summary" %> - <%= render partial: "cancel_voting_modal" %> - <% end %> -
- -
-

- <%= render partial: "count" %> -

-
- -
-
- <%= render partial: "projects" %> -
-
-
-<%= render partial: "decidim/budgets/partials/voting_help_modal" unless current_workflow.try(:disable_voting_instructions?) %> - -<%= javascript_pack_tag("decidim_budgets_booth_voting") %> \ No newline at end of file diff --git a/app/views/layouts/decidim/_language_chooser.html.erb b/app/views/layouts/decidim/_language_chooser.html.erb index 3d29f4f..66daecf 100644 --- a/app/views/layouts/decidim/_language_chooser.html.erb +++ b/app/views/layouts/decidim/_language_chooser.html.erb @@ -82,7 +82,4 @@
-
-
-
<% end %> diff --git a/app/views/layouts/decidim/_wrapper.html.erb b/app/views/layouts/decidim/_wrapper.html.erb index ed1e795..67df05b 100644 --- a/app/views/layouts/decidim/_wrapper.html.erb +++ b/app/views/layouts/decidim/_wrapper.html.erb @@ -60,6 +60,9 @@ end
<%= render partial: "layouts/decidim/logo", locals: { organization: current_organization } %>
+
+
+
+ + <% if current_user %> -
-
-
<%= render partial: "layouts/decidim/social_media_links" %> <%= render partial: "layouts/decidim/admin_links" %>