forked from URBREATH/decidim-module-idra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
37 lines (31 loc) · 734 Bytes
/
Rakefile
File metadata and controls
37 lines (31 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true
require "decidim/dev/common_rake"
require "fileutils"
def seed_db(path)
Dir.chdir(path) do
system("bundle exec rake db:seed")
end
end
def copy_helpers
FileUtils.mkdir_p "spec/decidim_dummy_app/app/views/v0.11", verbose: true
end
desc "Generates a dummy app for testing"
task test_app: "decidim:generate_external_test_app" do
ENV["RAILS_ENV"] = "test"
copy_helpers
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
seed_db("development_app")
end