Move specialized formulae base classes into a new file

This commit is contained in:
Adam Vandenberg 2012-03-04 16:52:50 -08:00
parent 1b372d7840
commit 6af1aae50b
2 changed files with 17 additions and 15 deletions

View File

@ -2,6 +2,7 @@ require 'download_strategy'
require 'formula_support'
require 'hardware'
require 'extend/fileutils'
require 'formula_specialties'
# Derive and define at least @url, see Library/Formula for examples
@ -764,18 +765,3 @@ private
end
end
end
# See youtube-dl.rb for an example
class ScriptFileFormula < Formula
def install
bin.install Dir['*']
end
end
# See flac.rb for an example
class GithubGistFormula < ScriptFileFormula
def initialize name='__UNKNOWN__', path=nil
super name, path
@version=File.basename(File.dirname(url))[0,6]
end
end

View File

@ -0,0 +1,16 @@
# Base classes for specialized types of formulae.
# See youtube-dl.rb for an example
class ScriptFileFormula < Formula
def install
bin.install Dir['*']
end
end
# See flac.rb for an example
class GithubGistFormula < ScriptFileFormula
def initialize name='__UNKNOWN__', path=nil
super name, path
@version=File.basename(File.dirname(url))[0,6]
end
end