vigetlabs/sprig — pull request #35 by h0tl33t (2014-06-06 18:52:32+00:00)
Title: Allow additional configuration options and enhanced control when using `reap`

#### Additional Options (`:limit` and `:ignored_attrs`)
```
# rake
rake db:seed:reap ENV=integration MODELS=User, Post LIMIT=10 IGNORED_ATTRS=created_at, updated_at

# console
Sprig::Harvest.reap(
:env => 'integration',
:models => [User, Post],
:limit => 10,
:ignored_attrs => [:created_at, :updated_at]
)
```
#### File-Based Config (allows for model-by-model configuration)
```
# db/seeds/reap_config.rb

Sprig::Harvest.configure do |config|
config.env = 'dreamland'
config.limit = 30
config.ignored_attrs = [:created_at, :updated_at]

config.models = [
{
:class => User,
:collection => User.active.where(:admin => false),
:limit => 10,
:ignored_attrs => :password
},

{
:class => Post,
:collection => Post.published,
:limit => 20
},

Comment
]
end
```
To use this reap config file, invoke `reap` via:
```
# rake
rake db:seed:reap FILE="./db/seeds/reap_config.rb"

# console
Sprig::Harvest.reap(:file => './db/seeds/reap_config.rb')
```