aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-04 16:52:50 -0800
committerAdam Vandenberg2012-03-05 21:14:39 -0800
commit6af1aae50bad076339db6cfe9c6af7898f4d8aea (patch)
tree8cb601dd2b68d11eb4c28e05b541387d215a2d7d /Library
parent1b372d7840a60c8d592aa03e5c95fb41a6c5fb6b (diff)
downloadbrew-6af1aae50bad076339db6cfe9c6af7898f4d8aea.tar.bz2
Move specialized formulae base classes into a new file
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb16
-rw-r--r--Library/Homebrew/formula_specialties.rb16
2 files changed, 17 insertions, 15 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 06863c136..44cf0d3b8 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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
diff --git a/Library/Homebrew/formula_specialties.rb b/Library/Homebrew/formula_specialties.rb
new file mode 100644
index 000000000..6aa469081
--- /dev/null
+++ b/Library/Homebrew/formula_specialties.rb
@@ -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