fredwu/api_taster — pull request #45 by timurvafin (2013-07-08 17:09:08+00:00)
Title: Introduce ApiTaster.route_path configuration option

@fredwu,

The right way to define where we would like to use ApiTaster is to require it in the correct bundler group.
For example we usually would like to use it in the test and staging environments in the Rails application.

So make sense to require like:

```ruby
group :development, :staging do
gem 'api_taster', github: 'fredwu/api_taster'
end
```

In the `config/routes.rb` better to check `ApiTaster` constant definition instead of define tricky logic like this

```ruby
if Rails.env.development? || Rails.env.staging?
mount ApiTaster::Engine => '/api_taster'
end
```

By default Rails loader requires everything from `app` directory. So in case we are in the `test` environment for example when `api_taster` gem does not loaded we will get `uninitialized constant ApiTaster` error for sure.

And for sure it will be not cool to check `ApiTaster` constant definition in each file in the `app/api_tasters/` folder.
Probable better to move api tasters from `app/api_tasters` to `lib/api_tasters`.

So this change set implements two things:

1. `ApiTaster.route_path` option introduced instead of hardcoded value in the `Route` class
2. Default value changed to `lib/api_tasters`

- Timur