appmap 0.37.0 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +1 -1
- data/.rubocop.yml +12 -1
- data/.travis.yml +2 -23
- data/CHANGELOG.md +24 -0
- data/CONTRIBUTING.md +22 -0
- data/README.md +79 -50
- data/Rakefile +3 -3
- data/lib/appmap/class_map.rb +25 -8
- data/lib/appmap/config.rb +22 -10
- data/lib/appmap/event.rb +16 -1
- data/lib/appmap/hook.rb +11 -3
- data/lib/appmap/hook/method.rb +18 -12
- data/lib/appmap/rails/request_handler.rb +25 -4
- data/lib/appmap/railtie.rb +1 -5
- data/lib/appmap/trace.rb +18 -7
- data/lib/appmap/version.rb +2 -2
- data/spec/abstract_controller_base_spec.rb +132 -67
- data/spec/fixtures/hook/instance_method.rb +4 -0
- data/spec/fixtures/hook/labels.rb +6 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/.dockerignore +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/.gitignore +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/.rspec +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/.ruby-version +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/Dockerfile +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/Dockerfile.pg +0 -0
- data/spec/fixtures/rails5_users_app/Gemfile +50 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/Rakefile +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/api/users_controller.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/application_controller.rb +0 -0
- data/spec/fixtures/{rails4_users_app/app/assets/images → rails5_users_app/app/controllers/concerns}/.keep +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/app/controllers/health_controller.rb +0 -0
- data/spec/fixtures/rails5_users_app/app/controllers/users_controller.rb +13 -0
- data/spec/fixtures/{rails4_users_app/app/models → rails5_users_app/app/models/activerecord}/user.rb +0 -0
- data/spec/fixtures/{rails4_users_app/app/controllers → rails5_users_app/app/models}/concerns/.keep +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/app/models/sequel/user.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/app/views/layouts/application.html.haml +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/app/views/users/index.html.haml +0 -0
- data/spec/fixtures/rails5_users_app/appmap.yml +4 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/appmap +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/byebug +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/gli +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/htmldiff +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ldiff +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/nokogiri +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rackup +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rails +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rake +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/rspec +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ruby-parse +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/ruby-rewrite +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/sequel +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/setup +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/sprockets +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/thor +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/bin/update +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config.ru +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/application.rb +2 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/boot.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/credentials.yml.enc +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/database.yml +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environment.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/development.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/production.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/environments/test.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/application_controller_renderer.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/cors.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/filter_parameter_logging.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/inflections.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/initializers/mime_types.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/record_button.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/initializers/wrap_parameters.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/config/locales/en.yml +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/config/routes.rb +1 -2
- data/spec/fixtures/{rails_users_app → rails5_users_app}/create_app +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/db/migrate/20190728211408_create_users.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/db/schema.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/docker-compose.yml +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/features/api_users.feature +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/env.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/hooks.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/features/support/steps.rb +0 -0
- data/spec/fixtures/{rails4_users_app/app/mailers → rails5_users_app/lib/tasks}/.keep +0 -0
- data/spec/fixtures/{rails4_users_app/app/models → rails5_users_app/log}/.keep +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/public/robots.txt +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/controllers/users_controller_api_spec.rb +1 -1
- data/spec/fixtures/rails5_users_app/spec/controllers/users_controller_spec.rb +27 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/models/user_spec.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/spec/rails_helper.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails5_users_app}/spec/spec_helper.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails5_users_app}/users_app/.gitignore +0 -0
- data/spec/fixtures/rails6_users_app/.dockerignore +1 -0
- data/spec/fixtures/rails6_users_app/.gitignore +39 -0
- data/spec/fixtures/rails6_users_app/.rspec +1 -0
- data/spec/fixtures/rails6_users_app/.ruby-version +1 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/Dockerfile +3 -4
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/Dockerfile.pg +1 -1
- data/spec/fixtures/{rails_users_app → rails6_users_app}/Gemfile +3 -4
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/Rakefile +1 -1
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/app/controllers/api/users_controller.rb +1 -1
- data/spec/fixtures/rails6_users_app/app/controllers/application_controller.rb +2 -0
- data/spec/fixtures/{rails4_users_app/app/models → rails6_users_app/app/controllers}/concerns/.keep +0 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/app/controllers/health_controller.rb +1 -1
- data/spec/fixtures/rails6_users_app/app/controllers/users_controller.rb +13 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/app/models/activerecord/user.rb +0 -0
- data/spec/fixtures/{rails4_users_app/lib/assets → rails6_users_app/app/models/concerns}/.keep +0 -0
- data/spec/fixtures/rails6_users_app/app/models/sequel/user.rb +25 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/app/views/layouts/application.html.haml +0 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/app/views/users/index.html.haml +0 -0
- data/spec/fixtures/rails6_users_app/appmap.yml +5 -0
- data/spec/fixtures/rails6_users_app/bin/appmap +29 -0
- data/spec/fixtures/rails6_users_app/bin/byebug +29 -0
- data/spec/fixtures/rails6_users_app/bin/gli +29 -0
- data/spec/fixtures/rails6_users_app/bin/htmldiff +29 -0
- data/spec/fixtures/rails6_users_app/bin/ldiff +29 -0
- data/spec/fixtures/rails6_users_app/bin/nokogiri +29 -0
- data/spec/fixtures/rails6_users_app/bin/rackup +29 -0
- data/spec/fixtures/rails6_users_app/bin/rails +4 -0
- data/spec/fixtures/rails6_users_app/bin/rake +29 -0
- data/spec/fixtures/rails6_users_app/bin/rspec +29 -0
- data/spec/fixtures/rails6_users_app/bin/ruby-parse +29 -0
- data/spec/fixtures/rails6_users_app/bin/ruby-rewrite +29 -0
- data/spec/fixtures/rails6_users_app/bin/sequel +29 -0
- data/spec/fixtures/rails6_users_app/bin/setup +25 -0
- data/spec/fixtures/rails6_users_app/bin/sprockets +29 -0
- data/spec/fixtures/rails6_users_app/bin/thor +29 -0
- data/spec/fixtures/rails6_users_app/bin/update +25 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config.ru +2 -1
- data/spec/fixtures/rails6_users_app/config/application.rb +53 -0
- data/spec/fixtures/rails6_users_app/config/boot.rb +3 -0
- data/spec/fixtures/rails6_users_app/config/credentials.yml.enc +1 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/database.yml +2 -2
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environment.rb +1 -1
- data/spec/fixtures/rails6_users_app/config/environments/development.rb +40 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environments/production.rb +19 -30
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/environments/test.rb +5 -11
- data/spec/fixtures/rails6_users_app/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/fixtures/rails6_users_app/config/initializers/cors.rb +16 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/filter_parameter_logging.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/inflections.rb +0 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/config/initializers/mime_types.rb +0 -0
- data/spec/fixtures/rails6_users_app/config/initializers/record_button.rb +3 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/initializers/wrap_parameters.rb +1 -6
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/config/locales/en.yml +10 -0
- data/spec/fixtures/{rails_users_app → rails6_users_app}/config/routes.rb +1 -1
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/create_app +7 -3
- data/spec/fixtures/rails6_users_app/db/migrate/20190728211408_create_users.rb +9 -0
- data/spec/fixtures/rails6_users_app/db/schema.rb +23 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/docker-compose.yml +3 -1
- data/spec/fixtures/rails6_users_app/features/api_users.feature +13 -0
- data/spec/fixtures/rails6_users_app/features/support/env.rb +4 -0
- data/spec/fixtures/rails6_users_app/features/support/hooks.rb +11 -0
- data/spec/fixtures/rails6_users_app/features/support/steps.rb +18 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/lib/tasks/.keep +0 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/log/.keep +0 -0
- data/spec/fixtures/rails6_users_app/public/robots.txt +1 -0
- data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb +29 -0
- data/spec/fixtures/rails6_users_app/spec/controllers/users_controller_spec.rb +27 -0
- data/spec/fixtures/rails6_users_app/spec/models/user_spec.rb +39 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app}/spec/rails_helper.rb +3 -32
- data/spec/fixtures/{rails_users_app → rails6_users_app}/spec/spec_helper.rb +0 -0
- data/spec/fixtures/{rails4_users_app → rails6_users_app/users_app}/.gitignore +8 -1
- data/spec/hook_spec.rb +111 -57
- data/spec/rails_spec_helper.rb +5 -5
- data/spec/railtie_spec.rb +31 -32
- data/spec/record_sql_rails_pg_spec.rb +62 -63
- data/spec/remote_recording_spec.rb +90 -89
- data/spec/rspec_feature_metadata_spec.rb +17 -18
- data/spec/spec_helper.rb +1 -0
- metadata +148 -139
- data/spec/abstract_controller4_base_spec.rb +0 -67
- data/spec/fixtures/rails4_users_app/.rbenv-gemsets +0 -2
- data/spec/fixtures/rails4_users_app/.ruby-version +0 -1
- data/spec/fixtures/rails4_users_app/Gemfile +0 -77
- data/spec/fixtures/rails4_users_app/README.rdoc +0 -28
- data/spec/fixtures/rails4_users_app/app/assets/javascripts/application.js +0 -16
- data/spec/fixtures/rails4_users_app/app/assets/stylesheets/application.css +0 -15
- data/spec/fixtures/rails4_users_app/app/controllers/application_controller.rb +0 -5
- data/spec/fixtures/rails4_users_app/app/controllers/users_controller.rb +0 -5
- data/spec/fixtures/rails4_users_app/app/helpers/application_helper.rb +0 -2
- data/spec/fixtures/rails4_users_app/appmap.yml +0 -3
- data/spec/fixtures/rails4_users_app/bin/rails +0 -9
- data/spec/fixtures/rails4_users_app/bin/setup +0 -29
- data/spec/fixtures/rails4_users_app/bin/spring +0 -17
- data/spec/fixtures/rails4_users_app/config/application.rb +0 -26
- data/spec/fixtures/rails4_users_app/config/boot.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/environments/development.rb +0 -41
- data/spec/fixtures/rails4_users_app/config/initializers/assets.rb +0 -11
- data/spec/fixtures/rails4_users_app/config/initializers/cookies_serializer.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/spec/fixtures/rails4_users_app/config/secrets.yml +0 -22
- data/spec/fixtures/rails4_users_app/db/migrate/20191127112304_create_users.rb +0 -10
- data/spec/fixtures/rails4_users_app/db/schema.rb +0 -26
- data/spec/fixtures/rails4_users_app/db/seeds.rb +0 -7
- data/spec/fixtures/rails4_users_app/public/404.html +0 -67
- data/spec/fixtures/rails4_users_app/public/422.html +0 -67
- data/spec/fixtures/rails4_users_app/public/500.html +0 -66
- data/spec/fixtures/rails4_users_app/public/favicon.ico +0 -0
- data/spec/fixtures/rails4_users_app/public/robots.txt +0 -5
- data/spec/fixtures/rails4_users_app/spec/controllers/users_controller_api_spec.rb +0 -49
- data/spec/fixtures/rails4_users_app/test/fixtures/users.yml +0 -9
- data/spec/fixtures/rails_users_app/app/controllers/concerns/.keep +0 -0
- data/spec/fixtures/rails_users_app/app/controllers/users_controller.rb +0 -5
- data/spec/fixtures/rails_users_app/app/models/concerns/.keep +0 -0
- data/spec/fixtures/rails_users_app/appmap.yml +0 -3
- data/spec/fixtures/rails_users_app/lib/tasks/.keep +0 -0
- data/spec/fixtures/rails_users_app/log/.keep +0 -0
- data/spec/record_sql_rails4_pg_spec.rb +0 -76
@@ -3,30 +3,29 @@
|
|
3
3
|
require 'rails_spec_helper'
|
4
4
|
|
5
5
|
describe 'RSpec feature and feature group metadata' do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path(tmpdir).shellescape}:/app/tmp app ./bin/rspec spec/models/user_spec.rb"
|
13
|
-
run_cmd cmd, chdir: @fixture_dir
|
6
|
+
include_examples 'Rails app pg database', 'spec/fixtures/rails5_users_app' do
|
7
|
+
around(:each) do |example|
|
8
|
+
FileUtils.rm_rf tmpdir
|
9
|
+
FileUtils.mkdir_p tmpdir
|
10
|
+
cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path(tmpdir).shellescape}:/app/tmp app ./bin/rspec spec/models/user_spec.rb"
|
11
|
+
run_cmd cmd, chdir: fixture_dir
|
14
12
|
|
15
|
-
|
16
|
-
|
13
|
+
example.run
|
14
|
+
end
|
17
15
|
|
18
|
-
|
19
|
-
|
16
|
+
let(:tmpdir) { 'tmp/spec/RSpec feature and feature group metadata' }
|
17
|
+
let(:appmap_json) { File.join(tmpdir, %(appmap/rspec/User_creation_creates_charles.appmap.json)) }
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
describe do
|
20
|
+
it 'are recorded in the appmap' do
|
21
|
+
expect(File).to exist(appmap_json)
|
22
|
+
appmap = JSON.parse(File.read(appmap_json)).to_yaml
|
25
23
|
|
26
|
-
|
24
|
+
expect(appmap).to include(<<-METADATA.strip)
|
27
25
|
feature: Create a user
|
28
26
|
feature_group: User
|
29
|
-
|
27
|
+
METADATA
|
28
|
+
end
|
30
29
|
end
|
31
30
|
end
|
32
31
|
end
|
data/spec/spec_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.40.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:
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- ".rubocop.yml"
|
320
320
|
- ".travis.yml"
|
321
321
|
- CHANGELOG.md
|
322
|
+
- CONTRIBUTING.md
|
322
323
|
- Dockerfile.appmap
|
323
324
|
- Gemfile
|
324
325
|
- LICENSE.txt
|
@@ -378,7 +379,6 @@ files:
|
|
378
379
|
- lore/public/stylesheets/style.css
|
379
380
|
- package-lock.json
|
380
381
|
- package.json
|
381
|
-
- spec/abstract_controller4_base_spec.rb
|
382
382
|
- spec/abstract_controller_base_spec.rb
|
383
383
|
- spec/class_map_spec.rb
|
384
384
|
- spec/config_spec.rb
|
@@ -387,6 +387,7 @@ files:
|
|
387
387
|
- spec/fixtures/hook/constructor.rb
|
388
388
|
- spec/fixtures/hook/exception_method.rb
|
389
389
|
- spec/fixtures/hook/instance_method.rb
|
390
|
+
- spec/fixtures/hook/labels.rb
|
390
391
|
- spec/fixtures/hook/singleton_method.rb
|
391
392
|
- spec/fixtures/rack_users_app/.dockerignore
|
392
393
|
- spec/fixtures/rack_users_app/.gitignore
|
@@ -396,146 +397,154 @@ files:
|
|
396
397
|
- spec/fixtures/rack_users_app/config.ru
|
397
398
|
- spec/fixtures/rack_users_app/docker-compose.yml
|
398
399
|
- spec/fixtures/rack_users_app/lib/app.rb
|
399
|
-
- spec/fixtures/
|
400
|
-
- spec/fixtures/
|
401
|
-
- spec/fixtures/
|
402
|
-
- spec/fixtures/
|
403
|
-
- spec/fixtures/
|
404
|
-
- spec/fixtures/
|
405
|
-
- spec/fixtures/
|
406
|
-
- spec/fixtures/
|
407
|
-
- spec/fixtures/
|
408
|
-
- spec/fixtures/
|
409
|
-
- spec/fixtures/
|
410
|
-
- spec/fixtures/
|
411
|
-
- spec/fixtures/
|
412
|
-
- spec/fixtures/
|
413
|
-
- spec/fixtures/
|
414
|
-
- spec/fixtures/
|
415
|
-
- spec/fixtures/
|
416
|
-
- spec/fixtures/
|
417
|
-
- spec/fixtures/
|
418
|
-
- spec/fixtures/
|
419
|
-
- spec/fixtures/
|
420
|
-
- spec/fixtures/
|
421
|
-
- spec/fixtures/
|
422
|
-
- spec/fixtures/
|
423
|
-
- spec/fixtures/
|
424
|
-
- spec/fixtures/
|
425
|
-
- spec/fixtures/
|
426
|
-
- spec/fixtures/
|
427
|
-
- spec/fixtures/
|
428
|
-
- spec/fixtures/
|
429
|
-
- spec/fixtures/
|
430
|
-
- spec/fixtures/
|
431
|
-
- spec/fixtures/
|
432
|
-
- spec/fixtures/
|
433
|
-
- spec/fixtures/
|
434
|
-
- spec/fixtures/
|
435
|
-
- spec/fixtures/
|
436
|
-
- spec/fixtures/
|
437
|
-
- spec/fixtures/
|
438
|
-
- spec/fixtures/
|
439
|
-
- spec/fixtures/
|
440
|
-
- spec/fixtures/
|
441
|
-
- spec/fixtures/
|
442
|
-
- spec/fixtures/
|
443
|
-
- spec/fixtures/
|
444
|
-
- spec/fixtures/
|
445
|
-
- spec/fixtures/
|
446
|
-
- spec/fixtures/
|
447
|
-
- spec/fixtures/
|
448
|
-
- spec/fixtures/
|
449
|
-
- spec/fixtures/
|
450
|
-
- spec/fixtures/
|
451
|
-
- spec/fixtures/
|
452
|
-
- spec/fixtures/
|
453
|
-
- spec/fixtures/
|
454
|
-
- spec/fixtures/
|
455
|
-
- spec/fixtures/
|
456
|
-
- spec/fixtures/
|
457
|
-
- spec/fixtures/
|
458
|
-
- spec/fixtures/
|
459
|
-
- spec/fixtures/
|
460
|
-
- spec/fixtures/
|
461
|
-
- spec/fixtures/
|
462
|
-
- spec/fixtures/
|
463
|
-
- spec/fixtures/
|
464
|
-
- spec/fixtures/
|
465
|
-
- spec/fixtures/
|
466
|
-
- spec/fixtures/
|
467
|
-
- spec/fixtures/
|
468
|
-
- spec/fixtures/
|
469
|
-
- spec/fixtures/
|
470
|
-
- spec/fixtures/
|
471
|
-
- spec/fixtures/
|
472
|
-
- spec/fixtures/
|
473
|
-
- spec/fixtures/
|
474
|
-
- spec/fixtures/
|
475
|
-
- spec/fixtures/
|
476
|
-
- spec/fixtures/
|
477
|
-
- spec/fixtures/
|
478
|
-
- spec/fixtures/
|
479
|
-
- spec/fixtures/
|
480
|
-
- spec/fixtures/
|
481
|
-
- spec/fixtures/
|
482
|
-
- spec/fixtures/
|
483
|
-
- spec/fixtures/
|
484
|
-
- spec/fixtures/
|
485
|
-
- spec/fixtures/
|
486
|
-
- spec/fixtures/
|
487
|
-
- spec/fixtures/
|
488
|
-
- spec/fixtures/
|
489
|
-
- spec/fixtures/
|
490
|
-
- spec/fixtures/
|
491
|
-
- spec/fixtures/
|
492
|
-
- spec/fixtures/
|
493
|
-
- spec/fixtures/
|
494
|
-
- spec/fixtures/
|
495
|
-
- spec/fixtures/
|
496
|
-
- spec/fixtures/
|
497
|
-
- spec/fixtures/
|
498
|
-
- spec/fixtures/
|
499
|
-
- spec/fixtures/
|
500
|
-
- spec/fixtures/
|
501
|
-
- spec/fixtures/
|
502
|
-
- spec/fixtures/
|
503
|
-
- spec/fixtures/
|
504
|
-
- spec/fixtures/
|
505
|
-
- spec/fixtures/
|
506
|
-
- spec/fixtures/
|
507
|
-
- spec/fixtures/
|
508
|
-
- spec/fixtures/
|
509
|
-
- spec/fixtures/
|
510
|
-
- spec/fixtures/
|
511
|
-
- spec/fixtures/
|
512
|
-
- spec/fixtures/
|
513
|
-
- spec/fixtures/
|
514
|
-
- spec/fixtures/
|
515
|
-
- spec/fixtures/
|
516
|
-
- spec/fixtures/
|
517
|
-
- spec/fixtures/
|
518
|
-
- spec/fixtures/
|
519
|
-
- spec/fixtures/
|
520
|
-
- spec/fixtures/
|
521
|
-
- spec/fixtures/
|
522
|
-
- spec/fixtures/
|
523
|
-
- spec/fixtures/
|
524
|
-
- spec/fixtures/
|
525
|
-
- spec/fixtures/
|
526
|
-
- spec/fixtures/
|
527
|
-
- spec/fixtures/
|
528
|
-
- spec/fixtures/
|
529
|
-
- spec/fixtures/
|
530
|
-
- spec/fixtures/
|
531
|
-
- spec/fixtures/
|
532
|
-
- spec/fixtures/
|
533
|
-
- spec/fixtures/
|
400
|
+
- spec/fixtures/rails5_users_app/.dockerignore
|
401
|
+
- spec/fixtures/rails5_users_app/.gitignore
|
402
|
+
- spec/fixtures/rails5_users_app/.rspec
|
403
|
+
- spec/fixtures/rails5_users_app/.ruby-version
|
404
|
+
- spec/fixtures/rails5_users_app/Dockerfile
|
405
|
+
- spec/fixtures/rails5_users_app/Dockerfile.pg
|
406
|
+
- spec/fixtures/rails5_users_app/Gemfile
|
407
|
+
- spec/fixtures/rails5_users_app/Rakefile
|
408
|
+
- spec/fixtures/rails5_users_app/app/controllers/api/users_controller.rb
|
409
|
+
- spec/fixtures/rails5_users_app/app/controllers/application_controller.rb
|
410
|
+
- spec/fixtures/rails5_users_app/app/controllers/concerns/.keep
|
411
|
+
- spec/fixtures/rails5_users_app/app/controllers/health_controller.rb
|
412
|
+
- spec/fixtures/rails5_users_app/app/controllers/users_controller.rb
|
413
|
+
- spec/fixtures/rails5_users_app/app/models/activerecord/user.rb
|
414
|
+
- spec/fixtures/rails5_users_app/app/models/concerns/.keep
|
415
|
+
- spec/fixtures/rails5_users_app/app/models/sequel/user.rb
|
416
|
+
- spec/fixtures/rails5_users_app/app/views/layouts/application.html.haml
|
417
|
+
- spec/fixtures/rails5_users_app/app/views/users/index.html.haml
|
418
|
+
- spec/fixtures/rails5_users_app/appmap.yml
|
419
|
+
- spec/fixtures/rails5_users_app/bin/appmap
|
420
|
+
- spec/fixtures/rails5_users_app/bin/byebug
|
421
|
+
- spec/fixtures/rails5_users_app/bin/gli
|
422
|
+
- spec/fixtures/rails5_users_app/bin/htmldiff
|
423
|
+
- spec/fixtures/rails5_users_app/bin/ldiff
|
424
|
+
- spec/fixtures/rails5_users_app/bin/nokogiri
|
425
|
+
- spec/fixtures/rails5_users_app/bin/rackup
|
426
|
+
- spec/fixtures/rails5_users_app/bin/rails
|
427
|
+
- spec/fixtures/rails5_users_app/bin/rake
|
428
|
+
- spec/fixtures/rails5_users_app/bin/rspec
|
429
|
+
- spec/fixtures/rails5_users_app/bin/ruby-parse
|
430
|
+
- spec/fixtures/rails5_users_app/bin/ruby-rewrite
|
431
|
+
- spec/fixtures/rails5_users_app/bin/sequel
|
432
|
+
- spec/fixtures/rails5_users_app/bin/setup
|
433
|
+
- spec/fixtures/rails5_users_app/bin/sprockets
|
434
|
+
- spec/fixtures/rails5_users_app/bin/thor
|
435
|
+
- spec/fixtures/rails5_users_app/bin/update
|
436
|
+
- spec/fixtures/rails5_users_app/config.ru
|
437
|
+
- spec/fixtures/rails5_users_app/config/application.rb
|
438
|
+
- spec/fixtures/rails5_users_app/config/boot.rb
|
439
|
+
- spec/fixtures/rails5_users_app/config/credentials.yml.enc
|
440
|
+
- spec/fixtures/rails5_users_app/config/database.yml
|
441
|
+
- spec/fixtures/rails5_users_app/config/environment.rb
|
442
|
+
- spec/fixtures/rails5_users_app/config/environments/development.rb
|
443
|
+
- spec/fixtures/rails5_users_app/config/environments/production.rb
|
444
|
+
- spec/fixtures/rails5_users_app/config/environments/test.rb
|
445
|
+
- spec/fixtures/rails5_users_app/config/initializers/application_controller_renderer.rb
|
446
|
+
- spec/fixtures/rails5_users_app/config/initializers/backtrace_silencers.rb
|
447
|
+
- spec/fixtures/rails5_users_app/config/initializers/cors.rb
|
448
|
+
- spec/fixtures/rails5_users_app/config/initializers/filter_parameter_logging.rb
|
449
|
+
- spec/fixtures/rails5_users_app/config/initializers/inflections.rb
|
450
|
+
- spec/fixtures/rails5_users_app/config/initializers/mime_types.rb
|
451
|
+
- spec/fixtures/rails5_users_app/config/initializers/record_button.rb
|
452
|
+
- spec/fixtures/rails5_users_app/config/initializers/wrap_parameters.rb
|
453
|
+
- spec/fixtures/rails5_users_app/config/locales/en.yml
|
454
|
+
- spec/fixtures/rails5_users_app/config/routes.rb
|
455
|
+
- spec/fixtures/rails5_users_app/create_app
|
456
|
+
- spec/fixtures/rails5_users_app/db/migrate/20190728211408_create_users.rb
|
457
|
+
- spec/fixtures/rails5_users_app/db/schema.rb
|
458
|
+
- spec/fixtures/rails5_users_app/docker-compose.yml
|
459
|
+
- spec/fixtures/rails5_users_app/features/api_users.feature
|
460
|
+
- spec/fixtures/rails5_users_app/features/support/env.rb
|
461
|
+
- spec/fixtures/rails5_users_app/features/support/hooks.rb
|
462
|
+
- spec/fixtures/rails5_users_app/features/support/steps.rb
|
463
|
+
- spec/fixtures/rails5_users_app/lib/tasks/.keep
|
464
|
+
- spec/fixtures/rails5_users_app/log/.keep
|
465
|
+
- spec/fixtures/rails5_users_app/public/robots.txt
|
466
|
+
- spec/fixtures/rails5_users_app/spec/controllers/users_controller_api_spec.rb
|
467
|
+
- spec/fixtures/rails5_users_app/spec/controllers/users_controller_spec.rb
|
468
|
+
- spec/fixtures/rails5_users_app/spec/models/user_spec.rb
|
469
|
+
- spec/fixtures/rails5_users_app/spec/rails_helper.rb
|
470
|
+
- spec/fixtures/rails5_users_app/spec/spec_helper.rb
|
471
|
+
- spec/fixtures/rails5_users_app/users_app/.gitignore
|
472
|
+
- spec/fixtures/rails6_users_app/.dockerignore
|
473
|
+
- spec/fixtures/rails6_users_app/.gitignore
|
474
|
+
- spec/fixtures/rails6_users_app/.rspec
|
475
|
+
- spec/fixtures/rails6_users_app/.ruby-version
|
476
|
+
- spec/fixtures/rails6_users_app/Dockerfile
|
477
|
+
- spec/fixtures/rails6_users_app/Dockerfile.pg
|
478
|
+
- spec/fixtures/rails6_users_app/Gemfile
|
479
|
+
- spec/fixtures/rails6_users_app/Rakefile
|
480
|
+
- spec/fixtures/rails6_users_app/app/controllers/api/users_controller.rb
|
481
|
+
- spec/fixtures/rails6_users_app/app/controllers/application_controller.rb
|
482
|
+
- spec/fixtures/rails6_users_app/app/controllers/concerns/.keep
|
483
|
+
- spec/fixtures/rails6_users_app/app/controllers/health_controller.rb
|
484
|
+
- spec/fixtures/rails6_users_app/app/controllers/users_controller.rb
|
485
|
+
- spec/fixtures/rails6_users_app/app/models/activerecord/user.rb
|
486
|
+
- spec/fixtures/rails6_users_app/app/models/concerns/.keep
|
487
|
+
- spec/fixtures/rails6_users_app/app/models/sequel/user.rb
|
488
|
+
- spec/fixtures/rails6_users_app/app/views/layouts/application.html.haml
|
489
|
+
- spec/fixtures/rails6_users_app/app/views/users/index.html.haml
|
490
|
+
- spec/fixtures/rails6_users_app/appmap.yml
|
491
|
+
- spec/fixtures/rails6_users_app/bin/appmap
|
492
|
+
- spec/fixtures/rails6_users_app/bin/byebug
|
493
|
+
- spec/fixtures/rails6_users_app/bin/gli
|
494
|
+
- spec/fixtures/rails6_users_app/bin/htmldiff
|
495
|
+
- spec/fixtures/rails6_users_app/bin/ldiff
|
496
|
+
- spec/fixtures/rails6_users_app/bin/nokogiri
|
497
|
+
- spec/fixtures/rails6_users_app/bin/rackup
|
498
|
+
- spec/fixtures/rails6_users_app/bin/rails
|
499
|
+
- spec/fixtures/rails6_users_app/bin/rake
|
500
|
+
- spec/fixtures/rails6_users_app/bin/rspec
|
501
|
+
- spec/fixtures/rails6_users_app/bin/ruby-parse
|
502
|
+
- spec/fixtures/rails6_users_app/bin/ruby-rewrite
|
503
|
+
- spec/fixtures/rails6_users_app/bin/sequel
|
504
|
+
- spec/fixtures/rails6_users_app/bin/setup
|
505
|
+
- spec/fixtures/rails6_users_app/bin/sprockets
|
506
|
+
- spec/fixtures/rails6_users_app/bin/thor
|
507
|
+
- spec/fixtures/rails6_users_app/bin/update
|
508
|
+
- spec/fixtures/rails6_users_app/config.ru
|
509
|
+
- spec/fixtures/rails6_users_app/config/application.rb
|
510
|
+
- spec/fixtures/rails6_users_app/config/boot.rb
|
511
|
+
- spec/fixtures/rails6_users_app/config/credentials.yml.enc
|
512
|
+
- spec/fixtures/rails6_users_app/config/database.yml
|
513
|
+
- spec/fixtures/rails6_users_app/config/environment.rb
|
514
|
+
- spec/fixtures/rails6_users_app/config/environments/development.rb
|
515
|
+
- spec/fixtures/rails6_users_app/config/environments/production.rb
|
516
|
+
- spec/fixtures/rails6_users_app/config/environments/test.rb
|
517
|
+
- spec/fixtures/rails6_users_app/config/initializers/application_controller_renderer.rb
|
518
|
+
- spec/fixtures/rails6_users_app/config/initializers/backtrace_silencers.rb
|
519
|
+
- spec/fixtures/rails6_users_app/config/initializers/cors.rb
|
520
|
+
- spec/fixtures/rails6_users_app/config/initializers/filter_parameter_logging.rb
|
521
|
+
- spec/fixtures/rails6_users_app/config/initializers/inflections.rb
|
522
|
+
- spec/fixtures/rails6_users_app/config/initializers/mime_types.rb
|
523
|
+
- spec/fixtures/rails6_users_app/config/initializers/record_button.rb
|
524
|
+
- spec/fixtures/rails6_users_app/config/initializers/wrap_parameters.rb
|
525
|
+
- spec/fixtures/rails6_users_app/config/locales/en.yml
|
526
|
+
- spec/fixtures/rails6_users_app/config/routes.rb
|
527
|
+
- spec/fixtures/rails6_users_app/create_app
|
528
|
+
- spec/fixtures/rails6_users_app/db/migrate/20190728211408_create_users.rb
|
529
|
+
- spec/fixtures/rails6_users_app/db/schema.rb
|
530
|
+
- spec/fixtures/rails6_users_app/docker-compose.yml
|
531
|
+
- spec/fixtures/rails6_users_app/features/api_users.feature
|
532
|
+
- spec/fixtures/rails6_users_app/features/support/env.rb
|
533
|
+
- spec/fixtures/rails6_users_app/features/support/hooks.rb
|
534
|
+
- spec/fixtures/rails6_users_app/features/support/steps.rb
|
535
|
+
- spec/fixtures/rails6_users_app/lib/tasks/.keep
|
536
|
+
- spec/fixtures/rails6_users_app/log/.keep
|
537
|
+
- spec/fixtures/rails6_users_app/public/robots.txt
|
538
|
+
- spec/fixtures/rails6_users_app/spec/controllers/users_controller_api_spec.rb
|
539
|
+
- spec/fixtures/rails6_users_app/spec/controllers/users_controller_spec.rb
|
540
|
+
- spec/fixtures/rails6_users_app/spec/models/user_spec.rb
|
541
|
+
- spec/fixtures/rails6_users_app/spec/rails_helper.rb
|
542
|
+
- spec/fixtures/rails6_users_app/spec/spec_helper.rb
|
543
|
+
- spec/fixtures/rails6_users_app/users_app/.gitignore
|
534
544
|
- spec/hook_spec.rb
|
535
545
|
- spec/open_spec.rb
|
536
546
|
- spec/rails_spec_helper.rb
|
537
547
|
- spec/railtie_spec.rb
|
538
|
-
- spec/record_sql_rails4_pg_spec.rb
|
539
548
|
- spec/record_sql_rails_pg_spec.rb
|
540
549
|
- spec/remote_recording_spec.rb
|
541
550
|
- spec/rspec_feature_metadata_spec.rb
|
@@ -1,67 +0,0 @@
|
|
1
|
-
require 'rails_spec_helper'
|
2
|
-
|
3
|
-
describe 'AbstractControllerBase' do
|
4
|
-
before(:all) { @fixture_dir = 'spec/fixtures/rails4_users_app' }
|
5
|
-
include_examples 'Rails app pg database'
|
6
|
-
|
7
|
-
around(:each) do |example|
|
8
|
-
FileUtils.rm_rf tmpdir
|
9
|
-
FileUtils.mkdir_p tmpdir
|
10
|
-
cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path tmpdir}:/app/tmp app ./bin/rspec spec/controllers/users_controller_api_spec.rb:8"
|
11
|
-
run_cmd cmd, chdir: @fixture_dir
|
12
|
-
|
13
|
-
example.run
|
14
|
-
end
|
15
|
-
|
16
|
-
let(:tmpdir) { 'tmp/spec/AbstractControllerBase' }
|
17
|
-
let(:appmap_json) { File.join(tmpdir, 'appmap/rspec/Api_UsersController_POST_api_users_with_required_parameters_creates_a_user.appmap.json') }
|
18
|
-
|
19
|
-
describe 'testing with rspec' do
|
20
|
-
it 'Message fields are recorded in the appmap' do
|
21
|
-
expect(File).to exist(appmap_json)
|
22
|
-
appmap = JSON.parse(File.read(appmap_json)).to_yaml
|
23
|
-
|
24
|
-
expect(appmap).to include(<<-MESSAGE.strip)
|
25
|
-
message:
|
26
|
-
- name: login
|
27
|
-
class: String
|
28
|
-
value: alice
|
29
|
-
object_id:
|
30
|
-
MESSAGE
|
31
|
-
|
32
|
-
expect(appmap).to include(<<-MESSAGE.strip)
|
33
|
-
- name: password
|
34
|
-
class: String
|
35
|
-
value: "[FILTERED]"
|
36
|
-
object_id:
|
37
|
-
MESSAGE
|
38
|
-
|
39
|
-
expect(appmap).to include(<<-SERVER_REQUEST.strip)
|
40
|
-
http_server_request:
|
41
|
-
request_method: POST
|
42
|
-
path_info: "/api/users"
|
43
|
-
SERVER_REQUEST
|
44
|
-
end
|
45
|
-
it 'Properly captures method parameters in the appmap' do
|
46
|
-
expect(File).to exist(appmap_json)
|
47
|
-
appmap = JSON.parse(File.read(appmap_json)).to_yaml
|
48
|
-
|
49
|
-
expect(appmap).to match(<<-CREATE_CALL.strip)
|
50
|
-
event: call
|
51
|
-
thread_id: .*
|
52
|
-
defined_class: Api::UsersController
|
53
|
-
method_id: build_user
|
54
|
-
path: app/controllers/api/users_controller.rb
|
55
|
-
lineno: 23
|
56
|
-
static: false
|
57
|
-
parameters:
|
58
|
-
- name: params
|
59
|
-
class: Hash
|
60
|
-
object_id: .*
|
61
|
-
value: '{"login"=>"alice"}'
|
62
|
-
kind: req
|
63
|
-
receiver:
|
64
|
-
CREATE_CALL
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|