Finally stop exposing url on Formula
This commit is contained in:
parent
8575034f19
commit
dec965e132
@ -33,8 +33,8 @@ class Formula
|
|||||||
attr_reader :path
|
attr_reader :path
|
||||||
|
|
||||||
# The stable (and default) {SoftwareSpec} for this {Formula}
|
# The stable (and default) {SoftwareSpec} for this {Formula}
|
||||||
# This contains all the attributes like e.g. {#url}, {.sha1} that apply to
|
# This contains all the attributes (e.g. URL, checksum) that apply to the
|
||||||
# the stable version of this formula.
|
# stable version of this formula.
|
||||||
attr_reader :stable
|
attr_reader :stable
|
||||||
|
|
||||||
# The development {SoftwareSpec} for this {Formula}.
|
# The development {SoftwareSpec} for this {Formula}.
|
||||||
@ -119,6 +119,7 @@ class Formula
|
|||||||
raise FormulaValidationError.new(:name, name)
|
raise FormulaValidationError.new(:name, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
url = active_spec.url
|
||||||
if url.nil? || url.empty? || url =~ /\s/
|
if url.nil? || url.empty? || url =~ /\s/
|
||||||
raise FormulaValidationError.new(:url, url)
|
raise FormulaValidationError.new(:url, url)
|
||||||
end
|
end
|
||||||
@ -158,14 +159,6 @@ class Formula
|
|||||||
self.class.homepage
|
self.class.homepage
|
||||||
end
|
end
|
||||||
|
|
||||||
# The URL used to download the source for the currently active {SoftwareSpec}.
|
|
||||||
# @see .url
|
|
||||||
# @deprecated
|
|
||||||
# @private
|
|
||||||
def url
|
|
||||||
active_spec.url
|
|
||||||
end
|
|
||||||
|
|
||||||
# The version for the currently active {SoftwareSpec}.
|
# The version for the currently active {SoftwareSpec}.
|
||||||
# The version is autodetected from the URL and/or tag so only needs to be
|
# The version is autodetected from the URL and/or tag so only needs to be
|
||||||
# declared if it cannot be autodetected correctly.
|
# declared if it cannot be autodetected correctly.
|
||||||
@ -194,12 +187,12 @@ class Formula
|
|||||||
active_spec.requirements
|
active_spec.requirements
|
||||||
end
|
end
|
||||||
|
|
||||||
# The cached download of {.url} for the currently active {SoftwareSpec}.
|
# The cached download for the currently active {SoftwareSpec}.
|
||||||
def cached_download
|
def cached_download
|
||||||
active_spec.cached_download
|
active_spec.cached_download
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deletes the download of {.url} for the currently active {SoftwareSpec}.
|
# Deletes the download for the currently active {SoftwareSpec}.
|
||||||
def clear_cache
|
def clear_cache
|
||||||
active_spec.clear_cache
|
active_spec.clear_cache
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user