scripts/webapp.rb in standup-0.3.0 vs scripts/webapp.rb in standup-0.3.1
- old
+ new
@@ -1,6 +1,10 @@
Standup.script do
+ self.default_params = {
+ :rails_env => 'production'
+ }
+
def run
install_package 'git-core'
install_gem 'bundler'
unless file_exists? '/opt/webapp'
@@ -54,11 +58,11 @@
unless run_pg_command("select * from pg_database where datname = 'webapp'") =~ /1 row/
run_pg_command "create database webapp with owner webapp"
in_dir '/opt/webapp' do
sudo 'bundle install'
- exec 'RAILS_ENV=production rake db:schema:load'
- exec 'RAILS_ENV=production rake db:seed'
+ exec "RAILS_ENV=#{params.rails_env} rake db:schema:load"
+ exec "RAILS_ENV=#{params.rails_env} rake db:seed"
end
end
end
def run_pg_command cmd