Sha256: a434f274ad8246522c51e9e4c9dfa45183e4074c726ab075b7072d3a844e2ab7

Contents?: true

Size: 642 Bytes

Versions: 13

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

require 'json'
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

13 entries across 13 versions & 1 rubygems

Version Path
appmap-0.64.0 lib/appmap/command/agent_setup/init.rb
appmap-0.63.0 lib/appmap/command/agent_setup/init.rb
appmap-0.62.1 lib/appmap/command/agent_setup/init.rb
appmap-0.62.0 lib/appmap/command/agent_setup/init.rb
appmap-0.61.1 lib/appmap/command/agent_setup/init.rb
appmap-0.61.0 lib/appmap/command/agent_setup/init.rb
appmap-0.60.0 lib/appmap/command/agent_setup/init.rb
appmap-0.59.2 lib/appmap/command/agent_setup/init.rb
appmap-0.59.1 lib/appmap/command/agent_setup/init.rb
appmap-0.59.0 lib/appmap/command/agent_setup/init.rb
appmap-0.58.0 lib/appmap/command/agent_setup/init.rb
appmap-0.57.1 lib/appmap/command/agent_setup/init.rb
appmap-0.57.0 lib/appmap/command/agent_setup/init.rb