Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update appcast.rb: remove :format #15969

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions lib/hbc/dsl/appcast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ class Hbc::DSL::Appcast
# todo :latest_version is considered experimental
# and may be removed

APPCAST_FORMATS = Set.new [
:sparkle, # first one is the default
:plaintext,
:unknown,
]

attr_reader :parameters, :sha256, :format, :latest_version
attr_reader :parameters, :sha256, :latest_version

def initialize(uri, parameters={})
@parameters = parameters
@uri = Hbc::UnderscoreSupportingURI.parse(uri)
@sha256 = @parameters[:sha256]
@latest_version = @parameters[:latest_version] # experimental
@format = @parameters[:format]
@format = APPCAST_FORMATS.first if @format.nil?
unless APPCAST_FORMATS.include?(@format)
raise "invalid appcast format: '#{@format.inspect}'"
end
end

def to_yaml
Expand Down