Remove cat_without_underscores bottle methods.
This commit is contained in:
parent
6f6d4e5894
commit
a75aff246e
@ -40,10 +40,6 @@ class Formula
|
|||||||
unless bottle.checksum.nil? || bottle.checksum.empty?
|
unless bottle.checksum.nil? || bottle.checksum.empty?
|
||||||
@bottle = bottle
|
@bottle = bottle
|
||||||
bottle.url ||= bottle_url(self)
|
bottle.url ||= bottle_url(self)
|
||||||
if bottle.cat_without_underscores
|
|
||||||
bottle.url.gsub!(MacOS.cat.to_s,
|
|
||||||
MacOS.cat_without_underscores.to_s)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -76,15 +76,12 @@ end
|
|||||||
|
|
||||||
class Bottle < SoftwareSpec
|
class Bottle < SoftwareSpec
|
||||||
attr_writer :url
|
attr_writer :url
|
||||||
# TODO: Can be removed when all bottles migrated to underscored cat symbols.
|
|
||||||
attr_reader :cat_without_underscores
|
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
@revision = 0
|
@revision = 0
|
||||||
@prefix = '/usr/local'
|
@prefix = '/usr/local'
|
||||||
@cellar = '/usr/local/Cellar'
|
@cellar = '/usr/local/Cellar'
|
||||||
@cat_without_underscores = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checksum methods in the DSL's bottle block optionally take
|
# Checksum methods in the DSL's bottle block optionally take
|
||||||
@ -101,9 +98,6 @@ class Bottle < SoftwareSpec
|
|||||||
|
|
||||||
if @#{cksum}.has_key? MacOS.cat
|
if @#{cksum}.has_key? MacOS.cat
|
||||||
@checksum = @#{cksum}[MacOS.cat]
|
@checksum = @#{cksum}[MacOS.cat]
|
||||||
elsif @#{cksum}.has_key? MacOS.cat_without_underscores
|
|
||||||
@checksum = @#{cksum}[MacOS.cat_without_underscores]
|
|
||||||
@cat_without_underscores = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EOS
|
EOS
|
||||||
|
|||||||
@ -27,13 +27,6 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Can be removed when all bottles migrated to underscored cat symbols.
|
|
||||||
def cat_without_underscores
|
|
||||||
possibly_underscored_cat = cat
|
|
||||||
return nil unless possibly_underscored_cat
|
|
||||||
cat.to_s.gsub('_', '').to_sym
|
|
||||||
end
|
|
||||||
|
|
||||||
def oldest_cpu
|
def oldest_cpu
|
||||||
if Hardware::CPU.type == :intel
|
if Hardware::CPU.type == :intel
|
||||||
if Hardware::CPU.is_64_bit?
|
if Hardware::CPU.is_64_bit?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user