summaryrefslogtreecommitdiff
path: root/lib/bundler/dependency.rb
diff options
context:
space:
mode:
authorBaumgarten <baumgarten@localhost.localdomain>2019-04-13 19:51:41 +0300
committerBaumgarten <baumgarten@localhost.localdomain>2019-04-13 19:51:41 +0300
commit2aab1fd231f2af3a0f0a5888a7d5bb5cd079ceb6 (patch)
tree94e527f54c793942cd8cbc2a18fb86edbf06cb9d /lib/bundler/dependency.rb
parent52e329f4385b73923a343e413cd36f7323448e6d (diff)
downloadbundler-2aab1fd231f2af3a0f0a5888a7d5bb5cd079ceb6.tar.gz
Add git and branch options to `bundle add`
Diffstat (limited to 'lib/bundler/dependency.rb')
-rw-r--r--lib/bundler/dependency.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 8840ad6a9c..e671ee1a4d 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -7,7 +7,7 @@ require "bundler/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)