From 28408923b0092741f4faf4c6aee7079d6674aac9 Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Tue, 27 Oct 2020 15:47:20 +0100 Subject: [PATCH 01/10] Update to decidim@0.22 --- Gemfile | 8 +- Gemfile.lock | 264 +++++++++--------- ...138_create_decidim_endorsements.decidim.rb | 14 + ...3139_add_session_token_to_users.decidim.rb | 8 + ...d_direct_message_types_to_users.decidim.rb | 13 + ...ign_keys_in_decidim_action_logs.decidim.rb | 10 + ...eign_keys_in_decidim_amendments.decidim.rb | 8 + ..._keys_in_decidim_authorizations.decidim.rb | 8 + ...ecidim_contextual_help_sections.decidim.rb | 8 + ...gn_keys_in_decidim_endorsements.decidim.rb | 8 + ...n_keys_in_decidim_notifications.decidim.rb | 8 + ...ign_keys_in_oauth_access_grants.decidim.rb | 8 + ..._add_id_to_content_blocks_scope.decidim.rb | 8 + ...01027143149_rename_scope_column.decidim.rb | 8 + ...igrate_newsletters_to_templates.decidim.rb | 34 +++ ...27143151_remove_newsletter_body.decidim.rb | 8 + ...index_on_content_block_scope_id.decidim.rb | 12 + ...orms_question_matrix_rows.decidim_forms.rb | 12 + ...idim_forms_answer_choices.decidim_forms.rb | 12 + ...chments.decidim_participatory_processes.rb | 8 + ...r_roles.decidim_participatory_processes.rb | 8 + ...ocesses.decidim_participatory_processes.rb | 9 + ...n_decidim_assemblies.decidim_assemblies.rb | 8 + ..._assembly_user_roles.decidim_assemblies.rb | 8 + ...ecidim_assembly_type.decidim_assemblies.rb | 9 + ..._assemblies_settings.decidim_assemblies.rb | 11 + ...idim_comments_comments.decidim_comments.rb | 8 + ...meetings_registrations.decidim_meetings.rb | 8 + ...er_cache_to_proposals.decidim_proposals.rb | 8 + ..._to_core_endorsements.decidim_proposals.rb | 53 ++++ ...source_endorsed_event.decidim_proposals.rb | 21 ++ ...167_check_legacy_tables.decidim_surveys.rb | 114 ++++++++ ...e_survey_answer_choices.decidim_surveys.rb | 8 + ...e_survey_answer_options.decidim_surveys.rb | 8 + ...0_remove_survey_answers.decidim_surveys.rb | 8 + ...remove_survey_questions.decidim_surveys.rb | 8 + ...2_remove_survey_columns.decidim_surveys.rb | 11 + ...tability_results.decidim_accountability.rb | 8 + ...decidim_debates_debates.decidim_debates.rb | 8 + ...ortitions_sortitions.decidim_sortitions.rb | 8 + ...ts_counter_cache_to_blogs.decidim_blogs.rb | 8 + ...ys_in_decidim_blogs_posts.decidim_blogs.rb | 8 + ...nsultations_votes.decidim_consultations.rb | 8 + db/schema.rb | 113 ++++---- 44 files changed, 752 insertions(+), 184 deletions(-) create mode 100644 db/migrate/20201027143138_create_decidim_endorsements.decidim.rb create mode 100644 db/migrate/20201027143139_add_session_token_to_users.decidim.rb create mode 100644 db/migrate/20201027143140_add_direct_message_types_to_users.decidim.rb create mode 100644 db/migrate/20201027143141_index_foreign_keys_in_decidim_action_logs.decidim.rb create mode 100644 db/migrate/20201027143142_index_foreign_keys_in_decidim_amendments.decidim.rb create mode 100644 db/migrate/20201027143143_index_foreign_keys_in_decidim_authorizations.decidim.rb create mode 100644 db/migrate/20201027143144_index_foreign_keys_in_decidim_contextual_help_sections.decidim.rb create mode 100644 db/migrate/20201027143145_index_foreign_keys_in_decidim_endorsements.decidim.rb create mode 100644 db/migrate/20201027143146_index_foreign_keys_in_decidim_notifications.decidim.rb create mode 100644 db/migrate/20201027143147_index_foreign_keys_in_oauth_access_grants.decidim.rb create mode 100644 db/migrate/20201027143148_add_id_to_content_blocks_scope.decidim.rb create mode 100644 db/migrate/20201027143149_rename_scope_column.decidim.rb create mode 100644 db/migrate/20201027143150_migrate_newsletters_to_templates.decidim.rb create mode 100644 db/migrate/20201027143151_remove_newsletter_body.decidim.rb create mode 100644 db/migrate/20201027143152_add_index_on_content_block_scope_id.decidim.rb create mode 100644 db/migrate/20201027143153_create_decidim_forms_question_matrix_rows.decidim_forms.rb create mode 100644 db/migrate/20201027143154_add_matrix_row_id_to_decidim_forms_answer_choices.decidim_forms.rb create mode 100644 db/migrate/20201027143155_index_foreign_keys_in_decidim_attachments.decidim_participatory_processes.rb create mode 100644 db/migrate/20201027143156_index_foreign_keys_in_decidim_participatory_process_user_roles.decidim_participatory_processes.rb create mode 100644 db/migrate/20201027143157_index_foreign_keys_in_decidim_participatory_processes.decidim_participatory_processes.rb create mode 100644 db/migrate/20201027143158_index_foreign_keys_in_decidim_assemblies.decidim_assemblies.rb create mode 100644 db/migrate/20201027143159_index_foreign_keys_in_decidim_assembly_user_roles.decidim_assemblies.rb create mode 100644 db/migrate/20201027143160_remove_legacy_decidim_assembly_type.decidim_assemblies.rb create mode 100644 db/migrate/20201027143161_create_decidim_assemblies_settings.decidim_assemblies.rb create mode 100644 db/migrate/20201027143162_index_foreign_keys_in_decidim_comments_comments.decidim_comments.rb create mode 100644 db/migrate/20201027143163_index_foreign_keys_in_decidim_meetings_registrations.decidim_meetings.rb create mode 100644 db/migrate/20201027143164_add_endorsements_counter_cache_to_proposals.decidim_proposals.rb create mode 100644 db/migrate/20201027143165_move_proposal_endorsements_to_core_endorsements.decidim_proposals.rb create mode 100644 db/migrate/20201027143166_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.decidim_proposals.rb create mode 100644 db/migrate/20201027143167_check_legacy_tables.decidim_surveys.rb create mode 100644 db/migrate/20201027143168_remove_survey_answer_choices.decidim_surveys.rb create mode 100644 db/migrate/20201027143169_remove_survey_answer_options.decidim_surveys.rb create mode 100644 db/migrate/20201027143170_remove_survey_answers.decidim_surveys.rb create mode 100644 db/migrate/20201027143171_remove_survey_questions.decidim_surveys.rb create mode 100644 db/migrate/20201027143172_remove_survey_columns.decidim_surveys.rb create mode 100644 db/migrate/20201027143173_index_foreign_keys_in_decidim_accountability_results.decidim_accountability.rb create mode 100644 db/migrate/20201027143174_index_foreign_keys_in_decidim_debates_debates.decidim_debates.rb create mode 100644 db/migrate/20201027143175_index_foreign_keys_in_decidim_sortitions_sortitions.decidim_sortitions.rb create mode 100644 db/migrate/20201027143176_add_endorsements_counter_cache_to_blogs.decidim_blogs.rb create mode 100644 db/migrate/20201027143177_index_foreign_keys_in_decidim_blogs_posts.decidim_blogs.rb create mode 100644 db/migrate/20201027143178_index_foreign_keys_in_decidim_consultations_votes.decidim_consultations.rb diff --git a/Gemfile b/Gemfile index 75515cd5e..25ec2cddd 100644 --- a/Gemfile +++ b/Gemfile @@ -4,10 +4,10 @@ source "https://rubygems.org" ruby RUBY_VERSION -gem "decidim", "0.21.0" -gem "decidim-consultations", "0.21.0" +gem "decidim", "0.22.0" +gem "decidim-consultations", "0.22.0" -gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator" +gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator", branch: "feature/decidim-0.22" gem "decidim-direct_verifications", github: "Platoniq/decidim-verifications-direct_verifications", branch: "devel" gem "bootsnap", "~> 1.3" @@ -21,7 +21,7 @@ gem "faker", "~> 1.9" group :development, :test do gem "byebug", "~> 11.0", platform: :mri - gem "decidim-dev", "0.21.0" + gem "decidim-dev", "0.22.0" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 2838c1a60..67ab7394a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,12 +9,13 @@ GIT GIT remote: git://github.com/coopdevs/decidim-module-action_delegator.git - revision: 4ca9d503cb68a4514c8eb6226d73bfa102837717 + revision: c85cc84f4ab92b8557f0956c3df010420071062a + branch: feature/decidim-0.22 specs: decidim-action_delegator (0.1) - decidim-admin (= 0.21.0) - decidim-consultations (= 0.21.0) - decidim-core (= 0.21.0) + decidim-admin (= 0.22.0) + decidim-consultations (= 0.22.0) + decidim-core (= 0.22.0) savon twilio-ruby @@ -125,6 +126,7 @@ GEM actionpack (>= 3.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) + chef-utils (16.6.14) childprocess (3.0.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) @@ -137,8 +139,7 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.1.7) connection_pool (2.2.3) - crack (0.4.3) - safe_yaml (~> 1.0.0) + crack (0.4.4) crass (1.0.6) css_parser (1.7.1) addressable @@ -149,69 +150,69 @@ GEM db-query-matchers (0.9.0) activesupport (>= 4.0, <= 6.0) rspec (~> 3.0) - decidim (0.21.0) - decidim-accountability (= 0.21.0) - decidim-admin (= 0.21.0) - decidim-api (= 0.21.0) - decidim-assemblies (= 0.21.0) - decidim-blogs (= 0.21.0) - decidim-budgets (= 0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - decidim-debates (= 0.21.0) - decidim-forms (= 0.21.0) - decidim-generators (= 0.21.0) - decidim-meetings (= 0.21.0) - decidim-pages (= 0.21.0) - decidim-participatory_processes (= 0.21.0) - decidim-proposals (= 0.21.0) - decidim-sortitions (= 0.21.0) - decidim-surveys (= 0.21.0) - decidim-system (= 0.21.0) - decidim-verifications (= 0.21.0) - decidim-accountability (0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - kaminari (~> 1.1) + decidim (0.22.0) + decidim-accountability (= 0.22.0) + decidim-admin (= 0.22.0) + decidim-api (= 0.22.0) + decidim-assemblies (= 0.22.0) + decidim-blogs (= 0.22.0) + decidim-budgets (= 0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + decidim-debates (= 0.22.0) + decidim-forms (= 0.22.0) + decidim-generators (= 0.22.0) + decidim-meetings (= 0.22.0) + decidim-pages (= 0.22.0) + decidim-participatory_processes (= 0.22.0) + decidim-proposals (= 0.22.0) + decidim-sortitions (= 0.22.0) + decidim-surveys (= 0.22.0) + decidim-system (= 0.22.0) + decidim-verifications (= 0.22.0) + decidim-accountability (0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + kaminari (~> 1.2, >= 1.2.1) searchlight (~> 4.1) - decidim-admin (0.21.0) + decidim-admin (0.22.0) active_link_to (~> 1.0) - decidim-core (= 0.21.0) + decidim-core (= 0.22.0) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 1.7) jquery-rails (~> 4.3) - sassc (~> 1.12, >= 1.12.1) - sassc-rails (~> 1.3) - decidim-api (0.21.0) + sassc (~> 2.3.0) + sassc-rails (~> 2.1.2) + decidim-api (0.22.0) graphiql-rails (~> 1.4, < 1.5) graphql (~> 1.9) rack-cors (~> 1.0) redcarpet (~> 3.4) sprockets-es6 (~> 0.9.2) - decidim-assemblies (0.21.0) - decidim-core (= 0.21.0) - decidim-blogs (0.21.0) - decidim-admin (= 0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) + decidim-assemblies (0.22.0) + decidim-core (= 0.22.0) + decidim-blogs (0.22.0) + decidim-admin (= 0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) httparty (~> 0.17) jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.1) - decidim-budgets (0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - kaminari (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) + decidim-budgets (0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + kaminari (~> 1.2, >= 1.2.1) searchlight (~> 4.1) - decidim-comments (0.21.0) - decidim-core (= 0.21.0) + decidim-comments (0.22.0) + decidim-core (= 0.22.0) jquery-rails (~> 4.3) redcarpet (~> 3.4) - decidim-consultations (0.21.0) - decidim-admin (= 0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - decidim-core (0.21.0) + decidim-consultations (0.22.0) + decidim-admin (= 0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + decidim-core (0.22.0) active_link_to (~> 1.0) anchored (>= 1.1.0) autoprefixer-rails (~> 8.0) @@ -222,7 +223,7 @@ GEM cells-rails (~> 0.0.9) charlock_holmes (~> 0.7) date_validator (~> 0.9.0) - decidim-api (= 0.21.0) + decidim-api (= 0.22.0) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) @@ -230,13 +231,13 @@ GEM doorkeeper-i18n (~> 4.0) etherpad-lite (~> 0.3) file_validators (~> 2.1) - foundation-rails (~> 6.4, < 6.5) + foundation-rails (~> 6.6, < 6.7) foundation_rails_helper (~> 3.0) geocoder (>= 1.5) hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) jquery-rails (~> 4.3) - kaminari (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) loofah (~> 2.3.1) mini_magick (~> 4.9) mustache (~> 1.1.0) @@ -252,13 +253,13 @@ GEM premailer-rails (~> 1.10) rack (>= 2.0.8) rack-attack (~> 6.0) - rails (>= 5.2, < 6.0.x) + rails (>= 5.2.4.3, < 6.0.x) rails-i18n (~> 5.0) rectify (~> 0.13.0) redis (~> 4.1) rubyzip (~> 2.0) - sassc (~> 1.12, >= 1.12.1) - sassc-rails (~> 1.3) + sassc (~> 2.3.0) + sassc-rails (~> 2.1.2) seven_zip_ruby (~> 1.2, >= 1.2.2) social-share-button (~> 1.2, >= 1.2.1) spreadsheet (~> 1.2) @@ -268,20 +269,20 @@ GEM uglifier (~> 4.1) valid_email2 (~> 2.1) wisper (~> 2.0) - decidim-debates (0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - kaminari (~> 1.1) + decidim-debates (0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + kaminari (~> 1.2, >= 1.2.1) searchlight (~> 4.1) - decidim-dev (0.21.0) + decidim-dev (0.22.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.9.0) - decidim (= 0.21.0) + decidim (= 0.22.0) erb_lint (~> 0.0.28) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) - mdl (~> 0.5.0) + mdl (~> 0.10) nokogiri (>= 1.10.8) puma (>= 4.3) rails-controller-testing (~> 1.0) @@ -299,53 +300,53 @@ GEM system_test_html_screenshots (~> 0.1.1) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-forms (0.21.0) - decidim-core (= 0.21.0) - decidim-generators (0.21.0) - decidim-core (= 0.21.0) - decidim-meetings (0.21.0) + decidim-forms (0.22.0) + decidim-core (= 0.22.0) + decidim-generators (0.22.0) + decidim-core (= 0.22.0) + decidim-meetings (0.22.0) cells-erb (~> 0.1.0) cells-rails (~> 0.0.9) - decidim-core (= 0.21.0) - decidim-forms (= 0.21.0) + decidim-core (= 0.22.0) + decidim-forms (= 0.22.0) httparty (~> 0.17) icalendar (~> 2.5) jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) searchlight (~> 4.1) - decidim-pages (0.21.0) - decidim-core (= 0.21.0) - decidim-participatory_processes (0.21.0) - decidim-core (= 0.21.0) - decidim-proposals (0.21.0) + decidim-pages (0.22.0) + decidim-core (= 0.22.0) + decidim-participatory_processes (0.22.0) + decidim-core (= 0.22.0) + decidim-proposals (0.22.0) acts_as_list (~> 0.9) cells-erb (~> 0.1.0) cells-rails (~> 0.0.9) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) doc2text (~> 0.4.2) - kaminari (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) ransack (~> 2.1.1) redcarpet (~> 3.4) - decidim-sortitions (0.21.0) - decidim-admin (= 0.21.0) - decidim-comments (= 0.21.0) - decidim-core (= 0.21.0) - decidim-proposals (= 0.21.0) - decidim-surveys (0.21.0) - decidim-core (= 0.21.0) - decidim-forms (= 0.21.0) - decidim-system (0.21.0) + decidim-sortitions (0.22.0) + decidim-admin (= 0.22.0) + decidim-comments (= 0.22.0) + decidim-core (= 0.22.0) + decidim-proposals (= 0.22.0) + decidim-surveys (0.22.0) + decidim-core (= 0.22.0) + decidim-forms (= 0.22.0) + decidim-system (0.22.0) active_link_to (~> 1.0) - decidim-core (= 0.21.0) + decidim-core (= 0.22.0) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 1.7) jquery-rails (~> 4.3) - sassc (~> 1.12, >= 1.12.1) - sassc-rails (~> 1.3) - decidim-verifications (0.21.0) - decidim-core (= 0.21.0) + sassc (~> 2.3.0) + sassc-rails (~> 2.1.2) + decidim-verifications (0.22.0) + decidim-core (= 0.22.0) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -398,7 +399,7 @@ GEM faraday (1.1.0) multipart-post (>= 1.2, < 3) ruby2_keywords - ffi (1.9.25) + ffi (1.13.1) file_validators (2.3.0) activemodel (>= 3.2) mime-types (>= 1.0) @@ -419,9 +420,9 @@ GEM fog-core nokogiri (>= 1.5.11, < 2.0.0) formatador (0.2.5) - foundation-rails (6.4.3.0) + foundation-rails (6.6.2.0) railties (>= 3.1.0) - sass (>= 3.3.0, < 3.5) + sass (>= 3.3.0) sprockets-es6 (>= 0.9.0) foundation_rails_helper (3.0.0) actionpack (>= 4.1, < 6.0) @@ -464,7 +465,7 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.6.1) + icalendar (2.7.0) ice_cube (~> 0.16) ice_cube (0.16.3) ice_nine (0.11.2) @@ -491,7 +492,10 @@ GEM activerecord kaminari-core (= 1.2.1) kaminari-core (1.2.1) - kramdown (1.17.0) + kramdown (2.3.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) launchy (2.4.3) addressable (~> 2.3) letter_opener (1.7.0) @@ -516,10 +520,12 @@ GEM mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) - mdl (0.5.0) - kramdown (~> 1.12, >= 1.12.0) - mixlib-cli (~> 1.7, >= 1.7.0) - mixlib-config (~> 2.2, >= 2.2.1) + mdl (0.11.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.3.1) mime-types-data (~> 3.2015) @@ -529,9 +535,11 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - mixlib-cli (1.7.0) - mixlib-config (2.2.18) + mixlib-cli (2.1.8) + mixlib-config (3.0.9) tomlrb + mixlib-shellout (3.1.6) + chef-utils msgpack (1.2.10) multi_json (1.15.0) multi_xml (0.6.0) @@ -576,7 +584,7 @@ GEM activerecord (>= 4.2) request_store (~> 1.1) parallel (1.19.2) - parser (2.7.1.4) + parser (2.7.2.0) ast (~> 2.4.1) pg (1.1.4) pg_search (2.3.4) @@ -649,7 +657,7 @@ GEM wisper (>= 1.6.1) redcarpet (3.5.0) redis (4.2.2) - regexp_parser (1.7.1) + regexp_parser (1.8.2) request_store (1.5.0) rack (>= 1.4) responders (3.0.1) @@ -660,6 +668,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) + rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) @@ -667,12 +676,12 @@ GEM rspec-cells (0.3.5) cells (>= 4.0.0, < 6.0.0) rspec-rails (< 5.0) - rspec-core (3.9.2) + rspec-core (3.9.3) rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) + rspec-expectations (3.9.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-html-matchers (0.9.2) + rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) rspec-mocks (3.9.1) @@ -688,7 +697,7 @@ GEM rspec-support (~> 3.9.0) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.9.3) + rspec-support (3.9.4) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.71.0) @@ -708,16 +717,17 @@ GEM ruby2_keywords (0.0.2) ruby_dep (1.5.0) rubyzip (2.0.0) - safe_yaml (1.0.5) - sass (3.4.25) - sassc (1.12.1) - ffi (~> 1.9.6) - sass (>= 3.3.0) - sassc-rails (1.3.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sassc (2.3.0) + ffi (~> 1.9) + sassc-rails (2.1.2) railties (>= 4.0.0) - sass - sassc (~> 1.9) - sprockets (> 2.11) + sassc (>= 2.0) + sprockets (> 3.0) sprockets-rails tilt savon (2.12.1) @@ -744,7 +754,7 @@ GEM simplecov-html (~> 0.11) simplecov-cobertura (1.3.1) simplecov (~> 0.8) - simplecov-html (0.12.2) + simplecov-html (0.12.3) smart_properties (1.15.0) social-share-button (1.2.3) coffee-rails @@ -810,7 +820,7 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - webmock (3.8.3) + webmock (3.9.3) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -829,10 +839,10 @@ DEPENDENCIES bootsnap (~> 1.3) byebug (~> 11.0) dalli - decidim (= 0.21.0) + decidim (= 0.22.0) decidim-action_delegator! - decidim-consultations (= 0.21.0) - decidim-dev (= 0.21.0) + decidim-consultations (= 0.22.0) + decidim-dev (= 0.22.0) decidim-direct_verifications! faker (~> 1.9) fog-aws diff --git a/db/migrate/20201027143138_create_decidim_endorsements.decidim.rb b/db/migrate/20201027143138_create_decidim_endorsements.decidim.rb new file mode 100644 index 000000000..7c6a8ebdb --- /dev/null +++ b/db/migrate/20201027143138_create_decidim_endorsements.decidim.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20191130151925) + +class CreateDecidimEndorsements < ActiveRecord::Migration[5.2] + def change + create_table :decidim_endorsements do |t| + t.references :resource, polymorphic: true + t.references :decidim_author, polymorphic: true, index: { name: "idx_endorsements_authors" } + t.integer :decidim_user_group_id, foreign_key: true + t.timestamps + t.index [:resource_type, :resource_id, :decidim_author_type, :decidim_author_id, :decidim_user_group_id], name: "idx_endorsements_rsrcs_and_authors", unique: true + end + end +end diff --git a/db/migrate/20201027143139_add_session_token_to_users.decidim.rb b/db/migrate/20201027143139_add_session_token_to_users.decidim.rb new file mode 100644 index 000000000..16c1722b0 --- /dev/null +++ b/db/migrate/20201027143139_add_session_token_to_users.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20191204075509) + +class AddSessionTokenToUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :session_token, :string + end +end diff --git a/db/migrate/20201027143140_add_direct_message_types_to_users.decidim.rb b/db/migrate/20201027143140_add_direct_message_types_to_users.decidim.rb new file mode 100644 index 000000000..02e259ce8 --- /dev/null +++ b/db/migrate/20201027143140_add_direct_message_types_to_users.decidim.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200211173227) + +class AddDirectMessageTypesToUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :direct_message_types, :string, default: "all" + # rubocop:disable Rails/SkipsModelValidations + Decidim::UserBaseEntity.update_all(direct_message_types: "all") + # rubocop:enable Rails/SkipsModelValidations + + change_column_null :decidim_users, :direct_message_types, false + end +end diff --git a/db/migrate/20201027143141_index_foreign_keys_in_decidim_action_logs.decidim.rb b/db/migrate/20201027143141_index_foreign_keys_in_decidim_action_logs.decidim.rb new file mode 100644 index 000000000..4b5641b71 --- /dev/null +++ b/db/migrate/20201027143141_index_foreign_keys_in_decidim_action_logs.decidim.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105904) + +class IndexForeignKeysInDecidimActionLogs < ActiveRecord::Migration[5.2] + def change + add_index :decidim_action_logs, :decidim_area_id + add_index :decidim_action_logs, :decidim_scope_id + add_index :decidim_action_logs, :version_id + end +end diff --git a/db/migrate/20201027143142_index_foreign_keys_in_decidim_amendments.decidim.rb b/db/migrate/20201027143142_index_foreign_keys_in_decidim_amendments.decidim.rb new file mode 100644 index 000000000..27ccc70b9 --- /dev/null +++ b/db/migrate/20201027143142_index_foreign_keys_in_decidim_amendments.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105905) + +class IndexForeignKeysInDecidimAmendments < ActiveRecord::Migration[5.2] + def change + add_index :decidim_amendments, :decidim_emendation_id + end +end diff --git a/db/migrate/20201027143143_index_foreign_keys_in_decidim_authorizations.decidim.rb b/db/migrate/20201027143143_index_foreign_keys_in_decidim_authorizations.decidim.rb new file mode 100644 index 000000000..b2f329b67 --- /dev/null +++ b/db/migrate/20201027143143_index_foreign_keys_in_decidim_authorizations.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105909) + +class IndexForeignKeysInDecidimAuthorizations < ActiveRecord::Migration[5.2] + def change + add_index :decidim_authorizations, :unique_id + end +end diff --git a/db/migrate/20201027143144_index_foreign_keys_in_decidim_contextual_help_sections.decidim.rb b/db/migrate/20201027143144_index_foreign_keys_in_decidim_contextual_help_sections.decidim.rb new file mode 100644 index 000000000..b67028733 --- /dev/null +++ b/db/migrate/20201027143144_index_foreign_keys_in_decidim_contextual_help_sections.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105917) + +class IndexForeignKeysInDecidimContextualHelpSections < ActiveRecord::Migration[5.2] + def change + add_index :decidim_contextual_help_sections, :section_id + end +end diff --git a/db/migrate/20201027143145_index_foreign_keys_in_decidim_endorsements.decidim.rb b/db/migrate/20201027143145_index_foreign_keys_in_decidim_endorsements.decidim.rb new file mode 100644 index 000000000..6e6953824 --- /dev/null +++ b/db/migrate/20201027143145_index_foreign_keys_in_decidim_endorsements.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105919) + +class IndexForeignKeysInDecidimEndorsements < ActiveRecord::Migration[5.2] + def change + add_index :decidim_endorsements, :decidim_user_group_id + end +end diff --git a/db/migrate/20201027143146_index_foreign_keys_in_decidim_notifications.decidim.rb b/db/migrate/20201027143146_index_foreign_keys_in_decidim_notifications.decidim.rb new file mode 100644 index 000000000..a34e2c95b --- /dev/null +++ b/db/migrate/20201027143146_index_foreign_keys_in_decidim_notifications.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105923) + +class IndexForeignKeysInDecidimNotifications < ActiveRecord::Migration[5.2] + def change + add_index :decidim_notifications, :decidim_resource_id + end +end diff --git a/db/migrate/20201027143147_index_foreign_keys_in_oauth_access_grants.decidim.rb b/db/migrate/20201027143147_index_foreign_keys_in_oauth_access_grants.decidim.rb new file mode 100644 index 000000000..687857741 --- /dev/null +++ b/db/migrate/20201027143147_index_foreign_keys_in_oauth_access_grants.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200320105927) + +class IndexForeignKeysInOAuthAccessGrants < ActiveRecord::Migration[5.2] + def change + add_index :oauth_access_grants, :resource_owner_id + end +end diff --git a/db/migrate/20201027143148_add_id_to_content_blocks_scope.decidim.rb b/db/migrate/20201027143148_add_id_to_content_blocks_scope.decidim.rb new file mode 100644 index 000000000..7c4d644f8 --- /dev/null +++ b/db/migrate/20201027143148_add_id_to_content_blocks_scope.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200323094443) + +class AddIdToContentBlocksScope < ActiveRecord::Migration[5.2] + def change + add_column :decidim_content_blocks, :scoped_resource_id, :integer + end +end diff --git a/db/migrate/20201027143149_rename_scope_column.decidim.rb b/db/migrate/20201027143149_rename_scope_column.decidim.rb new file mode 100644 index 000000000..5bf3949aa --- /dev/null +++ b/db/migrate/20201027143149_rename_scope_column.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200326102407) + +class RenameScopeColumn < ActiveRecord::Migration[5.2] + def change + rename_column :decidim_content_blocks, :scope, :scope_name + end +end diff --git a/db/migrate/20201027143150_migrate_newsletters_to_templates.decidim.rb b/db/migrate/20201027143150_migrate_newsletters_to_templates.decidim.rb new file mode 100644 index 000000000..6b8c8046c --- /dev/null +++ b/db/migrate/20201027143150_migrate_newsletters_to_templates.decidim.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200327082257) + +class MigrateNewslettersToTemplates < ActiveRecord::Migration[5.2] + class ContentBlock < ApplicationRecord + self.table_name = :decidim_content_blocks + end + + class Newsletter < ApplicationRecord + self.table_name = :decidim_newsletters + end + + def change + remove_index :decidim_content_blocks, name: "idx_dcdm_content_blocks_uniq_org_id_scope_manifest_name" + + Newsletter.find_each do |newsletter| + existing_content_block = ContentBlock + .where(decidim_organization_id: newsletter.organization_id) + .where(scope_name: :newsletter_template) + .find_by(scoped_resource_id: newsletter.id) + + next if existing_content_block + + content_block = ContentBlock.new( + decidim_organization_id: newsletter.organization_id, + manifest_name: :basic_only_text, + scope_name: :newsletter_template, + scoped_resource_id: newsletter.id, + settings: newsletter.body.transform_keys { |key| "body_#{key}" } + ) + content_block.save! + end + end +end diff --git a/db/migrate/20201027143151_remove_newsletter_body.decidim.rb b/db/migrate/20201027143151_remove_newsletter_body.decidim.rb new file mode 100644 index 000000000..05bb2fb6e --- /dev/null +++ b/db/migrate/20201027143151_remove_newsletter_body.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200327082954) + +class RemoveNewsletterBody < ActiveRecord::Migration[5.2] + def change + remove_column :decidim_newsletters, :body + end +end diff --git a/db/migrate/20201027143152_add_index_on_content_block_scope_id.decidim.rb b/db/migrate/20201027143152_add_index_on_content_block_scope_id.decidim.rb new file mode 100644 index 000000000..564c3b19e --- /dev/null +++ b/db/migrate/20201027143152_add_index_on_content_block_scope_id.decidim.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200401073419) + +class AddIndexOnContentBlockScopeId < ActiveRecord::Migration[5.2] + def change + add_index( + :decidim_content_blocks, + [:decidim_organization_id, :scope_name, :scoped_resource_id, :manifest_name], + name: "idx_decidim_content_blocks_org_id_scope_scope_id_manifest" + ) + end +end diff --git a/db/migrate/20201027143153_create_decidim_forms_question_matrix_rows.decidim_forms.rb b/db/migrate/20201027143153_create_decidim_forms_question_matrix_rows.decidim_forms.rb new file mode 100644 index 000000000..645f35e6a --- /dev/null +++ b/db/migrate/20201027143153_create_decidim_forms_question_matrix_rows.decidim_forms.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim_forms (originally 20200225123810) + +class CreateDecidimFormsQuestionMatrixRows < ActiveRecord::Migration[5.2] + def change + create_table :decidim_forms_question_matrix_rows do |t| + t.references :decidim_question, index: { name: "index_decidim_forms_question_matrix_questionnaire_id" } + t.integer :position, index: true + t.jsonb :body + end + end +end diff --git a/db/migrate/20201027143154_add_matrix_row_id_to_decidim_forms_answer_choices.decidim_forms.rb b/db/migrate/20201027143154_add_matrix_row_id_to_decidim_forms_answer_choices.decidim_forms.rb new file mode 100644 index 000000000..00103aef3 --- /dev/null +++ b/db/migrate/20201027143154_add_matrix_row_id_to_decidim_forms_answer_choices.decidim_forms.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim_forms (originally 20200304152939) + +class AddMatrixRowIdToDecidimFormsAnswerChoices < ActiveRecord::Migration[5.2] + class AnswerChoice < ApplicationRecord + self.table_name = :decidim_forms_answer_choices + end + + def change + add_column :decidim_forms_answer_choices, :decidim_question_matrix_row_id, :integer + end +end diff --git a/db/migrate/20201027143155_index_foreign_keys_in_decidim_attachments.decidim_participatory_processes.rb b/db/migrate/20201027143155_index_foreign_keys_in_decidim_attachments.decidim_participatory_processes.rb new file mode 100644 index 000000000..e44084e57 --- /dev/null +++ b/db/migrate/20201027143155_index_foreign_keys_in_decidim_attachments.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20200320105908) + +class IndexForeignKeysInDecidimAttachments < ActiveRecord::Migration[5.2] + def change + add_index :decidim_attachments, :attachment_collection_id + end +end diff --git a/db/migrate/20201027143156_index_foreign_keys_in_decidim_participatory_process_user_roles.decidim_participatory_processes.rb b/db/migrate/20201027143156_index_foreign_keys_in_decidim_participatory_process_user_roles.decidim_participatory_processes.rb new file mode 100644 index 000000000..2407791f1 --- /dev/null +++ b/db/migrate/20201027143156_index_foreign_keys_in_decidim_participatory_process_user_roles.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20200320105924) + +class IndexForeignKeysInDecidimParticipatoryProcessUserRoles < ActiveRecord::Migration[5.2] + def change + add_index :decidim_participatory_process_user_roles, :decidim_user_id, name: "idx_proces_user_role_on_user_id" + end +end diff --git a/db/migrate/20201027143157_index_foreign_keys_in_decidim_participatory_processes.decidim_participatory_processes.rb b/db/migrate/20201027143157_index_foreign_keys_in_decidim_participatory_processes.decidim_participatory_processes.rb new file mode 100644 index 000000000..4f61f1927 --- /dev/null +++ b/db/migrate/20201027143157_index_foreign_keys_in_decidim_participatory_processes.decidim_participatory_processes.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20200320105925) + +class IndexForeignKeysInDecidimParticipatoryProcesses < ActiveRecord::Migration[5.2] + def change + add_index :decidim_participatory_processes, :decidim_participatory_process_group_id, name: "idx_process_on_process_group_id" + add_index :decidim_participatory_processes, :decidim_scope_id, name: "idx_process_on_scope_id" + end +end diff --git a/db/migrate/20201027143158_index_foreign_keys_in_decidim_assemblies.decidim_assemblies.rb b/db/migrate/20201027143158_index_foreign_keys_in_decidim_assemblies.decidim_assemblies.rb new file mode 100644 index 000000000..0e5997024 --- /dev/null +++ b/db/migrate/20201027143158_index_foreign_keys_in_decidim_assemblies.decidim_assemblies.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20200320105906) + +class IndexForeignKeysInDecidimAssemblies < ActiveRecord::Migration[5.2] + def change + add_index :decidim_assemblies, :decidim_scope_id + end +end diff --git a/db/migrate/20201027143159_index_foreign_keys_in_decidim_assembly_user_roles.decidim_assemblies.rb b/db/migrate/20201027143159_index_foreign_keys_in_decidim_assembly_user_roles.decidim_assemblies.rb new file mode 100644 index 000000000..a23b59710 --- /dev/null +++ b/db/migrate/20201027143159_index_foreign_keys_in_decidim_assembly_user_roles.decidim_assemblies.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20200320105907) + +class IndexForeignKeysInDecidimAssemblyUserRoles < ActiveRecord::Migration[5.2] + def change + add_index :decidim_assembly_user_roles, :decidim_user_id + end +end diff --git a/db/migrate/20201027143160_remove_legacy_decidim_assembly_type.decidim_assemblies.rb b/db/migrate/20201027143160_remove_legacy_decidim_assembly_type.decidim_assemblies.rb new file mode 100644 index 000000000..a4a9df905 --- /dev/null +++ b/db/migrate/20201027143160_remove_legacy_decidim_assembly_type.decidim_assemblies.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20200416132109) + +class RemoveLegacyDecidimAssemblyType < ActiveRecord::Migration[5.2] + def change + remove_column :decidim_assemblies, :assembly_type, :string + remove_column :decidim_assemblies, :assembly_type_other, :jsonb + end +end diff --git a/db/migrate/20201027143161_create_decidim_assemblies_settings.decidim_assemblies.rb b/db/migrate/20201027143161_create_decidim_assemblies_settings.decidim_assemblies.rb new file mode 100644 index 000000000..3ae8e5825 --- /dev/null +++ b/db/migrate/20201027143161_create_decidim_assemblies_settings.decidim_assemblies.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20200430202456) + +class CreateDecidimAssembliesSettings < ActiveRecord::Migration[5.2] + def change + create_table :decidim_assemblies_settings do |t| + t.boolean :enable_organization_chart, default: true + t.references :decidim_organization, foreign_key: true + end + end +end diff --git a/db/migrate/20201027143162_index_foreign_keys_in_decidim_comments_comments.decidim_comments.rb b/db/migrate/20201027143162_index_foreign_keys_in_decidim_comments_comments.decidim_comments.rb new file mode 100644 index 000000000..b14d1311a --- /dev/null +++ b/db/migrate/20201027143162_index_foreign_keys_in_decidim_comments_comments.decidim_comments.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_comments (originally 20200320105911) + +class IndexForeignKeysInDecidimCommentsComments < ActiveRecord::Migration[5.2] + def change + add_index :decidim_comments_comments, :decidim_user_group_id + end +end diff --git a/db/migrate/20201027143163_index_foreign_keys_in_decidim_meetings_registrations.decidim_meetings.rb b/db/migrate/20201027143163_index_foreign_keys_in_decidim_meetings_registrations.decidim_meetings.rb new file mode 100644 index 000000000..3f1305559 --- /dev/null +++ b/db/migrate/20201027143163_index_foreign_keys_in_decidim_meetings_registrations.decidim_meetings.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20200320105922) + +class IndexForeignKeysInDecidimMeetingsRegistrations < ActiveRecord::Migration[5.2] + def change + add_index :decidim_meetings_registrations, :decidim_user_group_id + end +end diff --git a/db/migrate/20201027143164_add_endorsements_counter_cache_to_proposals.decidim_proposals.rb b/db/migrate/20201027143164_add_endorsements_counter_cache_to_proposals.decidim_proposals.rb new file mode 100644 index 000000000..e7264dac5 --- /dev/null +++ b/db/migrate/20201027143164_add_endorsements_counter_cache_to_proposals.decidim_proposals.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20191206154128) + +class AddEndorsementsCounterCacheToProposals < ActiveRecord::Migration[5.2] + def change + add_column :decidim_proposals_proposals, :endorsements_count, :integer, null: false, default: 0 + end +end diff --git a/db/migrate/20201027143165_move_proposal_endorsements_to_core_endorsements.decidim_proposals.rb b/db/migrate/20201027143165_move_proposal_endorsements_to_core_endorsements.decidim_proposals.rb new file mode 100644 index 000000000..9dc02340e --- /dev/null +++ b/db/migrate/20201027143165_move_proposal_endorsements_to_core_endorsements.decidim_proposals.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20200120215928) + +# This migration must be executed after CreateDecidimEndorsements migration in decidim-core. +class MoveProposalEndorsementsToCoreEndorsements < ActiveRecord::Migration[5.2] + class ProposalEndorsement < ApplicationRecord + self.table_name = :decidim_proposals_proposal_endorsements + end + class Endorsement < ApplicationRecord + self.table_name = :decidim_endorsements + end + # Move ProposalEndorsements to Endorsements + def up + non_duplicated_group_endorsements = ProposalEndorsement.select( + "MIN(id) as id, decidim_user_group_id" + ).group(:decidim_user_group_id).where.not(decidim_user_group_id: nil).map(&:id) + + ProposalEndorsement.where("id IN (?) OR decidim_user_group_id IS NULL", non_duplicated_group_endorsements).find_each do |prop_endorsement| + Endorsement.create!( + resource_type: Decidim::Proposals::Proposal.name, + resource_id: prop_endorsement.decidim_proposal_id, + decidim_author_type: prop_endorsement.decidim_author_type, + decidim_author_id: prop_endorsement.decidim_author_id, + decidim_user_group_id: prop_endorsement.decidim_user_group_id + ) + end + # update new `decidim_proposals_proposal.endorsements_count` counter cache + Decidim::Proposals::Proposal.select(:id).all.find_each do |proposal| + Decidim::Proposals::Proposal.reset_counters(proposal.id, :endorsements) + end + end + + def down + non_duplicated_group_endorsements = Endorsement.select( + "MIN(id) as id, decidim_user_group_id" + ).group(:decidim_user_group_id).where.not(decidim_user_group_id: nil).map(&:id) + + Endorsement + .where(resource_type: "Decidim::Proposals::Proposal") + .where("id IN (?) OR decidim_user_group_id IS NULL", non_duplicated_group_endorsements).find_each do |endorsement| + ProposalEndorsement.find_or_create_by!( + decidim_proposal_id: endorsement.resource_id, + decidim_author_type: endorsement.decidim_author_type, + decidim_author_id: endorsement.decidim_author_id, + decidim_user_group_id: endorsement.decidim_user_group_id + ) + end + # update `decidim_proposals_proposal.proposal_endorsements_count` counter cache + Decidim::Proposals::Proposal.select(:id).all.find_each do |proposal| + Decidim::Proposals::Proposal.reset_counters(proposal.id, :proposal_endorsements) + end + end +end diff --git a/db/migrate/20201027143166_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.decidim_proposals.rb b/db/migrate/20201027143166_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.decidim_proposals.rb new file mode 100644 index 000000000..de1450568 --- /dev/null +++ b/db/migrate/20201027143166_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.decidim_proposals.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20200730131631) + +class MoveProposalEndorsedEventNotificationsToResourceEndorsedEvent < ActiveRecord::Migration[5.2] + def up + Decidim::Notification.where(event_name: "decidim.events.proposals.proposal_endorsed", event_class: "Decidim::Proposals::ProposalEndorsedEvent").find_each do |notification| + notification.update(event_name: "decidim.events.resource_endorsed", event_class: "Decidim::ResourceEndorsedEvent") + end + end + + def down + Decidim::Notification.where( + event_name: "decidim.events.resource_endorsed", + event_class: "Decidim::ResourceEndorsedEvent", + decidim_resource_type: "Decidim::Proposals::Proposal" + ) + .find_each do |notification| + notification.update(event_name: "decidim.events.proposals.proposal_endorsed", event_class: "Decidim::Proposals::ProposalEndorsedEvent") + end + end +end diff --git a/db/migrate/20201027143167_check_legacy_tables.decidim_surveys.rb b/db/migrate/20201027143167_check_legacy_tables.decidim_surveys.rb new file mode 100644 index 000000000..9a595b230 --- /dev/null +++ b/db/migrate/20201027143167_check_legacy_tables.decidim_surveys.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200609090533) + +# rubocop:disable Rails/Output +# rubocop:disable Style/GuardClause +class CheckLegacyTables < ActiveRecord::Migration[5.2] + class Answer < ApplicationRecord + self.table_name = :decidim_surveys_survey_answers + end + + class AnswerChoice < ApplicationRecord + self.table_name = :decidim_surveys_survey_answer_choices + end + + class AnswerOption < ApplicationRecord + self.table_name = :decidim_surveys_survey_answer_options + end + + class Question < ApplicationRecord + self.table_name = :decidim_surveys_survey_questions + end + + def up + if tables_exists.any? + if tables_exists.all? + migrate_legacy_data if Question.any? + else + puts "Some legacy surveys tables exist but not all. Have you migrated all the data?" + puts "Migrate or backup your data and then remove the following raise statement to continue with the migrations (that will remove surveys legacy tables)" + puts "For migrating your data you can do that with the command:" + puts "bundle exec rake decidim_surveys:migrate_data_to_decidim_forms" + raise "ERROR: there's the risk to loose legacy information from old surveys!" + end + end + end + + def tables_exists + @tables_exists ||= [Answer, AnswerChoice, AnswerOption, Question].collect { |model| ActiveRecord::Base.connection.table_exists? model.table_name } + end + + def migrate_legacy_data + puts "Migrating data from decidim_surveys tables to decidim_forms tables..." + ActiveRecord::Base.transaction do + Decidim::Surveys::Survey.find_each do |survey| + puts "Migrating survey #{survey.id}..." + if survey.questionnaire.present? + puts("already migrated at questionnaire #{survey.questionnaire.id}") + next + end + + questionnaire = ::Decidim::Forms::Questionnaire.create!( + questionnaire_for: survey, + title: survey.title, + description: survey.description, + tos: survey.tos, + published_at: survey.published_at, + created_at: survey.created_at, + updated_at: survey.updated_at + ) + + Question.where(decidim_survey_id: survey.id).find_each do |survey_question| + puts "Migrating question #{survey_question.id}..." + + question = ::Decidim::Forms::Question.create!( + questionnaire: questionnaire, + position: survey_question.position, + question_type: survey_question.question_type, + mandatory: survey_question.mandatory, + body: survey_question.body, + description: survey_question.description, + max_choices: survey_question.max_choices, + created_at: survey_question.created_at, + updated_at: survey_question.updated_at + ) + + # A hash with the old answer_option id as key, and the new form answer option as value + answer_option_mapping = {} + + AnswerOption.where(decidim_survey_question_id: survey_question.id).find_each do |survey_answer_option| + answer_option_mapping[survey_answer_option.id] = ::Decidim::Forms::AnswerOption.create!( + question: question, + body: survey_answer_option.body, + free_text: survey_answer_option.free_text + ) + end + + Answer.where(decidim_survey_id: survey.id, decidim_survey_question_id: survey_question.id).find_each do |survey_answer| + answer = ::Decidim::Forms::Answer.new( + questionnaire: questionnaire, + question: question, + decidim_user_id: survey_answer.decidim_user_id, + body: survey_answer.body, + created_at: survey_answer.created_at, + updated_at: survey_answer.updated_at + ) + + AnswerChoice.where(decidim_survey_answer_id: survey_answer.id).find_each do |survey_answer_choice| + answer.choices.build( + answer_option: answer_option_mapping[survey_answer_choice.decidim_survey_answer_option_id], + body: survey_answer_choice.body, + custom_body: survey_answer_choice.custom_body, + position: survey_answer_choice.position + ) + end + + answer.save! + end + end + end + end + end +end +# rubocop:enable Style/GuardClause +# rubocop:enable Rails/Output diff --git a/db/migrate/20201027143168_remove_survey_answer_choices.decidim_surveys.rb b/db/migrate/20201027143168_remove_survey_answer_choices.decidim_surveys.rb new file mode 100644 index 000000000..52123bec4 --- /dev/null +++ b/db/migrate/20201027143168_remove_survey_answer_choices.decidim_surveys.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200610090533) + +class RemoveSurveyAnswerChoices < ActiveRecord::Migration[5.2] + def change + drop_table :decidim_surveys_survey_answer_choices, if_exists: true + end +end diff --git a/db/migrate/20201027143169_remove_survey_answer_options.decidim_surveys.rb b/db/migrate/20201027143169_remove_survey_answer_options.decidim_surveys.rb new file mode 100644 index 000000000..1bb14a38e --- /dev/null +++ b/db/migrate/20201027143169_remove_survey_answer_options.decidim_surveys.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200610090650) + +class RemoveSurveyAnswerOptions < ActiveRecord::Migration[5.2] + def change + drop_table :decidim_surveys_survey_answer_options, if_exists: true + end +end diff --git a/db/migrate/20201027143170_remove_survey_answers.decidim_surveys.rb b/db/migrate/20201027143170_remove_survey_answers.decidim_surveys.rb new file mode 100644 index 000000000..95f9cc5b0 --- /dev/null +++ b/db/migrate/20201027143170_remove_survey_answers.decidim_surveys.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200610090725) + +class RemoveSurveyAnswers < ActiveRecord::Migration[5.2] + def change + drop_table :decidim_surveys_survey_answers, if_exists: true + end +end diff --git a/db/migrate/20201027143171_remove_survey_questions.decidim_surveys.rb b/db/migrate/20201027143171_remove_survey_questions.decidim_surveys.rb new file mode 100644 index 000000000..3008d05a8 --- /dev/null +++ b/db/migrate/20201027143171_remove_survey_questions.decidim_surveys.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200610090845) + +class RemoveSurveyQuestions < ActiveRecord::Migration[5.2] + def change + drop_table :decidim_surveys_survey_questions, if_exists: true + end +end diff --git a/db/migrate/20201027143172_remove_survey_columns.decidim_surveys.rb b/db/migrate/20201027143172_remove_survey_columns.decidim_surveys.rb new file mode 100644 index 000000000..78226471b --- /dev/null +++ b/db/migrate/20201027143172_remove_survey_columns.decidim_surveys.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true +# This migration comes from decidim_surveys (originally 20200610105927) + +class RemoveSurveyColumns < ActiveRecord::Migration[5.2] + def change + remove_column :decidim_surveys_surveys, :title if ActiveRecord::Base.connection.column_exists?(:decidim_surveys_surveys, :title) + remove_column :decidim_surveys_surveys, :description if ActiveRecord::Base.connection.column_exists?(:decidim_surveys_surveys, :description) + remove_column :decidim_surveys_surveys, :tos if ActiveRecord::Base.connection.column_exists?(:decidim_surveys_surveys, :tos) + remove_column :decidim_surveys_surveys, :published_at if ActiveRecord::Base.connection.column_exists?(:decidim_surveys_surveys, :published_at) + end +end diff --git a/db/migrate/20201027143173_index_foreign_keys_in_decidim_accountability_results.decidim_accountability.rb b/db/migrate/20201027143173_index_foreign_keys_in_decidim_accountability_results.decidim_accountability.rb new file mode 100644 index 000000000..a6c311138 --- /dev/null +++ b/db/migrate/20201027143173_index_foreign_keys_in_decidim_accountability_results.decidim_accountability.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_accountability (originally 20200320105903) + +class IndexForeignKeysInDecidimAccountabilityResults < ActiveRecord::Migration[5.2] + def change + add_index :decidim_accountability_results, :external_id + end +end diff --git a/db/migrate/20201027143174_index_foreign_keys_in_decidim_debates_debates.decidim_debates.rb b/db/migrate/20201027143174_index_foreign_keys_in_decidim_debates_debates.decidim_debates.rb new file mode 100644 index 000000000..bf4057cf3 --- /dev/null +++ b/db/migrate/20201027143174_index_foreign_keys_in_decidim_debates_debates.decidim_debates.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_debates (originally 20200320105918) + +class IndexForeignKeysInDecidimDebatesDebates < ActiveRecord::Migration[5.2] + def change + add_index :decidim_debates_debates, :decidim_user_group_id + end +end diff --git a/db/migrate/20201027143175_index_foreign_keys_in_decidim_sortitions_sortitions.decidim_sortitions.rb b/db/migrate/20201027143175_index_foreign_keys_in_decidim_sortitions_sortitions.decidim_sortitions.rb new file mode 100644 index 000000000..1a8a90297 --- /dev/null +++ b/db/migrate/20201027143175_index_foreign_keys_in_decidim_sortitions_sortitions.decidim_sortitions.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_sortitions (originally 20200320105926) + +class IndexForeignKeysInDecidimSortitionsSortitions < ActiveRecord::Migration[5.2] + def change + add_index :decidim_sortitions_sortitions, :cancelled_by_user_id + end +end diff --git a/db/migrate/20201027143176_add_endorsements_counter_cache_to_blogs.decidim_blogs.rb b/db/migrate/20201027143176_add_endorsements_counter_cache_to_blogs.decidim_blogs.rb new file mode 100644 index 000000000..c457d7da4 --- /dev/null +++ b/db/migrate/20201027143176_add_endorsements_counter_cache_to_blogs.decidim_blogs.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_blogs (originally 20200128094730) + +class AddEndorsementsCounterCacheToBlogs < ActiveRecord::Migration[5.2] + def change + add_column :decidim_blogs_posts, :endorsements_count, :integer, null: false, default: 0 + end +end diff --git a/db/migrate/20201027143177_index_foreign_keys_in_decidim_blogs_posts.decidim_blogs.rb b/db/migrate/20201027143177_index_foreign_keys_in_decidim_blogs_posts.decidim_blogs.rb new file mode 100644 index 000000000..fc72c4bd8 --- /dev/null +++ b/db/migrate/20201027143177_index_foreign_keys_in_decidim_blogs_posts.decidim_blogs.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_blogs (originally 20200320105910) + +class IndexForeignKeysInDecidimBlogsPosts < ActiveRecord::Migration[5.2] + def change + add_index :decidim_blogs_posts, :decidim_user_group_id + end +end diff --git a/db/migrate/20201027143178_index_foreign_keys_in_decidim_consultations_votes.decidim_consultations.rb b/db/migrate/20201027143178_index_foreign_keys_in_decidim_consultations_votes.decidim_consultations.rb new file mode 100644 index 000000000..d01b58395 --- /dev/null +++ b/db/migrate/20201027143178_index_foreign_keys_in_decidim_consultations_votes.decidim_consultations.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_consultations (originally 20200320105916) + +class IndexForeignKeysInDecidimConsultationsVotes < ActiveRecord::Migration[5.2] + def change + add_index :decidim_consultations_votes, :decidim_user_group_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 385fd03ae..f467cc5ad 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_10_13_142131) do +ActiveRecord::Schema.define(version: 2020_10_27_143178) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" @@ -36,6 +36,7 @@ t.index ["decidim_accountability_status_id"], name: "decidim_accountability_results_on_status_id" t.index ["decidim_component_id"], name: "index_decidim_accountability_results_on_decidim_component_id" t.index ["decidim_scope_id"], name: "index_decidim_accountability_results_on_decidim_scope_id" + t.index ["external_id"], name: "index_decidim_accountability_results_on_external_id" t.index ["parent_id"], name: "decidim_accountability_results_on_parent_id" end @@ -98,11 +99,14 @@ t.integer "decidim_scope_id" t.integer "decidim_area_id" t.index ["created_at"], name: "index_decidim_action_logs_on_created_at" + t.index ["decidim_area_id"], name: "index_decidim_action_logs_on_decidim_area_id" t.index ["decidim_component_id"], name: "index_action_logs_on_component_id" t.index ["decidim_organization_id"], name: "index_action_logs_on_organization_id" + t.index ["decidim_scope_id"], name: "index_decidim_action_logs_on_decidim_scope_id" t.index ["decidim_user_id"], name: "index_action_logs_on_user_id" t.index ["participatory_space_type", "participatory_space_id"], name: "index_action_logs_on_space_type_and_id" t.index ["resource_type", "resource_id"], name: "index_action_logs_on_resource_type_and_id" + t.index ["version_id"], name: "index_decidim_action_logs_on_version_id" t.index ["visibility"], name: "index_decidim_action_logs_on_visibility" end @@ -116,6 +120,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["decidim_amendable_id", "decidim_amendable_type"], name: "index_on_amendable" + t.index ["decidim_emendation_id"], name: "index_decidim_amendments_on_decidim_emendation_id" t.index ["decidim_user_id", "decidim_amendable_id", "decidim_amendable_type"], name: "index_on_amender_and_amendable" t.index ["decidim_user_id"], name: "index_decidim_amendments_on_decidim_user_id" t.index ["state"], name: "index_decidim_amendments_on_state" @@ -169,8 +174,6 @@ t.integer "children_count", default: 0 t.jsonb "purpose_of_action" t.jsonb "composition" - t.string "assembly_type" - t.jsonb "assembly_type_other" t.date "creation_date" t.string "created_by" t.jsonb "created_by_other" @@ -191,9 +194,16 @@ t.index ["decidim_assemblies_type_id"], name: "index_decidim_assemblies_on_decidim_assemblies_type_id" t.index ["decidim_organization_id", "slug"], name: "index_unique_assembly_slug_and_organization", unique: true t.index ["decidim_organization_id"], name: "index_decidim_assemblies_on_decidim_organization_id" + t.index ["decidim_scope_id"], name: "index_decidim_assemblies_on_decidim_scope_id" t.index ["parent_id"], name: "decidim_assemblies_assemblies_on_parent_id" end + create_table "decidim_assemblies_settings", force: :cascade do |t| + t.boolean "enable_organization_chart", default: true + t.bigint "decidim_organization_id" + t.index ["decidim_organization_id"], name: "index_decidim_assemblies_settings_on_decidim_organization_id" + end + create_table "decidim_assemblies_types", force: :cascade do |t| t.jsonb "title", null: false t.integer "decidim_organization_id" @@ -229,6 +239,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["decidim_assembly_id", "decidim_user_id", "role"], name: "index_unique_user_and_assembly_role", unique: true + t.index ["decidim_user_id"], name: "index_decidim_assembly_user_roles_on_decidim_user_id" end create_table "decidim_attachment_collections", force: :cascade do |t| @@ -253,6 +264,7 @@ t.integer "weight", default: 0, null: false t.integer "attachment_collection_id" t.index ["attached_to_id", "attached_to_type"], name: "index_decidim_attachments_on_attached_to" + t.index ["attachment_collection_id"], name: "index_decidim_attachments_on_attachment_collection_id" end create_table "decidim_authorizations", id: :serial, force: :cascade do |t| @@ -267,6 +279,7 @@ t.string "verification_attachment" t.index ["decidim_user_id", "name"], name: "index_decidim_authorizations_on_decidim_user_id_and_name", unique: true t.index ["decidim_user_id"], name: "index_decidim_authorizations_on_decidim_user_id" + t.index ["unique_id"], name: "index_decidim_authorizations_on_unique_id" end create_table "decidim_blogs_posts", id: :serial, force: :cascade do |t| @@ -278,8 +291,10 @@ t.integer "decidim_author_id", null: false t.string "decidim_author_type", null: false t.integer "decidim_user_group_id" + t.integer "endorsements_count", default: 0, null: false t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_blogs_posts_on_decidim_author" t.index ["decidim_component_id"], name: "index_decidim_blogs_posts_on_decidim_component_id" + t.index ["decidim_user_group_id"], name: "index_decidim_blogs_posts_on_decidim_user_group_id" end create_table "decidim_budgets_line_items", id: :serial, force: :cascade do |t| @@ -379,6 +394,7 @@ t.index ["decidim_author_id"], name: "decidim_comments_comment_author" t.index ["decidim_commentable_type", "decidim_commentable_id"], name: "decidim_comments_comment_commentable" t.index ["decidim_root_commentable_type", "decidim_root_commentable_id"], name: "decidim_comments_comment_root_commentable" + t.index ["decidim_user_group_id"], name: "index_decidim_comments_comments_on_decidim_user_group_id" end create_table "decidim_components", id: :serial, force: :cascade do |t| @@ -489,21 +505,23 @@ t.index ["decidim_consultation_question_id", "decidim_author_id", "decidim_user_group_id"], name: "index_question_votes_author_unique", unique: true t.index ["decidim_consultation_question_id"], name: "index_consultations_votes_on_consultation_question" t.index ["decidim_consultations_response_id"], name: "index_consultations_votes_on_consultations_response_id" + t.index ["decidim_user_group_id"], name: "index_decidim_consultations_votes_on_decidim_user_group_id" end create_table "decidim_content_blocks", force: :cascade do |t| t.integer "decidim_organization_id", null: false t.string "manifest_name", null: false - t.string "scope", null: false + t.string "scope_name", null: false t.jsonb "settings" t.datetime "published_at" t.integer "weight" t.jsonb "images", default: {} - t.index ["decidim_organization_id", "scope", "manifest_name"], name: "idx_dcdm_content_blocks_uniq_org_id_scope_manifest_name", unique: true + t.integer "scoped_resource_id" + t.index ["decidim_organization_id", "scope_name", "scoped_resource_id", "manifest_name"], name: "idx_decidim_content_blocks_org_id_scope_scope_id_manifest" t.index ["decidim_organization_id"], name: "index_decidim_content_blocks_on_decidim_organization_id" t.index ["manifest_name"], name: "index_decidim_content_blocks_on_manifest_name" t.index ["published_at"], name: "index_decidim_content_blocks_on_published_at" - t.index ["scope"], name: "index_decidim_content_blocks_on_scope" + t.index ["scope_name"], name: "index_decidim_content_blocks_on_scope_name" end create_table "decidim_contextual_help_sections", force: :cascade do |t| @@ -511,6 +529,7 @@ t.bigint "organization_id", null: false t.jsonb "content", null: false t.index ["organization_id"], name: "index_decidim_contextual_help_sections_on_organization_id" + t.index ["section_id"], name: "index_decidim_contextual_help_sections_on_section_id" end create_table "decidim_debates_debates", id: :serial, force: :cascade do |t| @@ -530,6 +549,21 @@ t.string "decidim_author_type", null: false t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_debates_debates_on_decidim_author" t.index ["decidim_component_id"], name: "index_decidim_debates_debates_on_decidim_component_id" + t.index ["decidim_user_group_id"], name: "index_decidim_debates_debates_on_decidim_user_group_id" + end + + create_table "decidim_endorsements", force: :cascade do |t| + t.string "resource_type" + t.bigint "resource_id" + t.string "decidim_author_type" + t.bigint "decidim_author_id" + t.integer "decidim_user_group_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["decidim_author_type", "decidim_author_id"], name: "idx_endorsements_authors" + t.index ["decidim_user_group_id"], name: "index_decidim_endorsements_on_decidim_user_group_id" + t.index ["resource_type", "resource_id", "decidim_author_type", "decidim_author_id", "decidim_user_group_id"], name: "idx_endorsements_rsrcs_and_authors", unique: true + t.index ["resource_type", "resource_id"], name: "index_decidim_endorsements_on_resource_type_and_resource_id" end create_table "decidim_follows", force: :cascade do |t| @@ -549,6 +583,7 @@ t.integer "position" t.jsonb "body" t.text "custom_body" + t.integer "decidim_question_matrix_row_id" t.index ["decidim_answer_id"], name: "index_decidim_forms_answer_choices_answer_id" t.index ["decidim_answer_option_id"], name: "index_decidim_forms_answer_choices_answer_option_id" end @@ -576,6 +611,14 @@ t.index ["session_token"], name: "index_decidim_forms_answers_on_session_token" end + create_table "decidim_forms_question_matrix_rows", force: :cascade do |t| + t.bigint "decidim_question_id" + t.integer "position" + t.jsonb "body" + t.index ["decidim_question_id"], name: "index_decidim_forms_question_matrix_questionnaire_id" + t.index ["position"], name: "index_decidim_forms_question_matrix_rows_on_position" + end + create_table "decidim_forms_questionnaires", id: :serial, force: :cascade do |t| t.jsonb "title" t.jsonb "description" @@ -733,6 +776,7 @@ t.datetime "validated_at" t.bigint "decidim_user_group_id" t.index ["decidim_meeting_id"], name: "index_decidim_meetings_registrations_on_decidim_meeting_id" + t.index ["decidim_user_group_id"], name: "index_decidim_meetings_registrations_on_decidim_user_group_id" t.index ["decidim_user_id", "decidim_meeting_id"], name: "decidim_meetings_registrations_user_meeting_unique", unique: true t.index ["decidim_user_id"], name: "index_decidim_meetings_registrations_on_decidim_user_id" end @@ -808,7 +852,6 @@ create_table "decidim_newsletters", id: :serial, force: :cascade do |t| t.jsonb "subject" - t.jsonb "body" t.integer "organization_id" t.integer "author_id" t.integer "total_recipients" @@ -830,6 +873,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.jsonb "extra" + t.index ["decidim_resource_id"], name: "index_decidim_notifications_on_decidim_resource_id" t.index ["decidim_user_id"], name: "index_decidim_notifications_on_decidim_user_id" end @@ -932,6 +976,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["decidim_participatory_process_id", "decidim_user_id", "role"], name: "index_unique_user_and_process_role", unique: true + t.index ["decidim_user_id"], name: "idx_proces_user_role_on_user_id" end create_table "decidim_participatory_processes", id: :serial, force: :cascade do |t| @@ -969,6 +1014,8 @@ t.index ["decidim_area_id"], name: "index_decidim_participatory_processes_on_decidim_area_id" t.index ["decidim_organization_id", "slug"], name: "index_unique_process_slug_and_organization", unique: true t.index ["decidim_organization_id"], name: "index_decidim_processes_on_decidim_organization_id" + t.index ["decidim_participatory_process_group_id"], name: "idx_process_on_process_group_id" + t.index ["decidim_scope_id"], name: "idx_process_on_scope_id" t.index ["decidim_scope_type_id"], name: "index_decidim_participatory_processes_on_decidim_scope_type_id" end @@ -1098,6 +1145,7 @@ t.jsonb "cost_report" t.jsonb "execution_period" t.datetime "state_published_at" + t.integer "endorsements_count", default: 0, null: false t.index "md5(body)", name: "decidim_proposals_proposal_body_search" t.index "md5(title)", name: "decidim_proposals_proposal_title_search" t.index ["created_at"], name: "index_decidim_proposals_proposals_on_created_at" @@ -1214,6 +1262,7 @@ t.integer "cancelled_by_user_id" t.jsonb "candidate_proposals" t.string "decidim_author_type", null: false + t.index ["cancelled_by_user_id"], name: "index_decidim_sortitions_sortitions_on_cancelled_by_user_id" t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_sortitions_sortitions_on_decidim_author" t.index ["decidim_author_id"], name: "index_decidim_sortitions_sortitions_on_decidim_author_id" t.index ["decidim_component_id"], name: "index_sortitions__on_feature" @@ -1243,54 +1292,8 @@ t.index ["topic_id"], name: "index_decidim_static_pages_on_topic_id" end - create_table "decidim_surveys_survey_answer_choices", force: :cascade do |t| - t.bigint "decidim_survey_answer_id" - t.bigint "decidim_survey_answer_option_id" - t.jsonb "body" - t.text "custom_body" - t.integer "position" - t.index ["decidim_survey_answer_id"], name: "index_decidim_surveys_answer_choices_answer_id" - t.index ["decidim_survey_answer_option_id"], name: "index_decidim_surveys_answer_choices_answer_option_id" - end - - create_table "decidim_surveys_survey_answer_options", force: :cascade do |t| - t.bigint "decidim_survey_question_id" - t.jsonb "body" - t.boolean "free_text" - t.index ["decidim_survey_question_id"], name: "index_decidim_surveys_answer_options_question_id" - end - - create_table "decidim_surveys_survey_answers", id: :serial, force: :cascade do |t| - t.integer "decidim_user_id" - t.integer "decidim_survey_id" - t.integer "decidim_survey_question_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.text "body" - t.index ["decidim_survey_id"], name: "index_decidim_surveys_survey_answers_on_decidim_survey_id" - t.index ["decidim_survey_question_id"], name: "index_decidim_surveys_answers_question_id" - t.index ["decidim_user_id"], name: "index_decidim_surveys_survey_answers_on_decidim_user_id" - end - - create_table "decidim_surveys_survey_questions", id: :serial, force: :cascade do |t| - t.jsonb "body" - t.integer "decidim_survey_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "position" - t.boolean "mandatory" - t.string "question_type" - t.integer "max_choices" - t.jsonb "description" - t.index ["decidim_survey_id"], name: "index_decidim_surveys_survey_questions_on_decidim_survey_id" - end - create_table "decidim_surveys_surveys", id: :serial, force: :cascade do |t| - t.jsonb "title" - t.jsonb "description" - t.jsonb "tos" t.integer "decidim_component_id" - t.datetime "published_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["decidim_component_id"], name: "index_decidim_surveys_surveys_on_decidim_component_id" @@ -1376,6 +1379,8 @@ t.datetime "officialized_at" t.jsonb "officialized_as" t.datetime "admin_terms_accepted_at" + t.string "session_token" + t.string "direct_message_types", default: "all", null: false t.index ["confirmation_token"], name: "index_decidim_users_on_confirmation_token", unique: true t.index ["decidim_organization_id"], name: "index_decidim_users_on_decidim_organization_id" t.index ["email", "decidim_organization_id"], name: "index_decidim_users_on_email_and_decidim_organization_id", unique: true, where: "((deleted_at IS NULL) AND (managed = false) AND ((type)::text = 'Decidim::User'::text))" @@ -1408,6 +1413,7 @@ t.datetime "revoked_at" t.string "scopes" t.index ["application_id"], name: "index_oauth_access_grants_on_application_id" + t.index ["resource_owner_id"], name: "index_oauth_access_grants_on_resource_owner_id" t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true end @@ -1464,6 +1470,7 @@ add_foreign_key "decidim_areas", "decidim_area_types", column: "area_type_id" add_foreign_key "decidim_areas", "decidim_organizations" add_foreign_key "decidim_assemblies", "decidim_assemblies_types" + add_foreign_key "decidim_assemblies_settings", "decidim_organizations" add_foreign_key "decidim_attachments", "decidim_attachment_collections", column: "attachment_collection_id", name: "fk_decidim_attachments_attachment_collection_id", on_delete: :nullify add_foreign_key "decidim_authorizations", "decidim_users" add_foreign_key "decidim_categorizations", "decidim_categories" From e7f1d5ce3ad243a3bee43c95f5b1db9c7cb031d0 Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Wed, 28 Oct 2020 09:15:21 +0100 Subject: [PATCH 02/10] Used github decidim 0.22-stable instead --- Gemfile | 6 +- Gemfile.lock | 278 ++++++++++++++++++++++++++------------------------- 2 files changed, 146 insertions(+), 138 deletions(-) diff --git a/Gemfile b/Gemfile index 25ec2cddd..79620bb2c 100644 --- a/Gemfile +++ b/Gemfile @@ -4,8 +4,10 @@ source "https://rubygems.org" ruby RUBY_VERSION -gem "decidim", "0.22.0" -gem "decidim-consultations", "0.22.0" +DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", tag: "release/0.22-stable" } + +gem "decidim", DECIDIM_VERSION +gem "decidim-consultations", DECIDIM_VERSION gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator", branch: "feature/decidim-0.22" gem "decidim-direct_verifications", github: "Platoniq/decidim-verifications-direct_verifications", branch: "devel" diff --git a/Gemfile.lock b/Gemfile.lock index 67ab7394a..97e921e3c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,137 +19,11 @@ GIT savon twilio-ruby -GEM - remote: https://rubygems.org/ +GIT + remote: https://github.com/decidim/decidim + revision: e0cb3a1ee409820e806262d29cae2c3ca4bd2f57 + tag: release/0.22-stable specs: - actioncable (5.2.4.4) - actionpack (= 5.2.4.4) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.4.4) - actionpack (= 5.2.4.4) - actionview (= 5.2.4.4) - activejob (= 5.2.4.4) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.4.4) - actionview (= 5.2.4.4) - activesupport (= 5.2.4.4) - rack (~> 2.0, >= 2.0.8) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.4) - activesupport (= 5.2.4.4) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_link_to (1.0.5) - actionpack - addressable - activejob (5.2.4.4) - activesupport (= 5.2.4.4) - globalid (>= 0.3.6) - activemodel (5.2.4.4) - activesupport (= 5.2.4.4) - activerecord (5.2.4.4) - activemodel (= 5.2.4.4) - activesupport (= 5.2.4.4) - arel (>= 9.0) - activestorage (5.2.4.4) - actionpack (= 5.2.4.4) - activerecord (= 5.2.4.4) - marcel (~> 0.3.1) - activesupport (5.2.4.4) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - acts_as_list (0.9.19) - activerecord (>= 3.0) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - akami (1.3.1) - gyoku (>= 0.4.0) - nokogiri - anchored (1.1.0) - arel (9.0.0) - ast (2.4.1) - autoprefixer-rails (8.6.5) - execjs - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - babel-source (5.8.35) - babel-transpiler (0.7.0) - babel-source (>= 4.0, < 6) - execjs (~> 2.0) - batch-loader (1.5.0) - bcrypt (3.1.16) - better_html (1.0.15) - actionview (>= 4.0) - activesupport (>= 4.0) - ast (~> 2.0) - erubi (~> 1.4) - html_tokenizer (~> 0.0.6) - parser (>= 2.4) - smart_properties - bindex (0.7.0) - bootsnap (1.4.4) - msgpack (~> 1.0) - browser (2.7.1) - builder (3.2.4) - byebug (11.0.1) - capybara (3.33.0) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (~> 1.5) - xpath (~> 3.2) - carrierwave (1.3.1) - activemodel (>= 4.0.0) - activesupport (>= 4.0.0) - mime-types (>= 1.16) - cells (4.1.7) - declarative-builder (< 0.2.0) - declarative-option (< 0.2.0) - tilt (>= 1.4, < 3) - uber (< 0.2.0) - cells-erb (0.1.0) - cells (~> 4.0) - erbse (>= 0.1.1) - cells-rails (0.0.9) - actionpack (>= 3.0) - cells (>= 4.1.6, < 5.0.0) - charlock_holmes (0.7.7) - chef-utils (16.6.14) - childprocess (3.0.0) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (5.0.0) - coffee-script (>= 2.2.0) - railties (>= 5.2.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - concurrent-ruby (1.1.7) - connection_pool (2.2.3) - crack (0.4.4) - crass (1.0.6) - css_parser (1.7.1) - addressable - dalli (2.7.10) - date_validator (0.9.0) - activemodel - activesupport - db-query-matchers (0.9.0) - activesupport (>= 4.0, <= 6.0) - rspec (~> 3.0) decidim (0.22.0) decidim-accountability (= 0.22.0) decidim-admin (= 0.22.0) @@ -242,7 +116,7 @@ GEM mini_magick (~> 4.9) mustache (~> 1.1.0) nobspw (~> 0.6.0) - omniauth (= 1.9.0) + omniauth (~> 1.9) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 0.7) omniauth-rails_csrf_protection (~> 0.1) @@ -347,6 +221,138 @@ GEM sassc-rails (~> 2.1.2) decidim-verifications (0.22.0) decidim-core (= 0.22.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.2.4.4) + actionpack (= 5.2.4.4) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.4.4) + actionpack (= 5.2.4.4) + actionview (= 5.2.4.4) + activejob (= 5.2.4.4) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.2.4.4) + actionview (= 5.2.4.4) + activesupport (= 5.2.4.4) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.4.4) + activesupport (= 5.2.4.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + active_link_to (1.0.5) + actionpack + addressable + activejob (5.2.4.4) + activesupport (= 5.2.4.4) + globalid (>= 0.3.6) + activemodel (5.2.4.4) + activesupport (= 5.2.4.4) + activerecord (5.2.4.4) + activemodel (= 5.2.4.4) + activesupport (= 5.2.4.4) + arel (>= 9.0) + activestorage (5.2.4.4) + actionpack (= 5.2.4.4) + activerecord (= 5.2.4.4) + marcel (~> 0.3.1) + activesupport (5.2.4.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + acts_as_list (0.9.19) + activerecord (>= 3.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + akami (1.3.1) + gyoku (>= 0.4.0) + nokogiri + anchored (1.1.0) + arel (9.0.0) + ast (2.4.1) + autoprefixer-rails (8.6.5) + execjs + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) + batch-loader (1.5.0) + bcrypt (3.1.16) + better_html (1.0.15) + actionview (>= 4.0) + activesupport (>= 4.0) + ast (~> 2.0) + erubi (~> 1.4) + html_tokenizer (~> 0.0.6) + parser (>= 2.4) + smart_properties + bindex (0.7.0) + bootsnap (1.4.4) + msgpack (~> 1.0) + browser (2.7.1) + builder (3.2.4) + byebug (11.0.1) + capybara (3.33.0) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.5) + xpath (~> 3.2) + carrierwave (1.3.1) + activemodel (>= 4.0.0) + activesupport (>= 4.0.0) + mime-types (>= 1.16) + cells (4.1.7) + declarative-builder (< 0.2.0) + declarative-option (< 0.2.0) + tilt (>= 1.4, < 3) + uber (< 0.2.0) + cells-erb (0.1.0) + cells (~> 4.0) + erbse (>= 0.1.1) + cells-rails (0.0.9) + actionpack (>= 3.0) + cells (>= 4.1.6, < 5.0.0) + charlock_holmes (0.7.7) + chef-utils (16.6.14) + childprocess (3.0.0) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (5.0.0) + coffee-script (>= 2.2.0) + railties (>= 5.2.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.1.7) + connection_pool (2.2.3) + crack (0.4.4) + crass (1.0.6) + css_parser (1.7.1) + addressable + dalli (2.7.10) + date_validator (0.9.0) + activemodel + activesupport + db-query-matchers (0.9.0) + activesupport (>= 4.0, <= 6.0) + rspec (~> 3.0) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -440,7 +446,7 @@ GEM gyoku (1.3.1) builder (>= 2.1.2) hashdiff (1.0.1) - hashie (3.6.0) + hashie (4.1.0) highline (2.0.3) html_tokenizer (0.0.7) htmlentities (4.3.4) @@ -558,8 +564,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) + omniauth (1.9.1) + hashie (>= 3.4.6) rack (>= 1.6.2, < 3) omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) @@ -839,9 +845,9 @@ DEPENDENCIES bootsnap (~> 1.3) byebug (~> 11.0) dalli - decidim (= 0.22.0) + decidim! decidim-action_delegator! - decidim-consultations (= 0.22.0) + decidim-consultations! decidim-dev (= 0.22.0) decidim-direct_verifications! faker (~> 1.9) From 73644c4fb567a888eb12e48739cd799a7b145ce5 Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Mon, 2 Nov 2020 11:03:07 +0100 Subject: [PATCH 03/10] Use direct verifications coopdevs fork with decidim@0.22 branch --- Gemfile | 2 +- Gemfile.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 79620bb2c..9fe83ef1f 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem "decidim", DECIDIM_VERSION gem "decidim-consultations", DECIDIM_VERSION gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator", branch: "feature/decidim-0.22" -gem "decidim-direct_verifications", github: "Platoniq/decidim-verifications-direct_verifications", branch: "devel" +gem "decidim-direct_verifications", github: "coopdevs/decidim-verifications-direct_verifications", branch: "feature/decidim-0.22" gem "bootsnap", "~> 1.3" diff --git a/Gemfile.lock b/Gemfile.lock index 97e921e3c..72d0a853a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: git://github.com/Platoniq/decidim-verifications-direct_verifications.git - revision: a971f8b63e066b98a481324075c03007dfd54381 - branch: devel - specs: - decidim-direct_verifications (0.20) - decidim-admin (>= 0.17.0) - decidim-core (>= 0.17.0) - GIT remote: git://github.com/coopdevs/decidim-module-action_delegator.git revision: c85cc84f4ab92b8557f0956c3df010420071062a @@ -19,9 +10,18 @@ GIT savon twilio-ruby +GIT + remote: git://github.com/coopdevs/decidim-verifications-direct_verifications.git + revision: 09157b4699e75d7c27b3e327fe5509392cd10cfa + branch: feature/decidim-0.22 + specs: + decidim-direct_verifications (0.20) + decidim-admin (>= 0.17.0) + decidim-core (>= 0.17.0) + GIT remote: https://github.com/decidim/decidim - revision: e0cb3a1ee409820e806262d29cae2c3ca4bd2f57 + revision: ab0699464a08b957edda78d94274e60be7c2e5b7 tag: release/0.22-stable specs: decidim (0.22.0) @@ -442,7 +442,7 @@ GEM graphiql-rails (1.4.11) railties sprockets-rails - graphql (1.11.5) + graphql (1.11.6) gyoku (1.3.1) builder (>= 2.1.2) hashdiff (1.0.1) From d50852ff657d255f21dc817e134daf7de4bf7e6d Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Mon, 2 Nov 2020 11:03:55 +0100 Subject: [PATCH 04/10] Pull from decidim stable branch --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 72d0a853a..5db2c29c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -652,8 +652,8 @@ GEM activerecord (>= 5.0) activesupport (>= 5.0) i18n - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) rectify (0.13.0) activemodel (>= 4.1.0) From 74d59b91cf5453104b4dfbbe49972bdb89ddfe2d Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Mon, 2 Nov 2020 11:14:40 +0100 Subject: [PATCH 05/10] Update decidim-direct_verifications --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5db2c29c3..22f8ecd45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,7 +12,7 @@ GIT GIT remote: git://github.com/coopdevs/decidim-verifications-direct_verifications.git - revision: 09157b4699e75d7c27b3e327fe5509392cd10cfa + revision: c73549840974bd6a5a789dc275a4e75039a854c8 branch: feature/decidim-0.22 specs: decidim-direct_verifications (0.20) From a267d175dccd023d1e58e5ed61aa0663fcbf6cc4 Mon Sep 17 00:00:00 2001 From: Maxim Colls Date: Tue, 3 Nov 2020 11:54:51 +0100 Subject: [PATCH 06/10] Updated decidim-direct_verifications --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 22f8ecd45..53e401f0b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,12 +12,12 @@ GIT GIT remote: git://github.com/coopdevs/decidim-verifications-direct_verifications.git - revision: c73549840974bd6a5a789dc275a4e75039a854c8 + revision: 8d7137b5b3a899ed721f84a4f540e4b6a356eb80 branch: feature/decidim-0.22 specs: - decidim-direct_verifications (0.20) - decidim-admin (>= 0.17.0) - decidim-core (>= 0.17.0) + decidim-direct_verifications (0.22) + decidim-admin (>= 0.22.0) + decidim-core (>= 0.22.0) GIT remote: https://github.com/decidim/decidim From 108b255fe5cf439f1a6af6dd4c7848a7631ed47c Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 3 Nov 2020 15:07:09 +0100 Subject: [PATCH 07/10] Update commits from both dependencies --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 53e401f0b..dbca5aff8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/coopdevs/decidim-module-action_delegator.git - revision: c85cc84f4ab92b8557f0956c3df010420071062a + revision: 70c5939a8cef03a35fe3efb6b42666a838530487 branch: feature/decidim-0.22 specs: decidim-action_delegator (0.1) @@ -12,7 +12,7 @@ GIT GIT remote: git://github.com/coopdevs/decidim-verifications-direct_verifications.git - revision: 8d7137b5b3a899ed721f84a4f540e4b6a356eb80 + revision: f1f13daa9cf178b2d6d69bff326e68d8d45b4d6c branch: feature/decidim-0.22 specs: decidim-direct_verifications (0.22) From d7d8b6544d119fd3be1b11a826b2ccb5962cdaaf Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 4 Nov 2020 09:00:14 +0100 Subject: [PATCH 08/10] Toggle force_ssl depending on ENV var This adapts our FORCE_SSL flag to work on v0.22.0. In a8ff96b75 they forced this Rails setting app-wide in decidim-core's engine but giving the option to toggle it on/off using Decidim's config object in a config/initializer. --- config/initializers/decidim.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/decidim.rb b/config/initializers/decidim.rb index 4af31c97c..3fce4bbc2 100644 --- a/config/initializers/decidim.rb +++ b/config/initializers/decidim.rb @@ -125,6 +125,8 @@ if ENV["HEROKU_APP_NAME"].present? config.base_uploads_path = ENV["HEROKU_APP_NAME"] + "/" end + + config.force_ssl = ENV.fetch("FORCE_SSL", false) end Rails.application.config.i18n.available_locales = Decidim.available_locales From 6d798edec91b012c656d8bdf28c21b2831ac3d9b Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 4 Nov 2020 10:20:24 +0100 Subject: [PATCH 09/10] Use branch with backport So we can test things until the backport gets merged. --- Gemfile | 2 +- Gemfile.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 9fe83ef1f..fef5ed963 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", tag: "release/0.22-stable" } +DECIDIM_VERSION = { git: "https://github.com/CodiTramuntana/decidim", tag: "backport/6775_to_release/0.22-stable" } gem "decidim", DECIDIM_VERSION gem "decidim-consultations", DECIDIM_VERSION diff --git a/Gemfile.lock b/Gemfile.lock index dbca5aff8..52ce6b7ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,9 +20,9 @@ GIT decidim-core (>= 0.22.0) GIT - remote: https://github.com/decidim/decidim - revision: ab0699464a08b957edda78d94274e60be7c2e5b7 - tag: release/0.22-stable + remote: https://github.com/CodiTramuntana/decidim + revision: a294e1f3f2cd25089e57c9f153986b95899c4300 + tag: backport/6775_to_release/0.22-stable specs: decidim (0.22.0) decidim-accountability (= 0.22.0) @@ -544,7 +544,7 @@ GEM mixlib-cli (2.1.8) mixlib-config (3.0.9) tomlrb - mixlib-shellout (3.1.6) + mixlib-shellout (3.1.7) chef-utils msgpack (1.2.10) multi_json (1.15.0) @@ -684,7 +684,7 @@ GEM rspec-rails (< 5.0) rspec-core (3.9.3) rspec-support (~> 3.9.3) - rspec-expectations (3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-html-matchers (0.9.4) @@ -785,7 +785,7 @@ GEM system_test_html_screenshots (0.1.2) actionpack (>= 5.2, < 6.0.a) temple (0.8.2) - terminal-table (1.8.0) + terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) thor (1.0.1) thread_safe (0.3.6) From 54a3b087028c5bb684c62718488fe5bd17ca11c0 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 4 Nov 2020 12:43:00 +0100 Subject: [PATCH 10/10] Revert back to action_delegator's master branch It does now have support for Decidim 0.22 after https://github.com/coopdevs/decidim-module-action_delegator/pull/65 got merged. --- Gemfile | 2 +- Gemfile.lock | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index fef5ed963..b2c24d2d3 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ DECIDIM_VERSION = { git: "https://github.com/CodiTramuntana/decidim", tag: "back gem "decidim", DECIDIM_VERSION gem "decidim-consultations", DECIDIM_VERSION -gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator", branch: "feature/decidim-0.22" +gem "decidim-action_delegator", github: "coopdevs/decidim-module-action_delegator" gem "decidim-direct_verifications", github: "coopdevs/decidim-verifications-direct_verifications", branch: "feature/decidim-0.22" gem "bootsnap", "~> 1.3" diff --git a/Gemfile.lock b/Gemfile.lock index 52ce6b7ef..c3bc44366 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,6 @@ GIT remote: git://github.com/coopdevs/decidim-module-action_delegator.git - revision: 70c5939a8cef03a35fe3efb6b42666a838530487 - branch: feature/decidim-0.22 + revision: e7d483f1389a56161bf7b5becb7eef4b84214783 specs: decidim-action_delegator (0.1) decidim-admin (= 0.22.0)