Modify comments and other text
The `check_for_resources` code arguably speaks for itself, so it doesn't feel like a necessary addition. Besides that, this cleans up some other comments and text to better align with existing examples.
This commit is contained in:
parent
a81ef89883
commit
40b0070beb
@ -286,8 +286,6 @@ module Homebrew
|
|||||||
version_info[:latest] if version_info.present?
|
version_info[:latest] if version_info.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check current and latest resources (if "--resources" flag is given)
|
|
||||||
# Only check current and latest versions if we have resources to check against
|
|
||||||
check_for_resources = check_resources && formula_or_cask.is_a?(Formula) && formula_or_cask.resources.present?
|
check_for_resources = check_resources && formula_or_cask.is_a?(Formula) && formula_or_cask.resources.present?
|
||||||
if check_for_resources
|
if check_for_resources
|
||||||
resource_version_info = formula_or_cask.resources.map do |resource|
|
resource_version_info = formula_or_cask.resources.map do |resource|
|
||||||
@ -531,7 +529,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns an Array containing the formula/resource/cask URLs that can be used by livecheck.
|
# Returns an Array containing the formula/cask/resource URLs that can be used by livecheck.
|
||||||
sig { params(package_or_resource: T.any(Formula, Cask::Cask, Resource)).returns(T::Array[String]) }
|
sig { params(package_or_resource: T.any(Formula, Cask::Cask, Resource)).returns(T::Array[String]) }
|
||||||
def checkable_urls(package_or_resource)
|
def checkable_urls(package_or_resource)
|
||||||
urls = []
|
urls = []
|
||||||
|
@ -172,7 +172,7 @@ module Homebrew
|
|||||||
:cask_url_unversioned,
|
:cask_url_unversioned,
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
# Skip conditions for resource.
|
# Skip conditions for resources.
|
||||||
RESOURCE_CHECKS = [
|
RESOURCE_CHECKS = [
|
||||||
:package_or_resource_skip,
|
:package_or_resource_skip,
|
||||||
].freeze
|
].freeze
|
||||||
|
@ -152,11 +152,11 @@ describe Homebrew::Livecheck do
|
|||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns a URL string when given a livecheck_url string for formula" do
|
it "returns a URL string when given a livecheck_url string for a formula" do
|
||||||
expect(livecheck.livecheck_url_to_string(livecheck_url, f_livecheck_url)).to eq(livecheck_url)
|
expect(livecheck.livecheck_url_to_string(livecheck_url, f_livecheck_url)).to eq(livecheck_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns a URL string when given a livecheck_url string for resource" do
|
it "returns a URL string when given a livecheck_url string for a resource" do
|
||||||
expect(livecheck.livecheck_url_to_string(livecheck_url, r_livecheck_url)).to eq(livecheck_url)
|
expect(livecheck.livecheck_url_to_string(livecheck_url, r_livecheck_url)).to eq(livecheck_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user