diff options
author | Bundlerbot <bot@bundler.io> | 2019-04-23 19:30:19 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-04-23 19:30:19 +0000 |
commit | 58357f5bab5e7869d0532041bb44325d1832b036 (patch) | |
tree | e118b3e14015e0d3230aa653949ef89250d42d34 /lib/bundler/dependency.rb | |
parent | 69bf2bf121dccb750d0d537ff9f7a57473b0120b (diff) | |
parent | 2aab1fd231f2af3a0f0a5888a7d5bb5cd079ceb6 (diff) | |
download | bundler-58357f5bab5e7869d0532041bb44325d1832b036.tar.gz |
Merge #7127
7127: Add git and branch options to `bundle add` r=deivid-rodriguez a=tokachev
Closes #6841 These changes will allow to add a gem with the git or branch options.
```
bundle add redis --git "https://github.com/redis/redis-rb" --branch "staging"
```
The result in Gemfile will be:
```
gem "redis", "~> 4.0", :git => "https://github.com/redis/redis-rb", :branch => "staging"
```
Co-authored-by: Baumgarten <baumgarten@localhost.localdomain>
Diffstat (limited to 'lib/bundler/dependency.rb')
-rw-r--r-- | lib/bundler/dependency.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb index e76c2bc08e..0d588bc892 100644 --- a/lib/bundler/dependency.rb +++ b/lib/bundler/dependency.rb @@ -7,7 +7,7 @@ require_relative "rubygems_ext" module Bundler class Dependency < Gem::Dependency attr_reader :autorequire - attr_reader :groups, :platforms, :gemfile + attr_reader :groups, :platforms, :gemfile, :git, :branch PLATFORM_MAP = { :ruby => Gem::Platform::RUBY, @@ -84,6 +84,8 @@ module Bundler @autorequire = nil @groups = Array(options["group"] || :default).map(&:to_sym) @source = options["source"] + @git = options["git"] + @branch = options["branch"] @platforms = Array(options["platforms"]) @env = options["env"] @should_include = options.fetch("should_include", true) |