bottles: remove unused 'version' from DSL.

This commit is contained in:
Mike McQuaid 2013-03-08 16:07:37 +00:00
parent 2cc9322fbd
commit 5a2874c652
3 changed files with 2 additions and 15 deletions

View File

@ -31,9 +31,7 @@ def built_as_bottle? f
end end
def bottle_current? f def bottle_current? f
f.bottle and f.bottle.url \ f.bottle and f.bottle.url and not f.bottle.checksum.empty?
and (not f.bottle.checksum.empty?) \
and (f.bottle.version == f.stable.version)
end end
def bottle_file_outdated? f, file def bottle_file_outdated? f, file

View File

@ -125,17 +125,6 @@ class Bottle < SoftwareSpec
def revision val=nil def revision val=nil
val.nil? ? @revision : @revision = val val.nil? ? @revision : @revision = val
end 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 end

View File

@ -237,7 +237,7 @@ class RevisedBottleSpecTestBall < Formula
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do bottle do
version 1 revision 1
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion