aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-12-09 15:55:28 -0500
committerJack Nagel2014-12-09 15:55:28 -0500
commit4f25f521dc8a13da9fad044e4cec70c9d1f4c399 (patch)
tree8d617c43de8210e736d0246b4eb500ef901dd330 /Library
parent0b804a601d572e36a91907ee1c0db8fcd6d5a790 (diff)
downloadhomebrew-4f25f521dc8a13da9fad044e4cec70c9d1f4c399.tar.bz2
Include FileUtils in AbstractDownloadStrategy
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/qt5.rb2
-rw-r--r--Library/Homebrew/download_strategy.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/Library/Formula/qt5.rb b/Library/Formula/qt5.rb
index 7a376c8dc..4c8bec958 100644
--- a/Library/Formula/qt5.rb
+++ b/Library/Formula/qt5.rb
@@ -1,8 +1,6 @@
require "formula"
class Qt5HeadDownloadStrategy < GitDownloadStrategy
- include FileUtils
-
def stage
cached_location.cd { reset }
quiet_safe_system "git", "clone", cached_location, "."
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index f9cfd68c3..dddf52f04 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