aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-05-01 17:58:45 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-05-01 17:58:45 +0200
commita7a2fc57cf458fee98bad03b3c2a40b6e8d75606 (patch)
tree0a913d25b47e7fe71bc35763c0ac6e58ece0b6cb /lib
parent92cb57ecb28a91804ccacadffecb804a5786bd52 (diff)
downloadhmnoweb-a7a2fc57cf458fee98bad03b3c2a40b6e8d75606.tar.gz
hmnoweb-a7a2fc57cf458fee98bad03b3c2a40b6e8d75606.tar.bz2
hmnoweb-a7a2fc57cf458fee98bad03b3c2a40b6e8d75606.zip
Use file tasks for database and refinery core configs.
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/dev_setup.rake15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/tasks/dev_setup.rake b/lib/tasks/dev_setup.rake
index 7d7cbc7..8a216c6 100644
--- a/lib/tasks/dev_setup.rake
+++ b/lib/tasks/dev_setup.rake
@@ -16,14 +16,19 @@
# Rake task for local development setup
namespace :dev do
- task :config_db do
- sh 'ln -snf database.yml.sqlite3 config/database.yml'
+ file "config/database.yml" do |t|
+ sh "ln -snf database.yml.postgresql #{t.name}"
end
- task :config_refinery do
- sh 'cp config/initializers/refinery/core.rb.example config/initializers/refinery/core.rb'
+ file "config/initializers/refinery/core.rb" do |t|
+ sh "cp config/initializers/refinery/core.rb.example #{t.name}"
end
desc "Setup local environment for development."
- task :setup => [ 'config_refinery', 'config_db', 'db:setup', 'db:seed' ]
+ task :setup => [
+ 'config/initializers/refinery/core.rb',
+ 'config/database.yml',
+ 'db:setup',
+ 'db:seed'
+ ]
end