Sha256: 3c89830dafc129325888c1cb0fcecd94920c99d4ed8c1f2ec1ab0031dbf8607c

Contents?: true

Size: 981 Bytes

Versions: 11

Compression:

Stored size: 981 Bytes

Contents

# frozen_string_literal: true

require "decidim/dev/common_rake"

def install_module(path)
  Dir.chdir(path) do
    system("bundle exec rake decidim_plans: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" 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

  install_module("development_app")
  seed_db("development_app")
end

# Run all tests, include all
RSpec::Core::RakeTask.new(:spec) do |t|
  t.verbose = false
end

# Run both by default
task default: [:spec]

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
decidim-plans-0.16.8 Rakefile
decidim-plans-0.16.7 Rakefile
decidim-plans-0.16.6 Rakefile
decidim-plans-0.16.5 Rakefile
decidim-plans-0.16.4 Rakefile
decidim-plans-0.16.3 Rakefile
decidim-plans-0.16.2 Rakefile
decidim-plans-0.16.1 Rakefile
decidim-plans-0.16.0 Rakefile
decidim-plans-0.15.1 Rakefile
decidim-plans-0.15.0 Rakefile