release.rb 641 Bytes
Newer Older
1
2
3
4
module QA
  module Runtime
    ##
    # Class that is responsible for plugging CE/EE extensions in, depending on
5
    # existence of EE module.
6
7
8
9
10
    #
    # We need that to reduce the probability of conflicts when merging
    # CE to EE.
    #
    class Release
11
12
      def initialize
        require "qa/#{version.downcase}/strategy"
13
14
      end

15
      def version
16
        @version ||= File.directory?("#{__dir__}/../ee") ? :EE : :CE
17
18
19
      end

      def strategy
20
        QA.const_get("QA::#{version}::Strategy")
21
22
23
      end

      def self.method_missing(name, *args)
24
        self.new.strategy.public_send(name, *args)
25
26
27
28
      end
    end
  end
end