diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-13 13:54:33 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-13 13:54:33 +0100 |
commit | 0731365b9de9411a937bd786d6e3fd7e10099800 (patch) | |
tree | ec4d8356380c2fc898847f0125a12c965e52f7dc /qa/qa/runtime | |
parent | cbba91840d7c640f94e604575ce018a44f9937d1 (diff) | |
download | gitlab-ce-0731365b9de9411a937bd786d6e3fd7e10099800.tar.gz |
Add GitLab QA CE strategy and simplify inflectorfeature/gb/gitlab-qa-integration-tests
Diffstat (limited to 'qa/qa/runtime')
-rw-r--r-- | qa/qa/runtime/release.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/qa/qa/runtime/release.rb b/qa/qa/runtime/release.rb index 40d24e8d342..4f83a773645 100644 --- a/qa/qa/runtime/release.rb +++ b/qa/qa/runtime/release.rb @@ -8,34 +8,20 @@ module QA # CE to EE. # class Release - def initialize(variant = nil) - @version = variant || version - - begin - require "qa/#{@version.downcase}/strategy" - rescue LoadError - # noop - end + def initialize + require "qa/#{version.downcase}/strategy" end def version - File.directory?("#{__dir__}/../ee") ? :EE : :CE - end - - def has_strategy? - QA.const_defined?("QA::#{@version}::Strategy") + @version ||= File.directory?("#{__dir__}/../ee") ? :EE : :CE end def strategy - QA.const_get("QA::#{@version}::Strategy") + QA.const_get("QA::#{version}::Strategy") end def self.method_missing(name, *args) - @release ||= self.new - - if @release.has_strategy? - @release.strategy.public_send(name, *args) - end + self.new.strategy.public_send(name, *args) end end end |