Ruby Gemspec Dependency: Is possible have a git branch dependency?

前端 未结 4 1619
慢半拍i
慢半拍i 2020-12-08 03:51

Is possible have a git branch dependency, inside mygem.gemspec?

I\'m thinking something similar to the following:

gem.add_runtime_dependency \'oauth2         


        
4条回答
  •  感动是毒
    2020-12-08 04:24

    EDIT

    According to a commenter, this is no longer true. Prior information retained for historical context.

    Duplicating the reference to a gem in Gemfile and .gemspec now appears to raise a warning message in Bundler, so this answer would appear to be no longer true.

    Outdated info

    This article by Yehuda Katz cleared up similar confusion for me. It says that, for use in development only, it's best to add the git stuff into the gemfile, but that bundler will still use the dependency/version info from the gemspec (seems magical to me, but I trust Yehuda).

提交回复
热议问题