summaryrefslogtreecommitdiff
path: root/lib/system_check.rb
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-02-13 12:21:12 +0100
committerGabriel Mazetto <brodock@gmail.com>2017-05-31 14:33:03 +0200
commitbc6d131b74ba4cdf7acadea5a5b7d23f083f47ed (patch)
tree2cff048cee92204e1579957531fa6027e8e8e7db /lib/system_check.rb
parenta4460f420bbbac30fbcec3395261c89749b52bbd (diff)
downloadgitlab-ce-bc6d131b74ba4cdf7acadea5a5b7d23f083f47ed.tar.gz
Added specs for SystemCheck and custom matcher
Diffstat (limited to 'lib/system_check.rb')
-rw-r--r--lib/system_check.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/system_check.rb b/lib/system_check.rb
index ba22a40f5af..e9cbf6b8258 100644
--- a/lib/system_check.rb
+++ b/lib/system_check.rb
@@ -15,9 +15,16 @@ module SystemCheck
raise ArgumentError, 'Invalid executor'
end
+ prepare(component, checks, executor_klass).execute
+ end
+
+ def self.prepare(component, checks = [], executor_klass = SimpleExecutor)
executor = executor_klass.new(component)
checks.each do |check|
executor << check
end
+
+ executor
end
+ private_class_method :prepare
end