Commit 769d0620 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix conflicting `Options`

The `bin/` scripts do define `Options`.
Move the `Options` into `*Parser` class
to avoid conflicting definitions
parent e69768c0
......@@ -8,16 +8,6 @@
require 'optparse'
require 'yaml'
Options = Struct.new(
:amend,
:author,
:dry_run,
:force,
:merge_request,
:title,
:type,
:ee
)
INVALID_TYPE = -1
module ChangelogHelpers
......@@ -40,6 +30,17 @@ end
class ChangelogOptionParser
extend ChangelogHelpers
Options = Struct.new(
:amend,
:author,
:dry_run,
:force,
:merge_request,
:title,
:type,
:ee
)
Type = Struct.new(:name, :description)
TYPES = [
Type.new('added', 'New feature'),
......
......@@ -12,18 +12,6 @@ require 'cgi'
require_relative '../lib/feature/shared' unless defined?(Feature::Shared)
Options = Struct.new(
:name,
:type,
:group,
:ee,
:amend,
:dry_run,
:force,
:introduced_by_url,
:rollout_issue_url
)
module FeatureFlagHelpers
Abort = Class.new(StandardError)
Done = Class.new(StandardError)
......@@ -43,6 +31,18 @@ class FeatureFlagOptionParser
extend FeatureFlagHelpers
extend ::Feature::Shared
Options = Struct.new(
:name,
:type,
:group,
:ee,
:amend,
:dry_run,
:force,
:introduced_by_url,
:rollout_issue_url
)
class << self
def parse(argv)
options = Options.new
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment