Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install decidim-decidim_awesome #76

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ jobs:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 119.0.6045.105

- name: List Chrome
shell: "bash"
run: apt list --installed | grep chrome

- name: Remove Chrome
shell: "bash"
run: sudo apt remove google-chrome-stable

- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 119.0.6045.105

- name: Bundle Install
run: bundle install

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DECIDIM_VERSION = "0.27.5"
gem "decidim", DECIDIM_VERSION
gem "decidim-consultations", DECIDIM_VERSION

gem "decidim-decidim_awesome", "~> 0.10.2"
gem "decidim-direct_verifications", git: "https://github.com/Platoniq/decidim-verifications-direct_verifications", branch: "release/0.27-stable"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer", branch: "release/0.27-stable"

Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ GEM
decidim-debates (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-decidim_awesome (0.10.2)
decidim-admin (>= 0.26.0, < 0.28)
decidim-core (>= 0.26.0, < 0.28)
deface (>= 1.5)
sassc (~> 2.3)
decidim-dev (0.27.5)
axe-core-rspec (~> 4.1.0)
byebug (~> 11.0)
Expand Down Expand Up @@ -769,6 +774,8 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -884,6 +891,7 @@ DEPENDENCIES
daemons
decidim (= 0.27.5)
decidim-consultations (= 0.27.5)
decidim-decidim_awesome (~> 0.10.2)
decidim-dev (= 0.27.5)
decidim-direct_verifications!
decidim-term_customizer!
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/extend_proposal_title_size.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Rails.application.configure do
config.after_initialize do
Decidim::Proposals::ProposalWizardCreateStepForm
.validators_on(:title).find { |v| v.is_a?(ActiveModel::Validations::LengthValidator) }
.validators_on(:title).find { |v| v.is_a?(ProposalLengthValidator) }
.instance_variable_set(:@options, { maximum: 250 })
Decidim.available_locales.each do |locale|
Decidim::Proposals::Admin::ProposalForm
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20200324170000)

class CreateDecidimAwesomeConfig < ActiveRecord::Migration[5.2]
def change
create_table :decidim_awesome_config do |t|
t.jsonb :var
t.jsonb :value
t.integer :decidim_organization_id,
foreign_key: true,
index: { name: "index_decidim_awesome_on_decidim_organization_id" }

t.timestamps
t.index [:var, :decidim_organization_id], name: "index_decidim_awesome_organization_var", unique: true
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20200324230936)

class CreateAwesomeEditorImages < ActiveRecord::Migration[5.2]
def change
create_table :decidim_awesome_editor_images do |t|
t.string :image
t.string :path
t.references :decidim_author, null: false, foreign_key: { to_table: :decidim_users }, index: { name: "decidim_awesome_editor_images_author" }
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_awesome_editor_images_constraint_organization" }

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20200403142257)

class CreateDecidimAwesomeConfigConstraints < ActiveRecord::Migration[5.2]
def change
create_table :decidim_awesome_config_constraints do |t|
t.jsonb :settings

t.references :decidim_awesome_config, null: false, foreign_key: { to_table: :decidim_awesome_config }, index: { name: "decidim_awesome_config_constraints_config" }
t.timestamps
t.index [:settings, :decidim_awesome_config_id], name: "index_decidim_awesome_settings_awesome_config", unique: true
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20210628150825)

class ChangeAwesomeConfigVarType < ActiveRecord::Migration[5.2]
def change
change_column :decidim_awesome_config, :var, :string

Decidim::DecidimAwesome::AwesomeConfig.find_each do |config|
config.var.gsub!('"', "")
config.save!
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20231006113837)

class CreateDecidimAwesomeVoteWeights < ActiveRecord::Migration[6.0]
def change
create_table :decidim_awesome_vote_weights do |t|
# this might be polymorphic in the future (if other types of votes are supported)
t.references :proposal_vote, null: false, index: { name: "decidim_awesome_proposals_weights_vote" }

t.integer :weight, null: false, default: 1
t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20231006113841)

class CreateDecidimAwesomeProposalExtraFields < ActiveRecord::Migration[6.0]
def change
create_table :decidim_awesome_proposal_extra_fields do |t|
# this might be polymorphic in the future (if other types of votes are supported)
t.references :decidim_proposal, null: false, index: { name: "decidim_awesome_extra_fields_on_proposal" }

t.jsonb :vote_weight_totals
t.integer :weight_total, default: 0
t.timestamps
end
end
end
52 changes: 51 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_01_30_141953) do
ActiveRecord::Schema.define(version: 2024_06_12_120639) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -293,6 +293,53 @@
t.index ["unique_id"], name: "index_decidim_authorizations_on_unique_id"
end

create_table "decidim_awesome_config", force: :cascade do |t|
t.string "var"
t.jsonb "value"
t.integer "decidim_organization_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["decidim_organization_id"], name: "index_decidim_awesome_on_decidim_organization_id"
t.index ["var", "decidim_organization_id"], name: "index_decidim_awesome_organization_var", unique: true
end

create_table "decidim_awesome_config_constraints", force: :cascade do |t|
t.jsonb "settings"
t.bigint "decidim_awesome_config_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["decidim_awesome_config_id"], name: "decidim_awesome_config_constraints_config"
t.index ["settings", "decidim_awesome_config_id"], name: "index_decidim_awesome_settings_awesome_config", unique: true
end

create_table "decidim_awesome_editor_images", force: :cascade do |t|
t.string "image"
t.string "path"
t.bigint "decidim_author_id", null: false
t.bigint "decidim_organization_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["decidim_author_id"], name: "decidim_awesome_editor_images_author"
t.index ["decidim_organization_id"], name: "decidim_awesome_editor_images_constraint_organization"
end

create_table "decidim_awesome_proposal_extra_fields", force: :cascade do |t|
t.bigint "decidim_proposal_id", null: false
t.jsonb "vote_weight_totals"
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"
end

create_table "decidim_awesome_vote_weights", force: :cascade do |t|
t.bigint "proposal_vote_id", null: false
t.integer "weight", default: 1, null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["proposal_vote_id"], name: "decidim_awesome_proposals_weights_vote"
end

create_table "decidim_blogs_posts", id: :serial, force: :cascade do |t|
t.jsonb "title"
t.jsonb "body"
Expand Down Expand Up @@ -1892,6 +1939,9 @@
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_awesome_config_constraints", "decidim_awesome_config"
add_foreign_key "decidim_awesome_editor_images", "decidim_organizations"
add_foreign_key "decidim_awesome_editor_images", "decidim_users", column: "decidim_author_id"
add_foreign_key "decidim_budgets_budgets", "decidim_scopes"
add_foreign_key "decidim_budgets_orders", "decidim_budgets_budgets"
add_foreign_key "decidim_budgets_projects", "decidim_budgets_budgets"
Expand Down
Loading
Loading