gitlab-qa 7.0.4 → 7.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94fd458767a2190eeba5094962dca4d1eb9d1ec2769c3ed6815e0750c4d95d3e
4
- data.tar.gz: 38f5336f05c2bb558c7099d410ceea33cf1f0ea254b978e18c32c96f5e7fdc62
3
+ metadata.gz: 11257d04b7148f3f1a25b08136c44734701fbf20fc3e1bd8cb8cc2315e67a4a4
4
+ data.tar.gz: 97585ca75030f229cc2eea291eebf1b85b31017a6ba0f31c8450eaebea636c74
5
5
  SHA512:
6
- metadata.gz: 8a146c677f1b78dde5755e9d0d0445c100f4264d2e862dc98c75c8bf7265b84df9167565702c88556877c48747eb18b677a6deb4ff4489bf5e05a54c0fb0bd5c
7
- data.tar.gz: e386131381bdfc7e1f7c4f9644586279af44e8996c0f4fc23a70559d821f127856e56ec37391407346982058b9377f78979f269e2d0d49b49d074845fad7c37a
6
+ metadata.gz: 587cf192a0d5ef209e7b94110510424078cbb765f81c0d4c1aab79eddfa690837a4da28e4f6121f031ac95cfbe760efe4ceffa3badebdbb83dad28ba0459de03
7
+ data.tar.gz: 66cadfafda69cf92cfece41609ad62de5dbfa5973c710d263f3848dbf8fbcd0d618d43b8ed0797ba30dd48f76c35e0e105ada659127f9a6f701b220aed1ea801
@@ -57,7 +57,10 @@ module Gitlab
57
57
  end
58
58
  end
59
59
 
60
- args.reject! { |arg| gitlab_qa_options.include?(arg) }
60
+ # Remove arguments passed into GitLab QA preventing them from being
61
+ # passed into the specs
62
+ args = remove_gitlab_qa_args(args)
63
+
61
64
  if args.size >= 1
62
65
  load_omnibus_configurations
63
66
 
@@ -79,7 +82,22 @@ module Gitlab
79
82
  end
80
83
 
81
84
  def self.gitlab_qa_options
82
- @gitlab_qa_options ||= @options.top.list.map(&:long).flatten
85
+ @gitlab_qa_options ||= @options.top.list
86
+ end
87
+
88
+ # Take a set of arguments and remove them from the set of
89
+ # predefined GitLab QA arguments
90
+ # @param args Array the arguments to parse through and remove GitLab QA opts
91
+ # @return Arguments to be passed ultimately to the RSpec runner
92
+ def self.remove_gitlab_qa_args(args)
93
+ args.each_with_index do |arg, i|
94
+ gitlab_qa_options.each do |opt|
95
+ next unless opt.long.flatten.first == arg
96
+
97
+ args[i] = nil
98
+ args[i + 1] = nil if opt.is_a? OptionParser::Switch::RequiredArgument
99
+ end
100
+ end.compact
83
101
  end
84
102
 
85
103
  def self.load_omnibus_configurations
@@ -100,8 +118,8 @@ module Gitlab
100
118
  end
101
119
  rescue NameError
102
120
  raise <<~ERROR
103
- Invalid Omnibus Configuration `#{config}`.
104
- Possible configurations: #{Runtime::OmnibusConfigurations.constants.map { |c| c.to_s.underscore }.join(',')}"
121
+ Invalid Omnibus Configuration `#{config}`.
122
+ Possible configurations: #{Runtime::OmnibusConfigurations.constants.map { |c| c.to_s.underscore }.join(',')}"
105
123
  ERROR
106
124
  end
107
125
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '7.0.4'.freeze
3
+ VERSION = '7.0.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control