Requirable

File require logic extracted from Padrino's gem.

Installation

Add this line to your application's Gemfile:

gem 'requirable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install requirable

Usage

|-- app
|   |-- models
|   |   |-- user.rb
|   |-- routes
|   |   |-- home.rb
|   |   |-- users.rb
|   |   |-- items.rb
|-- config
|   |-- configs.rb
|   |-- env.rb
|-- app.rb
|-- boot.rb

Let's say this is your root, you can use Requirable to load all your files:

Requirable.load! 'config', 'app'

Or just tell which folders and files you want to require:

Requirable.load "./config/*.rb"
Requirable.load "./app/**{,/*/**}/*.rb"

Contributing

  1. Fork it ( http://github.com/joaquimadraz/requirable/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request