appmap 0.28.0 → 0.34.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 +32 -0
- data/README.md +54 -2
- data/Rakefile +1 -1
- data/appmap.gemspec +1 -0
- data/lib/appmap.rb +25 -14
- data/lib/appmap/algorithm/stats.rb +2 -1
- data/lib/appmap/class_map.rb +26 -28
- data/lib/appmap/config.rb +115 -0
- data/lib/appmap/event.rb +28 -19
- data/lib/appmap/hook.rb +88 -129
- data/lib/appmap/hook/method.rb +78 -0
- data/lib/appmap/metadata.rb +1 -1
- data/lib/appmap/minitest.rb +141 -0
- data/lib/appmap/open.rb +57 -0
- data/lib/appmap/rails/action_handler.rb +7 -7
- data/lib/appmap/rails/sql_handler.rb +10 -8
- data/lib/appmap/record.rb +27 -0
- data/lib/appmap/rspec.rb +2 -2
- data/lib/appmap/trace.rb +17 -9
- data/lib/appmap/util.rb +19 -0
- data/lib/appmap/version.rb +1 -1
- data/package-lock.json +3 -3
- data/spec/abstract_controller4_base_spec.rb +1 -1
- data/spec/abstract_controller_base_spec.rb +9 -2
- data/spec/config_spec.rb +3 -3
- data/spec/fixtures/hook/compare.rb +7 -0
- data/spec/fixtures/hook/singleton_method.rb +54 -0
- data/spec/hook_spec.rb +280 -53
- data/spec/open_spec.rb +19 -0
- data/spec/record_sql_rails_pg_spec.rb +56 -33
- data/spec/util_spec.rb +1 -1
- data/test/cli_test.rb +14 -4
- 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/openssl_recorder/Gemfile +3 -0
- data/test/fixtures/openssl_recorder/appmap.yml +3 -0
- data/test/fixtures/openssl_recorder/lib/openssl_cert_sign.rb +94 -0
- data/test/fixtures/openssl_recorder/lib/openssl_encrypt.rb +34 -0
- data/test/fixtures/openssl_recorder/lib/openssl_key_sign.rb +28 -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/openssl_test.rb +203 -0
- data/test/record_process_test.rb +35 -0
- data/test/test_helper.rb +1 -0
- metadata +38 -4
- data/spec/fixtures/hook/class_method.rb +0 -17
@@ -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
|
data/test/test_helper.rb
CHANGED
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.34.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-
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,14 +283,19 @@ files:
|
|
269
283
|
- lib/appmap/class_map.rb
|
270
284
|
- lib/appmap/command/record.rb
|
271
285
|
- lib/appmap/command/stats.rb
|
286
|
+
- lib/appmap/config.rb
|
272
287
|
- lib/appmap/cucumber.rb
|
273
288
|
- lib/appmap/event.rb
|
274
289
|
- lib/appmap/hook.rb
|
290
|
+
- lib/appmap/hook/method.rb
|
275
291
|
- lib/appmap/metadata.rb
|
276
292
|
- lib/appmap/middleware/remote_recording.rb
|
293
|
+
- lib/appmap/minitest.rb
|
294
|
+
- lib/appmap/open.rb
|
277
295
|
- lib/appmap/rails/action_handler.rb
|
278
296
|
- lib/appmap/rails/sql_handler.rb
|
279
297
|
- lib/appmap/railtie.rb
|
298
|
+
- lib/appmap/record.rb
|
280
299
|
- lib/appmap/rspec.rb
|
281
300
|
- lib/appmap/trace.rb
|
282
301
|
- lib/appmap/util.rb
|
@@ -304,10 +323,11 @@ files:
|
|
304
323
|
- spec/abstract_controller_base_spec.rb
|
305
324
|
- spec/config_spec.rb
|
306
325
|
- spec/fixtures/hook/attr_accessor.rb
|
307
|
-
- spec/fixtures/hook/
|
326
|
+
- spec/fixtures/hook/compare.rb
|
308
327
|
- spec/fixtures/hook/constructor.rb
|
309
328
|
- spec/fixtures/hook/exception_method.rb
|
310
329
|
- spec/fixtures/hook/instance_method.rb
|
330
|
+
- spec/fixtures/hook/singleton_method.rb
|
311
331
|
- spec/fixtures/rack_users_app/.dockerignore
|
312
332
|
- spec/fixtures/rack_users_app/.gitignore
|
313
333
|
- spec/fixtures/rack_users_app/Dockerfile
|
@@ -452,6 +472,7 @@ files:
|
|
452
472
|
- spec/fixtures/rails_users_app/spec/spec_helper.rb
|
453
473
|
- spec/fixtures/rails_users_app/users_app/.gitignore
|
454
474
|
- spec/hook_spec.rb
|
475
|
+
- spec/open_spec.rb
|
455
476
|
- spec/rails_spec_helper.rb
|
456
477
|
- spec/railtie_spec.rb
|
457
478
|
- spec/record_sql_rails4_pg_spec.rb
|
@@ -471,7 +492,6 @@ files:
|
|
471
492
|
- test/fixtures/cucumber4_recorder/features/support/hooks.rb
|
472
493
|
- test/fixtures/cucumber4_recorder/features/support/steps.rb
|
473
494
|
- test/fixtures/cucumber4_recorder/lib/hello.rb
|
474
|
-
- test/fixtures/cucumber_recorder/.bundle/config
|
475
495
|
- test/fixtures/cucumber_recorder/Gemfile
|
476
496
|
- test/fixtures/cucumber_recorder/appmap.yml
|
477
497
|
- test/fixtures/cucumber_recorder/features/say_hello.feature
|
@@ -479,12 +499,26 @@ files:
|
|
479
499
|
- test/fixtures/cucumber_recorder/features/support/hooks.rb
|
480
500
|
- test/fixtures/cucumber_recorder/features/support/steps.rb
|
481
501
|
- test/fixtures/cucumber_recorder/lib/hello.rb
|
502
|
+
- test/fixtures/minitest_recorder/Gemfile
|
503
|
+
- test/fixtures/minitest_recorder/appmap.yml
|
504
|
+
- test/fixtures/minitest_recorder/lib/hello.rb
|
505
|
+
- test/fixtures/minitest_recorder/test/hello_test.rb
|
506
|
+
- test/fixtures/openssl_recorder/Gemfile
|
507
|
+
- test/fixtures/openssl_recorder/appmap.yml
|
508
|
+
- test/fixtures/openssl_recorder/lib/openssl_cert_sign.rb
|
509
|
+
- test/fixtures/openssl_recorder/lib/openssl_encrypt.rb
|
510
|
+
- test/fixtures/openssl_recorder/lib/openssl_key_sign.rb
|
511
|
+
- test/fixtures/process_recorder/appmap.yml
|
512
|
+
- test/fixtures/process_recorder/hello.rb
|
482
513
|
- test/fixtures/rspec_recorder/Gemfile
|
483
514
|
- test/fixtures/rspec_recorder/appmap.yml
|
484
515
|
- test/fixtures/rspec_recorder/lib/hello.rb
|
485
516
|
- test/fixtures/rspec_recorder/spec/decorated_hello_spec.rb
|
486
517
|
- test/fixtures/rspec_recorder/spec/labeled_hello_spec.rb
|
487
518
|
- test/fixtures/rspec_recorder/spec/plain_hello_spec.rb
|
519
|
+
- test/minitest_test.rb
|
520
|
+
- test/openssl_test.rb
|
521
|
+
- test/record_process_test.rb
|
488
522
|
- test/rspec_test.rb
|
489
523
|
- test/test_helper.rb
|
490
524
|
homepage: https://github.com/applandinc/appmap-ruby
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class ClassMethod
|
4
|
-
class << self
|
5
|
-
def say_default
|
6
|
-
'default'
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def ClassMethod.say_class_defined
|
11
|
-
'defined with explicit class scope'
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.say_self_defined
|
15
|
-
'defined with self class scope'
|
16
|
-
end
|
17
|
-
end
|