Class: AppMap::Command::AgentSetup::Status

Inherits:
StatusStruct show all
Defined in:
lib/appmap/command/agent_setup/status.rb

Instance Attribute Summary

Attributes inherited from StatusStruct

#config_file

Instance Method Summary collapse

Instance Method Details

#performObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/appmap/command/agent_setup/status.rb', line 14

def perform
  status = {
    test_commands: Service::TestCommandProvider.all,
    properties: {
      config: {
        app: config_analyzer.app_name,
        present: config_analyzer.present?,
        valid: config_analyzer.valid?
      },
      project: {
        agentVersion: AppMap::VERSION,
        language: 'ruby',
        remoteRecordingCapable: Gem.loaded_specs.has_key?('rails'),
        integrationTests: Service::IntegrationTestPathFinder.new.count_paths > 0
      }
    }
  }

  puts JSON.pretty_generate(status)
end