Class: GDK::Diagnostic::Gitlab::GitlabShellSecretDiagnostic

Inherits:
Object
  • Object
show all
Defined in:
lib/gdk/diagnostic/gitlab.rb

Constant Summary collapse

GITLAB_SHELL_SECRET_FILE =
'.gitlab_shell_secret'

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ GitlabShellSecretDiagnostic

Returns a new instance of GitlabShellSecretDiagnostic.



38
39
40
# File 'lib/gdk/diagnostic/gitlab.rb', line 38

def initialize(config)
  @config = config
end

Instance Method Details

#detailObject



46
47
48
49
50
51
52
53
54
# File 'lib/gdk/diagnostic/gitlab.rb', line 46

def detail
  return if success?

  if !both_files_exist?
    file_doesnt_exist_detail + solution_detail
  elsif !contents_match?
    contents_match_detail + solution_detail
  end
end

#success?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/gdk/diagnostic/gitlab.rb', line 42

def success?
  both_files_exist? && contents_match?
end