Travis - build all the branches.
Require some different gems in 1.8 and 1.9

* Require ruby-debug (only for Ruby 1.8.x)
* Add simplecov for ruby 1.9
* Don't load rcov tasks in 1.9
Fix for bug that was affecting parsing of 0.6 JSON feeds in Core

Previously it wouldn't correctly parse feed with empty values array.
Raised exception rather than parsing everything else.

Fixing spec that had commented out stuff incorrectly.

Accept JSON with version 0.6 (not just 0.6-alpha).

Core currently accepts this via the old EEML gem, so this maintains
compatability.
Bunch of fixes and tweaks to the parsing logic.

Use FasterCSV for parsing.

Need to be a little careful with how we require it, as if we are in 1.9
mode, then FasterCSV is the default, so we:

 * check ruby version
 * if 1.9 require 'csv'
 * if 1.8 require 'fastercsv' then alias that as CSV
 * tweak gemspec so that it manages the csv dependency properly

When parsing, capture timestamps from CSV if v2 and we have 3 values per row.

Don't alter the top level definition of CSV.

Could step on toes of any other code trying to use Cosm-rb. Not totally
happy with this solution but at least it keeps it tidied away.

Possibly controversial - preserve behaviour of EEML gem.

Strip whitespace from start/end of tags in XML.

Don't just do a join of tags extracted from XML.

This breaks if any tag contains a comma. Need to properly quote tags
like this, so use the CSV library line generation.

Added spec for the breaking XML parser issue.

Handles dodgy tags in XML better.

Added custom attr_accessor method that strips white space on writing

Currently just converted datastream to use this.

Syntax change to make work in 1.9

The case statement syntax defined in the class_eval method seems to need
tweaking to work with 1.9.

Extra protection against trying to extract value from nonexistent node.

In xml 5.1 we try and extract timestamp and value from current_value
node. Don't do that if the node isn't present.

Raise exception if passed CSV with many columns.

This is never valid.

Handle XML mising the base environment node more gracefully.

Rather than just bailing after calling #attributes on a nil class, raise
an exception with a explanatory message.

Add incorrect number of fields exception message.

Don't set tags element if no tags present in xml

Manually strip whitespace from xml input

Where the value comes from the node contents (rather than attributes).
This problem really only affects XML where extra white space might be
introduced by formatting (i.e. add a newline after an opening tag). In
JSON and CSV this issue doesn't really arise, so assume for JSON that
any whitespace surrounding a value is intentional.

Couple more fixes for parsing errors in core, and increase coverage.

Duplication of if clause missed capturing some data.

Removed duplicate if, and added spec to verify desired behaviour.

Datastream CSV parser wasn't yet set up to capture timestamps.

This resolves that, also add exception handling so it raises if passed
CSV we shouldn't be parsing.
Bump version to 0.0.4
Build tweaks

Omit lib/cosm-rb.rb from SimpleCov

Coverage failure an artifact of coverage library I think.

This gets coverage to 100% by putting the hash merge invocation on a
single line. I suspect it was actually covered before (SimpleCov already
reported it at 100%), but rcov wasn't able to detect this. Putting it
all on a single line fixes this.

Enable all branches in travis config.

Set COVERAGE=on environment variable
Merge pull request #5 from smulube/feature/eeml_replace_rebase

Feature/eeml replace rebase