appmap 0.81.1 → 0.83.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: 94d8d2495de74768697429a640c553549c029992969acfeb65c540f2471fbef3
4
- data.tar.gz: bfbdf261991d859d31ec1f98c95ca9954e08bb1de0fe98ac2973a06c42a3dd18
3
+ metadata.gz: 14e329b0f8ab9095d4c90804976dfd50aa1dd5a9a16edae5e617eae656cd28d8
4
+ data.tar.gz: e1d95435d0c77329270f645f7e4230676b46711cbb4ecec4611d4cc9e00a3581
5
5
  SHA512:
6
- metadata.gz: 993e2ce2c51973a6469fd5f10c66c48c13200c4456f3230748e9d5ffd2b107962cdae7d0b286d59e4ee95aee98957dfa6cd062d0ac4ba5ab1923e99da233edf1
7
- data.tar.gz: 512cb13c413d394d5237840f8dfec94a0d1d0720cb6c4e164d46e11949078b808b7c25220c3c0fc32a9be74ed4326726ef844588ea346a84242bdca1f87f3056
6
+ metadata.gz: 7446aee80e06c3796c6d68e2e157baf644995d83e50279930946a0e5a2124ab2daf12eba19a7853cbb53cdc909e96d95f4c7587273a0a36595be3d3df03e2526
7
+ data.tar.gz: 3840c616f9bc8829688a91cd3ac5c3e7e15bbc5e17418220681102b07dbad36702e1aa45305bb73e55cf13166ca3f7bc08a7dac9e051225ff42955c200af7a8a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## [0.83.1](https://github.com/applandinc/appmap-ruby/compare/v0.83.0...v0.83.1) (2022-05-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Allow appmap_dir, language and additional properties ([a3bb87c](https://github.com/applandinc/appmap-ruby/commit/a3bb87cb4a87d00a7196f21c45dfcaaf6502e014))
7
+
8
+ # [0.83.0](https://github.com/applandinc/appmap-ruby/compare/v0.82.0...v0.83.0) (2022-04-29)
9
+
10
+
11
+ ### Features
12
+
13
+ * #before_setup is lang.eval.safe and deserialize.safe ([cf03641](https://github.com/applandinc/appmap-ruby/commit/cf03641dacc1c50aa8ec9803e27936df06acf592))
14
+ * pandoc-ruby is system.exec.safe ([2b3ec8e](https://github.com/applandinc/appmap-ruby/commit/2b3ec8ecc762b1209dc070bc5dc4ec5f33d7eec9))
15
+
16
+ # [0.82.0](https://github.com/applandinc/appmap-ruby/compare/v0.81.1...v0.82.0) (2022-04-27)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * Guess 'app' as the source path ([090f9f3](https://github.com/applandinc/appmap-ruby/commit/090f9f39616accd3bc1e9d3cc5f7991232fe5663))
22
+
23
+
24
+ ### Features
25
+
26
+ * install command emits language, appmap_dir ([f780095](https://github.com/applandinc/appmap-ruby/commit/f780095269352e30637de3300dd76b2d6c051022))
27
+
1
28
  ## [0.81.1](https://github.com/applandinc/appmap-ruby/compare/v0.81.0...v0.81.1) (2022-04-27)
2
29
 
3
30
 
data/config-schema.yml CHANGED
@@ -1,10 +1,14 @@
1
1
  type: object
2
- additionalProperties: false
2
+ additionalProperties: true
3
3
  required:
4
4
  - name
5
5
  properties:
6
6
  name:
7
7
  type: string
8
+ language:
9
+ type: string
10
+ appmap_dir:
11
+ type: string
8
12
  packages:
9
13
  type: array
10
14
  items:
@@ -19,17 +19,6 @@
19
19
  require_name: ruby
20
20
  label: lang.eval
21
21
  handler_class: AppMap::Handler::Eval
22
- # TODO: eval does not happen in the right context, and therefore any new constants
23
- # which are defined are placed on the wrong module/class.
24
- # - Binding#eval
25
- # - BasicObject#instance_eval
26
- # These methods cannot be hooked as far as I can tell.
27
- # Why? When calling one of these functions, the context at the point of
28
- # definition is used. It's not possible to bind class_eval to a new context.
29
- # - Module#class_eval
30
- # - Module#module_eval
31
- # require_name: ruby
32
- # label: lang.eval
33
22
  - methods:
34
23
  - IO#popen
35
24
  - Kernel#exec
@@ -13,7 +13,9 @@ module AppMap
13
13
  def perform
14
14
  config = {
15
15
  'name' => Service::Guesser.guess_name,
16
- 'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } }
16
+ 'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } },
17
+ 'language' => 'ruby',
18
+ 'appmap_dir' => 'tmp/appmap'
17
19
  }
18
20
 
19
21
  result = {
@@ -49,3 +49,7 @@
49
49
  label: mvc.render
50
50
  handler_class: AppMap::Handler::Rails::RenderHandler
51
51
  require_name: action_controller
52
+ - method: ActionDispatch::Integration::Runner#before_setup
53
+ labels:
54
+ - deserialize.safe
55
+ - lang.eval.safe
@@ -0,0 +1,3 @@
1
+ - method: PandocRuby#convert
2
+ labels:
3
+ - system.exec.safe
@@ -23,6 +23,11 @@ module AppMap
23
23
  config_validator.valid?
24
24
  end
25
25
 
26
+ def errors
27
+ valid?
28
+ config_validator.violations.map(&:message)
29
+ end
30
+
26
31
  private
27
32
 
28
33
  def config_validator
@@ -3,10 +3,11 @@
3
3
  module AppMap
4
4
  module Service
5
5
  class Guesser
6
- POSSIBLE_PATHS = %w[app/controllers app/models lib]
6
+ POSSIBLE_PATHS = %w[app lib]
7
7
  class << self
8
8
  def guess_name
9
9
  return Pathname.new(`git rev-parse --show-toplevel`.strip).basename.to_s if File.directory?('.git')
10
+
10
11
  Dir.pwd.split('/').last
11
12
  end
12
13
 
@@ -19,6 +19,7 @@ module AppMap
19
19
  end
20
20
 
21
21
  def valid?
22
+ @violations = []
22
23
  validate_ruby_version
23
24
  validate_rails_presence
24
25
  validate_config_presence
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.81.1'
6
+ VERSION = '0.83.1'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.7.0'
9
9
 
@@ -0,0 +1,14 @@
1
+ name: appmap
2
+ packages:
3
+ - path: app/models
4
+ exclude: app/models/helpers
5
+ - gem: rack
6
+ - gem: activesupport
7
+ shallow: false
8
+ functions:
9
+ - methods:
10
+ - OpenSSL::X509::Request#sign
11
+ - OpenSSL::X509::Request#verify
12
+ label: crypto.x509
13
+ language: ruby
14
+ appmap_dir: tmp/appmap
@@ -1,3 +1,3 @@
1
1
  name: appmap
2
2
  packages:
3
- - path: app/models
3
+ - path: app/models
@@ -37,10 +37,8 @@ describe AppMap::Service::ConfigAnalyzer do
37
37
  end
38
38
  end
39
39
 
40
- describe '.is_valid?' do
41
- it 'returns true' do
42
- expect(subject.valid?).to be_falsey
43
- end
40
+ it 'is valid' do
41
+ expect(subject.errors).to eq(['AppMap auto-configuration is currently not available for non Rails projects'])
44
42
  end
45
43
 
46
44
  describe '.is_present?' do
@@ -50,6 +48,14 @@ describe AppMap::Service::ConfigAnalyzer do
50
48
  end
51
49
  end
52
50
 
51
+ context 'with maximal valid config' do
52
+ let(:config_file) { 'spec/fixtures/config/maximal_config.yml'}
53
+
54
+ it 'is valid' do
55
+ expect(subject.errors).to eq(['AppMap auto-configuration is currently not available for non Rails projects'])
56
+ end
57
+ end
58
+
53
59
  context 'with invalid YAML config' do
54
60
  let(:config_file) { 'spec/fixtures/config/invalid_yaml_config.yml'}
55
61
 
@@ -9,6 +9,8 @@ class AgentSetupInitTest < Minitest::Test
9
9
  name: appmap-ruby
10
10
  packages:
11
11
  - path: lib
12
+ language: ruby
13
+ appmap_dir: tmp/appmap
12
14
  )
13
15
 
14
16
  def test_init_when_config_exists
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.81.1
4
+ version: 0.83.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: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -385,6 +385,7 @@ files:
385
385
  - lib/appmap/gem_hooks/activesupport.yml
386
386
  - lib/appmap/gem_hooks/cancancan.yml
387
387
  - lib/appmap/gem_hooks/devise.yml
388
+ - lib/appmap/gem_hooks/pandoc-ruby.yml
388
389
  - lib/appmap/gem_hooks/rails.yml
389
390
  - lib/appmap/gem_hooks/railties.yml
390
391
  - lib/appmap/gem_hooks/resque.yml
@@ -435,6 +436,7 @@ files:
435
436
  - spec/fixtures/config/incomplete_config.yml
436
437
  - spec/fixtures/config/invalid_config.yml
437
438
  - spec/fixtures/config/invalid_yaml_config.yml
439
+ - spec/fixtures/config/maximal_config.yml
438
440
  - spec/fixtures/config/missing_path_or_gem.yml
439
441
  - spec/fixtures/config/valid_config.yml
440
442
  - spec/fixtures/database.yml