Class: GDK::Diagnostic::Geo

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

Constant Summary collapse

TITLE =
'Geo'

Instance Method Summary collapse

Methods inherited from Base

#message, #title

Instance Method Details

#detailObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/gdk/diagnostic/geo.rb', line 16

def detail
  return if success?

  <<~MESSAGE
    There is a mismatch in your Geo configuration.

    #{geo_mismatch_description}
    Please run `gdk reconfigure` to apply settings in gdk.yml.
    For more details, please refer to #{geo_howto_url}.
  MESSAGE
end

#success?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/gdk/diagnostic/geo.rb', line 8

def success?
  @success ||= if geo_enabled?
                 geo_secondary? ? geo_database_exists? : !geo_database_exists?
               else
                 !geo_database_exists?
               end
end