/budget-ragnarson

Simple budgeting application - Fall 2012 Internship

Primary LanguageRubyMIT LicenseMIT

Using this application you are able to control your finances by easily managing the household wallet. You can add new categories, expenses and income. In a simple way you can plan a category by adding the future expenses. You can invite other people (eg, family members), so that all have access to the management of the wallet.

Application is being developed during internship at Ragnarson. Source code is provided under MIT license.

Demo

Demo application can be found at budget.shellyapp.com

Team

Mentors

Interns

Before you make a commit

  1. Ask yourself: am I done? Is this commit a complete cohesive unit of work that can be tested by the end-user? Avoid making commits that add only a part of the functionality, e.g. only the model. Try to do less work, but make it span all levels of the application, i.e. make a real user-facing functionality. If you’re not done, get back to code and commit later.

  2. Run ‘bundle install` if you have changed Gemfile. Include updated Gemfile.lock in your commit: `git add Gemfile.lock`.

  3. Run ‘rake db:migrate` if you have added a migration. Include updated schema.rb in your commit: `git add db/schema.rb`.

  4. Make sure ‘git status` shows no unstaged changes, i.e. there should be no “Changes not staged for commit:” nor “Untracked files:” in the output. If there are, either `git add` them or remove them.

  5. Run the tests to make sure your change didn’t break anything: ‘rake test`. If it did, fix it and go to step 4 again.

  6. Review your own change: ‘git diff –cached`. Make sure everything looks as you intended. This diff is what will be reviewed later by senior developers. If you have to fix something, do it and go to step 4 again.

  7. When reviewing take note if there are tests included. In particular, if you’ve changed (or added) a controller, view or helper, you need to change (or add) a functional test. If you’ve changed (or added) a model or mailer, you need to change (or add) a unit test. If the tests are missing, write them and go back to step 4.

  8. Finally, commit your change, describing in the commit message the reason why it was made. Try to include information that is not clearly visible in the code.

PostgreSQL setup

Following description assumes that you have installed and running PostgreSQL server. Its installation procedure may vary depending on your operating system and it’s not mentioned here. In order to run application using PostgreSQL database, please copy config/database.yml.example as config/database.yml. By default, application uses ‘budget’ as your database name, login and password. Please follow those steps.

(1) Connect to database using your Superuser role (ex. ‘postgres’)

$ psql -U postgres

(2) Using SQL query create user and setup password

postgres=# CREATE USER budget WITH PASSWORD 'budget';

(3) Create database and assign its owner

postgres=# CREATE DATABASE budget WITH OWNER budget;

Your database should already be configured. You’re now ready to run application.

Integration tests with phantomjs

Integration testing using phantomjs. Remember to add phantomjs to your PATH.