Class: AppMap::Command::AgentSetup::Config
- Inherits:
-
ConfigStruct
- Object
- Struct
- ConfigStruct
- AppMap::Command::AgentSetup::Config
- Defined in:
- lib/appmap/command/agent_setup/config.rb
Defined Under Namespace
Classes: FileExistsError
Instance Attribute Summary
Attributes inherited from ConfigStruct
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/appmap/command/agent_setup/config.rb', line 14 def perform raise FileExistsError unless overwrite || !File.exist?(config_file) config = { 'name' => Service::Guesser.guess_name, 'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } }, 'language' => 'ruby', 'appmap_dir' => 'tmp/appmap' } File.write(config_file, YAML.dump(config)) end |