appmap 0.52.1 → 0.53.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: 2ea77b709360095bcd2ee1333a2380e777a85c51856a13d603095be08649e5da
4
- data.tar.gz: d1ba48dec0628ae81be4527371b20dcbc334ea59c925cc866f97ec6f73f5dc93
3
+ metadata.gz: 69fc6d5fce636d669cb33a9564a3c504eb255cb13a81985154589eb7cc6f9879
4
+ data.tar.gz: f2400bbda425b4e0f8d72b52d7edfcf761c8356638691074c79b72fdbca9f086
5
5
  SHA512:
6
- metadata.gz: db175f34a2d019a010e2675184b216e339524f82508464d85468dac83cc259f8bd1df4a5ce9a4ff2bf17ab66fbce17da3609e3b7c387771918192a901b4c98a8
7
- data.tar.gz: b48df26af2811d428107256326a1f4477857c2c151f3a1d6235054a3028f95ceb4fe25b78b2b90173522846b43d9f92ac71492e3bb7378b3f67899bf3441605e
6
+ metadata.gz: 17016392e9b2931c961bf1cdb3c7f832af15896201b395995c124befb7de1987ee43997f9186c329f9fe6474101158c06a0772e8bf0bd6bbd9b9b4ddd84defeb
7
+ data.tar.gz: 29fe408c9a44ec5cf8ffd410f732d6cc5959e045480c94406a4f9cc4abc2badbc1843f449bba0b8cd5e2b6269c71f8e5d603b9e99a902e63e6692d16af0e4c6f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.53.0](https://github.com/applandinc/appmap-ruby/compare/v0.52.1...v0.53.0) (2021-06-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * appmap-agent-setup as a separate command not using GLI library ([f0eedb7](https://github.com/applandinc/appmap-ruby/commit/f0eedb7451368ea0399872f3be680e1581ac6200))
7
+
1
8
  ## [0.52.1](https://github.com/applandinc/appmap-ruby/compare/v0.52.0...v0.52.1) (2021-06-23)
2
9
 
3
10
 
data/appmap.gemspec CHANGED
@@ -33,7 +33,6 @@ Gem::Specification.new do |spec|
33
33
  spec.require_paths = ['lib']
34
34
 
35
35
  spec.add_dependency 'activesupport'
36
- spec.add_dependency 'gli'
37
36
  spec.add_dependency 'method_source'
38
37
  spec.add_dependency 'rack'
39
38
  spec.add_dependency 'reverse_markdown'
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'optparse'
5
+ require 'appmap'
6
+ require 'appmap/command/agent_setup/init'
7
+
8
+ @options = {:config_file => AppMap::DEFAULT_CONFIG_FILE_PATH}
9
+
10
+ OptionParser.new do |parser|
11
+ parser.banner = 'Usage: bundle exec exe/appmap-agent-init [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
+ end.parse!
18
+
19
+ AppMap::Command::AgentSetup::Init.new(@options[:config_file]).perform
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.52.1'
6
+ VERSION = '0.53.0'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.5.1'
9
9
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'test_helper'
5
5
 
6
- class AgentSetupCLITest < Minitest::Test
6
+ class AgentSetupInitTest < Minitest::Test
7
7
  CONFIG_FILENAME = '123.yml'
8
8
  SUBFOLDER_CONFIG_FILEPATH = 'conf/123.yml'
9
9
  EXPECTED_CONFIG_CONTENT = %(name: appmap-ruby
@@ -12,13 +12,13 @@ packages:
12
12
  )
13
13
 
14
14
  def test_init_when_config_exists
15
- output = `./exe/appmap-agent-setup init`
15
+ output = `./exe/appmap-agent-init`
16
16
  assert_equal 0, $CHILD_STATUS.exitstatus
17
17
  assert_includes output, 'The AppMap config file appmap.yml already exists.'
18
18
  end
19
19
 
20
20
  def test_init_with_custom_config_filename
21
- output = `./exe/appmap-agent-setup -c #{CONFIG_FILENAME} init`
21
+ output = `./exe/appmap-agent-init -c #{CONFIG_FILENAME}`
22
22
  assert_equal 0, $CHILD_STATUS.exitstatus
23
23
  assert_includes output, "The following AppMap config file #{CONFIG_FILENAME} has been created:"
24
24
  assert_equal EXPECTED_CONFIG_CONTENT, File.read(CONFIG_FILENAME)
@@ -27,7 +27,7 @@ packages:
27
27
  end
28
28
 
29
29
  def test_init_with_custom_config_file_in_subfolder
30
- output = `./exe/appmap-agent-setup -c #{SUBFOLDER_CONFIG_FILEPATH} init`
30
+ output = `./exe/appmap-agent-init --config=#{SUBFOLDER_CONFIG_FILEPATH}`
31
31
  assert_equal 0, $CHILD_STATUS.exitstatus
32
32
  assert_includes output, "The following AppMap config file #{SUBFOLDER_CONFIG_FILEPATH} has been created:"
33
33
  assert_equal EXPECTED_CONFIG_CONTENT, File.read(SUBFOLDER_CONFIG_FILEPATH)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.52.1
4
+ version: 0.53.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: gli
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: method_source
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -294,7 +280,7 @@ description:
294
280
  email:
295
281
  - kgilpin@gmail.com
296
282
  executables:
297
- - appmap-agent-setup
283
+ - appmap-agent-init
298
284
  - appmap-inspect
299
285
  extensions:
300
286
  - ext/appmap/extconf.rb
@@ -323,7 +309,7 @@ files:
323
309
  - examples/mock_webapp/lib/mock_webapp/controller.rb
324
310
  - examples/mock_webapp/lib/mock_webapp/request.rb
325
311
  - examples/mock_webapp/lib/mock_webapp/user.rb
326
- - exe/appmap-agent-setup
312
+ - exe/appmap-agent-init
327
313
  - exe/appmap-inspect
328
314
  - ext/appmap/appmap.c
329
315
  - ext/appmap/extconf.rb
@@ -528,7 +514,7 @@ files:
528
514
  - spec/remote_recording_spec.rb
529
515
  - spec/spec_helper.rb
530
516
  - spec/util_spec.rb
531
- - test/agent_setup_cli_test.rb
517
+ - test/agent_setup_init_test.rb
532
518
  - test/bundle_vendor_test.rb
533
519
  - test/cucumber_test.rb
534
520
  - test/expectations/openssl_test_key_sign1.json
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'gli'
5
-
6
- require 'appmap'
7
-
8
- class App
9
- extend GLI::App
10
-
11
- program_desc 'CLI tool to be used by code editor plugins for AppMap setup and configuration'
12
-
13
- version AppMap::VERSION
14
-
15
- subcommand_option_handling :normal
16
- arguments :strict
17
- preserve_argv true
18
-
19
- desc 'AppMap configuration file name'
20
- default_value ENV['APPMAP_CONFIG'] || AppMap::DEFAULT_CONFIG_FILE_PATH
21
- arg_name 'filename'
22
- flag %i[c config]
23
-
24
- desc 'Creates base configuration file for the current project'
25
- command :init do |c|
26
- c.action do
27
- require 'appmap/command/agent_setup/init'
28
- AppMap::Command::AgentSetup::Init.new(@config_file).perform
29
- end
30
- end
31
-
32
- pre do |global, _, _, _|
33
- @config_file = global[:config]
34
- @config = interpret_config_option(@config_file) if File.exist?(@config_file)
35
- true
36
- end
37
-
38
- class << self
39
- protected
40
-
41
- def interpret_config_option(fname)
42
- AppMap::Config.load_from_file fname
43
- end
44
- end
45
- end
46
-
47
- exit App.run(ARGV)