diff options
| author | Mike McQuaid | 2013-02-09 19:06:54 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-03-01 17:49:09 +0000 |
| commit | 360af367a816fa2f7b736a270decdd0626f02f22 (patch) | |
| tree | 360fe5d1f6c960e7c6a46079da81f3d595141323 /Library/Homebrew/formula_support.rb | |
| parent | 161104cae70f3207b247331d182dc47c0b8c8a06 (diff) | |
| download | brew-360af367a816fa2f7b736a270decdd0626f02f22.tar.bz2 | |
Cleanup bottle DSL.
* Remove legacy url syntax.
* Use revision instead of version.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 10be6ff63..2f3b10322 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -83,7 +83,7 @@ class Bottle < SoftwareSpec # TODO: Can be removed when all bottles migrated to underscored cat symbols. attr_reader :cat_without_underscores - def initialize url=nil, version=nil + def initialize super @revision = 0 @cat_without_underscores = false @@ -98,8 +98,6 @@ class Bottle < SoftwareSpec case val when nil @#{cksum}[MacOS.cat] - when String - @#{cksum}[:lion] = Checksum.new(:#{cksum}, val) when Hash key, value = val.shift @#{cksum}[value] = Checksum.new(:#{cksum}, key) @@ -115,12 +113,13 @@ class Bottle < SoftwareSpec } end - def url val=nil - val.nil? ? @url : @url = val + def revision val=nil + val.nil? ? @revision : @revision = val end - # Used in the bottle DSL to set @revision, but acts as an + # Used in the old bottle DSL to set @revision, but acts as an # as accessor for @version to preserve the interface + # TODO: Can be removed when no bottles are using `version` any more. def version val=nil if val.nil? return @version ||= Version.parse(@url) |
