From e9c368b92e9b5461d0218ae21089b66c463691e8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 9 Dec 2014 15:55:28 -0500 Subject: [PATCH] Include FileUtils in AbstractDownloadStrategy --- Library/Homebrew/download_strategy.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index f9cfd68c30..dddf52f04d 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1,6 +1,8 @@ require 'utils/json' class AbstractDownloadStrategy + include FileUtils + attr_reader :name, :resource def initialize name, resource @@ -204,7 +206,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy when :p7zip safe_system '7zr', 'x', tarball_path else - FileUtils.cp tarball_path, basename_without_params + cp tarball_path, basename_without_params end end @@ -301,7 +303,7 @@ end # Useful for installing jars. class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy def stage - FileUtils.cp tarball_path, basename_without_params + cp tarball_path, basename_without_params end end @@ -599,7 +601,7 @@ end class CVSDownloadStrategy < VCSDownloadStrategy def stage - FileUtils.cp_r Dir[cached_location+"{.}"], Dir.pwd + cp_r Dir[cached_location+"{.}"], Dir.pwd end private @@ -692,8 +694,8 @@ class BazaarDownloadStrategy < VCSDownloadStrategy def stage # The export command doesn't work on checkouts # See https://bugs.launchpad.net/bzr/+bug/897511 - FileUtils.cp_r Dir[cached_location+"{.}"], Dir.pwd - FileUtils.rm_r ".bzr" + cp_r Dir[cached_location+"{.}"], Dir.pwd + rm_r ".bzr" end private