= codefumes_harvester

* http://codefumes.rubyforge.org/codefumes_harvester
* Wiki: https://github.com/cosyn/codefumes_harvester/wikis
* Repository: https://github.com/cosyn/codefumes_harvester
* Official CodeFumes.com gems: http://codefumes.rubyforge.org
* Website: http://www.codefumes.com

== DESCRIPTION:

CodeFumesHarvester provides a set of high-level tools for gathering
history and common metrics from a local repository and sending them to
CodeFumes.com[http://codefumes.com].

== FEATURES/PROBLEMS:

=== Features

* Executable +harvest_repo_metrics+ script which gathers a repository's
commit lineage
* Rake tasks for grabbing content from metric_fu (coverage,
lines of 'code code' vs 'test code' ratio).
* QuickMetric class which can be used to link a custom attribute to the
current repository commit identifier of a code base to a CodeFumes
project. This makes it trivial to send up custom attributes from
scripts, rake tasks, or even the console, if desired.

=== Problems / Things to Note
* The only supported SCM right now is git. We know this sucks. Adding
in other SCMs shouldn't be hard, and is planned. It's just not done
yet.

== SYNOPSIS:

=== Associating a repository to a CodeFumes.com project

# Use +harvest_repo_metrics+ to create a project on CodeFumes.com
# In your terminal (not IRB):

# If you don't care what the public key of your project is:
$ harvest_repo_metrics
=> results in a project URI similar to: http://codefumes.com/p/uPnf

# If you want to customize the public_key of your project:
$ harvest_repo_metrics -k my_custom_key
=> results in a project URI of: http://codefumes.com/p/my_custom_key
(assuming it was not already taken)

# If you are on another machine and want to update that project,
# you can pass both the public & private keys of the project for
# authentication:
$ harvest_repo_metrics -k my_custom_key -a some-generated-private-key


=== Sending up custom metrics using QuickMetric

# Send up your own data and associate it with the current commit
# (HEAD, in git parlance) of your current directory. This makes the
# (bold) assumption that the repository is already set up as a CodeFumes
# project, and that you want to link the data provided to the current
# commit only (think 'rake task' and 'build server').
#
# An IRB example:
> require 'codefumes_harvester'
> QuickMetric.save(:name_of_metric => "some value")
=> true # returns +false+ if it failed
...that's all

=== Sending up coverage info from metric_fu output
# Assuming you have run 'rake metrics:all'
$ rake cf:metric_fu:coverage

=== Sending up lines of code code / lines of test code ratio

# This is only on Rails projects, I believe
$ rake cf:metric_fu:loc_lot_stats


== REQUIREMENTS:

* +codefumes+ gem

== INSTALL:

From Gemcutter:

sudo gem install codefumes_harvester

== LICENSE:

(The MIT License)

Copyright (c) 2009 FIXME full name

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.