restorando/cube — pull request #2 by gschammah (2013-11-01 03:23:59+00:00)
Title: restore original week and month tiers from cube 0.1.4

@abecciu

Encontre que la version 0.1 de cube soportaba week y month tiers. Copie los tests de esos tiers a nuestro repo y fallan todos. Asi que modifique los tiers qeu creaste para que queden como estaban en la version original de cube, y les agregue los `bins` que la version 0.1 no tenia. Tambien volvi a deshabilitar los tiers mas chicos ya que sino cube tarda unos 10 min en procesar cualquier metrica.

No me quedo claro que son los `bins`, pero encontre otra clase que hace uso de `bins` y `tiers` y no se si afecta el hecho de que no le hayamos agregado los week y month tiers. Quizas vos estas mas en tema. El archivo es https://github.com/restorando/cube/blob/master/lib/cube/models/event.js#L42-L56

Aca esta el output de los tests que fallaron

```
week floor
✗ rounds down to weeks
» expected Sun, 04 Sep 2011 00:00:00 GMT,
got	Mon, 29 Aug 2011 03:00:00 GMT (deepEqual) // tiers-test.js:350
✗ does not modify the passed-in date
» expected Sun, 04 Sep 2011 00:00:00 GMT,
got	Mon, 29 Aug 2011 03:00:00 GMT (deepEqual) // tiers-test.js:358
week ceil
✗ rounds up to weeks
» expected Sun, 04 Sep 2011 00:00:00 GMT,
got	Mon, 05 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:365
✗ does not modified the specified date
» expected Sun, 04 Sep 2011 00:00:00 GMT,
got	Mon, 05 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:373
week step
✗ increments time by one week
» expected Sun, 11 Sep 2011 00:00:00 GMT,
got	Tue, 06 Sep 2011 00:00:00 GMT (deepEqual) // tiers-test.js:381
✗ does not round the specified date
» expected Fri, 09 Sep 2011 12:21:23 GMT,
got	Mon, 05 Sep 2011 12:21:23 GMT (deepEqual) // tiers-test.js:388
✗ does not modify the specified date
» expected Sun, 11 Sep 2011 00:00:00 GMT,
got	Tue, 06 Sep 2011 00:00:00 GMT (deepEqual) // tiers-test.js:392
month floor
✗ rounds down to months
» expected Thu, 01 Sep 2011 00:00:00 GMT,
got	Mon, 01 Aug 2011 03:00:00 GMT (deepEqual) // tiers-test.js:413
✗ does not modify the passed-in date
» expected Thu, 01 Sep 2011 00:00:00 GMT,
got	Thu, 01 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:421
month ceil
✗ rounds up to weeks
» expected Thu, 01 Sep 2011 00:00:00 GMT,
got	Thu, 01 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:428
✗ does not modified the specified date
» expected Sat, 01 Oct 2011 00:00:00 GMT,
got	Sat, 01 Oct 2011 03:00:00 GMT (deepEqual) // tiers-test.js:436
month step
✗ increments time by one month
» expected Sat, 01 Oct 2011 00:00:00 GMT,
got	Thu, 01 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:444
✗ does not round the specified date
» expected Wed, 02 Mar 2011 12:21:23 GMT,
got	Tue, 01 Mar 2011 03:00:00 GMT (deepEqual) // tiers-test.js:451
✗ does not modify the specified date
» expected Sat, 01 Oct 2011 00:00:00 GMT,
got	Thu, 01 Sep 2011 03:00:00 GMT (deepEqual) // tiers-test.js:456
```