appmap 0.99.4 → 0.100.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eda0d23ff548aaa0e6e61eef0e7734a542660eeeb45e899f54a7287665baaf7e
4
- data.tar.gz: 84dc9f162eeae76f58f0c6015ec47686509aabf9ac4cac727016957b69421daf
3
+ metadata.gz: 5f52fa6b2d5e7414553f16fbcf018b4d32214bdfcda4afd2567d9bef11203979
4
+ data.tar.gz: 0d456c7e95dc01ae731bbe9def89ba1585651412d6d8a35eaa2f9c4f83580d2f
5
5
  SHA512:
6
- metadata.gz: af594c4d511623a7e9b37bc3bc45d5d2460de1410e9177f544e900c1d1cd5a555be04bef870c8c5e18a05f46fb242afd6dd9ce26646fc700f071c7a4d917da5a
7
- data.tar.gz: 49a5e81dd6f504c1e5998f8dc2af53e1b657ddcef387005cd6f313f6c299eb46cc27b7a1c470356de8170435e459d3b1f5e06ef65a1d72f92cea5c0eed797607
6
+ metadata.gz: a07b7341627a96c8ef21930d21a095e9cf849cf06b882d980ec670ce07003dc28e68d2a30e930fb203bf4315ca7aba1f60d43e5d7053d2e56e598ed7d6709302
7
+ data.tar.gz: 691c992e647a2760de0ae0ec75c00efb6824b008abd85f6506c31d34175e52d178d5e3297ab3414eb918fc3e083bba208b0b04c9c74f763330bc4333eb078ce1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.100.0](https://github.com/getappmap/appmap-ruby/compare/v0.99.4...v0.100.0) (2023-07-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add `appmap-agent-config` command to bootstrap appmap.yml ([568acc3](https://github.com/getappmap/appmap-ruby/commit/568acc3948871f736ba72244a04fd54d8be67615))
7
+
1
8
  ## [0.99.4](https://github.com/getappmap/appmap-ruby/compare/v0.99.3...v0.99.4) (2023-05-15)
2
9
 
3
10
 
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'optparse'
5
+ require 'appmap'
6
+ require 'appmap/command/agent_setup/config'
7
+
8
+ @options = { config_file: AppMap::DEFAULT_CONFIG_FILE_PATH, force: false }
9
+
10
+ OptionParser.new do |parser|
11
+ parser.banner = 'Usage: appmap-agent-config [options]'
12
+
13
+ description = "AppMap configuration file path (default: #{AppMap::DEFAULT_CONFIG_FILE_PATH})"
14
+ parser.on('-c', '--config=FILEPATH', description) do |filepath|
15
+ @options[:config_file] = filepath
16
+ end
17
+
18
+ parser.on('-f', '--force', 'Overwrite existing configuration file') do
19
+ @options[:force] = true
20
+ end
21
+ end.parse!
22
+
23
+ begin
24
+ AppMap::Command::AgentSetup::Config.new(@options[:config_file], @options[:force]).perform
25
+
26
+ puts "AppMap configuration file created at #{@options[:config_file]}"
27
+ rescue AppMap::Command::AgentSetup::Config::FileExistsError
28
+ puts "AppMap configuration file already exists at #{@options[:config_file]}"
29
+ puts 'Use the --force option to overwrite.'
30
+ exit 1
31
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+ require 'appmap/service/guesser'
5
+
6
+ module AppMap
7
+ module Command
8
+ module AgentSetup
9
+ ConfigStruct = Struct.new(:config_file, :overwrite)
10
+
11
+ class Config < ConfigStruct
12
+ class FileExistsError < StandardError; end
13
+
14
+ def perform
15
+ raise FileExistsError unless overwrite || !File.exist?(config_file)
16
+
17
+ config = {
18
+ 'name' => Service::Guesser.guess_name,
19
+ 'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } },
20
+ 'language' => 'ruby',
21
+ 'appmap_dir' => 'tmp/appmap'
22
+ }
23
+
24
+ File.write(config_file, YAML.dump(config))
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.99.4'
6
+ VERSION = '0.100.0'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.12.0'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.4
4
+ version: 0.100.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source
@@ -308,6 +308,7 @@ description:
308
308
  email:
309
309
  - kgilpin@gmail.com
310
310
  executables:
311
+ - appmap-agent-config
311
312
  - appmap-agent-init
312
313
  - appmap-agent-status
313
314
  - appmap-agent-validate
@@ -347,6 +348,7 @@ files:
347
348
  - examples/mock_webapp/lib/mock_webapp/controller.rb
348
349
  - examples/mock_webapp/lib/mock_webapp/request.rb
349
350
  - examples/mock_webapp/lib/mock_webapp/user.rb
351
+ - exe/appmap-agent-config
350
352
  - exe/appmap-agent-init
351
353
  - exe/appmap-agent-status
352
354
  - exe/appmap-agent-validate
@@ -365,6 +367,7 @@ files:
365
367
  - lib/appmap/builtin_hooks/psych.yml
366
368
  - lib/appmap/builtin_hooks/ruby.yml
367
369
  - lib/appmap/class_map.rb
370
+ - lib/appmap/command/agent_setup/config.rb
368
371
  - lib/appmap/command/agent_setup/init.rb
369
372
  - lib/appmap/command/agent_setup/status.rb
370
373
  - lib/appmap/command/agent_setup/validate.rb