Sha256: 891f93f6bad7ca06fba5eb851ad6e0043bacde14a0bfd5a0a2ef7b03bbacbea7

Contents?: true

Size: 982 Bytes

Versions: 2

Compression:

Stored size: 982 Bytes

Contents

# frozen_string_literal: true

require 'json'
require 'appmap/service/config_analyzer'

module AppMap
  module Command
    module AgentSetup
      StatusStruct = Struct.new(:config_file)

      class Status < StatusStruct
        def perform
          status = {
            :properties => {
              :config => {
                :app => config_analyzer.app_name,
                :present => config_analyzer.present?,
                :valid => config_analyzer.valid?
              },
              :project => {
                :agentVersionProject => AppMap::VERSION,
                :language => 'ruby',
                :remoteRecordingCapable => Gem.loaded_specs.has_key?('rails'),
                :integrationTests => false #TODO
              }
            }
          }

          puts status.to_json
        end

        private

        def config_analyzer
          @config_analyzer ||= Service::ConfigAnalyzer.new(config_file)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appmap-0.57.0 lib/appmap/command/agent_setup/status.rb
appmap-0.56.0 lib/appmap/command/agent_setup/status.rb