Sha256: 2d758cb3f2a56050f3ff1216978cd2d79fb99178b31636fe3bec6bbc7385438c

Contents?: true

Size: 657 Bytes

Versions: 37

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

require 'json'
require 'yaml'
require 'appmap/service/guesser'

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

      class Init < InitStruct
        def perform
          config = {
            'name' => Service::Guesser.guess_name,
            'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } }
          }

          result = {
            configuration: {
              filename: config_file,
              contents: YAML.dump(config)
            }
          }

          puts JSON.pretty_generate(result)
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
appmap-0.81.1 lib/appmap/command/agent_setup/init.rb
appmap-0.81.0 lib/appmap/command/agent_setup/init.rb
appmap-0.80.2 lib/appmap/command/agent_setup/init.rb
appmap-0.80.1 lib/appmap/command/agent_setup/init.rb
appmap-0.80.0 lib/appmap/command/agent_setup/init.rb
appmap-0.79.0 lib/appmap/command/agent_setup/init.rb
appmap-0.78.0 lib/appmap/command/agent_setup/init.rb
appmap-0.77.4 lib/appmap/command/agent_setup/init.rb
appmap-0.77.3 lib/appmap/command/agent_setup/init.rb
appmap-0.77.2 lib/appmap/command/agent_setup/init.rb
appmap-0.77.1 lib/appmap/command/agent_setup/init.rb
appmap-0.77.0 lib/appmap/command/agent_setup/init.rb
appmap-0.76.0 lib/appmap/command/agent_setup/init.rb
appmap-0.75.0 lib/appmap/command/agent_setup/init.rb
appmap-0.74.0 lib/appmap/command/agent_setup/init.rb
appmap-0.73.0 lib/appmap/command/agent_setup/init.rb
appmap-0.72.5 lib/appmap/command/agent_setup/init.rb
appmap-0.72.4 lib/appmap/command/agent_setup/init.rb
appmap-0.72.3 lib/appmap/command/agent_setup/init.rb
appmap-0.72.2 lib/appmap/command/agent_setup/init.rb