paperlesspost/bi — pull request #4 by ukd1 (2014-06-21 17:55:00+00:00)
Title: Feature/travis ci

Basic Travis-Ci support. It's currently failing on;

```
$ bundle exec rake
*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
Run options: --seed 39317
# Running tests:
ConnectionChooserTest | ....
| 0.01 s
KpiCalculatorTest | ...F
| 0.01 s
KpiResultTest | ...
| 0.03 s
KpiTest | .
| 0.01 s
QuestionTest | ...........
| 0.02 s
QuestionsHelperTest |
ReportTest |
ReportsHelperTest |
UserTest |
VisualizationsHelperTest |
Finished tests in 0.080351s, 286.2429 tests/s, 1045.4090 assertions/s.
1) Failure:
KpiCalculatorTest#test: build sql should build the correct sql. [/home/travis/build/ukd1/bi/test/unit/kpi_calculator_test.rb:33]:
<"SELECT'2013-03-15'asdate,CAST('Total'asvarchar(255))asevent_type,COUNT(CASEWHENa.created_atBETWEEN'2013-03-1504:00:00+0000'AND'2013-03-1604:00:00+0000'THENa.idELSENULLEND)asToday,COUNT(CASEWHENa.created_atBETWEEN'2013-03-0904:00:00+0000'AND'2013-03-1604:00:00+0000'THENa.idELSENULLEND)asT7Days,COUNT(CASEWHENa.created_atBETWEEN'2013-02-1404:00:00+0000'AND'2013-03-1604:00:00+0000'THENa.idELSENULLEND)asT30Days,COUNT(CASEWHENa.created_atBETWEEN'2013-01-0104:00:00+0000'AND'2013-03-1604:00:00+0000'THENa.idELSENULLEND)asQTD,COUNT(CASEWHENa.created_atBETWEEN'2013-01-0104:00:00+0000'AND'2013-03-1604:00:00+0000'THENa.idELSENULLEND)asYTDFROMaccountsaWHEREa.created_atBETWEEN'2013-01-0104:00:00+0000'AND'2013-03-1604:00:00+0000'"> expected but was
<"SELECT'2013-03-15'asdate,CAST('Total'asvarchar(255))asevent_type,COUNT(CASEWHENa.created_atBETWEEN'2013-03-1504:00:00-0400'AND'2013-03-1604:00:00-0400'THENa.idELSENULLEND)asToday,COUNT(CASEWHENa.created_atBETWEEN'2013-03-0904:00:00-0500'AND'2013-03-1604:00:00-0400'THENa.idELSENULLEND)asT7Days,COUNT(CASEWHENa.created_atBETWEEN'2013-02-1404:00:00-0500'AND'2013-03-1604:00:00-0400'THENa.idELSENULLEND)asT30Days,COUNT(CASEWHENa.created_atBETWEEN'2013-01-0104:00:00-0500'AND'2013-03-1604:00:00-0400'THENa.idELSENULLEND)asQTD,COUNT(CASEWHENa.created_atBETWEEN'2013-01-0104:00:00-0500'AND'2013-03-1604:00:00-0400'THENa.idELSENULLEND)asYTDFROMaccountsaWHEREa.created_atBETWEEN'2013-01-0104:00:00-0500'AND'2013-03-1604:00:00-0400'">.
23 tests, 84 assertions, 1 failures, 0 errors, 0 skips
```

What version of Postgres does this require?