Skip to content

E-Commerce API that allows users to track merchants and their sales

Notifications You must be signed in to change notification settings

jakeheft/rails_engine

Repository files navigation

README

What's this app?!

Rails Engine is an e-commerce application that tracks merchants, customer, items, and invoices. Information is stored in a database and accessed via internal api between Front-End and Back-End pieces of the application.

Learning Goals

  • Exposing an API
  • Use serializers to format JSON responses
  • Test API exposure
  • Compose advanced ActiveRecord queries to analyze information stored in SQL databases

Versions

  • Ruby 2.5.3
  • Rails 5.2.4.4

Setup

  1. Create a directory (e.g. rails_engine) as a parent directory

  2. cd into that directory and run the following commands:

    • To clone the front end repo of this project that contains a test suite
    git clone git@github.com:turingschool-examples/rails_driver.git
    
    git clone git@github.com:jakeheft/rails_engine.git
    

    Both of these directories should live inside the parent directory you made

  3. cd into rails_engine (child directory) and run bundle install and then rails g rspec:install

  4. From inside the rails_engine (child directory), run rails db:{drop,create,migrate,seed}. To get the spec harness to pass (see 'Running Tests' below), you will need to have the database properly seeded.

Running Tests

To test the interconnectivity of this application with the Front-End application (rails_driver), run rails s while inside this project's root directory (rails_engine child directory). Then in another terminal window, run bundle exec rspec spec/features/harness_spec.rb to run the tests.

The Back-End has also been fully tested with 100% test coverage in SimpleCov.

About

E-Commerce API that allows users to track merchants and their sales

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published