injixo/time_frame — pull request #17 by kai-kuchenbecker (2014-10-21 12:26:07+00:00)
Title: added arel-predicate-building

This PR implements arel predicate building for `TimeRange`. TimeRanges now can be passed into where-clauses like this one `SomeModel.where(created_at: some_time_range)` resulting in the following SQL-statement
```sql
SELECT some_models.*
FROM some_models
WHERE (some_models.created_at BETWEEN '{some_time_range.min}' AND '{some_time_range.max}')
```

I.e. it is equivalent to
```ruby
SomeModel.where('created_at >= ?', some_time_range.min)
.where('created_at <= ?', some_time_range.max)
```

Changes:
* added `TimeRange::Handler` class to handle predicate building
* added active_record dependency
* added sqlite3 development_depenency for specs
* minor improvement to time_range#initialize method