appmap 0.77.1 → 0.77.4

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.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -7
  3. data/CHANGELOG.md +21 -0
  4. data/Rakefile +29 -3
  5. data/lib/appmap/config.rb +9 -1
  6. data/lib/appmap/handler/function.rb +8 -8
  7. data/lib/appmap/handler/net_http.rb +19 -18
  8. data/lib/appmap/handler/rails/request_handler.rb +3 -4
  9. data/lib/appmap/handler/rails/template.rb +68 -62
  10. data/lib/appmap/hook/method/ruby2.rb +56 -0
  11. data/lib/appmap/hook/method/ruby3.rb +56 -0
  12. data/lib/appmap/hook/method.rb +42 -98
  13. data/lib/appmap/hook.rb +2 -2
  14. data/lib/appmap/swagger/rake_tasks.rb +6 -1
  15. data/lib/appmap/version.rb +1 -1
  16. data/spec/fixtures/rails7_users_app/.dockerignore +1 -0
  17. data/spec/fixtures/rails7_users_app/.gitattributes +7 -0
  18. data/spec/fixtures/rails7_users_app/.gitignore +31 -0
  19. data/spec/fixtures/rails7_users_app/.rspec +1 -0
  20. data/spec/fixtures/rails7_users_app/.ruby-version +1 -0
  21. data/spec/fixtures/rails7_users_app/Dockerfile +30 -0
  22. data/spec/fixtures/rails7_users_app/Dockerfile.pg +3 -0
  23. data/spec/fixtures/rails7_users_app/Gemfile +99 -0
  24. data/spec/fixtures/rails7_users_app/README.md +24 -0
  25. data/spec/fixtures/rails7_users_app/Rakefile +6 -0
  26. data/spec/fixtures/rails7_users_app/app/assets/config/manifest.js +4 -0
  27. data/spec/fixtures/rails7_users_app/app/assets/images/.keep +0 -0
  28. data/spec/fixtures/rails7_users_app/app/assets/stylesheets/application.css +15 -0
  29. data/spec/fixtures/rails7_users_app/app/channels/application_cable/channel.rb +4 -0
  30. data/spec/fixtures/rails7_users_app/app/channels/application_cable/connection.rb +4 -0
  31. data/spec/fixtures/rails7_users_app/app/controllers/application_controller.rb +2 -0
  32. data/spec/fixtures/rails7_users_app/app/controllers/concerns/.keep +0 -0
  33. data/spec/fixtures/rails7_users_app/app/helpers/application_helper.rb +2 -0
  34. data/spec/fixtures/rails7_users_app/app/javascript/application.js +3 -0
  35. data/spec/fixtures/rails7_users_app/app/javascript/controllers/application.js +9 -0
  36. data/spec/fixtures/rails7_users_app/app/javascript/controllers/hello_controller.js +7 -0
  37. data/spec/fixtures/rails7_users_app/app/javascript/controllers/index.js +11 -0
  38. data/spec/fixtures/rails7_users_app/app/jobs/application_job.rb +7 -0
  39. data/spec/fixtures/rails7_users_app/app/mailers/application_mailer.rb +4 -0
  40. data/spec/fixtures/rails7_users_app/app/models/application_record.rb +3 -0
  41. data/spec/fixtures/rails7_users_app/app/models/concerns/.keep +0 -0
  42. data/spec/fixtures/rails7_users_app/app/models/instance.rb +7 -0
  43. data/spec/fixtures/rails7_users_app/app/models/instructor.rb +7 -0
  44. data/spec/fixtures/rails7_users_app/app/views/layouts/application.html.erb +16 -0
  45. data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.html.erb +13 -0
  46. data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.text.erb +1 -0
  47. data/spec/fixtures/rails7_users_app/appmap.yml +3 -0
  48. data/spec/fixtures/rails7_users_app/bin/bundle +114 -0
  49. data/spec/fixtures/rails7_users_app/bin/importmap +4 -0
  50. data/spec/fixtures/rails7_users_app/bin/rails +4 -0
  51. data/spec/fixtures/rails7_users_app/bin/rake +4 -0
  52. data/spec/fixtures/rails7_users_app/bin/setup +33 -0
  53. data/spec/fixtures/rails7_users_app/config/application.rb +22 -0
  54. data/spec/fixtures/rails7_users_app/config/boot.rb +4 -0
  55. data/spec/fixtures/rails7_users_app/config/cable.yml +10 -0
  56. data/spec/fixtures/rails7_users_app/config/credentials.yml.enc +1 -0
  57. data/spec/fixtures/rails7_users_app/config/database.yml +86 -0
  58. data/spec/fixtures/rails7_users_app/config/environment.rb +5 -0
  59. data/spec/fixtures/rails7_users_app/config/environments/development.rb +70 -0
  60. data/spec/fixtures/rails7_users_app/config/environments/production.rb +93 -0
  61. data/spec/fixtures/rails7_users_app/config/environments/test.rb +60 -0
  62. data/spec/fixtures/rails7_users_app/config/importmap.rb +7 -0
  63. data/spec/fixtures/rails7_users_app/config/initializers/assets.rb +12 -0
  64. data/spec/fixtures/rails7_users_app/config/initializers/content_security_policy.rb +26 -0
  65. data/spec/fixtures/rails7_users_app/config/initializers/filter_parameter_logging.rb +8 -0
  66. data/spec/fixtures/rails7_users_app/config/initializers/inflections.rb +16 -0
  67. data/spec/fixtures/rails7_users_app/config/initializers/permissions_policy.rb +11 -0
  68. data/spec/fixtures/rails7_users_app/config/locales/en.yml +33 -0
  69. data/spec/fixtures/rails7_users_app/config/puma.rb +43 -0
  70. data/spec/fixtures/rails7_users_app/config/routes.rb +6 -0
  71. data/spec/fixtures/rails7_users_app/config/storage.yml +34 -0
  72. data/spec/fixtures/rails7_users_app/config.ru +6 -0
  73. data/spec/fixtures/rails7_users_app/create_app +31 -0
  74. data/spec/fixtures/rails7_users_app/db/migrate/20220328093141_create_instances.rb +8 -0
  75. data/spec/fixtures/rails7_users_app/db/migrate/20220328093154_create_instructors.rb +8 -0
  76. data/spec/fixtures/rails7_users_app/db/schema.rb +27 -0
  77. data/spec/fixtures/rails7_users_app/db/seeds.rb +7 -0
  78. data/spec/fixtures/rails7_users_app/docker-compose.yml +31 -0
  79. data/spec/fixtures/rails7_users_app/lib/assets/.keep +0 -0
  80. data/spec/fixtures/rails7_users_app/lib/tasks/.keep +0 -0
  81. data/spec/fixtures/rails7_users_app/log/.keep +0 -0
  82. data/spec/fixtures/rails7_users_app/public/404.html +67 -0
  83. data/spec/fixtures/rails7_users_app/public/422.html +67 -0
  84. data/spec/fixtures/rails7_users_app/public/500.html +66 -0
  85. data/spec/fixtures/rails7_users_app/public/apple-touch-icon-precomposed.png +0 -0
  86. data/spec/fixtures/rails7_users_app/public/apple-touch-icon.png +0 -0
  87. data/spec/fixtures/rails7_users_app/public/favicon.ico +0 -0
  88. data/spec/fixtures/rails7_users_app/public/robots.txt +1 -0
  89. data/spec/fixtures/rails7_users_app/storage/.keep +0 -0
  90. data/spec/fixtures/rails7_users_app/test/application_system_test_case.rb +5 -0
  91. data/spec/fixtures/rails7_users_app/test/channels/application_cable/connection_test.rb +11 -0
  92. data/spec/fixtures/rails7_users_app/test/controllers/.keep +0 -0
  93. data/spec/fixtures/rails7_users_app/test/fixtures/files/.keep +0 -0
  94. data/spec/fixtures/rails7_users_app/test/fixtures/instances.yml +11 -0
  95. data/spec/fixtures/rails7_users_app/test/fixtures/instructors.yml +11 -0
  96. data/spec/fixtures/rails7_users_app/test/helpers/.keep +0 -0
  97. data/spec/fixtures/rails7_users_app/test/integration/.keep +0 -0
  98. data/spec/fixtures/rails7_users_app/test/mailers/.keep +0 -0
  99. data/spec/fixtures/rails7_users_app/test/models/.keep +0 -0
  100. data/spec/fixtures/rails7_users_app/test/models/instance_test.rb +6 -0
  101. data/spec/fixtures/rails7_users_app/test/models/instructor_test.rb +7 -0
  102. data/spec/fixtures/rails7_users_app/test/system/.keep +0 -0
  103. data/spec/fixtures/rails7_users_app/test/test_helper.rb +13 -0
  104. data/spec/hook_spec.rb +2 -2
  105. data/spec/rails_recording_spec.rb +6 -4
  106. data/spec/rails_spec_helper.rb +7 -0
  107. data/spec/rails_test_spec.rb +45 -0
  108. data/spec/swagger/swagger_spec.rb +2 -2
  109. metadata +93 -2
@@ -0,0 +1,43 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers: a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum; this matches the default thread size of Active Record.
6
+ #
7
+ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9
+ threads min_threads_count, max_threads_count
10
+
11
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
12
+ # terminating a worker in development environments.
13
+ #
14
+ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
15
+
16
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
17
+ #
18
+ port ENV.fetch("PORT") { 3000 }
19
+
20
+ # Specifies the `environment` that Puma will run in.
21
+ #
22
+ environment ENV.fetch("RAILS_ENV") { "development" }
23
+
24
+ # Specifies the `pidfile` that Puma will use.
25
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
26
+
27
+ # Specifies the number of `workers` to boot in clustered mode.
28
+ # Workers are forked web server processes. If using threads and workers together
29
+ # the concurrency of the application would be max `threads` * `workers`.
30
+ # Workers do not work on JRuby or Windows (both of which do not support
31
+ # processes).
32
+ #
33
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
34
+
35
+ # Use the `preload_app!` method when specifying a `workers` number.
36
+ # This directive tells Puma to first boot the application and load code
37
+ # before forking the application. This takes advantage of Copy On Write
38
+ # process behavior so workers use less memory.
39
+ #
40
+ # preload_app!
41
+
42
+ # Allow puma to be restarted by `bin/rails restart` command.
43
+ plugin :tmp_restart
@@ -0,0 +1,6 @@
1
+ Rails.application.routes.draw do
2
+ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
3
+
4
+ # Defines the root path route ("/")
5
+ # root "articles#index"
6
+ end
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket-<%= Rails.env %>
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket-<%= Rails.env %>
23
+
24
+ # Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name-<%= Rails.env %>
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -0,0 +1,6 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative "config/environment"
4
+
5
+ run Rails.application
6
+ Rails.application.load_server
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ set -ex
3
+
4
+ # Just checking for a healthy container isn't enough, apparently. If
5
+ # we don't wait here, sometimes the database is inaccessible.
6
+ for i in {1..10}; do
7
+ psql -h pg -U postgres postgres -c 'select 1' >/dev/null 2>&1 && break
8
+ printf ' .'
9
+ sleep 1
10
+ done
11
+ echo
12
+ out="$(psql -h pg -U postgres postgres -c 'select 1' 2>&1)"
13
+ if [[ $? != 0 ]]; then
14
+ echo "Postgres didn't start in time:"
15
+ echo "$out"
16
+ exit 1
17
+ fi
18
+
19
+ # Required for migrations
20
+ export ORM_MODULE=sequel
21
+
22
+ set +e
23
+ psql -h pg -U postgres -c "drop database if exists app_development"
24
+ psql -h pg -U postgres -c "drop database if exists app_test"
25
+ set -e
26
+
27
+ psql -h pg -U postgres -c "create database app_development"
28
+ psql -h pg -U postgres -c "create database app_test"
29
+
30
+ env RAILS_ENV=development bundle exec rake -t db:migrate
31
+ env RAILS_ENV=test bundle exec rake -t db:migrate
@@ -0,0 +1,8 @@
1
+ class CreateInstances < ActiveRecord::Migration[7.0]
2
+ def change
3
+ create_table :instances do |t|
4
+
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ class CreateInstructors < ActiveRecord::Migration[7.0]
2
+ def change
3
+ create_table :instructors do |t|
4
+
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,27 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema[7.0].define(version: 2022_03_28_093154) do
14
+ # These are extensions that must be enabled in order to support this database
15
+ enable_extension "plpgsql"
16
+
17
+ create_table "instances", force: :cascade do |t|
18
+ t.datetime "created_at", null: false
19
+ t.datetime "updated_at", null: false
20
+ end
21
+
22
+ create_table "instructors", force: :cascade do |t|
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
25
+ end
26
+
27
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }])
7
+ # Character.create(name: "Luke", movie: movies.first)
@@ -0,0 +1,31 @@
1
+ version: "3"
2
+ services:
3
+ pg:
4
+ build:
5
+ context: .
6
+ dockerfile: Dockerfile.pg
7
+ ports:
8
+ - "5432"
9
+ environment:
10
+ POSTGRES_HOST_AUTH_METHOD: trust
11
+
12
+ app:
13
+ build:
14
+ context: .
15
+ dockerfile: Dockerfile
16
+ image: rails7-app:${RUBY_VERSION}
17
+ command:
18
+ [ "./bin/rails", "server", "-b", "0.0.0.0", "-u", "webrick" ]
19
+ environment:
20
+ RAILS_ENV:
21
+ ORM_MODULE:
22
+ PGHOST: pg
23
+ PGPORT: '5432'
24
+ DATABASE_URL: postgres://postgres@pg
25
+ APPMAP:
26
+ volumes:
27
+ - .:/src/app
28
+ ports:
29
+ - "3000"
30
+ links:
31
+ - pg:pg
File without changes
File without changes
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1 @@
1
+ # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
File without changes
@@ -0,0 +1,5 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ end
@@ -0,0 +1,11 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
4
+ # test "connects with cookies" do
5
+ # cookies.signed[:user_id] = 42
6
+ #
7
+ # connect
8
+ #
9
+ # assert_equal connection.user_id, "42"
10
+ # end
11
+ end
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the "{}" from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the "{}" from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ require "test_helper"
2
+
3
+ class InstanceTest < ActiveSupport::TestCase
4
+ test "creates valid instance" do
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ require "test_helper"
2
+
3
+ class InstructorTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
File without changes
@@ -0,0 +1,13 @@
1
+ ENV["RAILS_ENV"] ||= "test"
2
+ require_relative "../config/environment"
3
+ require "rails/test_help"
4
+
5
+ class ActiveSupport::TestCase
6
+ # Run tests in parallel with specified workers
7
+ parallelize(workers: :number_of_processors)
8
+
9
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
data/spec/hook_spec.rb CHANGED
@@ -115,7 +115,7 @@ describe 'AppMap class Hooking', docker: false do
115
115
  require 'appmap/hook/method'
116
116
  package = config.lookup_package(hook_cls, method)
117
117
  expect(package).to be
118
- hook_method = AppMap::Hook::Method.new(package, hook_cls, method)
118
+ hook_method = AppMap::Handler::Function.new(package, hook_cls, method)
119
119
  hook_method.activate
120
120
 
121
121
  tracer = AppMap.tracing.trace
@@ -1188,7 +1188,7 @@ describe 'AppMap class Hooking', docker: false do
1188
1188
  require 'appmap/hook/method'
1189
1189
 
1190
1190
  pkg = AppMap::Config::Package.new('fixtures/hook/prependend_override')
1191
- AppMap::Hook::Method.new(pkg, PrependedClass, PrependedClass.public_instance_method(:say_hello)).activate
1191
+ AppMap::Handler::Function.new(pkg, PrependedClass, PrependedClass.public_instance_method(:say_hello)).activate
1192
1192
 
1193
1193
  tracer = AppMap.tracing.trace
1194
1194
  AppMap::Event.reset_id_counter
@@ -1,14 +1,16 @@
1
1
  require 'rails_spec_helper'
2
2
 
3
+ # Rails5 doesn't work with Ruby 3.x
3
4
  def default_rails_versions
4
- ruby_2? ? [ 5, 6 ] : [ 6 ]
5
+ testing_ruby_2? ? [ 5, 6 ] : [ 6 ]
5
6
  end
6
7
 
7
- # Rails5 doesn't work with Ruby 3.x
8
- RailsVersions = ENV['RAILS_VERSIONS'] || default_rails_versions
8
+ def rails_versions
9
+ Array(ENV['RAILS_VERSIONS'] || default_rails_versions)
10
+ end
9
11
 
10
12
  describe 'Rails' do
11
- RailsVersions.each do |rails_major_version| # rubocop:disable Metrics/BlockLength
13
+ rails_versions.each do |rails_major_version| # rubocop:disable Metrics/BlockLength
12
14
  context "#{rails_major_version}" do
13
15
  include_context 'Rails app pg database', "spec/fixtures/rails#{rails_major_version}_users_app" unless use_existing_data?
14
16
  include_context 'rails integration test setup'
@@ -5,6 +5,13 @@ require 'active_support'
5
5
  require 'active_support/core_ext'
6
6
  require 'open3'
7
7
 
8
+ # The RUBY_VERSION global variable indicates the version of the
9
+ # runtime. The RUBY_VERSION environment variable is the version we're
10
+ # testing, so it needs to be used to pick a fixture directory.
11
+ def testing_ruby_2?
12
+ ENV['RUBY_VERSION'].split('.')[0].to_i == 2
13
+ end
14
+
8
15
  # docker compose v2 replaced the --filter flag with --status
9
16
  PS_CMD=`docker-compose --version` =~ /version v2/ ?
10
17
  "docker-compose ps -q --status running" :
@@ -0,0 +1,45 @@
1
+ require 'rails_spec_helper'
2
+
3
+ # Rails5 doesn't work with Ruby 3.x, Rails 7 doesn't work with Ruby < 2.7.
4
+ def default_rails_versions
5
+ if testing_ruby_2?
6
+ if Gem::Requirement.create('>= 2.7') =~ Gem::Version.new(ENV['RUBY_VERSION'])
7
+ [ 5, 6, 7 ]
8
+ else
9
+ [ 5, 6 ]
10
+ end
11
+ else
12
+ [ 6, 7 ]
13
+ end
14
+ end
15
+
16
+ def rails_versions
17
+ Array(ENV['RAILS_VERSIONS'] || default_rails_versions)
18
+ end
19
+
20
+ describe 'Rails' do
21
+ rails_versions.each do |rails_major_version| # rubocop:disable Metrics/BlockLength
22
+ context "#{rails_major_version}" do
23
+ include_context 'Rails app pg database', "spec/fixtures/rails#{rails_major_version}_users_app" unless use_existing_data?
24
+ def tmpdir
25
+ 'tmp/spec/rails_test_spec'
26
+ end
27
+ before(:all) do
28
+ FileUtils.rm_rf tmpdir
29
+ FileUtils.mkdir_p tmpdir
30
+ end
31
+
32
+ def run_tests
33
+ cmd = <<~CMD.gsub "\n", ' '
34
+ docker-compose run --rm -e RAILS_ENV=test -e APPMAP=true -e TEST_OPTS=--verbose
35
+ -v #{File.absolute_path tmpdir}:/app/tmp app bundle exec rake
36
+ CMD
37
+ run_cmd cmd, chdir: fixture_dir
38
+ end
39
+
40
+ it 'runs tests with APPMAP=true' do
41
+ run_tests
42
+ end
43
+ end
44
+ end
45
+ end
@@ -33,8 +33,8 @@ describe 'rake appmap:swagger' do
33
33
  expect(swagger).to eq(YAML.load(<<~YAML
34
34
  :openapi: 3.0.1
35
35
  :info:
36
- :title: My project
37
- :version: v1
36
+ :title: Usersapp API
37
+ :version: 1.1.0
38
38
  :paths:
39
39
  :/api/users:
40
40
  :get: