Giter Site home page Giter Site logo

marcooquendoc / catalogofmythings-rubycapstone Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 6.45 MB

Console app that will help keeping record of different types of things you own like: books, music albums, movies, and games

License: MIT License

Ruby 99.71% Nix 0.29%

catalogofmythings-rubycapstone's Introduction

πŸ“— Table of Contents

πŸ“– Catalog of My Things - Ruby Capstone

Catalog of My Things - Ruby Capstone is a simple console app that allows users to manage collections of the things they own.

πŸ›  Built With

Tech Stack

Client
Database

Key Features

  • [Create and manage data about my things]
  • [Add a Book]
  • [Add a Game]
  • [Add a Music Album]
  • [List all added items]
  • [Keep track of books, music albums, movies, and games and other information]

(back to top)

πŸš€ Project Documentation

Please visit our zoom video presentation. Click the Link button.

Diagram

Diagram

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

ruby version 2.7.0 or later

Setup

Clone this repository to your desired folder:

  git clone https://github.com/MarcoOquendoC/CatalogOfMyThings-RubyCapstone.git
  cd CatalogOfMyThings-RubyCapstone

Install

Install this project with:

  bundle install

Usage

To run the project, execute the following command:

  ruby main.rb

Run tests

To run tests, run the following command:

  rspec src/spec

Deployment

Please visit and try the app. Click the Run button.

(back to top)

πŸ‘₯ Authors

Fabio FΓ‘bio Lima

Marco Marco Oquendo

Miliyon Miliyon Ayalew

(back to top)

πŸ”­ Future Features

  • [Integration with PostgreSQL]
  • [Refactor files and code to match the drawing below] image
  • [Refactor reading the data to get wired associations] image

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project please leave a star.

(back to top)

πŸ™ Acknowledgments

I would like to thank everyone whose code was used or served as inspiration.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

catalogofmythings-rubycapstone's People

Contributors

limavfabio avatar marcooquendoc avatar miliyonayalew avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

miliyonayalew

catalogofmythings-rubycapstone's Issues

[1pt] Create genre.rb file

  • Create Genre class with an association to the Item class (in a separate .rb file).

  • All Genre class properties visible in the diagram should be defined and set up in the constructor method.

catalog_of_my_things

[1pt] Create music_album.rb file.

  • Create MusicAlbum class in a separate .rb file.

  • All MusicAlbum class properties visible in the diagram should be defined and set up in the constructor method.

catalog_of_my_things

[1pt] Create schema for Genre and MusicAlbum tables

  • Create a schema.sql file with tables that will be analogical to the structure of the classes that you created:
    • music_albums table (add all properties and associations from the parent Item class as table columns)
    • genres table

catalog_of_my_things

[1pt] Create an Author Class

  • Create an Author class with an association to the Item class (in a separate .rb file).
  • Author class properties visible in the diagram should be defined and set up in the constructor method.
    catalog_of_my_things

[2pt] Implement methods in the Author Class

add_item method in the Author class

  • should take an instance of the Item class as an input
  • should add the input item to the collection of items
  • should add self as a property of the item object (by using the correct setter from the item object)

can_be_archived?() in the Game class

  • should override the method from the parent class
  • should return true if parent's method returns true AND if last_played_at is older than 2 years
  • otherwise, it should return false

[1pt] Create a Label class

Create a Label class with an association to the Item class (in a separate .rb file).

  • All Label class properties visible in the diagram should be defined and set up in the constructor method.

catalog_of_my_things

[1pt] Add methods to Item class.

Implement methods:

  • can_be_archived?

    • It should return true if published_date is older than 10 years. Otherwise return false.
  • move_to_archive

    • It should reuse can_be_archived?() method
    • It should change the archived property to true if the result of the can_be_archived?() method is true.
    • It should do nothing if the result of the can_be_archived?() method is false.

[1pt] Create a schema.sql for Games and authors table

Create a schema.sql file with tables that will be analogical to the structure of the classes that you created:

  • games table (add all properties and associations from the parent Item class as table columns)
  • authors table

[1pt] Create Book Class

Create a Book class in a separate .rb file.

  • All Book class properties visible in the diagram should be defined and set up in the constructor method.

catalog_of_my_things

[1pt] Implement add_item method in the Label class

Add_item method in the Label class

  • Should take an instance of the Item class as an input
  • Should add the input item to the collection of items
  • Should add self as a property of the item object (by using the correct setter from the item object)

[2pt] Implement startup actions.

  • Present the user with a list of options to perform.
  • Let users choose an option.
  • If needed, ask for parameters for the option.
  • Have a way to quit the app.

[1pt] Linters + Create a main.rb

  • Setup the linters and conection to replit.
  • Create app.rb file with basic class
  • Create the file main.rb that will serve as the console app entry-point.

It should look like this:

require_relative 'app'

def main
  system('cls')
  system('clear')
  puts "________Welcome to Catalog Of My Things App!________\n "
  app = App.new
  app.run
end

main

[2pt] Implement methods for MusicAlbums and Genre classes

  • Create add_item method in the Genre class

    • should take an instance of the Item class as an input
    • should add the input item to the collection of items
    • should add self as a property of the item object (by using the correct setter from the item object)
  • can_be_archived?() in the MusicAlbum class

    • should override the method from the parent class
    • should return true if parent's method returns true AND if on_spotify equals true
    • otherwise, it should return false

[1pt] Create a Game Class

  • Create a Game class in a separate .rb file.
  • Class properties visible in the diagram should be defined and set up in the constructor method.
    catalog_of_my_things

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.