Class: GDK::Diagnostic::RubyGems

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

Constant Summary collapse

TITLE =
'Ruby Gems'
GEM_REQUIRE_MAPPING =
{
  'static_holmes' => 'charlock_holmes',
  'ffi' => 'ffi',
  'gpgme' => 'gpgme',
  'pg' => 'pg',
  'oj' => 'oj'
}.freeze
GITLAB_GEMS_WITH_C_CODE_TO_CHECK =
GEM_REQUIRE_MAPPING.keys

Instance Method Summary collapse

Methods inherited from Base

#message, #title

Constructor Details

#initialize(allow_gem_not_installed: false) ⇒ RubyGems

Returns a new instance of RubyGems.



18
19
20
21
22
# File 'lib/gdk/diagnostic/ruby_gems.rb', line 18

def initialize(allow_gem_not_installed: false)
  @allow_gem_not_installed = allow_gem_not_installed

  super()
end

Instance Method Details

#detailObject



30
31
32
33
34
35
36
# File 'lib/gdk/diagnostic/ruby_gems.rb', line 30

def detail
  return if success?

  return bundle_check_error_message unless bundle_check_ok?

  gitlab_error_message
end

#success?Boolean

Returns:

  • (Boolean)


24
25
26
27
28
# File 'lib/gdk/diagnostic/ruby_gems.rb', line 24

def success?
  return false unless bundle_check_ok?

  failed_to_load_gitlab_gems.empty?
end