aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/patch.rb
diff options
context:
space:
mode:
authorJack Nagel2014-03-13 19:51:23 -0500
committerJack Nagel2014-03-13 21:35:41 -0500
commit86cdd812a2517e6dddfe9628220e5806ca6557fb (patch)
tree8f5ff0d61ba03d1f40ed0aca8abed1ce5cb24e93 /Library/Homebrew/patch.rb
parent665b14c4a44c272b46b8559836e9fdbeee5d8a46 (diff)
downloadbrew-86cdd812a2517e6dddfe9628220e5806ca6557fb.tar.bz2
Teach fetch to download patches
Diffstat (limited to 'Library/Homebrew/patch.rb')
-rw-r--r--Library/Homebrew/patch.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb
index 64325e78d..27ce2d9c3 100644
--- a/Library/Homebrew/patch.rb
+++ b/Library/Homebrew/patch.rb
@@ -1,6 +1,7 @@
require 'resource'
require 'stringio'
require 'erb'
+require 'forwardable'
class Patch
def self.create(strip, io=nil, &block)
@@ -80,8 +81,13 @@ class IOPatch < Patch
end
class ExternalPatch < Patch
+ extend Forwardable
+
attr_reader :resource, :strip
+ def_delegators :@resource, :fetch, :verify_download_integrity,
+ :cached_download, :clear_cache
+
def initialize(strip, &block)
@strip = strip
@resource = Resource.new(&block)