diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-05-26 01:46:54 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-05-31 14:33:03 +0200 |
commit | ecdbde3d95b7abf11bae47d3a3b05693d84c27cc (patch) | |
tree | 9479c4fa10515ac2a762b334aa89269925216c4c /lib | |
parent | 27e632758feed94d8b3ff065b7c8928a854cecc5 (diff) | |
download | gitlab-ce-ecdbde3d95b7abf11bae47d3a3b05693d84c27cc.tar.gz |
Improve Specs and some fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system_check/base_check.rb | 4 | ||||
-rw-r--r-- | lib/system_check/simple_executor.rb | 12 | ||||
-rw-r--r-- | lib/tasks/gitlab/task_helpers.rb | 1 |
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/system_check/base_check.rb b/lib/system_check/base_check.rb index aff830f54d7..63b7eea5add 100644 --- a/lib/system_check/base_check.rb +++ b/lib/system_check/base_check.rb @@ -1,9 +1,11 @@ +require 'tasks/gitlab/task_helpers' + module SystemCheck # Base class for Checks. You must inherit from here # and implement the methods below when necessary class BaseCheck include ::Gitlab::TaskHelpers - include Helpers + include ::SystemCheck::Helpers # Define a custom term for when check passed # diff --git a/lib/system_check/simple_executor.rb b/lib/system_check/simple_executor.rb index 7a5042047ab..ad2f549b3fb 100644 --- a/lib/system_check/simple_executor.rb +++ b/lib/system_check/simple_executor.rb @@ -24,17 +24,17 @@ module SystemCheck c = check.new - # When implements a multi check, we don't control the output - if c.is_multi_check? - c.multi_check - return - end - # When implements skip method, we run it first, and if true, skip the check if c.can_skip? && c.skip? $stdout.puts check.skip_reason.color(:magenta) return end + + # When implements a multi check, we don't control the output + if c.is_multi_check? + c.multi_check + return + end if c.check? $stdout.puts check.check_pass.color(:green) diff --git a/lib/tasks/gitlab/task_helpers.rb b/lib/tasks/gitlab/task_helpers.rb index e38e21b149f..e3c9d3b491c 100644 --- a/lib/tasks/gitlab/task_helpers.rb +++ b/lib/tasks/gitlab/task_helpers.rb @@ -113,7 +113,6 @@ module Gitlab end end - # TODO: MIGRATED # Tries to configure git itself # # Returns true if all subcommands were successfull (according to their exit code) |