appmap 0.53.0 → 0.54.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 +12 -0
- data/lib/appmap.rb +28 -110
- data/lib/appmap/agent.rb +115 -0
- data/lib/appmap/class_map.rb +2 -2
- data/lib/appmap/config.rb +11 -3
- data/lib/appmap/handler/net_http.rb +2 -1
- data/lib/appmap/handler/rails/request_handler.rb +2 -1
- data/lib/appmap/metadata.rb +4 -2
- data/lib/appmap/minitest.rb +2 -0
- data/lib/appmap/railtie.rb +2 -2
- data/lib/appmap/rspec.rb +5 -3
- data/lib/appmap/swagger.rb +2 -0
- data/lib/appmap/swagger/configuration.rb +70 -0
- data/lib/appmap/swagger/markdown_descriptions.rb +43 -0
- data/lib/appmap/swagger/rake_tasks.rb +43 -0
- data/lib/appmap/swagger/stable.rb +37 -0
- data/lib/appmap/version.rb +1 -1
- data/package.json +0 -1
- data/spec/config_spec.rb +0 -1
- data/spec/fixtures/hook/.gitignore +2 -0
- data/spec/fixtures/hook/app/controllers/api/api_keys_controller.rb +1 -0
- data/spec/fixtures/hook/app/controllers/organizations_controller.rb +1 -0
- data/spec/fixtures/hook/app/models/api_key.rb +1 -0
- data/spec/fixtures/hook/app/models/configuration.rb +1 -0
- data/spec/fixtures/hook/app/models/show.rb +1 -0
- data/spec/fixtures/hook/app/models/user.rb +1 -0
- data/spec/fixtures/hook/revoke_api_key.appmap.json +847 -0
- data/spec/fixtures/hook/spec/api_spec.rb +1 -0
- data/spec/fixtures/hook/spec/user_spec.rb +1 -0
- data/spec/fixtures/hook/user_page_scenario.appmap.json +1722 -0
- data/spec/fixtures/rails5_users_app/config/environments/test.rb +3 -0
- data/spec/fixtures/rails6_users_app/Dockerfile +0 -1
- data/spec/fixtures/rails6_users_app/appmap.yml +3 -1
- data/spec/fixtures/rails6_users_app/config/environments/test.rb +3 -0
- data/spec/fixtures/rails6_users_app/lib/tasks/appmap.rake +13 -0
- data/spec/rails_recording_spec.rb +1 -1
- data/spec/swagger/swagger_spec.rb +47 -0
- data/test/gem_test.rb +1 -0
- metadata +21 -2
@@ -224,7 +224,7 @@ describe 'Rails' do
|
|
224
224
|
'name' => 'ActionView',
|
225
225
|
'children' => include(hash_including(
|
226
226
|
# Rails 6/5 difference
|
227
|
-
'name' => /^(Template)?Renderer$/,
|
227
|
+
'name' => /^(Template)?Renderer$/,
|
228
228
|
'children' => include(hash_including(
|
229
229
|
'name' => 'render',
|
230
230
|
'labels' => ['mvc.view']
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_relative '../rails_spec_helper'
|
2
|
+
|
3
|
+
describe 'rake appmap:swagger' do
|
4
|
+
include_context 'Rails app pg database', "spec/fixtures/rails6_users_app" unless use_existing_data?
|
5
|
+
include_context 'rails integration test setup'
|
6
|
+
|
7
|
+
def run_spec(spec_name)
|
8
|
+
cmd = <<~CMD.gsub "\n", ' '
|
9
|
+
docker-compose run --rm -e RAILS_ENV=test -e APPMAP=true
|
10
|
+
-v #{File.absolute_path tmpdir}:/app/tmp app ./bin/rspec #{spec_name}
|
11
|
+
CMD
|
12
|
+
run_cmd cmd, chdir: fixture_dir
|
13
|
+
end
|
14
|
+
|
15
|
+
def generate_swagger
|
16
|
+
cmd = <<~CMD.gsub "\n", ' '
|
17
|
+
docker-compose run --rm -v #{File.absolute_path tmpdir}:/app/tmp app ./bin/rake appmap:swagger
|
18
|
+
CMD
|
19
|
+
run_cmd cmd, chdir: fixture_dir
|
20
|
+
end
|
21
|
+
|
22
|
+
unless use_existing_data?
|
23
|
+
before(:all) do
|
24
|
+
generate_swagger
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# The swagger-building logic is mostly in the JS code. So what we are really testing here
|
29
|
+
# is the Rails integration - the rake task and integration with the appmap.yml.
|
30
|
+
# And of course the bundling of the JS code by the appmap gem.
|
31
|
+
it 'generates openapi_stable.yml' do
|
32
|
+
swagger = YAML.load(File.read(File.join(tmpdir, 'swagger', 'openapi_stable.yaml'))).deep_symbolize_keys
|
33
|
+
|
34
|
+
expect(swagger).to match(
|
35
|
+
hash_including(
|
36
|
+
openapi: /^\d\.\d\.\d$/,
|
37
|
+
info: {
|
38
|
+
title: 'Usersapp API',
|
39
|
+
version: '1.1.0'
|
40
|
+
},
|
41
|
+
paths: hash_including(
|
42
|
+
:'/api/users' => an_instance_of(Hash)
|
43
|
+
)
|
44
|
+
)
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
data/test/gem_test.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.54.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: 2021-06-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -314,6 +314,7 @@ files:
|
|
314
314
|
- ext/appmap/appmap.c
|
315
315
|
- ext/appmap/extconf.rb
|
316
316
|
- lib/appmap.rb
|
317
|
+
- lib/appmap/agent.rb
|
317
318
|
- lib/appmap/class_map.rb
|
318
319
|
- lib/appmap/command/agent_setup/init.rb
|
319
320
|
- lib/appmap/command/inspect.rb
|
@@ -337,6 +338,11 @@ files:
|
|
337
338
|
- lib/appmap/record.rb
|
338
339
|
- lib/appmap/rspec.rb
|
339
340
|
- lib/appmap/service/guesser.rb
|
341
|
+
- lib/appmap/swagger.rb
|
342
|
+
- lib/appmap/swagger/configuration.rb
|
343
|
+
- lib/appmap/swagger/markdown_descriptions.rb
|
344
|
+
- lib/appmap/swagger/rake_tasks.rb
|
345
|
+
- lib/appmap/swagger/stable.rb
|
340
346
|
- lib/appmap/trace.rb
|
341
347
|
- lib/appmap/util.rb
|
342
348
|
- lib/appmap/version.rb
|
@@ -344,6 +350,13 @@ files:
|
|
344
350
|
- release.sh
|
345
351
|
- spec/class_map_spec.rb
|
346
352
|
- spec/config_spec.rb
|
353
|
+
- spec/fixtures/hook/.gitignore
|
354
|
+
- spec/fixtures/hook/app/controllers/api/api_keys_controller.rb
|
355
|
+
- spec/fixtures/hook/app/controllers/organizations_controller.rb
|
356
|
+
- spec/fixtures/hook/app/models/api_key.rb
|
357
|
+
- spec/fixtures/hook/app/models/configuration.rb
|
358
|
+
- spec/fixtures/hook/app/models/show.rb
|
359
|
+
- spec/fixtures/hook/app/models/user.rb
|
347
360
|
- spec/fixtures/hook/attr_accessor.rb
|
348
361
|
- spec/fixtures/hook/compare.rb
|
349
362
|
- spec/fixtures/hook/constructor.rb
|
@@ -353,7 +366,11 @@ files:
|
|
353
366
|
- spec/fixtures/hook/instance_method.rb
|
354
367
|
- spec/fixtures/hook/labels.rb
|
355
368
|
- spec/fixtures/hook/method_named_call.rb
|
369
|
+
- spec/fixtures/hook/revoke_api_key.appmap.json
|
356
370
|
- spec/fixtures/hook/singleton_method.rb
|
371
|
+
- spec/fixtures/hook/spec/api_spec.rb
|
372
|
+
- spec/fixtures/hook/spec/user_spec.rb
|
373
|
+
- spec/fixtures/hook/user_page_scenario.appmap.json
|
357
374
|
- spec/fixtures/rack_users_app/.dockerignore
|
358
375
|
- spec/fixtures/rack_users_app/.gitignore
|
359
376
|
- spec/fixtures/rack_users_app/Dockerfile
|
@@ -496,6 +513,7 @@ files:
|
|
496
513
|
- spec/fixtures/rails6_users_app/features/support/hooks.rb
|
497
514
|
- spec/fixtures/rails6_users_app/features/support/steps.rb
|
498
515
|
- spec/fixtures/rails6_users_app/lib/tasks/.keep
|
516
|
+
- spec/fixtures/rails6_users_app/lib/tasks/appmap.rake
|
499
517
|
- spec/fixtures/rails6_users_app/log/.keep
|
500
518
|
- spec/fixtures/rails6_users_app/public/robots.txt
|
501
519
|
- spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb
|
@@ -513,6 +531,7 @@ files:
|
|
513
531
|
- spec/record_sql_rails_pg_spec.rb
|
514
532
|
- spec/remote_recording_spec.rb
|
515
533
|
- spec/spec_helper.rb
|
534
|
+
- spec/swagger/swagger_spec.rb
|
516
535
|
- spec/util_spec.rb
|
517
536
|
- test/agent_setup_init_test.rb
|
518
537
|
- test/bundle_vendor_test.rb
|