"Rails Engine Lite" is a solo project built over the course of four days in Turing's module 3 backend program. It takes a fictitious E-Commerce Application and required exposing API's to return data in a standard format (related to merchants and their items) for a frontend team to consume.
- Original Project Details and Requirements can be found here.
- Practice exposing API's.
- Practice SRP using Controllers, Models, Serializers.
- Utilize advanced routing techniques including namespacing to organize and group like functionality together under V1.
- Test API responses with RSpec and capture happy/sad paths.
- Ruby -V 2.7.2
- Rails -V 5.2.6
- rspec
- pry
- simplecov
- factory_bot_rails
- faker
- jsonapi-serializer
- Fork and/or Clone this Repo from GitHub.
- In your terminal use
$ git clone <ssh or https path>
- Change into the cloned directory using
$ cd rails-engine
- Install the gem packages using
$ bundle install
- Database Migrations (Information comes from here) can be setup by running:
$ rails rake db:{drop,create,migrate,seed}
$ rails db:schema:dump
- Startup and Access require the server to be running locally and a web browser opened.
- Start Server
$ rails s
- Open Web Broswer and visit http://localhost:3000/
- Please visit below endpoints to see JSON data being exposed
- Testing is performed in two places.
- The terminal utilizing RSpec
$ rspec spec/<follow directory path to test specific files>
or test the whole suite with $ rspec
2. Postman to test what the endpoints are returning and the happy/sad paths while the local server is running.
- To install Turing's pre-made postman tests for both part one and two of the project use these links: Postman Part 1 Tests & Postman Part 2 Tests
- Copy the link and in postman choose to import then paste the link under the link option. This should create a new collection with the needed tests.
- Merchants Index
- Merchants Show
- Merchant's Items Index
- Merchants Find
- Items Index
- Items Show
- Items Create
- Items Update
- Items Destroy
- Item's Merchant Index
- Items Find_All