diff options
| author | Jack Nagel | 2014-12-26 16:07:32 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-12-26 16:17:53 -0500 |
| commit | 80465f5d4b2a0e8a0378dfc24b1a1e663b6864b2 (patch) | |
| tree | 8d5938c88c649be7afbeedc06ff9867e4fac2bf0 | |
| parent | a98a09e1fc76a5cf94f3e233b524e77a8f8a139e (diff) | |
| download | homebrew-80465f5d4b2a0e8a0378dfc24b1a1e663b6864b2.tar.bz2 | |
Finally stop exposing url on Formula
| -rw-r--r-- | Library/Homebrew/formula.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 1ff27e7da..55faf8778 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -33,8 +33,8 @@ class Formula attr_reader :path # The stable (and default) {SoftwareSpec} for this {Formula} - # This contains all the attributes like e.g. {#url}, {.sha1} that apply to - # the stable version of this formula. + # This contains all the attributes (e.g. URL, checksum) that apply to the + # stable version of this formula. attr_reader :stable # The development {SoftwareSpec} for this {Formula}. @@ -119,6 +119,7 @@ class Formula raise FormulaValidationError.new(:name, name) end + url = active_spec.url if url.nil? || url.empty? || url =~ /\s/ raise FormulaValidationError.new(:url, url) end @@ -158,14 +159,6 @@ class Formula self.class.homepage 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 is autodetected from the URL and/or tag so only needs to be # declared if it cannot be autodetected correctly. @@ -194,12 +187,12 @@ class Formula active_spec.requirements end - # The cached download of {.url} for the currently active {SoftwareSpec}. + # The cached download for the currently active {SoftwareSpec}. def cached_download active_spec.cached_download end - # Deletes the download of {.url} for the currently active {SoftwareSpec}. + # Deletes the download for the currently active {SoftwareSpec}. def clear_cache active_spec.clear_cache end |
