diff options
| author | mo khan <mo@mokhan.ca> | 2015-05-19 07:55:04 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-05-21 21:26:10 -0600 |
| commit | e89bc7cb1467063ce65e3e78d77c8f4635132d0f (patch) | |
| tree | 4e7664935ebe396ac0b048e0421e15a034f15b61 /bin/setup | |
| parent | b769c085489679d362ccacd4e5d514f663379089 (diff) | |
create a workout record for each recors in the sqlite db.
Diffstat (limited to 'bin/setup')
| -rwxr-xr-x | bin/setup | 37 |
1 files changed, 25 insertions, 12 deletions
@@ -1,16 +1,29 @@ #!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'setup' is installed as part of a gem, and -# this file is here to facilitate running it. -# - require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) -require 'rubygems' -require 'bundler/setup' +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +Dir.chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file: + + puts "== Installing dependencies ==" + system "gem install bundler --conservative" + system "bundle check || bundle install" + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # system "cp config/database.yml.sample config/database.yml" + # end + + puts "\n== Preparing database ==" + system "bin/rake db:setup" + + puts "\n== Removing old logs and tempfiles ==" + system "rm -f log/*" + system "rm -rf tmp/cache" -load Gem.bin_path('factory_girl_rails', 'setup') + puts "\n== Restarting application server ==" + system "touch tmp/restart.txt" +end |
