diff --git a/bin/setup b/bin/setup index a6ada35ea..371d1446b 100755 --- a/bin/setup +++ b/bin/setup @@ -1,6 +1,5 @@ #!/usr/bin/env ruby require 'fileutils' -include FileUtils # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,13 +8,15 @@ def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do +FileUtils.chdir APP_ROOT do # This script is a starting point to setup your application. # Add necessary setup steps to this file. puts "\n== Installing dependencies ==" system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies system! 'bin/yarn install' puts "\n== Updating webdrivers ==" @@ -23,7 +24,7 @@ chdir APP_ROOT do puts "\n== Copying sample files ==" unless File.exist?('.env') - cp 'config/env.example', '.env' + FileUtils.cp 'config/env.example', '.env' end # Create the database, load the schema, and initialize it with the seed data diff --git a/bin/update b/bin/update index 3c8f58d28..1f9877a1a 100755 --- a/bin/update +++ b/bin/update @@ -1,6 +1,5 @@ #!/usr/bin/env ruby require 'fileutils' -include FileUtils # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,7 +8,7 @@ def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do +FileUtils.chdir APP_ROOT do # This script is a way to update your development environment automatically. # Add necessary update steps to this file.