From 5a2874c6520b6997137b130a67c9a49977ce49bb Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 8 Mar 2013 16:07:37 +0000 Subject: [PATCH] bottles: remove unused 'version' from DSL. --- Library/Homebrew/bottles.rb | 4 +--- Library/Homebrew/formula_support.rb | 11 ----------- Library/Homebrew/test/testball.rb | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index a11350fed4..46aedcbd14 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -31,9 +31,7 @@ def built_as_bottle? f end def bottle_current? f - f.bottle and f.bottle.url \ - and (not f.bottle.checksum.empty?) \ - and (f.bottle.version == f.stable.version) + f.bottle and f.bottle.url and not f.bottle.checksum.empty? end def bottle_file_outdated? f, file diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 3cd221129c..5e8fa2965b 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -125,17 +125,6 @@ class Bottle < SoftwareSpec def revision val=nil val.nil? ? @revision : @revision = val end - - # 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) - else - @revision = val - end - end end diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb index 858f1d6474..2afedaacbe 100644 --- a/Library/Homebrew/test/testball.rb +++ b/Library/Homebrew/test/testball.rb @@ -237,7 +237,7 @@ class RevisedBottleSpecTestBall < Formula sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' bottle do - version 1 + revision 1 sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion