From 360af367a816fa2f7b736a270decdd0626f02f22 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 9 Feb 2013 19:06:54 -0800 Subject: Cleanup bottle DSL. * Remove legacy url syntax. * Use revision instead of version. Signed-off-by: Mike McQuaid --- Library/Homebrew/formula_support.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/formula_support.rb') 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) -- cgit v1.2.3