Rakefile in decidim-decidim_awesome-0.7.2 vs Rakefile in decidim-decidim_awesome-0.8.0
- old
+ new
@@ -8,36 +8,34 @@
system("bundle exec rake decidim_decidim_awesome:install:migrations")
system("bundle exec rake db:migrate")
end
end
+def override_webpacker_config_files(path)
+ Dir.chdir(path) do
+ system("bundle exec rake decidim_decidim_awesome:webpacker:install")
+ end
+end
+
def seed_db(path)
Dir.chdir(path) do
system("bundle exec rake db:seed")
end
end
-def copy_themes
- FileUtils.cp_r "lib/decidim/decidim_awesome/test/themes", "spec/decidim_dummy_app/app/assets/themes", verbose: true
-end
-
-def copy_headers
+def copy_helpers
FileUtils.mkdir_p "spec/decidim_dummy_app/app/views/v0.11", verbose: true
FileUtils.cp_r "lib/decidim/decidim_awesome/test/layouts", "spec/decidim_dummy_app/app/views/v0.11/layouts", verbose: true
+ FileUtils.cp "lib/decidim/decidim_awesome/test/initializer.rb", "spec/decidim_dummy_app/config/initializers/decidim_awesome.rb", verbose: true
end
-desc "copy test theme files"
-task :copy_themes do
- copy_themes
-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")
- copy_themes
- copy_headers
+ override_webpacker_config_files("spec/decidim_dummy_app")
+ copy_helpers
end
desc "Generates a development app."
task :development_app do
Bundler.with_original_env do
@@ -52,6 +50,7 @@
)
end
install_module("development_app")
seed_db("development_app")
+ override_webpacker_config_files("development_app")
end