GithubHelp home page GithubHelp logo

odongohcoder / flower-delivery-challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from refactor8/flower-delivery-challenge

0.0 0.0 0.0 245 KB

A flower delivery web application code challenge

Ruby 81.19% JavaScript 1.37% CSS 3.03% HTML 14.40%

flower-delivery-challenge's Introduction

Bloom & Wild Test

Hello! And welcome to the Bloom & Wild coding exercise.

We recommend you spend around 2-3 hours over this exercise, but how much time you take is up to you. Read through the brief below for details of what to do and what we're looking for.

Test brief

In this test you'll be building a simple app to enable placement of an order for a bouquet.

We'll be looking for things like:

  • A clean and simple solution
  • Done in a standard way
  • Solid use of tests

Getting started

We've provided you with a skeleton rails application -- once it's running, you can visit http://localhost:3000 and use the simple UI to place an order.

You should build on top of this solution for the tasks below.

Tasks

  • Add a feature test (there's an example already) which places an order.

  • Expand on (or delete) the model tests in spec/models

  • Add the ability to upgrade shipping (£2.50 per order) to "Special Delivery"

  • Create a new model called "Delivery" containing:

    • Bouquet
    • Recipient name
    • Delivery date
    • Reference to the order that created it
    • The shipping method to be used

    Do not connect it to anything else yet!

  • Add a rake task called "shipping". When this task runs it should take a date as an argument and create a Delivery object for all Order objects going out that day that have status "billed". It should set the status of Order to "complete" when it is done.

  • Add a new attribute to Order "three_month_bundle" that, if true, will have a delivery every month from the Order's delivery_on date for 3 months (Price increase is Bouquet.price * 3 but with a 10% discount on bouquet 2 and 3)

  • Update the Shipping task to make sure it produces deliveries for these bundles, orders should remain in "billed" until all three deliveries have been created.

  • Discussion: How might you improve the architecture of the code? Specifically think about what might happen if the application were to die mid way through processing an order and what will happen as complexity increases

flower-delivery-challenge's People

Contributors

bloomandwild-steve 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.