I have a rails application, I am adding an open source gem in the gemfile. Most of the code in the gem works fine as per my requirement, but I need to make a few changes in the gem code to make it more useful.
I am not including the gem code in lib because it would mean maintaining more code than required.
How to I include the gem while also rewriting some of the code which replaces the gem code (only for some files)?
extensionsand load it in your initializer. Note however that monkey patching has a serious downside - it might make it really hard to upgrade the gem.