Use extracted download strategy.

master
Adam Vandenberg 2009-12-01 12:01:29 -08:00 committed by Max Howell
parent a7cad4cf94
commit 38460e637f
2 changed files with 2 additions and 16 deletions

View File

@ -1,19 +1,12 @@
require 'formula'
# even though "file -b" reports this as a zip archive, it's just a binary
class JythonHttpDownloadStrategy <CurlDownloadStrategy
def stage
FileUtils.mv @dl, File.basename(@url)
end
end
class Jython <Formula
url 'http://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar'
homepage 'http://www.jython.org'
md5 '2ee978eff4306b23753b3fe9d7af5b37'
def download_strategy
JythonHttpDownloadStrategy
NoUnzipCurlDownloadStrategy # Don't unzip jar.
end
def install

View File

@ -1,12 +1,5 @@
require 'formula'
# even though "file -b" reports this as a zip archive, it's just a binary
class SbtHttpDownloadStrategy <CurlDownloadStrategy
def stage
FileUtils.mv @dl, File.basename(@url)
end
end
class Sbt <Formula
JAR = 'sbt-launcher-0.5.5.jar'
url "http://simple-build-tool.googlecode.com/files/#{JAR}"
@ -14,7 +7,7 @@ class Sbt <Formula
md5 'e3593448b3be17ce1666c6241b8d2f90'
def download_strategy
SbtHttpDownloadStrategy
NoUnzipCurlDownloadStrategy # Don't unzip jar.
end
def install