From 5bed6bfcea591a05a976687750e6b15417782b03 Mon Sep 17 00:00:00 2001 From: Chad Serrant Date: Mon, 27 Sep 2021 16:43:28 -0400 Subject: [PATCH] Update README document for start up instructions. --- Gemfile.lock | 5 +++++ README.md | 25 +++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e06d1c6a..2aeb3474 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -110,11 +110,15 @@ GEM mini_mime (>= 0.1.1) method_source (1.0.0) mini_mime (1.1.1) + mini_portile2 (2.6.1) minitest (5.14.4) multi_json (1.15.0) nested_scaffold (1.1.0) newrelic_rpm (8.0.0) nio4r (2.5.8) + nokogiri (1.12.4) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) nokogiri (1.12.4-x86_64-darwin) racc (~> 1.4) nokogiri (1.12.4-x86_64-linux) @@ -243,6 +247,7 @@ GEM nokogiri (~> 1.8) PLATFORMS + ruby x86_64-darwin-20 x86_64-linux diff --git a/README.md b/README.md index 8a731783..b1aa36c7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,15 @@ This is a Rails project, deployed on Heroku. ## Local development +Install Postgres and running first. + +(MacOS, Optional), you can use Homebrew: +``` +$ brew install postgres +$ brew services start postgresql +``` + +Once postgres is installed and running, install the required gems and then migrate the database. ``` $ bundle install $ bundle exec rake db:create db:migrate db:seed @@ -28,22 +37,14 @@ You can load these into the database and index them for use in the webapp by run You can start by generating fake data: ``` -$ bundle exec rake data:generate -``` - -Loading all the real response data take a while, so you can start by loading only a sample of the data for one particular school with: - -``` -$ bundle exec rake data:load_sample +$ bundle exec rake db:fixtures:load ``` -This loads all the data: - +## Running tests ``` -$ bundle exec rake data:load +$ bundle exec rake test ``` - ## Demo deploy Get the code and make a new repo without any history. ``` @@ -98,4 +99,4 @@ Loading attempts took a while. I factored data rake task out into Ruby class to - superadmin is done by user id - no schools for default user? - endpoints for school/categories, school/questions -- attempts route and controller commented out \ No newline at end of file +- attempts route and controller commented out