Skip to content

Teapane/fourth_meal

 
 

Repository files navigation

##Fourth Meal

####Overview

Fourth Meal is the step after the Dinner Dash Project Dinner Dash The original tutorial was created by Jumpstart Lab. Fourth Meal Fourth Meal focuses on taking another group's code, refactoring it and making it applicable for multiple restaurants.

###Craveyard Production site link

####Instructions

#####Setting Up Locally

  1. Clone the repository. `https://github.com/pzula/fourth_meal.git'
  2. Move into that directory. cd fourth_meal
  3. Install gem dependencies. bundle install
  4. Make sure you have Postgres installed on your computer. We recommend either installing it through the Postgres.app or Homebrew
  5. Create and seed the database. rake db:create db:seed
  6. Start the Rails sever. rails s

To Run RSPEC

# Run all specs
bundle exec rspec

# Run only model specs
bundle exec rspec spec/models
rake db:test:load

To purge the test database - run

rake db:test:purge

#####Dependencies Amazon AWS S3 Bucket for images To integrate the Paperclip gem with image upload on Heroku, we use an AWS S3 bucket to store our images. You will need to create a bucket (free) on S3, and then export the following keys to your environment: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and S3_BUCKET_NAME

Stripe for Payment integration To integrate credit card payments, we used Stripe. In order for your local copy to process payments correctly, you will need to sign up for a free Stripe account, visit your account settings, and export the following API keys to your environment: SECRET_KEY and PUBLISHABLE_KEY

SendGrid for ActionMailer integration To integrate email on account creation and payment success, we use the SendGrid API. In order for this to function correctly, you must create a SendGrid account, and set your environment variables with the following: SENDGRID_USERNAME and SENDGRID_PASSWORD.

###Process

We used Pivotal Tracker in order to structure our project. We wrote user stories that we converted into tests, using BDD with RSpec and Capybara in order to drive development.

PivotalTracker Screenshot

RSpec Test

####Extraction of External Services

We extracted Stripe into its own model, and switch to the development processor in our development and testing environments in order to speed up the development process.

Payment Processor Initializer

Stripe Stub

Stripe Integration

Stripe Rendering

About

Dinner Dash continued...

Resources

Stars

Watchers

Forks

Packages

No packages published