From d334aa01f209be7b5ec57eca89cc76638daec0c1 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 8 Feb 2017 21:58:30 +0100 Subject: [PATCH] Option parsing: Remove tag1, tag2 cruft (#479) --- lib/github_changelog_generator/options.rb | 13 ++----------- lib/github_changelog_generator/parser.rb | 2 -- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/github_changelog_generator/options.rb b/lib/github_changelog_generator/options.rb index 6b456ce..5c4a958 100644 --- a/lib/github_changelog_generator/options.rb +++ b/lib/github_changelog_generator/options.rb @@ -52,11 +52,6 @@ module GitHubChangelogGenerator :verbose ] - THESE_ARE_DIFFERENT = [ - :tag1, - :tag2 - ] - def initialize(values) super(values) unsupported_options.any? && raise(UnsupportedOptionError, unsupported_options.inspect) @@ -78,15 +73,11 @@ module GitHubChangelogGenerator end def unsupported_options - values.keys - supported_options + values.keys - KNOWN_OPTIONS end def supported_option?(key) - supported_options.include?(key) - end - - def supported_options - KNOWN_OPTIONS + THESE_ARE_DIFFERENT + KNOWN_OPTIONS.include?(key) end end end diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 0d82891..4c836cf 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -191,8 +191,6 @@ module GitHubChangelogGenerator # @return [Hash] Default options def self.default_options Options.new( - tag1: nil, - tag2: nil, date_format: "%Y-%m-%d", output: "CHANGELOG.md", base: "HISTORY.md",