Permalink
Commits on Nov 17, 2013
  1. Add simple script to export transactions as CSV

    I can imagine that I might build this into the app at some point, but
    this'll do for now.
    chrisroos committed Nov 17, 2013
  2. Add newlines to the end of each file

    As is good practice generally, and recommended in the Ruby Style Guide.
    chrisroos committed Nov 17, 2013
  3. Add rubocop to the development group

    I've used this in the past to check my code against the Ruby Style
    Guide[1]. I figure that it won't do any harm to keep it in the
    development group of the repo.
    
    [1] https://github.com/bbatsov/ruby-style-guide
    chrisroos committed Nov 17, 2013
  4. Remove vendor/plugins

    This is no longer supported by Rails so I'm removing it.
    chrisroos committed Nov 17, 2013
  5. Remove .gitkeep files

    Rails now uses .keep files instead of .gitkeep. Running the Rails 4
    setup over the top of this existing repo means that I've now got the
    .keep files.
    
    I renamed a couple of the '.gitkeep' files to '.keep', where the
    equivalent .keep file didn't exist.
    
    I found the '.gitkeep' files with: `find . -name ".gitkeep" | grep -v
    ".bundle"`.
    chrisroos committed Nov 17, 2013
  6. Remove unnecessary #encoding comments

    These are no longer necessary as utf-8 is the default encoding in Ruby
    2.
    chrisroos committed Nov 17, 2013
  7. Add autocomplete to the Location field

    This is similar to the commits that added autocomplete to the
    descriptions[1] and categories[2]. The difference here is that the set
    of location options are dependent on the description field, in order to
    limit the set of possibilities.
    
    I wasn't able to use the simple format of `autocomplete` in
    application.js, as I need to get hold of the description at the time I
    make the request to get the set of autocomplete suggestions. Setting the
    `source` option to a string doesn't allow me to do this.
    
    I've added an additional 'transaction' class to the form element in the
    edit template, so that I can target the transaction container given the
    location field.
    
    [1] d94e1bd
    [2] c7a0ca0
    chrisroos committed Nov 17, 2013
  8. Update README

    Update the instructions to download/import a database dump from ./tmp
    rather than the app directory.
    
    Add a newline to the end of the file.
    chrisroos committed Nov 17, 2013
Commits on Nov 14, 2013
  1. Merge branch 'upgrade-to-rails-4'

    All the tests pass and I've tested that it correctly deploys to Heroku.
    chrisroos committed Nov 14, 2013
  2. Add Heroku rails_12factor gem

    Apparently this is required for a Rails 4 app to serve assets in
    production[1].
    
    [1] http://stackoverflow.com/questions/15354539/heroku-does-not-compile-files-under-assets-piplines-in-rails-4
    chrisroos committed Nov 14, 2013
Commits on Nov 13, 2013
  1. Fix broken exception notifier config

    Prior to this, I was seeing the following error in the Heroku logs:
    
        undefined method `new' for ExceptionNotifier:Module (NoMethodError)
    
    The info on upgrading is in the Exception Notifier README[1].
    
    [1] https://github.com/smartinez87/exception_notification#upgrading-to-4x-version
    chrisroos committed Nov 13, 2013
  2. Avoid deprecation warning with default scope

    The warning was:
    
    DEPRECATION WARNING: Calling #default_scope without a block is
    deprecated. For example instead of `default_scope where(color: 'red')`,
    please use `default_scope { where(color: 'red') }`.
    chrisroos committed Nov 13, 2013
  3. Upgrade to Rails 4.0.1

    I ran `rails new money-tracker` from this app's parent directory and
    then went through each of the changed files and manually merged their
    contents where applicable.
    
    I've had to disable turbolinks (it was added to application.js by
    default) to avoid the 'Editing multiple transactions with javascript'
    test from failing. Everything appeared to work OK in development even
    with turbolinks enabled.
    chrisroos committed Nov 13, 2013
  4. Remove use of attr_protected

    This is no longer required as I'm using strong parameters. Removing this
    now should make the upgrade to Rails 4 go a little smoother.
    chrisroos committed Nov 13, 2013
  5. Fix asset precompilation

    Running `rake assets:precompile` failed on Heroku (and locally) with the
    following error: "'fontawesome.less' wasn't found". This change (as per
    the README[1]) fixes the problem in development and will hopefully do
    the same on Heroku.
    
    [1] https://github.com/seyhunak/twitter-bootstrap-rails/#icons
    chrisroos committed Nov 13, 2013
  6. Specify Ruby 2.0.0

    I've additionally specified 2.0.0-p247 (which is the version on
    Heroku[1]) in .ruby-version even though that's not in the repo.
    
    All the tests pass on my laptop so I'm hoping they'll pass on Travis and
    that it'll all just work once deployed to Heroku.
    
    [1] https://devcenter.heroku.com/articles/ruby-support#ruby-versions
    chrisroos committed Nov 13, 2013
  7. Update bundled gems

    I ran `bundle update`. I think/hope this'll make it easier to upgrade to
    Rails 4.
    chrisroos committed Nov 13, 2013
Commits on Sep 4, 2013
Commits on May 24, 2013
  1. Disable uploads in 'demo mode'

    Now that I've got some seed data I can use to demonstrate money tracker, I'd
    rather avoid the chance of someone uploading their personal data.
    chrisroos committed May 24, 2013
  2. Add seed data

    I want to populate the demo site with dummy data so that people can get an
    idea of how it might work.
    chrisroos committed May 24, 2013
  3. Update migrations

    Resetting the column information of the models in the system means that I can
    load the seed data immediately after running the migrations.
    chrisroos committed May 24, 2013
Commits on May 18, 2013
  1. Merge branch 'display-original-data-on-edit-forms'

    Display original date and description on bulk/single edit forms.
    chrisroos committed May 18, 2013
  2. Fix a failing test

    The addition of the 'should display original description in the edit form'
    test in the previous commit caused this test to start failing. The test would
    pass when run alone, or as part of all transaction controller tests, but it
    would fail when run with rake. For whatever reason, the addition of the
    aforementioned test resulted in `Transaction.search 'test description'`
    returning the transactions in a different order.
    
    Once I realised what was happening I focussed on my 'should add a class to the
    first transaction on a given day' and noticed that it was asserting things
    about the markup that it couldn't know for sure (i.e. the order in which the
    transactions would be returned from `Transaction.search`). I've now updated it
    so that it just checks for the presence of a single `firstOfDay` class.
    chrisroos committed May 18, 2013
  3. Display original data on the edit form

    I think this'll help when editing the date or description.
    chrisroos committed May 18, 2013
  4. Display original data on bulk edit form

    I think this'll help when editing the date or description.
    chrisroos committed May 18, 2013
Commits on May 4, 2013
  1. Merge branch 'add-accounts'

    This is a little clunky but should hopefully be good enough for now. You can
    upload statements from multiple accounts and they'll be associated with the
    correct account automatically. The account name (which is only editable
    through the console) is currently shown against each transaction but I imagine
    that it'll make more sense to have the transactions index be nested under an
    account resource in the near future.
    chrisroos committed May 4, 2013
  2. Allow accounts to be named

    The `Account#name` defaults to `Account#account_id` when not explicitly set.
    This isn't used in the frontend yet but I'm planning to add it to the table of
    transactions soon.
    chrisroos committed May 4, 2013
  3. Associate transactions with accounts

    *NOTE* After running the migration in this commit, you'll want to update the
    account_id of the account created, or manually merge the accounts (in the
    Rails console) after a subsequent import.
    
    * The migration creates a generic account and associates all existing
    transactions with this account.
    
    * The `StatementImporter` is responsible for finding or creating the account
    referred to by the ACCTID field in the OFX file. It's possible I'll want to
    restrict this further by BANKID in future but the ACCTID should be good enough
    for now.
    
    * Although accounts aren't referred to anywhere in the frontend, it *should*
    (as of this commit) be possible to upload transactions from multiple banks and
    not lose any data.
    chrisroos committed May 4, 2013
  4. Add accounts

    Accounts need an account_id (I'm imagining that I'll use the account_id field
    from the OFX file here) that's both present and unique.
    
    Transactions aren't currently linked to accounts.
    chrisroos committed May 4, 2013
  5. Add missing constraints to Heroku database

    I'm not sure why but the database on Heroku doesn't have the not-null
    constraint set on the created_at or updated_at columns of the uploads table.
    chrisroos committed May 4, 2013
  6. Merge branch 'rubocop-suggestions'

    I've fixed most of the warnings generated by rubocop but do have a few left.
    
    Those left are either:
    
    * 'Line is too long', which I'm not going to attempt to 'fix' in bulk
    
    * In the auto-generated db/schema.rb which there's nothing I can do about
    
    * In the feature step definitions that I'm planning to change when I change
    the style of Cucumber in use in the project.
    chrisroos committed May 4, 2013
  7. Remove unused variables

    chrisroos committed May 4, 2013