Sha256: f58c9c7e8aabfcfe71d7155c4a580f523dc1b6fcbcc8e8d3748a098cfc7ec875
Contents?: true
Size: 1.13 KB
Versions: 14
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true require "decidim/generators/app_generator" namespace :decidim do def generate_decidim_app(*options) app_path = File.expand_path(options.first, Dir.pwd) sh "rm -fR #{app_path}", verbose: false original_folder = Dir.pwd Decidim::Generators::AppGenerator.start(options) Dir.chdir(original_folder) end def base_app_name File.basename(Dir.pwd).underscore end desc "Generates a dummy app for testing in external installations" task :generate_external_test_app do generate_decidim_app( "spec/decidim_dummy_app", "--app_name", "#{base_app_name}_test_app", "--path", "../..", "--recreate_db", "--skip_gemfile", "--demo" ) end desc "Generates a dummy app for trying out external modules" task :generate_external_development_app do Bundler.with_original_env do generate_decidim_app( "development_app", "--app_name", "#{base_app_name}_development_app", "--path", "..", "--recreate_db", "--seed_db", "--demo", "--profiling" ) end end end
Version data entries
14 entries across 14 versions & 1 rubygems