This is a collection of Ruby extensions and utilities I've been carting around from project to project. Some are taken from the Facets project (I just don't want to include that whole gem in my codebases). Others gathered from blog posts, repositories and snippets founded in the web. This is not something kind of valid gem though.
My own approach where to place this library in rails project:
app/
config/
db/
gems/
assorted_candy/ # <-- here
...
and require it in my Gemfile as:
gem 'assorted_candy', path: 'gems/assorted_candy'
As you can see I just clone this repository into project's tree and treat it as ordinary library. Don't miss that you should explicitely require particular ruby files.
The library does not automatically require anything, so you can pick and choose which extensions get added, by requiring them individually, e.g.:
require 'assorted_candy/null_object/null_object'
require 'assorted_candy/core/multi_block'
and so on.
Or you can use helper method somewere in your initializing script:
AssortedCandy[:option, :null_object]
Just feed this method with names of library name.
Some of established minilibs adds a method(s) to Kernel which might be considered bad practice. So use it wisely.
I would appreciate any participation in the project. Any additions, fixes and ideas are welcome!
- Fork the project on Github
- Create a topic branch for your changes
- Ensure that the changes in your branch are as atomic as possible
- Create a pull request on Github
This ruby gem is under MIT License. Copyright 2013 Yury Batenko [email protected]