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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/appmap/command/agent_setup/validate.rb +8 -1
- data/lib/appmap/command/inspect.rb +0 -1
- data/lib/appmap/version.rb +1 -1
- data/spec/depends/api_spec.rb +1 -1
- data/spec/rails_spec_helper.rb +6 -1
- data/test/agent_setup_validate_test.rb +18 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66a5dd9600679b05f4789e2531ca6151bc46fa5e95a7458d401f67b3b94861e7
|
4
|
+
data.tar.gz: 89380ec4d7ebfabe615a187a1d0a10ad107d06df4e5bc50c987b62a3f27c4edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/appmap/version.rb
CHANGED
data/spec/depends/api_spec.rb
CHANGED
@@ -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(
|
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
|
|
data/spec/rails_spec_helper.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|