appmap 0.78.0 → 0.79.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -16
  3. data/CHANGELOG.md +7 -0
  4. data/{spec/fixtures/rails5_users_app/Dockerfile.pg → Dockerfile.pg} +0 -0
  5. data/README.md +14 -44
  6. data/README_CI.md +0 -7
  7. data/Rakefile +12 -150
  8. data/appmap.gemspec +3 -2
  9. data/docker-compose.yml +10 -0
  10. data/lib/appmap/version.rb +1 -1
  11. data/spec/config_spec.rb +1 -1
  12. data/spec/depends/api_spec.rb +13 -5
  13. data/spec/depends/spec_helper.rb +0 -9
  14. data/spec/fixtures/database.yml +11 -0
  15. data/spec/fixtures/rails5_users_app/config/database.yml +1 -0
  16. data/spec/fixtures/rails6_users_app/Gemfile +1 -25
  17. data/spec/fixtures/rails6_users_app/config/database.yml +1 -0
  18. data/spec/fixtures/rails7_users_app/Gemfile +1 -25
  19. data/spec/fixtures/rails7_users_app/config/database.yml +1 -0
  20. data/spec/hook_spec.rb +1 -1
  21. data/spec/rails_recording_spec.rb +4 -20
  22. data/spec/rails_spec_helper.rb +76 -63
  23. data/spec/rails_test_spec.rb +7 -17
  24. data/spec/railtie_spec.rb +4 -18
  25. data/spec/record_sql_rails_pg_spec.rb +44 -75
  26. data/spec/remote_recording_spec.rb +18 -30
  27. data/spec/spec_helper.rb +1 -0
  28. data/spec/swagger/swagger_spec.rb +1 -16
  29. data/spec/util_spec.rb +1 -1
  30. metadata +21 -21
  31. data/Dockerfile.appmap +0 -5
  32. data/spec/fixtures/rack_users_app/Dockerfile +0 -32
  33. data/spec/fixtures/rack_users_app/docker-compose.yml +0 -9
  34. data/spec/fixtures/rails5_users_app/Dockerfile +0 -29
  35. data/spec/fixtures/rails5_users_app/config/database.yml +0 -18
  36. data/spec/fixtures/rails5_users_app/create_app +0 -33
  37. data/spec/fixtures/rails5_users_app/docker-compose.yml +0 -31
  38. data/spec/fixtures/rails6_users_app/.ruby-version +0 -1
  39. data/spec/fixtures/rails6_users_app/Dockerfile +0 -44
  40. data/spec/fixtures/rails6_users_app/Dockerfile.pg +0 -3
  41. data/spec/fixtures/rails6_users_app/config/database.yml +0 -18
  42. data/spec/fixtures/rails6_users_app/create_app +0 -33
  43. data/spec/fixtures/rails6_users_app/docker-compose.yml +0 -31
  44. data/spec/fixtures/rails7_users_app/.ruby-version +0 -1
  45. data/spec/fixtures/rails7_users_app/Dockerfile +0 -30
  46. data/spec/fixtures/rails7_users_app/Dockerfile.pg +0 -3
  47. data/spec/fixtures/rails7_users_app/config/database.yml +0 -86
  48. data/spec/fixtures/rails7_users_app/create_app +0 -31
  49. data/spec/fixtures/rails7_users_app/docker-compose.yml +0 -31
@@ -1,32 +0,0 @@
1
- ARG GEM_VERSION
2
- ARG RUBY_VERSION
3
-
4
- FROM appmap:${GEM_VERSION} as appmap
5
-
6
- FROM ruby:${RUBY_VERSION}
7
- RUN apt-get update && apt-get install -y vim less
8
-
9
- RUN mkdir /app
10
- WORKDIR /app
11
-
12
- RUN gem install -N bundler
13
-
14
- COPY Gemfile .
15
-
16
- RUN bundle
17
- RUN bundle binstubs rack
18
-
19
- COPY . .
20
-
21
- COPY --from=appmap /pkg/appmap.gem /tmp/
22
- RUN gem install /tmp/appmap.gem && \
23
- bundle update --local appmap && \
24
- bundle binstubs appmap --force
25
-
26
- EXPOSE 9292
27
-
28
- ENV GLI_DEBUG=true
29
-
30
- ENTRYPOINT [ "./bin/appmap", "record", "-o", "tmp/appmap.json" ]
31
-
32
- HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:9292/health || exit 1
@@ -1,9 +0,0 @@
1
- version: "3"
2
- services:
3
- app:
4
- build:
5
- context: .
6
- dockerfile: Dockerfile
7
- image: rack-users-app:${RUBY_VERSION}
8
- ports:
9
- - "9292"
@@ -1,29 +0,0 @@
1
- ARG GEM_VERSION
2
- ARG RUBY_VERSION
3
-
4
- FROM appmap:${GEM_VERSION} as appmap
5
-
6
- FROM ruby:${RUBY_VERSION}
7
- RUN apt-get update && apt-get install -y vim less
8
- RUN apt-get install -y postgresql-client
9
-
10
- RUN mkdir /app
11
- WORKDIR /app
12
-
13
- RUN gem install -N bundler
14
-
15
- COPY Gemfile .
16
-
17
- RUN bundle
18
- RUN bundle binstubs bundler rspec-core --force
19
-
20
- COPY . .
21
-
22
- COPY --from=appmap /pkg/appmap.gem /tmp/
23
- RUN gem install /tmp/appmap.gem && \
24
- bundle update --local appmap && \
25
- bundle binstubs appmap --force
26
-
27
- EXPOSE 3000
28
-
29
- HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:3000/health || exit 1
@@ -1,18 +0,0 @@
1
- default: &default
2
- host: <%= ENV['PGHOST'] || 'pg' %>
3
- port: <%= ENV['PGPORT'] || 5432 %>
4
- user: postgres
5
- adapter: postgresql
6
- encoding: unicode
7
- # For details on connection pooling, see Rails configuration guide
8
- # http://guides.rubyonrails.org/configuring.html#database-pooling
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
-
11
- development:
12
- <<: *default
13
- database: app_development
14
- test:
15
- <<: *default
16
- database: app_test
17
- production:
18
- <<: *default
@@ -1,33 +0,0 @@
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
32
-
33
- echo "INSERT INTO users ( login ) VALUES ( 'admin' ) " | psql -h pg -U postgres app_development
@@ -1,31 +0,0 @@
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: rails5-app:${RUBY_VERSION}
17
- command:
18
- [ "./bin/rails", "server", "-b", "0.0.0.0", "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
@@ -1 +0,0 @@
1
- 2.6.2
@@ -1,44 +0,0 @@
1
- ARG GEM_VERSION
2
- ARG RUBY_VERSION
3
-
4
- FROM appmap:${GEM_VERSION} as appmap
5
- FROM ruby:${RUBY_VERSION}
6
-
7
- SHELL ["/bin/bash", "-c"]
8
-
9
- RUN apt-get update && apt-get install -y vim less
10
- RUN apt-get install -y postgresql-client
11
-
12
- RUN curl -fsSL https://fnm.vercel.app/install | bash \
13
- && source /root/.bashrc \
14
- && fnm install --lts \
15
- && echo 'fnm default $(fnm current)' >> ~/.bashrc \
16
- && ln -s $(which node) /usr/local/bin/ \
17
- && ln -s $(which npx) /usr/local/bin/ \
18
- && npm install -g yarn \
19
- && ln -s $(which yarn) /usr/local/bin/
20
-
21
- RUN mkdir /app
22
- WORKDIR /app
23
-
24
- RUN gem install -N bundler
25
-
26
- COPY package.json .
27
-
28
- RUN yarn install
29
-
30
- COPY Gemfile .
31
-
32
- RUN bundle
33
- RUN bundle binstubs bundler rspec-core --force
34
-
35
- COPY . .
36
-
37
- COPY --from=appmap /pkg/appmap.gem /tmp/
38
- RUN gem install /tmp/appmap.gem && \
39
- bundle update --local appmap && \
40
- bundle binstubs appmap --force
41
-
42
- EXPOSE 3000
43
-
44
- HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:3000/health || exit 1
@@ -1,3 +0,0 @@
1
- FROM postgres:10
2
-
3
- HEALTHCHECK --interval=1s --retries=10 CMD psql -U postgres -c "select 1" || exit 1
@@ -1,18 +0,0 @@
1
- default: &default
2
- host: <%= ENV['PGHOST'] || 'pg' %>
3
- port: <%= ENV['PGPORT'] || 5432 %>
4
- user: postgres
5
- adapter: postgresql
6
- encoding: unicode
7
- # For details on connection pooling, see Rails configuration guide
8
- # http://guides.rubyonrails.org/configuring.html#database-pooling
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
-
11
- development:
12
- <<: *default
13
- database: app_development
14
- test:
15
- <<: *default
16
- database: app_test
17
- production:
18
- <<: *default
@@ -1,33 +0,0 @@
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
32
-
33
- echo "INSERT INTO users ( login ) VALUES ( 'admin' ) " | psql -h pg -U postgres app_development
@@ -1,31 +0,0 @@
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: rails6-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
@@ -1 +0,0 @@
1
- ruby-3.1.0
@@ -1,30 +0,0 @@
1
- ARG GEM_VERSION
2
- ARG RUBY_VERSION
3
-
4
- FROM appmap:${GEM_VERSION} as appmap
5
- FROM ruby:${RUBY_VERSION}
6
-
7
- SHELL ["/bin/bash", "-c"]
8
-
9
- RUN apt-get update && apt-get install -y vim less
10
- RUN apt-get install -y postgresql-client
11
-
12
- RUN mkdir /app
13
- WORKDIR /app
14
-
15
- RUN gem install -N bundler
16
-
17
- COPY Gemfile .
18
-
19
- RUN bundle
20
-
21
- COPY . .
22
-
23
- COPY --from=appmap /pkg/appmap.gem /tmp/
24
- RUN gem install /tmp/appmap.gem && \
25
- bundle update --local appmap && \
26
- bundle binstubs appmap --force
27
-
28
- EXPOSE 3000
29
-
30
- HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:3000/health || exit 1
@@ -1,3 +0,0 @@
1
- FROM postgres:10
2
-
3
- HEALTHCHECK --interval=1s --retries=10 CMD psql -U postgres -c "select 1" || exit 1
@@ -1,86 +0,0 @@
1
- # PostgreSQL. Versions 9.3 and up are supported.
2
- #
3
- # Install the pg driver:
4
- # gem install pg
5
- # On macOS with Homebrew:
6
- # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7
- # On macOS with MacPorts:
8
- # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9
- # On Windows:
10
- # gem install pg
11
- # Choose the win32 build.
12
- # Install PostgreSQL and put its /bin directory on your path.
13
- #
14
- # Configure Using Gemfile
15
- # gem "pg"
16
- #
17
- default: &default
18
- adapter: postgresql
19
- encoding: unicode
20
- # For details on connection pooling, see Rails configuration guide
21
- # https://guides.rubyonrails.org/configuring.html#database-pooling
22
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
23
-
24
- development:
25
- <<: *default
26
- database: app_development
27
-
28
- # The specified database role being used to connect to postgres.
29
- # To create additional roles in postgres see `$ createuser --help`.
30
- # When left blank, postgres will use the default role. This is
31
- # the same name as the operating system user running Rails.
32
- #username: app
33
-
34
- # The password associated with the postgres role (username).
35
- #password:
36
-
37
- # Connect on a TCP socket. Omitted by default since the client uses a
38
- # domain socket that doesn't need configuration. Windows does not have
39
- # domain sockets, so uncomment these lines.
40
- #host: localhost
41
-
42
- # The TCP port the server listens on. Defaults to 5432.
43
- # If your server runs on a different port number, change accordingly.
44
- #port: 5432
45
-
46
- # Schema search path. The server defaults to $user,public
47
- #schema_search_path: myapp,sharedapp,public
48
-
49
- # Minimum log levels, in increasing order:
50
- # debug5, debug4, debug3, debug2, debug1,
51
- # log, notice, warning, error, fatal, and panic
52
- # Defaults to warning.
53
- #min_messages: notice
54
-
55
- # Warning: The database defined as "test" will be erased and
56
- # re-generated from your development database when you run "rake".
57
- # Do not set this db to the same as development or production.
58
- test:
59
- <<: *default
60
- database: app_test
61
-
62
- # As with config/credentials.yml, you never want to store sensitive information,
63
- # like your database password, in your source code. If your source code is
64
- # ever seen by anyone, they now have access to your database.
65
- #
66
- # Instead, provide the password or a full connection URL as an environment
67
- # variable when you boot the app. For example:
68
- #
69
- # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
70
- #
71
- # If the connection URL is provided in the special DATABASE_URL environment
72
- # variable, Rails will automatically merge its configuration values on top of
73
- # the values provided in this file. Alternatively, you can specify a connection
74
- # URL environment variable explicitly:
75
- #
76
- # production:
77
- # url: <%= ENV["MY_APP_DATABASE_URL"] %>
78
- #
79
- # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
80
- # for a full overview on how database connection configuration can be specified.
81
- #
82
- production:
83
- <<: *default
84
- database: app_production
85
- username: app
86
- password: <%= ENV["APP_DATABASE_PASSWORD"] %>
@@ -1,31 +0,0 @@
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
@@ -1,31 +0,0 @@
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