Giter Club home page Giter Club logo

mod1-project's Introduction

The Colorado Beer Suggester

Table of Contents

General Info

The Colorado Beer Suggester is a CLI app which takes user input and accordingly suggests a beer from a Colorado microbrewery to try from its database.

Technologies

Ruby - Version 2.6.1 ActiveRecord - Version 6.0 Sinatra - Version 2.0 Sinatra-activerecord - Version 2.0 SQLite3 - Version 1.4 TTY Toolkit

Setup

This program comes equipped with all necessary gems. To use them locally, execute the command:

$ bundle

To install and use the database, run the commands:

$ rake db:seed

and

$ rake db:migrate

Finally, run the program with:

$ ruby runner.rb

Code Examples

    def beer_information(selection)
        chosen_beer = Beer.all.find do |beer|
        beer.name == selection 
        end
        table = TTY::Table.new ["Name", "Type", "Brewery", "ABV"], [["#{chosen_beer.name}", "#{chosen_beer.beer_type}", "#{chosen_beer.brewery.name}", "#{chosen_beer.abv}"]]
        puts table.render(:unicode) 
        puts "\n"
        add_to_favorites(@user, chosen_beer)
    end
if view_favorites_question
  favorite_beers = Favorite.all.map do |favorite|
      favorite.beer
    end.uniq
  puts "\n\n"
  table = TTY::Table.new header: ["Beer", "Type", "Brewery", "ABV"] do |t|
      favorite_beers.each do |beer|
           t << ["#{beer.name}", "#{beer.beer_type}", "#{beer.brewery.name}", "#{beer.abv}"]
      end 
  end 

Features

  • Browse beers by beer type
  • Return suggestions based on beer type
  • See beer details
  • Save beers to “to try” list
  • Remove beers from “to try” list
  • View “to try” list
  • Ability to quit application

Future features to be added:

  • Add API functionality to expand database
  • Ability to search by state
  • Contact and location info for breweries
  • Ability for users to add suggestions

Status

Project is: completed with option to add future functionality.

Contact

Created by Nolan Dyke and Chris Banta

License

Click to view

mod1-project's People

Contributors

nolan-dyke avatar kathleenscriver avatar chrisbanta avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

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.