宝石:从拉动要求整合变化 [英] gem: integrate change from pull request

查看:109
本文介绍了宝石:从拉动要求整合变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个gem问题,并发现有人能够在此请求中修复它:



https://github.com/rheaton/carrierwave-video/pull/13



我可以在本地集成这个变化到我的应用程序中吗?

指定存储库和分支用于Gemfile中的gem(它也支持指定标记或引用散列,但一个分支应该适合你的情况)。在这种情况下,它可能看起来像这样:

  gem'carrierwave-video',::git => 'git://github.com/elja/carrierwave-video.git',:branch => 'patch-1'

或者更简洁:

  gem'carrierwave-video',::github => 'elja / carrierwave-video',:branch => 'patch-1'

这不是一个很好的长期解决方案,因为分支不太可能继续保持最新状态并且可能会消失,所以您应该在拉取请求解决后立即切换回默认值。


I am having issues with a gem and found that someone was able to fix it in this pull request:

https://github.com/rheaton/carrierwave-video/pull/13

How can I integrate this change into my app locally since it has been merged yet?

解决方案

Assuming you're using Bundler, you can specify the repository and branch to use for the gem in your Gemfile (it also supports specifying a tag or a reference hash, but a branch should work for your case). In this case, it might look something like:

gem 'carrierwave-video', :git => 'git://github.com/elja/carrierwave-video.git', :branch => 'patch-1'

or, more concisely:

gem 'carrierwave-video', :github => 'elja/carrierwave-video', :branch => 'patch-1'

This isn't a great long-term solution, since the branch is unlikely to continue to keep up to date properly, and might disappear, so you should probably switch back to the default as soon as the pull request is resolved.

这篇关于宝石:从拉动要求整合变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆