appmap 0.67.0 → 0.67.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4209d3f9422b61ba07ca1776597eac220374e8308a303cdf001604c90903dd31
4
- data.tar.gz: 55a755af5bd85255ce882633d3089a0ca308d137b15945e0a1fff4d5479c4994
3
+ metadata.gz: 66a5dd9600679b05f4789e2531ca6151bc46fa5e95a7458d401f67b3b94861e7
4
+ data.tar.gz: 89380ec4d7ebfabe615a187a1d0a10ad107d06df4e5bc50c987b62a3f27c4edf
5
5
  SHA512:
6
- metadata.gz: 4a7ce04424eac8292b0457c99bc3b6f699c0e80a6222450e52f37071e078c2c574c33e8a89249c584412c50da5b26d07f98864f50ecc13e0318da6272fafb879
7
- data.tar.gz: 6c8ba9b9a67f09ce662d1bdf0569238537087709cff6f9be2562d50fe06d8ca4199268a2bc3c0d9136dd8a6ab6ff0e66f0d85683b4d3c15e95ba5e10dbcdeb71
6
+ metadata.gz: 89b13f75e8fbe46e5ddf9a5ec817eaebfd0356d124f2a117e74c24a44d07a8d89f9b0e5afcacbe9ea1277f34979955f30d441c5325ce8aa954bfeda08ce2f03f
7
+ data.tar.gz: 27c0ba4946df49d998aa6cfa5cfae8cbcc10bed6ec0590ac06c106e99d828f03bfb675b4a67317b1abd1b87ba1c0016699f44470585c0954d431198ee34b6b44
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.67.1](https://github.com/applandinc/appmap-ruby/compare/v0.67.0...v0.67.1) (2021-11-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Don't try to index AppMaps when inspecting ([ca18861](https://github.com/applandinc/appmap-ruby/commit/ca188619bd7085caa75a06eeeb5d5a92213251ac))
7
+
1
8
  # [0.67.0](https://github.com/applandinc/appmap-ruby/compare/v0.66.2...v0.67.0) (2021-10-21)
2
9
 
3
10
 
@@ -10,7 +10,14 @@ module AppMap
10
10
 
11
11
  class Validate < ValidateStruct
12
12
  def perform
13
- puts JSON.pretty_generate(config_validator.valid? ? [] : config_validator.violations.map(&:to_h))
13
+ schema_path = File.expand_path('../../../../../config-schema.yml', __FILE__)
14
+ schema = YAML.safe_load(File.read(schema_path))
15
+ result = {
16
+ version: 2,
17
+ errors: config_validator.valid? ? [] : config_validator.violations.map(&:to_h),
18
+ schema: schema
19
+ }
20
+ puts JSON.pretty_generate(result)
14
21
  end
15
22
 
16
23
  private
@@ -13,7 +13,6 @@ module AppMap
13
13
 
14
14
  def inspect(arguments)
15
15
  detect_nodejs
16
- index_appmaps
17
16
 
18
17
  arguments.unshift 'inspect'
19
18
  arguments.unshift APPMAP_JS
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.67.0'
6
+ VERSION = '0.67.1'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.5.1'
9
9
 
@@ -104,7 +104,7 @@ describe 'Depends API' do
104
104
  describe '.run_tests' do
105
105
  def run_tests
106
106
  Dir.chdir 'spec/fixtures/depends' do
107
- api.run_tests([ 'spec/actual_rspec_test.rb', 'test/actual_minitest_test.rb' ], appmap_dir: Pathname.new(DEPENDS_TEST_DIR).expand_path.to_s)
107
+ api.run_tests([ 'spec/actual_rspec_test.rb', 'test/actual_minitest_test.rb' ], appmap_dir: Pathname.new('.').expand_path.to_s)
108
108
  end
109
109
  end
110
110
 
@@ -5,9 +5,14 @@ require 'active_support'
5
5
  require 'active_support/core_ext'
6
6
  require 'open3'
7
7
 
8
+ # docker compose v2 replaced the --filter flag with --status
9
+ PS_CMD=`docker-compose --version` =~ /version v2/ ?
10
+ "docker-compose ps -q --status running" :
11
+ "docker-compose ps -q --filter health=healthy"
12
+
8
13
  def wait_for_container(app_name)
9
14
  start_time = Time.now
10
- until `docker-compose ps -q --filter health=healthy #{app_name}`.strip != ''
15
+ until `#{PS_CMD} #{app_name}`.strip != ''
11
16
  elapsed = Time.now - start_time
12
17
  raise "Timeout waiting for container #{app_name} to be ready" if elapsed > 10
13
18
 
@@ -2,28 +2,40 @@
2
2
 
3
3
  require 'test_helper'
4
4
 
5
+ schema_path = File.expand_path('../../config-schema.yml', __FILE__)
6
+ CONFIG_SCHEMA = YAML.safe_load(File.read(schema_path))
5
7
  class AgentSetupValidateTest < Minitest::Test
6
8
  NON_EXISTING_CONFIG_FILENAME = '123.yml'
7
9
  INVALID_YAML_CONFIG_FILENAME = 'spec/fixtures/config/invalid_yaml_config.yml'
8
10
  INVALID_CONFIG_FILENAME = 'spec/fixtures/config/invalid_config.yml'
9
11
  MISSING_PATH_OR_GEM_CONFIG_FILENAME = 'spec/fixtures/config/missing_path_or_gem.yml'
10
12
 
13
+ def check_output(output, expected_errors)
14
+ expected = JSON.pretty_generate(
15
+ {
16
+ version: 2,
17
+ errors: expected_errors,
18
+ schema: CONFIG_SCHEMA
19
+ }
20
+ )
21
+ assert_equal(expected, output.strip)
22
+ end
23
+
11
24
  def test_init_when_config_exists
12
25
  output = `./exe/appmap-agent-validate`
13
26
  assert_equal 0, $CHILD_STATUS.exitstatus
14
- expected = JSON.pretty_generate([
27
+ check_output(output, [
15
28
  {
16
29
  level: :error,
17
30
  message: 'AppMap auto-configuration is currently not available for non Rails projects'
18
31
  }
19
32
  ])
20
- assert_equal expected, output.strip
21
33
  end
22
34
 
23
35
  def test_init_with_non_existing_config_file
24
36
  output = `./exe/appmap-agent-validate -c #{NON_EXISTING_CONFIG_FILENAME}`
25
37
  assert_equal 0, $CHILD_STATUS.exitstatus
26
- expected = JSON.pretty_generate([
38
+ check_output(output, [
27
39
  {
28
40
  level: :error,
29
41
  message: 'AppMap auto-configuration is currently not available for non Rails projects'
@@ -34,13 +46,12 @@ class AgentSetupValidateTest < Minitest::Test
34
46
  message: "AppMap configuration #{NON_EXISTING_CONFIG_FILENAME} file does not exist"
35
47
  }
36
48
  ])
37
- assert_equal expected, output.strip
38
49
  end
39
50
 
40
51
  def test_init_with_invalid_YAML
41
52
  output = `./exe/appmap-agent-validate -c #{INVALID_YAML_CONFIG_FILENAME}`
42
53
  assert_equal 0, $CHILD_STATUS.exitstatus
43
- expected = JSON.pretty_generate([
54
+ check_output(output, [
44
55
  {
45
56
  level: :error,
46
57
  message: 'AppMap auto-configuration is currently not available for non Rails projects'
@@ -53,13 +64,12 @@ class AgentSetupValidateTest < Minitest::Test
53
64
  'did not find expected key while parsing a block mapping at line 1 column 1'
54
65
  }
55
66
  ])
56
- assert_equal expected, output.strip
57
67
  end
58
68
 
59
69
  def test_init_with_invalid_data_config
60
70
  output = `./exe/appmap-agent-validate -c #{INVALID_CONFIG_FILENAME}`
61
71
  assert_equal 0, $CHILD_STATUS.exitstatus
62
- expected = JSON.pretty_generate([
72
+ check_output(output, [
63
73
  {
64
74
  level: :error,
65
75
  message: 'AppMap auto-configuration is currently not available for non Rails projects'
@@ -71,13 +81,12 @@ class AgentSetupValidateTest < Minitest::Test
71
81
  detailed_message: "no implicit conversion of String into Integer"
72
82
  }
73
83
  ])
74
- assert_equal expected, output.strip
75
84
  end
76
85
 
77
86
  def test_init_with_missing_package_key
78
87
  output = `./exe/appmap-agent-validate -c #{MISSING_PATH_OR_GEM_CONFIG_FILENAME}`
79
88
  assert_equal 0, $CHILD_STATUS.exitstatus
80
- expected = JSON.pretty_generate([
89
+ check_output(output, [
81
90
  {
82
91
  level: :error,
83
92
  message: 'AppMap auto-configuration is currently not available for non Rails projects'
@@ -89,6 +98,5 @@ class AgentSetupValidateTest < Minitest::Test
89
98
  detailed_message: "AppMap config 'package' element should specify 'gem' or 'path'"
90
99
  }
91
100
  ])
92
- assert_equal expected, output.strip
93
101
  end
94
102
  end
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.67.0
4
+ version: 0.67.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2021-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport