Skip to content

Commit

Permalink
Leverage bin/setup within script/setup
Browse files Browse the repository at this point in the history
And remove duplicate output. `bin/setup` is the Rails default for
updating your environment after code updates and `script/setup` is our
convenience script for the initial setup and starting with sample data.
  • Loading branch information
mkllnk committed Mar 20, 2023
1 parent 133724d commit ce10adf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
11 changes: 0 additions & 11 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,4 @@ FileUtils.chdir APP_ROOT do
# system! "bin/rails restart"
# Faster to do it manually:
system! "touch tmp/restart.txt"

puts "\n== Welcome to Open Food Network! =="
puts ""
puts "To login as the default user, use:"
puts ""
puts " email: [email protected]"
puts " password: ofn123"
puts ""
puts "Load sample data with:"
puts ""
puts " ./bin/rake ofn:sample_data"
end
10 changes: 2 additions & 8 deletions script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ fi
# Install used Bundler version
./script/install-bundler

# Install all dependencies
bundle check || bundle install
yarn install

# Set up the database for both development and test
# Confirming the default user and password
printf '\n\n' | bundle exec rake db:setup db:test:prepare
printf '\n'
# Install dependencies, prepare database and tidy
./bin/setup

# Load some default data for your environment
bundle exec rake ofn:sample_data
Expand Down

0 comments on commit ce10adf

Please sign in to comment.