CoreExt
Utility classes and Ruby extensions for non Rails projects.
Philosophy
CoreExt is a reduced fork of Rails's ActiveSupport gem, shipping only the core_ext part and its minimal dependencies. Some stufft like Autoload, Caching, Logging, Notifications and other Rails related classes are left behind. It was built with a few goals in mind:
- Pick only what you need - use (or require) only the modules or classes that you need on your project, without load (and override) the entire stack.
- Embrace the magic - Patching Ruby core classes - excuse me the purists - is more productive that using tons of utils classes spread throughtout your project. And this, ActiveSupport does well.
- Don't Repeat Yourself - Rather than always implement the same core functionality on different projects, centralize and reuse it.
Installation
If using bundler, first add 'core_ext' to your Gemfile:
gem "core_ext"
And run
bundle install
Otherwise simply
gem install core_ext
Usage
Loading all core extensions:
require "core_ext/all"
Cherry-picking only what you want:
require "core_ext/object"
require "core_ext/time"
Documentation
See Rail's ActiveSupport Core Extensions documentation.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
Ruby on Rails is released under the MIT License.
CoreExt is released under the MIT License.