aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_support.rb
diff options
context:
space:
mode:
authorMike McQuaid2013-02-09 19:06:54 -0800
committerMike McQuaid2013-03-01 17:49:09 +0000
commit360af367a816fa2f7b736a270decdd0626f02f22 (patch)
tree360fe5d1f6c960e7c6a46079da81f3d595141323 /Library/Homebrew/formula_support.rb
parent161104cae70f3207b247331d182dc47c0b8c8a06 (diff)
downloadbrew-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.rb11
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)