Skip to content

Gvieve/rails-engine

Repository files navigation

Rails Engine API

Created by: Genevieve Nuebel

Rails engine provides foundational API endpoints that can be adopted for a basic e-commerce sales platform. It provides a starting point for a useful database schema, which includes sample records for merchants, items, invoices, customers, and transactions.

Built With

This project was tested with:

  • RSpec version 3.10

Contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Ruby

    • The project is built with rubyonrails using ruby version 2.5.3p105, you must install ruby on your local machine first. Please visit the ruby home page to get set up. Please ensure you install the version of ruby noted above.
  • Rails

    gem install rails --version 5.2.5
  • Postgres database

    • Visit the postgresapp homepage and follow their instructions to download the latest version of Postgres.app.

Installing

  1. Clone the repo
$ git clone https://github.com/Gvieve/rails-engine
  1. Bundle Install
$ bundle install
  1. Create, migrate and seed rails database
$ rails db:{create,migrate,seed}

If you do not wish to use the sample data provided to seed your database, replace the commands in db/seeds.rb and the data dump file in db/data/rails-engine-development.pgdump.

  1. Start rails server
$ rails s

Endpoints

All Items
All Merchants
Find Item
Find Merchants
Merchants by Revenue
Merchants by Items Sold
Items by Revenue
Unshipped invoices by potential revenue

Testing

Running Tests
  • To run the full test suite run the below in your terminal:
$ bundle exec rspec
  • To run an individual test file run the below in tour terminal:
$ bundle exec rspec <file path>

for example: bundle exec rspec spec/requests/merchants_request_spec.rb

How to Contribute

In the spirit of collaboration, things done together are better than done on our own. If you have any amazing ideas or contributions on how we can improve this API they are greatly appreciated. To contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Roadmap

See the open issues for a list of proposed features (and known issues). Please open an issue ticket if you see an existing error or bug.

Contributors

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published