GitmeTime

GitmeTime is an hook for git that logs each commit on the Basecamp timeline.

Once installed and configured for your project, gitme_time will create an entry in your basecamp timeline for each commit you do. The message of the commit will be in the format <commit.message> (<commit.branch> : <commit.sha>) with an empty duration.

If you specify a number between square brackets in your commit message, it will be used as time entry duration. e.g.:

    git commit -am "small refactoring [2]" # => entry with description "small refactoring" and duration of 2 hours

Duration Format

Duration of a commit has to be specified at the end of the message inside the square brackets. It's published on basecamp using the basecamp format:

    2 => 2 hours
    2.5 = 2:30 => 2 hours and 30 minutes

Installation

Require it inside your project Gemfile:

    group :development do
      gem 'gitme_time', '~> 0.1.0'
    end

Configuration

First of all, you need to setup your basecamp credentials:

    git config --global --add basecamp.username <username>
    git config --global --add basecamp.password <password>

Then, inside your project, launch gitme_time init to configure your project:

    cd /path/to/git/project
    gitme_time init

This will create the project config file if not exist and will add a git post-commit hook. Upon each commit, the hook will send your data to the configured basecamp domain.

Note: remember to add the project config file (.gitme_time.yml) to the git repo, so all your teammates will log the entries inside the same domain/project

TODO

  • Specs! I had no time to write them.

Get ready to contribute!

  • Fork this repo
  • Run 'bundle install --binstubs=bin/stubs' from the repo
  • Run the specs with either 'thor spec' or 'guard'