https://github.com/zimbatm/monkeypatch
Safe(er) monkey patching in Ruby
https://github.com/zimbatm/monkeypatch
Last synced: about 1 year ago
JSON representation
Safe(er) monkey patching in Ruby
- Host: GitHub
- URL: https://github.com/zimbatm/monkeypatch
- Owner: zimbatm
- License: other
- Created: 2009-05-25T20:21:57.000Z (about 17 years ago)
- Default Branch: master
- Last Pushed: 2009-06-09T20:06:20.000Z (about 17 years ago)
- Last Synced: 2025-04-01T23:27:45.693Z (about 1 year ago)
- Language: Ruby
- Homepage: http://twitter.com/monkeypatch
- Size: 82 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
= MonkeyPatch
*WARNING: This is alpha code, the API is not stable yet.*
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.
Authors:: [ zimbatm ]
== 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
* http://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