开发者

Updating an unpacked and customised gem

We have an interesting scenario I 开发者_如何学运维need to sort out:

1) We have an existing application running with an unpacked gem 2) The application has some customisations to the unpacked gem 3) I would like to somehow "merge" a new version of said gem into this unpacked gem to bring it up to date.

Any ideas on a nice way of doing this?

All the code is in git, although the gem source is in a different repo.


You can compute the diff with git.

Create a new empty repository and copy the customized Gem. Add the changes and commit.

$ mkdir thegem
$ cd thegem
$ git init
$ cp -r /path/to/gem/* .
$ git add *
$ git commit -m "Custom Gem"

Now download a snapshot of the original Gem and replace all the content of the folder (exept the .git folder). Add and commit.

Now you can view the differences between the first and second commit to know what changed in your customized Gem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜