/flowershop

An implementation of the Cogent Flowershop coding exercise.

Primary LanguageRuby

TODO:

  • decide on input format
  • decide on output format
  • input and output to flowershop.rb is unimplemented due to running out of time.

The Flowershop

This program will calculate the number and types of bundles for incoming flower orders.

Prerequisites

  • Ruby v2.1.0. Older versions of Ruby 1.9+ should work fine, although they haven't been tested.
  • RSpec v2.14.1. RSpec is required to run the test suite.
  • RVM. RVM is optional but support has been added for specific ruby versioning and a dedicated gemset.

Configuration

Configuration options are specified in the config folder. There are a number of configration options that you can set:

  • product_range.yml. This file lists the flower product range, pricing and bundle combinations.

Running the program

TODO

input output

Running the tests

This program also includes a full test suite that you can use to verify the behaviour of the program and examples of how to run the program effectively. The testing suite will requirerspec to run.

To run the test scripts, run rspec in the program directory.