Skip to content

lortza/food_planner

Repository files navigation

Food Planner

Maintainability

WIP food planning app.

Live on heroku as myfoodplanner

Features

Getting Started

  • Fork & Clone
  • bundle
  • Set up DB: rake db:setup (Runs db:create, db:schema:load and db:seed)
  • User: In development, see the seeds file for the user credentials so you can log in
  • Run rails s to start the server

Standard RB

Standard RB is used for enforcing style guide

  • Run with: standardrb or standardrb --fix

Tests

  • Tests: bundle exec rspec

Linters

This project uses these linters in CI:

Run them locally on your machine like this:

bundle exec reek

bundle exec scss-lint app/assets/stylesheets/**.scss

standardrb --fix
# or
rake standard:fix

Related Docs

Heroku Scheduler

Heroku runs a cron job to add the weekly shopping_list items to the grocery list. This is accomplished with a rake task plus the cron job. The job is set to run daily because heroku doesn't offer a weekly interval. The rake task has a condition to only allow it to run on a specific day of the week. Configure the cron job.

This feature is dependent on my account having both a list named "grocery" and another list named "weekly items." Without either of those specifically-named lists, this job will error.

Editing the credentials file

Never open the master.key or credentials.yml.enc in atom. This will add newline characters that you can't remove and it will not be able to be unencrypted.

To edit this file, run:

EDITOR="code --wait" bin/rails credentials:edit

If this file gets borked, this post and this post will help.

Deploying

  • log into Heroku CLI with heroku login
  • assuming your local copy of the main branch is up to date, run git push heroku main

WIP USDA Food Composition Databases

About

personal project: food planning rails app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •