- Rails-Engine is an app for developers to access the business database. The users are allow to search/find informations on merchants, items, and their invoices, as well as business analytic statistics
https://github.com/Omegaeye/rails-engine
- Khoa Nguyen - github - https://github.com/Omegaeye
- Getting Started
- Runing the tests
- Method Highlights/Tests
- Running the tests
- API End Points
- License
- Acknowledgments
gem 'fast_jsonapi'
gem 'rspec-rails'
gem 'capybara'
gem 'launchy'
gem 'pry'
gem 'simplecov'
gem 'shoulda-matchers', '~> 3.1'
gem 'orderly'
gem 'factory_bot_rails'
gem 'faker'
What things you need to install the software and how to install them
- rails
gem install rails --version 5.2.4.3
1. Clone Repo
2. Install gem packages: `bundle install`
3. Setup the database: `rails db:create`
4. Migrate and Seed the database: `rails db:setup`
- Trying out public_send, this particular method send the values to the method inside the model.
- Utilizing scope (class method), and the naming convention, the public_send able to pass the params value into the correct method.
In order to run all tests and see coverage run:
bundle exec rspec
-
All Merchants - http://localhost:3000/api/v1/merchants then add ?per_page=<number_per_page>&page=<page_number>
-
One Merchant - http://localhost:3000/api/v1/merchants/{{merchant_id}}
-
Find Merchants - http://localhost:3000/api/v1/merchants/find_all?name=
-
Find_all Merc. - http://localhost:3000/api/v1/merchants/find_all?name=
-
Merchant's Items - http://localhost:3000/api/v1/merchants/{{merchant_id}}/items
-
Merc most_items - http://localhost:3000/api/v1/merchants/most_items?quantity=
-
Merc revenue - http://localhost:3000/api/v1/revenue/merchants?quantity=1
-
Items - http://localhost:3000/api/v1/items then add ?per_page=<number_per_page>&page=<page_number>
-
Create Item - Post 'http://localhost:3000/api/v1/items'
-
Update Item - Patch 'http://localhost:3000/api/v1/items'
-
Delete Item - Delete 'http://localhost:3000/api/v1/items/{{item_id}}'
-
Item's Merchant - http://localhost:3000/api/v1/items/{{item_id}}/merchant
-
Find Items name - http://localhost:3000/api/v1/items/find?name=
-
Find Items Price - http://localhost:3000/api/v1/items/find?min_price= or max_price, or both
-
Revenue - http://localhost:3000/api/v1/revenue?start={{start_date}}&end={{end_date}}
-
Single Merc Rev - http://localhost:3000/api/v1/revenue/merchants/{{merchant_id}}
- Ruby/Rails
- HTML
- Me and me only
- My 2011 BE cohorts that helped me out a lot.