diff --git a/.github/workflows/ci_emitter.yml b/.github/workflows/ci_emitter.yml index 009e272..28bbc97 100644 --- a/.github/workflows/ci_emitter.yml +++ b/.github/workflows/ci_emitter.yml @@ -36,7 +36,7 @@ jobs: bundler-cache: true - name: Run Rubocop run: bundle exec rubocop -P - main: + tests: name: Tests runs-on: ubuntu-latest timeout-minutes: 30 diff --git a/Gemfile.lock b/Gemfile.lock index de1640e..814429d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -517,6 +517,8 @@ GEM nio4r (2.7.1) nokogiri (1.16.4-arm64-darwin) racc (~> 1.4) + nokogiri (1.16.4-x86_64-linux) + racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) snaky_hash (~> 2.0) @@ -801,6 +803,7 @@ GEM PLATFORMS arm64-darwin-22 + x86_64-linux DEPENDENCIES bootsnap (~> 1.4) diff --git a/Rakefile b/Rakefile index efde3b4..ca88b3f 100644 --- a/Rakefile +++ b/Rakefile @@ -2,8 +2,39 @@ require "decidim/dev/common_rake" +def install_module(path) + Dir.chdir(path) do + system("bundle exec rake decidim_emitter:install:migrations") + system("bundle exec rake db:migrate") + end +end + +def seed_db(path) + Dir.chdir(path) do + system("bundle exec rake db:seed") + end +end + desc "Generates a dummy app for testing" -task test_app: "decidim:generate_external_test_app" +task test_app: "decidim:generate_external_test_app" do + ENV["RAILS_ENV"] = "test" + install_module("spec/decidim_dummy_app") +end + +desc "Generates a development app" +task :development_app do + Bundler.with_original_env do + generate_decidim_app( + "development_app", + "--app_name", + "#{base_app_name}_development_app", + "--path", + "..", + "--recreate_db", + "--demo" + ) + end -desc "Generates a development app." -task development_app: "decidim:generate_external_development_app" + install_module("development_app") + seed_db("development_app") +end diff --git a/decidim-emitter.gemspec b/decidim-emitter.gemspec index d4a3709..0ddb966 100644 --- a/decidim-emitter.gemspec +++ b/decidim-emitter.gemspec @@ -11,18 +11,18 @@ Gem::Specification.new do |s| s.license = "AGPL-3.0" s.homepage = "https://decidim.org" s.metadata = { - "bug_tracker_uri" => "https://github.com/decidim/decidim/issues", + "bug_tracker_uri" => "https://github.com/OpenSourcePolitics/decidim-module-emitter/issues", "documentation_uri" => "https://docs.decidim.org/", "funding_uri" => "https://opencollective.com/decidim", "homepage_uri" => "https://decidim.org", - "source_code_uri" => "https://github.com/decidim/decidim", + "source_code_uri" => "https://github.com/OpenSourcePolitics/decidim-module-emitter", "rubygems_mfa_required" => "true" } s.required_ruby_version = "~> 3.0" s.name = "decidim-emitter" - s.summary = "A decidim emitter module" - s.description = "A Decidim module to create new emitters for administrators." + s.summary = "Decidim module for adding new emitters to participatory processes" + s.description = "A Decidim module for adding new emitters to participatory processes directly from the backoffice, and visible in the frontoffice." s.files = Dir.chdir(__dir__) do `git ls-files -z`.split("\x0").select do |f|