Option parsing: Remove tag1, tag2 cruft (#479)
This commit is contained in:
parent
1e9e72f1a5
commit
d334aa01f2
|
@ -52,11 +52,6 @@ module GitHubChangelogGenerator
|
||||||
:verbose
|
:verbose
|
||||||
]
|
]
|
||||||
|
|
||||||
THESE_ARE_DIFFERENT = [
|
|
||||||
:tag1,
|
|
||||||
:tag2
|
|
||||||
]
|
|
||||||
|
|
||||||
def initialize(values)
|
def initialize(values)
|
||||||
super(values)
|
super(values)
|
||||||
unsupported_options.any? && raise(UnsupportedOptionError, unsupported_options.inspect)
|
unsupported_options.any? && raise(UnsupportedOptionError, unsupported_options.inspect)
|
||||||
|
@ -78,15 +73,11 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def unsupported_options
|
def unsupported_options
|
||||||
values.keys - supported_options
|
values.keys - KNOWN_OPTIONS
|
||||||
end
|
end
|
||||||
|
|
||||||
def supported_option?(key)
|
def supported_option?(key)
|
||||||
supported_options.include?(key)
|
KNOWN_OPTIONS.include?(key)
|
||||||
end
|
|
||||||
|
|
||||||
def supported_options
|
|
||||||
KNOWN_OPTIONS + THESE_ARE_DIFFERENT
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -191,8 +191,6 @@ module GitHubChangelogGenerator
|
||||||
# @return [Hash] Default options
|
# @return [Hash] Default options
|
||||||
def self.default_options
|
def self.default_options
|
||||||
Options.new(
|
Options.new(
|
||||||
tag1: nil,
|
|
||||||
tag2: nil,
|
|
||||||
date_format: "%Y-%m-%d",
|
date_format: "%Y-%m-%d",
|
||||||
output: "CHANGELOG.md",
|
output: "CHANGELOG.md",
|
||||||
base: "HISTORY.md",
|
base: "HISTORY.md",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user