aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/dos2unix.rb6
-rw-r--r--Library/Homebrew/formula.rb15
-rwxr-xr-xLibrary/Homebrew/unittest.rb4
3 files changed, 17 insertions, 8 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb
index 48a3098d2..bba4a31b3 100644
--- a/Library/Formula/dos2unix.rb
+++ b/Library/Formula/dos2unix.rb
@@ -1,9 +1,9 @@
require 'brewkit'
class Dos2unix <Formula
- @url='http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz'
- @md5='25ff56bab202de63ea6f6c211c416e96'
- @homepage='http://www.sfr-fresh.com/linux/misc/'
+ url 'http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz'
+ md5 '25ff56bab202de63ea6f6c211c416e96'
+ homepage 'http://www.sfr-fresh.com/linux/misc/'
def install
File.unlink 'dos2unix'
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 1c0871432..207cd615f 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -330,9 +330,18 @@ private
end
class <<self
- attr_reader :url, :version, :homepage, :head, :deps
- attr_reader *CHECKSUM_TYPES
-
+ def self.attr_rw(*attrs)
+ attrs.each do |attr|
+ class_eval %Q{
+ def #{attr}(val=nil)
+ val.nil? ? @#{attr} : @#{attr} = val
+ end
+ }
+ end
+ end
+
+ attr_rw :url, :version, :homepage, :head, :deps, *CHECKSUM_TYPES
+
def depends_on name, *args
@deps ||= []
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index 15336ebde..41ebfb173 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -75,8 +75,8 @@ class TestBallOverrideBrew <Formula
end
class TestScriptFileFormula <ScriptFileFormula
- @url="file:///#{Pathname.new(ABS__FILE__).realpath}"
- @version="1"
+ url "file:///#{Pathname.new(ABS__FILE__).realpath}"
+ version "1"
def initialize
super