Merge pull request #7606 from vitorgalvao/appcast-configuration-match
Cask: rename appcast configuration to must_contain
This commit is contained in:
commit
aff92b3af3
@ -307,7 +307,7 @@ module Cask
|
||||
def check_appcast_contains_version
|
||||
return unless appcast?
|
||||
return if cask.appcast.to_s.empty?
|
||||
return if cask.appcast.configuration == :no_check
|
||||
return if cask.appcast.must_contain == :no_check
|
||||
|
||||
appcast_stanza = cask.appcast.to_s
|
||||
appcast_contents, = curl_output("--compressed", "--user-agent", HOMEBREW_USER_AGENT_FAKE_SAFARI, "--location",
|
||||
@ -316,7 +316,7 @@ module Cask
|
||||
adjusted_version_stanza = if cask.appcast.configuration.blank?
|
||||
version_stanza.match(/^[[:alnum:].]+/)[0]
|
||||
else
|
||||
cask.appcast.configuration
|
||||
cask.appcast.must_contain
|
||||
end
|
||||
return if appcast_contents.include? adjusted_version_stanza
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
module Cask
|
||||
class DSL
|
||||
class Appcast
|
||||
attr_reader :uri, :parameters, :configuration
|
||||
attr_reader :uri, :parameters, :must_contain
|
||||
|
||||
def initialize(uri, **parameters)
|
||||
@uri = URI(uri)
|
||||
@parameters = parameters
|
||||
@configuration = parameters[:configuration] if parameters.key?(:configuration)
|
||||
@must_contain = parameters[:must_contain] if parameters.key?(:must_contain)
|
||||
end
|
||||
|
||||
def to_yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user