Sha256: bfea60ed6888e0a191e68c60c63141303a7a003d5e475d88141148d623016942

Contents?: true

Size: 1010 Bytes

Versions: 133

Compression:

Stored size: 1010 Bytes

Contents

#!/usr/bin/env ruby
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)

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

FileUtils.chdir APP_ROOT do
  # This script is a way to set up or update your development environment automatically.
  # This script is idempotent, so that you can run it at any time and get an expectable outcome.
  # Add necessary setup steps to this file.

  puts '== Installing dependencies =='
  system! 'gem install bundler --conservative'
  system('bundle check') || system!('bundle install')

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

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

  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

133 entries across 124 versions & 31 rubygems

Version Path
koalagator-2.0.0 spec/test_app/bin/setup
send_grid_mailer-2.4.0 spec/dummy/bin/setup
letter_opener_web_wally-2.0.1 spec/dummy/bin/setup
stitches-5.0.0 spec/fake_app/bin/setup
stitches-5.0.0.RC1 spec/fake_app/bin/setup
firetail-1.0.1 examples/rails/bin/setup
administrate-field-nested_has_many-2.1.0 spec/dummy/bin/setup
administrate-field-nested_has_many-2.0.0 spec/dummy/bin/setup
power_api-2.1.1 spec/dummy/bin/setup
local_resource-2.0.0 spec/dummy/bin/setup
send_grid_mailer-2.3.0 spec/dummy/bin/setup
job_notifier-3.0.0 spec/dummy/bin/setup
human_attributes-1.1.0 spec/dummy/bin/setup
active_job_log-3.0.0 spec/dummy/bin/setup
repo_analyzer-1.6.0 spec/dummy/bin/setup
repo_analyzer-1.5.0 spec/dummy/bin/setup
repo_analyzer-1.4.0 spec/dummy/bin/setup
solidus_i18n-2.2.0 spec/dummy/bin/setup
calagator2-2.0.0 spec/test_app/bin/setup
repo_analyzer-1.3.0 spec/dummy/bin/setup