In this project, we created a console app that will help users to keep a record of different types of things you won: books, music albums, movies, and games. Everything based on the UML class diagram. The data stored in JSON files but we also prepared a database with tables structure analogical to our program's classes structure.
- Description
- Built With
- Getting Started
- Prerequisites
- Setup
- Usage
- Testing
- Database
- Collaborators
- Show Your Support
- Acknowledgments
- License
A console app that will help you to keep a record of different types of things you won: books, music albums, movies, and games.
- Technologies:
Ruby
,PostgreSQL
,RSpec
Check the following instructions to install and use the project in you local machine!
To begin with, you need to be able to use the ruby command, if you don't have it you can install it using any of these commands:
brew install rbenv ruby-build
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
# Install Ruby
rbenv install 3.0.1
rbenv global 3.0.1
ruby -v
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 3.0.1
rbenv global 3.0.1
ruby -v
Use WSL
Once you have installed ruby you need to clone this project's repository, use this command in your terminal:
$ git clone https://github.com/aimemalaika/catalog-ruby.git
$ cd catalog-ruby
To open the app in your terminal run this command:
$ ruby ./main.rb
$ rspec ./spec
This repository includes files with plain SQL that can be used to recreate a database:
- Run this in your bash terminal to gain access to postgres command line
$ psql postgres
- Create a new database with any name ('vet-clinic' is suggested), and connect to that database.
# CREATE DATABASE <database_name>;
# \c <database_name>
- Use schema.sql to create all tables. Copy and paste the content of this file into the postgres command line. That should create the tables in your database. Now verify it. The following command displays all tables in your database:
# \d
And that's pretty much all. At this point, feel free to experiment by inserting data and running queries!
👤 Aime Malaika
Platform | Badge |
---|---|
GitHub | @aimemalaika |
@aimemalaika | |
aimemalaika |
👤 Kyrillos
Platform | Badge |
---|---|
GitHub | @bondok6 |
@kyrillos | |
kyrillos |
👤 Eduardo
Platform | Badge |
---|---|
GitHub | @eduardosancho |
@sanchitobless | |
Eduardo |
Give a ⭐️ if you like this project!
The ideas and inspiration from this project are coming from this online school of software development:
This project is MIT licensed.