diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-05-26 02:34:25 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-05-31 14:33:03 +0200 |
commit | bca5603740f77667dda6355c457ad1791b4fa42e (patch) | |
tree | 219075400551107e22c474ae3964e14ff680190b /lib/system_check | |
parent | ecdbde3d95b7abf11bae47d3a3b05693d84c27cc (diff) | |
download | gitlab-ce-bca5603740f77667dda6355c457ad1791b4fa42e.tar.gz |
Fix codestyle
Diffstat (limited to 'lib/system_check')
-rw-r--r-- | lib/system_check/app/git_version_check.rb | 2 | ||||
-rw-r--r-- | lib/system_check/app/init_script_up_to_date_check.rb | 7 | ||||
-rw-r--r-- | lib/system_check/app/projects_have_namespace_check.rb | 8 | ||||
-rw-r--r-- | lib/system_check/helpers.rb | 3 |
4 files changed, 8 insertions, 12 deletions
diff --git a/lib/system_check/app/git_version_check.rb b/lib/system_check/app/git_version_check.rb index 3a128f00911..c388682dfb4 100644 --- a/lib/system_check/app/git_version_check.rb +++ b/lib/system_check/app/git_version_check.rb @@ -17,7 +17,7 @@ module SystemCheck end def show_error - puts "Your git bin path is \"#{Gitlab.config.git.bin_path}\"" + $stdout.puts "Your git bin path is \"#{Gitlab.config.git.bin_path}\"" try_fixing_it( "Update your git to a version >= #{self.class.required_version} from #{self.class.current_version}" diff --git a/lib/system_check/app/init_script_up_to_date_check.rb b/lib/system_check/app/init_script_up_to_date_check.rb index 28c1451b8d2..015c7ed1731 100644 --- a/lib/system_check/app/init_script_up_to_date_check.rb +++ b/lib/system_check/app/init_script_up_to_date_check.rb @@ -14,7 +14,7 @@ module SystemCheck recipe_path = Rails.root.join('lib/support/init.d/', 'gitlab') unless File.exist?(SCRIPT_PATH) - puts "can't check because of previous errors".color(:magenta) + $stdout.puts "can't check because of previous errors".color(:magenta) return end @@ -22,14 +22,13 @@ module SystemCheck script_content = File.read(SCRIPT_PATH) if recipe_content == script_content - puts 'yes'.color(:green) + $stdout.puts 'yes'.color(:green) else - puts 'no'.color(:red) + $stdout.puts 'no'.color(:red) show_error end end - def show_error try_fixing_it( 'Re-download the init script' diff --git a/lib/system_check/app/projects_have_namespace_check.rb b/lib/system_check/app/projects_have_namespace_check.rb index d21ae225b0b..c70633a6d4f 100644 --- a/lib/system_check/app/projects_have_namespace_check.rb +++ b/lib/system_check/app/projects_have_namespace_check.rb @@ -9,15 +9,15 @@ module SystemCheck end def multi_check - puts '' + $stdout.puts '' Project.find_each(batch_size: 100) do |project| - print sanitized_message(project) + $stdout.print sanitized_message(project) if project.namespace - puts 'yes'.color(:green) + $stdout.puts 'yes'.color(:green) else - puts 'no'.color(:red) + $stdout.puts 'no'.color(:red) show_error end end diff --git a/lib/system_check/helpers.rb b/lib/system_check/helpers.rb index 91454c99838..0a6be42a7d1 100644 --- a/lib/system_check/helpers.rb +++ b/lib/system_check/helpers.rb @@ -75,6 +75,3 @@ module SystemCheck end end end - - - |