MonkeyPatch
*WARNING: This is alpha code, the API is not stable yet.*
<INSERT NICE INTRO HERE>
Do you monkeys, patch ? If so, use this library, you won't regret it.
Why use a library when you could do all this by hand ? For two reasons:
1. We provide the mechanism to protect from patch collision
2. By including this gem as dependency, you declare your project is
monkeypatching.
</INSERT NICE INTRO HERE>
- Authors
- zimbatm <[email protected]>
Getting started
Example usage:
:include:example/patch_usage.rb
Look at the MonkeyPatch module to get an idea of the API.
Once you have a patch object, look at the MonkeyPatch::Patch definition to know how to use it.
Related projects
-
github.com/coderrr/monkey_shield/ : provides sorts of namespaces to avoid patch collision
Ideas
-
method re-definition or module/class extension could be detected, especially when using Gems. The load-path is not the same between the original definition and the new-one.
-
load-path as namespace
TODO
-
Rework the documentation
-
Add reason string
-
Add ‘monkeywarn’ that warns when a monkeypatch is applied