GithubHelp home page GithubHelp logo

crystalpea / takeaway-challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makersacademy/takeaway-challenge

0.0 1.0 0.0 76 KB

Use the Twilio Gem to order food

License: Other

Ruby 100.00%

takeaway-challenge's Introduction

Takeaway Challenge

"Pierozki"

==================

                            _________
              r==           |   <3  |
           _  //            |  Pier |   ))))
          |_)//(''''':      |  ozki |
            //  \_____:_____.-------D     )))))
           //   | ===  |   /        \
       .:'//.   \ \=|   \ /  .:'':./    )))))
      :' // ':   \ \ ''..'--:'-.. ':
      '. '' .'    \:.....:--'.-'' .'
       ':..:'                ':..:'

==================

Welcome to "Pierozki", a take-away serving Polish vegan cuisine. Warning!!! Seriously delicious!

This project is a simulation of a take-away service that I prepared as a part of web development course at Makers Academy, London.

It lets you:

  • see a menu of available dishes,
  • create an order,
  • add multiple portions of dishes to your order
  • see order
  • check if the order sum total is correct
  • remove unwanted items from your order
  • place an order (and get a confirmation text message wit ETA of your order!)

==================

User stories covered:

As a customer
So that I can check if I want to order something
I would like to see a list of dishes with prices

As a customer
So that I can order the meal I want
I would like to be able to select some number of several available dishes

As a customer
So that I can verify that my order is correct
I would like to check that the total I have been given matches the sum of the various dishes in my order

As a customer
So that I am reassured that my order will be delivered on time
I would like to receive a text such as "Thank you! Your order was placed and will be delivered before 18:52" after I have ordered

How to use:


  • Fork this repo
  • Run the command 'bundle' in the project directory to ensure you have all the gems
  • Enter following commands in irb/pry:

To start:

require './lib/takeaway'
takeaway = TakeAway.new(DishesMenu, Order, SMS.new)

To see available dishes (pay attention to index numbers of dishes, you will need them for ordering):

takeaway.show_menu

To create an order:

takeaway.create_order

To add dishes to your order:

takeaway.add(dish_index, quantity)

To see your order:

takeaway.show_order

To remove a position from your order enter following command with dish index as shown on your order (not on the menu!):

takeaway.remove_items(dish_index_from_order)

To check if your total is correct:

takeaway.correct?

To place your order:

takeaway.place_order

Number specified in send_text private method will receive a text message with order confirmation and ETA. This code can be easily updated to accept any number as an argument, but then it would need a premium Twilio account to operate.

This repo works with Coveralls to calculate test coverage statistics on each pull request.

Build Status Coverage Status

takeaway-challenge's People

Contributors

tansaku avatar silvabox avatar dbugsy avatar ptolemybarnes avatar anitacanita avatar roidriscoll avatar sdorunga avatar

Watchers

James Cloos 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.