blob: 4f96e0cf44b8b7679fb30a26226437e5921bf7fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
module QA
module Runtime
##
# Class that is responsible for plugging CE/EE extensions in, depending on
# existence of EE module.
#
# We need that to reduce the probability of conflicts when merging
# CE to EE.
#
class Release
def initialize
require "qa/#{version.downcase}/strategy"
end
def version
@version ||= ::File.directory?("#{__dir__}/../ee") ? :EE : :CE
end
def strategy
QA.const_get("QA::#{version}::Strategy")
end
def self.method_missing(name, *args)
self.new.strategy.public_send(name, *args)
end
end
end
end
|