Sha256: 2a18a31639186c9a273998b63268267fa902c26a34af8d084d9c735c9c92cfc4

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

require "decidim/dev/common_rake"

desc "Generates a dummy app for testing"
task test_app: "decidim:generate_external_test_app"

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

  # Copy the initializer and translation file to the development app folder
  base_path = __dir__
  source_path = "#{base_path}/lib/decidim/access_requests/generators/app_templates"
  target_path = "#{base_path}/development_app/config"
  FileUtils.cp(
    "#{source_path}/initializer.rb",
    "#{target_path}/initializers/decidim_verifications_access_requests.rb"
  )
  FileUtils.cp(
    "#{source_path}/en.yml",
    "#{target_path}/locales/decidim-access_requests.en.yml"
  )

  # Seed the DB after the initializer has been installed
  Dir.chdir("development_app") do
    system("bundle exec rake db:seed")
  end
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

2 entries across 2 versions & 1 rubygems

Version Path
decidim-access_requests-0.17.0 Rakefile
decidim-access_requests-0.16.1 Rakefile