amatsuda/kaminari — Issue #174: Makes kaminari independent Rails/Railities
Author: aereal
Created: 2011-10-28 23:18:37+00:00
State: open

I want to use kaminari.gem with Padrino and it works well.
But I won't install rails.

I think that kaminari.gem can be independent of Rails/Railties and more pluggable.
So I tried to make kaminari.gem indendent them in [my forked repos](https://github.com/aereal/kaminari).
(referred conversations and commits in #161, thanks!)

Simply I coded:

* added Kaminari::Initializer module which only stores hooks
* define and register a hook, such as extending ORM
* framework initializers (such as Railties) calls Kaminari::Initializer.init! and hooks will be fired

Some issues are left:

* test cases are not separated. I thought they must be rewritten for each gems
* some gems for testing kaminari.gem are declared as dependency from all gems

My works are a little ad-hoc, so they must refined and I have not sent pull requests yet.
Do you have any nice ideas or commits?