This is a rudimentary bill splitting/budgeting thingy (being) built in Ruby, using Sinatra and RSpec.
It's hosted on heroku, to use straight away.
Please don't use this with real currency! read the notes.
-
Clone/ Fork this repo here,
-
Navigate to the app folder in the command line and run
bundle install
. Install any missing dependencies. -
To start the app and server, run
ruby app.rb
and navigate to http://localhost:4567 in a web browser.
-
Enter the name of the food item into the first box.
-
Press tab / touch or select the next input to enter the cost of the previous item.
-
Press 'Add Munch', and continue to add further items, the total running cost will be displayed below the button
- Navigate to the app folder and run
rspec spec/
Don't use this in the real life with real currency, due to rounding errors in float arithmetic, there will be inaccuracies!
Global variables are being used here. This is generally bad practice, however, as there is no database or data persistence, this should not be an issue. Servers logs are captured by LogDNA.