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 @@ ...@@ -8,16 +8,6 @@
require 'optparse' require 'optparse'
require 'yaml' require 'yaml'
Options = Struct.new(
:amend,
:author,
:dry_run,
:force,
:merge_request,
:title,
:type,
:ee
)
INVALID_TYPE = -1 INVALID_TYPE = -1
module ChangelogHelpers module ChangelogHelpers
...@@ -40,6 +30,17 @@ end ...@@ -40,6 +30,17 @@ end
class ChangelogOptionParser class ChangelogOptionParser
extend ChangelogHelpers extend ChangelogHelpers
Options = Struct.new(
:amend,
:author,
:dry_run,
:force,
:merge_request,
:title,
:type,
:ee
)
Type = Struct.new(:name, :description) Type = Struct.new(:name, :description)
TYPES = [ TYPES = [
Type.new('added', 'New feature'), Type.new('added', 'New feature'),
......
...@@ -12,18 +12,6 @@ require 'cgi' ...@@ -12,18 +12,6 @@ require 'cgi'
require_relative '../lib/feature/shared' unless defined?(Feature::Shared) 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 module FeatureFlagHelpers
Abort = Class.new(StandardError) Abort = Class.new(StandardError)
Done = Class.new(StandardError) Done = Class.new(StandardError)
...@@ -43,6 +31,18 @@ class FeatureFlagOptionParser ...@@ -43,6 +31,18 @@ class FeatureFlagOptionParser
extend FeatureFlagHelpers extend FeatureFlagHelpers
extend ::Feature::Shared extend ::Feature::Shared
Options = Struct.new(
:name,
:type,
:group,
:ee,
:amend,
:dry_run,
:force,
:introduced_by_url,
:rollout_issue_url
)
class << self class << self
def parse(argv) def parse(argv)
options = Options.new 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