Welcome to mirror list, hosted at ThFree Co, Russian Federation.

system_check.rb « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d09b57911ade2d7ce521c1064875febcc0357e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module SystemCheck
  def self.run(component, checks = {}, executor_klass = SimpleExecutor)
    unless executor_klass.is_a? BaseExecutor
      raise ArgumentError, 'Invalid executor'
    end

    executor = executor_klass.new(component)
    executor.checks = checks.map do |check|
      raise ArgumentError unless check.is_a? BaseCheck
    end
  end
end