Skip to content

Commit

Permalink
Add term customizer gem and one time actions (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHassig authored Oct 18, 2024
1 parent 3c750cf commit 5accf22
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem "decidim", DECIDIM_VERSION
gem "decidim-templates", DECIDIM_VERSION

gem "decidim-decidim_awesome"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer.git", branch: "main"
gem "decidim-ub"

gem "bootsnap", "~> 1.3"
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/mainio/decidim-module-term_customizer.git
revision: 9133eea57ebfc4164b640efd1ac6b9ca1628c793
branch: main
specs:
decidim-term_customizer (0.28.0)
decidim-admin (~> 0.28.0)
decidim-core (~> 0.28.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -887,6 +896,7 @@ DEPENDENCIES
decidim-decidim_awesome
decidim-dev (= 0.28.2)
decidim-templates (= 0.28.2)
decidim-term_customizer!
decidim-ub
figaro (~> 1.2)
letter_opener_web (~> 2.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true
# This migration comes from decidim_term_customizer (originally 20190217132503)

class CreateDecidimTermCustomizerTranslationSets < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_translation_sets do |t|
t.jsonb :name
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true
# This migration comes from decidim_term_customizer (originally 20190217132654)

class CreateDecidimTermCustomizerTranslations < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_translations do |t|
t.string :locale
t.string :key
t.text :value

t.references(
:translation_set,
null: false,
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
index: { name: "decidim_term_customizer_translation_translation_set" }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true
# This migration comes from decidim_term_customizer (originally 20190217132726)

class CreateDecidimTermCustomizerConstraints < ActiveRecord::Migration[5.2]
def change
create_table :decidim_term_customizer_constraints do |t|
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_term_customizer_constraint_organization" }
t.references :subject, polymorphic: true, index: { name: "decidim_term_customizer_constraint_subject" }

t.references(
:translation_set,
null: false,
foreign_key: { to_table: :decidim_term_customizer_translation_sets },
index: { name: "decidim_term_customizer_constraint_translation_set" }
)
end
end
end
27 changes: 26 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/system/decidim_awesome/custom_styles_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
expect(page.body).to have_no_content("body {background: red;}")
end

it "css is not applyied" do
it "css is not applied" do
expect(page.execute_script("return window.getComputedStyle($('body')[0]).backgroundColor")).to eq("rgba(0, 0, 0, 0)")
end
end
Expand Down

0 comments on commit 5accf22

Please sign in to comment.