Mercurial > zeropaste
comparison bin/setup @ 459:07d6c6639adf
Upgrade to rails 5.2. RIP code style.
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 14 Apr 2018 04:19:52 +0900 |
parents | 68eb23b52864 |
children | fd3078b4d355 |
comparison
equal
deleted
inserted
replaced
458:1c6a056269e6 | 459:07d6c6639adf |
---|---|
1 #!/usr/bin/env ruby | 1 #!/usr/bin/env ruby |
2 require 'pathname' | |
3 require 'fileutils' | 2 require 'fileutils' |
4 include FileUtils | 3 include FileUtils |
5 | 4 |
6 # path to your application root. | 5 # path to your application root. |
7 APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | 6 APP_ROOT = File.expand_path('..', __dir__) |
8 | 7 |
9 def system!(*args) | 8 def system!(*args) |
10 system(*args) || abort("\n== Command #{args} failed ==") | 9 system(*args) || abort("\n== Command #{args} failed ==") |
11 end | 10 end |
12 | 11 |
15 # Add necessary setup steps to this file. | 14 # Add necessary setup steps to this file. |
16 | 15 |
17 puts '== Installing dependencies ==' | 16 puts '== Installing dependencies ==' |
18 system! 'gem install bundler --conservative' | 17 system! 'gem install bundler --conservative' |
19 system('bundle check') || system!('bundle install') | 18 system('bundle check') || system!('bundle install') |
19 | |
20 # Install JavaScript dependencies if using Yarn | |
21 # system('bin/yarn') | |
20 | 22 |
21 # puts "\n== Copying sample files ==" | 23 # puts "\n== Copying sample files ==" |
22 # unless File.exist?('config/database.yml') | 24 # unless File.exist?('config/database.yml') |
23 # cp 'config/database.yml.sample', 'config/database.yml' | 25 # cp 'config/database.yml.sample', 'config/database.yml' |
24 # end | 26 # end |