adriennem76 / guided-module-one-project-assessment-nyc-web-062419

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UFO Sightings CLI

Install

Gems Needed: gem "sinatra-activerecord" gem "sqlite3" gem "pry" gem "require_all" gem "faker" gem "colorize"

Run bundle install in your terminal.

To seed the databse with the inital data run rake db:seed in your terminal. (This will take ~ 20 min, here are some videos to watch while you wait: https://www.youtube.com/results?search_query=ufo+sightings 🛸)

Running the App

Run ruby bin/run.rb in your terminal to run the app.

Usage

The following is a menu of commands that you can enter in your terminal and their description:

COMMANDS: DESCRIPTION:

report : report a UFO sighting, find : search for sightings by location, shape, or date, my sightings : displays your UFO sightings, edit : edit one of your UFO sightings, delete : delete one of your UFO sightings, disappear : delete your username and all of your sightings, help : displays the menu, exit : exits the program

You can also force quit the program with 'CTRL-c' at any time.

RE-SET DATABASE

If you would like to delete all of your database data and then repopulate it, first run the following two lines of code in 'rake console' in your terminal:

User.delete_all

ActiveRecord::Base.connection.execute(“DELETE from sqlite_sequence where name = 'users’”)

Then, un-comment out lines 11-12 in the seeds.rb file and run rake db:seed again.

Screenshots

Screen Shot 2019-07-12 at 11 00 28 AM

A new user can be created.

Screen Shot 2019-07-12 at 9 46 36 AM

An existing user can log back in to their username.

Screen Shot 2019-07-12 at 11 01 01 AM

A sighting can be reported.

Screen Shot 2019-07-12 at 11 07 44 AM

A user can view a list of all their reported sightings.

Screen Shot 2019-07-12 at 11 06 08 AM

Sightings can be looked up by date.

Screen Shot 2019-07-12 at 11 04 37 AM

Sightings can be looked up by shape.

Screen Shot 2019-07-12 at 11 02 52 AM

Sightings can be looked up by location.

Screen Shot 2019-07-12 at 11 08 59 AM

A user can select a sighting to edit from their list of reported sightings.

Screen Shot 2019-07-12 at 11 10 42 AM

The date of sightings can be edited.

Screen Shot 2019-07-12 at 11 10 09 AM

The location of sightings can be edited.

Screen Shot 2019-07-12 at 11 09 40 AM

The shape of sightings can be edited.

Screen Shot 2019-07-12 at 11 11 11 AM

A user can choose a sighting to delete from their list of reported sightings.

Screen Shot 2019-07-12 at 11 07 09 AM

A user can 'disappear' which will delete their username and all of thier reported sightings.

Authors

Kyle Conlon

Adrienne Miranda

Acknowledgments

UFO sighting data was provided by: https://www.kaggle.com/NUFORC/ufo-sightings

👽🛸👽

About

License:Other


Languages

Language:Ruby 100.0%