Sha256: 3ff3a61c6b678d4883a3da6e941b20abd55e3fdb11e12a28747304e64eddc3cb

Contents?: true

Size: 920 Bytes

Versions: 28

Compression:

Stored size: 920 Bytes

Contents

#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)

def system!(*args)
  system(*args) || abort("\n== Command #{args} failed ==")
end

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') or system!('bundle install')

  # puts "\n== Copying sample files =="
  # unless File.exist?('config/database.yml')
  #   cp 'config/database.yml.sample', 'config/database.yml'
  # end

  puts "\n== Preparing database =="
  system! 'bin/rails db:setup'

  puts "\n== Removing old logs and tempfiles =="
  system! 'bin/rails log:clear tmp:clear'

  puts "\n== Restarting application server =="
  system! 'bin/rails restart'
end

Version data entries

28 entries across 22 versions & 6 rubygems

Version Path
remotipart-1.4.4 spec/dummy_app/bin/setup
remotipart-1.4.3 spec/dummy_app/bin/setup
happy_seed-0.0.21 spec/dummy/bin/setup
babel-schmooze-sprockets-0.1.3 examples/myapp/bin/setup
babel-schmooze-sprockets-0.1.2 examples/myapp/bin/setup
babel-schmooze-sprockets-0.1.1 examples/myapp/bin/setup
babel-schmooze-sprockets-0.1.0 examples/myapp/bin/setup
amd-0.1.5 test/dummy/bin/setup
amd-0.1.4 test/dummy/bin/setup
amd-0.1.3 test/dummy/bin/setup
amd-0.1.2 test/dummy/bin/setup
amd-0.1.1 test/dummy/bin/setup
babel-schmooze-sprockets-0.1.0.alpha.3 examples/myapp/bin/setup
babel-schmooze-sprockets-0.1.0.alpha.2 examples/myapp/bin/setup
jobshop-0.0.2.2 spec/dummy-5.0.0.beta3/bin/setup
jobshop-0.0.2.1 spec/dummy-5.0.0.beta3/bin/setup
bouquet-0.2.2 store/spec/dummy/bin/setup
bouquet-0.2.2 gate/spec/dummy/bin/setup
bouquet-0.2.2 core/spec/dummy/bin/setup
bouquet-0.2.1 store/spec/dummy/bin/setup