summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-04-07 14:57:37 +0900
committerAndre Arko <andre@arko.net>2014-04-07 14:57:37 +0900
commit8ed40526d137397462674c7efa92d9c5badffa71 (patch)
treef5431539458be198f255ad41c94d0d7de779e5c9
parent4bf4c5b30a3e58bae2ab67e3e514c3b359740c2c (diff)
downloadbundler-8ed40526d137397462674c7efa92d9c5badffa71.tar.gz
turns out it's not static after all :\
Revert "good grief why a proc it doesn't change" This reverts commit 583c6e59eca018ca68e2dcdbc1f6ba5a1f62910c. Conflicts: lib/bundler/source/git/git_proxy.rb
-rw-r--r--lib/bundler/source/git.rb2
-rw-r--r--lib/bundler/source/git/git_proxy.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 4721838e5c..3a42202302 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -280,7 +280,7 @@ module Bundler
end
def git_proxy
- @git_proxy ||= GitProxy.new(cache_path, uri, ref, cached_revision, allow_git_ops?)
+ @git_proxy ||= GitProxy.new(cache_path, uri, ref, cached_revision){ allow_git_ops? }
end
end
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index be2b430952..198176416f 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 = true)
+ def initialize(path, uri, ref, revision=nil, &allow)
@path = path
@uri = uri
@ref = ref
@revision = revision
- @allow = allow
+ @allow = allow || Proc.new { true }
raise GitNotInstalledError.new if allow? && !Bundler.git_present?
end
@@ -138,7 +138,7 @@ module Bundler
end
def allow?
- @allow
+ @allow.call
end
def in_path(&blk)