From 3c750cf5c339f4d9a65f1b950def888314b0e111 Mon Sep 17 00:00:00 2001 From: Harrison Hassig Date: Mon, 9 Sep 2024 08:48:30 +0200 Subject: [PATCH] Bump decidim-decidim_awesome from 0.11.0 to 0.11.1 (#13) * Use the main branch of decidim awesome * Rollback rubocop --- Gemfile | 2 +- Gemfile.lock | 18 ++++------- ..._private_fields.decidim_decidim_awesome.rb | 30 +++++++++++++++++++ ...ate_fields_date.decidim_decidim_awesome.rb | 21 +++++++++++++ db/schema.rb | 7 +++-- 5 files changed, 63 insertions(+), 15 deletions(-) create mode 100644 db/migrate/20240906102430_add_decidim_awesome_proposal_private_fields.decidim_decidim_awesome.rb create mode 100644 db/migrate/20240906102431_add_decidim_awesome_proposal_private_fields_date.decidim_decidim_awesome.rb diff --git a/Gemfile b/Gemfile index 49a16f5..151096f 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem "decidim", DECIDIM_VERSION # gem "decidim-initiatives", DECIDIM_VERSION gem "decidim-templates", DECIDIM_VERSION -gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome", branch: "develop" +gem "decidim-decidim_awesome" gem "decidim-ub" gem "bootsnap", "~> 1.3" diff --git a/Gemfile.lock b/Gemfile.lock index 05b7aa0..82ce77f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,14 +1,3 @@ -GIT - remote: https://github.com/decidim-ice/decidim-module-decidim_awesome - revision: b2800256f5e147452438686029b3990c89fb21be - branch: develop - specs: - decidim-decidim_awesome (0.11.0) - decidim-admin (>= 0.28.0, < 0.29) - decidim-core (>= 0.28.0, < 0.29) - deface (>= 1.5) - sassc (~> 2.3) - GEM remote: https://rubygems.org/ specs: @@ -286,6 +275,11 @@ GEM decidim-debates (0.28.2) decidim-comments (= 0.28.2) decidim-core (= 0.28.2) + decidim-decidim_awesome (0.11.1) + decidim-admin (>= 0.28.0, < 0.29) + decidim-core (>= 0.28.0, < 0.29) + deface (>= 1.5) + sassc (~> 2.3) decidim-dev (0.28.2) bullet (~> 7.0) byebug (~> 11.0) @@ -890,7 +884,7 @@ DEPENDENCIES capistrano-rbenv capistrano-sidekiq decidim (= 0.28.2) - decidim-decidim_awesome! + decidim-decidim_awesome decidim-dev (= 0.28.2) decidim-templates (= 0.28.2) decidim-ub diff --git a/db/migrate/20240906102430_add_decidim_awesome_proposal_private_fields.decidim_decidim_awesome.rb b/db/migrate/20240906102430_add_decidim_awesome_proposal_private_fields.decidim_decidim_awesome.rb new file mode 100644 index 0000000..8ebac80 --- /dev/null +++ b/db/migrate/20240906102430_add_decidim_awesome_proposal_private_fields.decidim_decidim_awesome.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# This migration comes from decidim_decidim_awesome (originally 20240531224204) + +class AddDecidimAwesomeProposalPrivateFields < ActiveRecord::Migration[6.0] + class ProposalExtraField < ApplicationRecord + self.table_name = :decidim_awesome_proposal_extra_fields + end + + def change + add_column :decidim_awesome_proposal_extra_fields, :private_body, :string + add_column :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, :string + reversible do |direction| + direction.up do + execute <<~SQL.squish + UPDATE decidim_awesome_proposal_extra_fields + SET decidim_proposal_type = 'Decidim::Proposals::Proposal' + SQL + end + end + + remove_index :decidim_awesome_proposal_extra_fields, name: "decidim_awesome_extra_fields_on_proposal" + add_index :decidim_awesome_proposal_extra_fields, + [:decidim_proposal_id, :decidim_proposal_type], + name: "index_decidim_awesome_proposal_extra_fields_on_decidim_proposal" + + change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_id, false + change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, false + ProposalExtraField.reset_column_information + end +end diff --git a/db/migrate/20240906102431_add_decidim_awesome_proposal_private_fields_date.decidim_decidim_awesome.rb b/db/migrate/20240906102431_add_decidim_awesome_proposal_private_fields_date.decidim_decidim_awesome.rb new file mode 100644 index 0000000..7d6b053 --- /dev/null +++ b/db/migrate/20240906102431_add_decidim_awesome_proposal_private_fields_date.decidim_decidim_awesome.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This migration comes from decidim_decidim_awesome (originally 20240729164227) + +class AddDecidimAwesomeProposalPrivateFieldsDate < ActiveRecord::Migration[6.1] + class ProposalExtraField < ApplicationRecord + self.table_name = :decidim_awesome_proposal_extra_fields + end + + def change + add_column :decidim_awesome_proposal_extra_fields, :private_body_updated_at, :datetime + + reversible do |direction| + direction.up do + execute <<~SQL.squish + UPDATE decidim_awesome_proposal_extra_fields + SET private_body_updated_at = updated_at + SQL + end + end + end +end diff --git a/db/schema.rb b/db/schema.rb index ae7e8ed..71301c0 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: 2024_07_11_071117) do +ActiveRecord::Schema.define(version: 2024_09_06_102431) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" @@ -347,7 +347,10 @@ t.integer "weight_total", default: 0 t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false - t.index ["decidim_proposal_id"], name: "decidim_awesome_extra_fields_on_proposal" + t.string "private_body" + t.string "decidim_proposal_type", null: false + t.datetime "private_body_updated_at" + t.index ["decidim_proposal_id", "decidim_proposal_type"], name: "index_decidim_awesome_proposal_extra_fields_on_decidim_proposal" end create_table "decidim_awesome_vote_weights", force: :cascade do |t|