diff options
author | Andre Arko <andre@arko.net> | 2014-04-07 09:25:25 +0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-04-07 09:28:59 +0700 |
commit | 583c6e59eca018ca68e2dcdbc1f6ba5a1f62910c (patch) | |
tree | 45d033d87ff6eef91078af30f833e95554cbe3a8 /lib/bundler/source/git | |
parent | 65a7f6048e68317c96f626265529403aad7310ba (diff) | |
download | bundler-583c6e59eca018ca68e2dcdbc1f6ba5a1f62910c.tar.gz |
good grief why a proc it doesn't change
Diffstat (limited to 'lib/bundler/source/git')
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index 573aae6d..df7288e4 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -34,12 +34,12 @@ module Bundler attr_accessor :path, :uri, :ref attr_writer :revision - def initialize(path, uri, ref, revision=nil, &allow) + def initialize(path, uri, ref, revision = nil, allow = true) @path = path @uri = uri @ref = ref @revision = revision - @allow = allow || Proc.new { true } + @allow = allow raise GitNotInstalledError.new if allow? && !Bundler.git_present? end @@ -138,7 +138,7 @@ module Bundler end def allow? - @allow.call + !@allow.nil? end def in_path(&blk) |