This is application that immitates Cart behaviour during the online shopping.
- Ruby
3.1.2
- Postgresql (
brew install postgresql
)
- Clone this repo and install Ruby gems
gem install bundler
bundle install
- Start services (they should be started on startup)
brew services start postgresql
- Run rake task for database creation and seeding
rails db:setup
- Launch the server
rails s
To run the test suite
rspec
The are several routes available:
- http://localhost:3000 – list of available products
- http://localhost:3000/cart – cart, which contains all added products and displays prices. Cart is created automatically for each session
-
http://localhost:3000/admin/offers – administration zone, where offers can be managed. In order to access it, please use username
admin
and passwordadmin