appmap 0.28.1 → 0.31.0
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 +14 -1
- data/README.md +24 -0
- data/Rakefile +1 -1
- data/lib/appmap.rb +7 -6
- data/lib/appmap/class_map.rb +15 -23
- data/lib/appmap/config.rb +91 -0
- data/lib/appmap/hook.rb +92 -128
- data/lib/appmap/metadata.rb +1 -1
- data/lib/appmap/minitest.rb +141 -0
- data/lib/appmap/record.rb +27 -0
- data/lib/appmap/rspec.rb +1 -1
- data/lib/appmap/trace.rb +9 -1
- data/lib/appmap/version.rb +1 -1
- data/spec/config_spec.rb +3 -3
- data/spec/fixtures/hook/compare.rb +7 -0
- data/spec/fixtures/hook/openssl_sign.rb +87 -0
- data/spec/hook_spec.rb +141 -18
- data/spec/util_spec.rb +1 -1
- data/test/fixtures/minitest_recorder/Gemfile +5 -0
- data/test/fixtures/minitest_recorder/appmap.yml +3 -0
- data/test/fixtures/minitest_recorder/lib/hello.rb +5 -0
- data/test/fixtures/minitest_recorder/test/hello_test.rb +12 -0
- data/test/fixtures/process_recorder/appmap.yml +3 -0
- data/test/fixtures/process_recorder/hello.rb +9 -0
- data/test/minitest_test.rb +38 -0
- data/test/record_process_test.rb +35 -0
- metadata +15 -2
data/spec/util_spec.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'test_helper'
|
5
|
+
require 'English'
|
6
|
+
|
7
|
+
class MinitestTest < Minitest::Test
|
8
|
+
def perform_test(test_name)
|
9
|
+
Bundler.with_clean_env do
|
10
|
+
Dir.chdir 'test/fixtures/minitest_recorder' do
|
11
|
+
FileUtils.rm_rf 'tmp'
|
12
|
+
system 'bundle config --local local.appmap ../../..'
|
13
|
+
system 'bundle'
|
14
|
+
system({ 'APPMAP' => 'true' }, %(bundle exec ruby -Ilib -Itest test/#{test_name}_test.rb))
|
15
|
+
|
16
|
+
yield
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_hello
|
22
|
+
perform_test 'hello' do
|
23
|
+
appmap_file = 'tmp/appmap/minitest/Hello_hello.appmap.json'
|
24
|
+
|
25
|
+
assert File.file?(appmap_file), 'appmap output file does not exist'
|
26
|
+
appmap = JSON.parse(File.read(appmap_file))
|
27
|
+
assert_equal AppMap::APPMAP_FORMAT_VERSION, appmap['version']
|
28
|
+
assert_includes appmap.keys, 'metadata'
|
29
|
+
metadata = appmap['metadata']
|
30
|
+
assert_equal 'minitest_recorder', metadata['app']
|
31
|
+
assert_equal 'minitest', metadata['recorder']['name']
|
32
|
+
assert_equal 'ruby', metadata['language']['name']
|
33
|
+
assert_equal 'Hello', metadata['feature_group']
|
34
|
+
assert_equal 'hello', metadata['feature']
|
35
|
+
assert_equal 'Hello hello', metadata['name']
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'test_helper'
|
5
|
+
require 'English'
|
6
|
+
|
7
|
+
class RecordProcessTest < Minitest::Test
|
8
|
+
def perform_test(program_name)
|
9
|
+
Bundler.with_clean_env do
|
10
|
+
Dir.chdir 'test/fixtures/process_recorder' do
|
11
|
+
FileUtils.rm_rf 'tmp'
|
12
|
+
system 'bundle config --local local.appmap ../../..'
|
13
|
+
system 'bundle'
|
14
|
+
system(%(bundle exec ruby #{program_name}))
|
15
|
+
|
16
|
+
yield
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_hello
|
22
|
+
perform_test 'hello.rb' do
|
23
|
+
appmap_file = 'appmap.json'
|
24
|
+
|
25
|
+
assert File.file?(appmap_file), 'appmap output file does not exist'
|
26
|
+
appmap = JSON.parse(File.read(appmap_file))
|
27
|
+
assert_equal AppMap::APPMAP_FORMAT_VERSION, appmap['version']
|
28
|
+
assert_includes appmap.keys, 'metadata'
|
29
|
+
metadata = appmap['metadata']
|
30
|
+
assert_equal 'process_recorder', metadata['app']
|
31
|
+
assert_equal 'record_process', metadata['recorder']['name']
|
32
|
+
assert_equal 'ruby', metadata['language']['name']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
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.
|
4
|
+
version: 0.31.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: 2020-07-
|
11
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -269,14 +269,17 @@ files:
|
|
269
269
|
- lib/appmap/class_map.rb
|
270
270
|
- lib/appmap/command/record.rb
|
271
271
|
- lib/appmap/command/stats.rb
|
272
|
+
- lib/appmap/config.rb
|
272
273
|
- lib/appmap/cucumber.rb
|
273
274
|
- lib/appmap/event.rb
|
274
275
|
- lib/appmap/hook.rb
|
275
276
|
- lib/appmap/metadata.rb
|
276
277
|
- lib/appmap/middleware/remote_recording.rb
|
278
|
+
- lib/appmap/minitest.rb
|
277
279
|
- lib/appmap/rails/action_handler.rb
|
278
280
|
- lib/appmap/rails/sql_handler.rb
|
279
281
|
- lib/appmap/railtie.rb
|
282
|
+
- lib/appmap/record.rb
|
280
283
|
- lib/appmap/rspec.rb
|
281
284
|
- lib/appmap/trace.rb
|
282
285
|
- lib/appmap/util.rb
|
@@ -304,9 +307,11 @@ files:
|
|
304
307
|
- spec/abstract_controller_base_spec.rb
|
305
308
|
- spec/config_spec.rb
|
306
309
|
- spec/fixtures/hook/attr_accessor.rb
|
310
|
+
- spec/fixtures/hook/compare.rb
|
307
311
|
- spec/fixtures/hook/constructor.rb
|
308
312
|
- spec/fixtures/hook/exception_method.rb
|
309
313
|
- spec/fixtures/hook/instance_method.rb
|
314
|
+
- spec/fixtures/hook/openssl_sign.rb
|
310
315
|
- spec/fixtures/hook/singleton_method.rb
|
311
316
|
- spec/fixtures/rack_users_app/.dockerignore
|
312
317
|
- spec/fixtures/rack_users_app/.gitignore
|
@@ -478,12 +483,20 @@ files:
|
|
478
483
|
- test/fixtures/cucumber_recorder/features/support/hooks.rb
|
479
484
|
- test/fixtures/cucumber_recorder/features/support/steps.rb
|
480
485
|
- test/fixtures/cucumber_recorder/lib/hello.rb
|
486
|
+
- test/fixtures/minitest_recorder/Gemfile
|
487
|
+
- test/fixtures/minitest_recorder/appmap.yml
|
488
|
+
- test/fixtures/minitest_recorder/lib/hello.rb
|
489
|
+
- test/fixtures/minitest_recorder/test/hello_test.rb
|
490
|
+
- test/fixtures/process_recorder/appmap.yml
|
491
|
+
- test/fixtures/process_recorder/hello.rb
|
481
492
|
- test/fixtures/rspec_recorder/Gemfile
|
482
493
|
- test/fixtures/rspec_recorder/appmap.yml
|
483
494
|
- test/fixtures/rspec_recorder/lib/hello.rb
|
484
495
|
- test/fixtures/rspec_recorder/spec/decorated_hello_spec.rb
|
485
496
|
- test/fixtures/rspec_recorder/spec/labeled_hello_spec.rb
|
486
497
|
- test/fixtures/rspec_recorder/spec/plain_hello_spec.rb
|
498
|
+
- test/minitest_test.rb
|
499
|
+
- test/record_process_test.rb
|
487
500
|
- test/rspec_test.rb
|
488
501
|
- test/test_helper.rb
|
489
502
|
homepage: https://github.com/applandinc/appmap-ruby
|