捆绑软件可以告诉我Gemfile中的哪些宝石具有更新的版本(例如,试运行的捆绑软件更新) [英] Can bundler show me which gems in Gemfile have newer versions (eg. dry-run of bundle update)
问题描述
有没有办法在假装模式下运行捆绑更新
Is there a way to run bundle update in pretend mode, similar to the -p (pretend) flag for Rails generators or cap's -n (dry-run) flag?
我想像这样的东西:
$> bundle update -p
Fetching source index for http://rubygems.org/
The following gems have updated versions:
...
list of gems
...
推荐答案
Bundler 1.1引入了新的过时功能,这正是我想要的。 Pat Shaughnessy具有出色的撰写有关新功能的信息。用他的话说,捆绑包已过期
:
Bundler 1.1 introduced a new 'outdated' feature, which is exactly what I was looking for. Pat Shaughnessy has a great write-up on the new features. In his words, bundle outdated
:
显示将下载并安装的宝石,但实际上没有
这样做。这使我可以自由地检查列表并仅更新我想要的宝石
。
displays the gems it would download and install, but without actually doing it. This gives me the freedom to inspect the list and update just the gems I would like to.
快速查看需要更新的宝石,而无需实际修改源宝石和本地宝石。谢谢邦德勒!
This should make it a snap to see what gems are due for an update without actually modifying your source and local gems. Thanks Bundler!
这篇关于捆绑软件可以告诉我Gemfile中的哪些宝石具有更新的版本(例如,试运行的捆绑软件更新)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!