diff options
author | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
commit | 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch) | |
tree | c3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/system_check/helpers.rb | |
parent | f6453eca992a9c142268e78ac782cef98110d183 (diff) | |
download | gitlab-ce-tc-standard-gem.tar.gz |
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I
decided to try https://github.com/testdouble/standard on our codebase.
It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/system_check/helpers.rb')
-rw-r--r-- | lib/system_check/helpers.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/system_check/helpers.rb b/lib/system_check/helpers.rb index 07d479848fe..daad28c78ff 100644 --- a/lib/system_check/helpers.rb +++ b/lib/system_check/helpers.rb @@ -6,14 +6,14 @@ module SystemCheck # Display a message telling to fix and rerun the checks def fix_and_rerun - $stdout.puts ' Please fix the error above and rerun the checks.'.color(:red) + $stdout.puts " Please fix the error above and rerun the checks.".color(:red) end # Display a formatted list of references (documentation or links) where to find more information # # @param [Array<String>] sources one or more references (documentation or links) def for_more_information(*sources) - $stdout.puts ' For more information see:'.color(:blue) + $stdout.puts " For more information see:".color(:blue) sources.each do |source| $stdout.puts " #{source}" end @@ -25,15 +25,15 @@ module SystemCheck # @deprecated This will no longer be used when all checks were executed using SystemCheck def finished_checking(component) - $stdout.puts '' - $stdout.puts "Checking #{component.color(:yellow)} ... #{'Finished'.color(:green)}" - $stdout.puts '' + $stdout.puts "" + $stdout.puts "Checking #{component.color(:yellow)} ... #{"Finished".color(:green)}" + $stdout.puts "" end # @deprecated This will no longer be used when all checks were executed using SystemCheck def start_checking(component) $stdout.puts "Checking #{component.color(:yellow)} ..." - $stdout.puts '' + $stdout.puts "" end # Display a formatted list of instructions on how to fix the issue identified by the #check? @@ -42,7 +42,7 @@ module SystemCheck def try_fixing_it(*steps) steps = steps.shift if steps.first.is_a?(Array) - $stdout.puts ' Try fixing it:'.color(:blue) + $stdout.puts " Try fixing it:".color(:blue) steps.each do |step| $stdout.puts " #{step}" end @@ -57,15 +57,11 @@ module SystemCheck end def should_sanitize? - if ENV['SANITIZE'] == 'true' - true - else - false - end + ENV["SANITIZE"] == "true" end def omnibus_gitlab? - Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails' + Dir.pwd == "/opt/gitlab/embedded/service/gitlab-rails" end def sudo_gitlab(command) |