appmap 0.64.0 → 0.65.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/.travis.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/lib/appmap/command/agent_setup/init.rb +1 -0
- data/lib/appmap/config.rb +2 -2
- data/lib/appmap/cucumber.rb +1 -0
- data/lib/appmap/depends/util.rb +2 -0
- data/lib/appmap/minitest.rb +1 -0
- data/lib/appmap/rspec.rb +1 -0
- data/lib/appmap/service/validator/config_validator.rb +5 -1
- data/lib/appmap/swagger/rake_tasks.rb +1 -0
- data/lib/appmap/util.rb +1 -1
- data/lib/appmap/version.rb +2 -3
- data/spec/depends/api_spec.rb +1 -1
- data/spec/fixtures/rails6_users_app/Gemfile +1 -1
- data/spec/fixtures/rails6_users_app/docker-compose.yml +1 -1
- data/spec/hook_spec.rb +6 -4
- data/spec/rails_recording_spec.rb +5 -2
- data/spec/railtie_spec.rb +3 -3
- data/spec/record_sql_rails_pg_spec.rb +1 -1
- data/spec/remote_recording_spec.rb +3 -3
- data/spec/spec_helper.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ff92977defe997917c8b7c2d9d5974d5e743c02b637bcfffa5548e087d4644f
|
4
|
+
data.tar.gz: 4889a8d717b0167737719acc75c12f5709404b6445b6dd633523cd76e4992a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a78ced9dc2d5c0e80fe0f68d01508cff0af59bfc65f9a747ec5f981d7bd5a7523a59230427ddf465b39db1768f2443c856a93c852ddb444bc80eec4a539f460
|
7
|
+
data.tar.gz: 21a54adacd2b5b27a5f2a6143db0c0684716a9d1db6add75d4e05fdd73054bb9576fc2bac3ce68067230d1fb04caf177c8e4366e05a061301bd1a9dd84214bf5
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [0.65.0](https://github.com/applandinc/appmap-ruby/compare/v0.64.0...v0.65.0) (2021-09-14)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Require fileutils as needed ([790c3a8](https://github.com/applandinc/appmap-ruby/commit/790c3a88b0e69581e0e4f73b7a92f46448b3cdd8))
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* Add support for Ruby 3.0, and drop Ruby 2.5 ([eba14e1](https://github.com/applandinc/appmap-ruby/commit/eba14e1669bdf50dc51ce8623c5d586edfdb1a2f))
|
12
|
+
|
1
13
|
# [0.64.0](https://github.com/applandinc/appmap-ruby/compare/v0.63.0...v0.64.0) (2021-08-24)
|
2
14
|
|
3
15
|
|
data/README.md
CHANGED
@@ -117,11 +117,11 @@ root@6fab5f89125f:/src/app# bundle
|
|
117
117
|
```
|
118
118
|
|
119
119
|
At this point, the bundle is built with the `appmap` gem located in `/src/appmap`, which is volume-mounted from the host.
|
120
|
-
So you can edit the fixture code and the appmap code and run test commands such as `rspec`
|
120
|
+
So you can edit the fixture code and the appmap code and run test commands such as `rspec` in the container.
|
121
121
|
For example:
|
122
122
|
|
123
123
|
```sh-session
|
124
|
-
root@6fab5f89125f:/src/app# bundle exec rspec
|
124
|
+
root@6fab5f89125f:/src/app# APPMAP=true bundle exec rspec
|
125
125
|
Configuring AppMap from path appmap.yml
|
126
126
|
....
|
127
127
|
|
data/Rakefile
CHANGED
data/lib/appmap/config.rb
CHANGED
@@ -254,7 +254,7 @@ module AppMap
|
|
254
254
|
functions.each do |func|
|
255
255
|
package_options = {}
|
256
256
|
package_options[:labels] = func.labels if func.labels
|
257
|
-
@hooked_methods[func.cls] << TargetMethods.new(func.function_names, Package.build_from_path(func.package, package_options))
|
257
|
+
@hooked_methods[func.cls] << TargetMethods.new(func.function_names, Package.build_from_path(func.package, **package_options))
|
258
258
|
end
|
259
259
|
|
260
260
|
@hooked_methods.each_value do |hooks|
|
@@ -367,7 +367,7 @@ module AppMap
|
|
367
367
|
config_params[:depends_config] = depends_config
|
368
368
|
end
|
369
369
|
|
370
|
-
Config.new name, config_params
|
370
|
+
Config.new name, **config_params
|
371
371
|
end
|
372
372
|
end
|
373
373
|
|
data/lib/appmap/cucumber.rb
CHANGED
data/lib/appmap/depends/util.rb
CHANGED
data/lib/appmap/minitest.rb
CHANGED
data/lib/appmap/rspec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'appmap/service/validator/violation'
|
4
|
+
require 'yaml'
|
4
5
|
|
5
6
|
module AppMap
|
6
7
|
module Service
|
@@ -76,7 +77,10 @@ module AppMap
|
|
76
77
|
end
|
77
78
|
|
78
79
|
def validate_ruby_version
|
79
|
-
|
80
|
+
major, minor, _ = RUBY_VERSION.split('.')
|
81
|
+
version = [ major, minor ].join('.')
|
82
|
+
|
83
|
+
unless AppMap::SUPPORTED_RUBY_VERSIONS.member?(version)
|
80
84
|
@violations << Violation.error(
|
81
85
|
message: "AppMap does not support Ruby #{RUBY_VERSION}. " \
|
82
86
|
"Supported versions are: #{AppMap::SUPPORTED_RUBY_VERSIONS.join(', ')}."
|
data/lib/appmap/util.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'bundler'
|
4
|
+
require 'fileutils'
|
4
5
|
|
5
6
|
module AppMap
|
6
7
|
module Util
|
@@ -130,7 +131,6 @@ module AppMap
|
|
130
131
|
|
131
132
|
# Atomically writes AppMap data to +filename+.
|
132
133
|
def write_appmap(filename, appmap)
|
133
|
-
require 'fileutils'
|
134
134
|
require 'tmpdir'
|
135
135
|
|
136
136
|
# This is what Ruby Tempfile does; but we don't want the file to be unlinked.
|
data/lib/appmap/version.rb
CHANGED
@@ -3,12 +3,11 @@
|
|
3
3
|
module AppMap
|
4
4
|
URL = 'https://github.com/applandinc/appmap-ruby'
|
5
5
|
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.65.0'
|
7
7
|
|
8
8
|
APPMAP_FORMAT_VERSION = '1.5.1'
|
9
9
|
|
10
|
-
|
11
|
-
SUPPORTED_RUBY_VERSIONS = %w[2.5 2.6 2.7].freeze
|
10
|
+
SUPPORTED_RUBY_VERSIONS = %w[2.6 2.7 3.0].freeze
|
12
11
|
|
13
12
|
DEFAULT_APPMAP_DIR = 'tmp/appmap'.freeze
|
14
13
|
DEFAULT_CONFIG_FILE_PATH = 'appmap.yml'.freeze
|
data/spec/depends/api_spec.rb
CHANGED
@@ -55,7 +55,7 @@ describe 'Depends API' do
|
|
55
55
|
describe '.inspect_test_files' do
|
56
56
|
it 'reports metadata, added, removed, changed, failed' do
|
57
57
|
test_report = api.inspect_test_files(appmap_dir: DEPENDS_TEST_DIR, test_file_patterns: %w[spec/fixtures/depends/spec/*_spec.rb])
|
58
|
-
expect(test_report.metadata_files).to eq(%w[spec/fixtures/depends/
|
58
|
+
expect(test_report.metadata_files.sort).to eq(%w[spec/fixtures/depends/revoke_api_key/metadata.json spec/fixtures/depends/user_page_scenario/metadata.json])
|
59
59
|
expect(test_report.added).to be_empty
|
60
60
|
expect(test_report.removed).to be_empty
|
61
61
|
expect(test_report.changed).to be_empty
|
data/spec/hook_spec.rb
CHANGED
@@ -987,10 +987,12 @@ describe 'AppMap class Hooking', docker: false do
|
|
987
987
|
end
|
988
988
|
|
989
989
|
describe 'kwargs handling' do
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
990
|
+
if ruby_2?
|
991
|
+
# https://github.com/applandinc/appmap-ruby/issues/153
|
992
|
+
it 'empty hash for **kwrest can be proxied as a regular function argument', github_issue: 153 do
|
993
|
+
invoke_test_file 'spec/fixtures/hook/kwargs.rb' do
|
994
|
+
expect(Kwargs.has_kwrest_calls_no_kwargs(nil, {})).to eq({})
|
995
|
+
end
|
994
996
|
end
|
995
997
|
end
|
996
998
|
end
|
@@ -1,7 +1,10 @@
|
|
1
1
|
require 'rails_spec_helper'
|
2
2
|
|
3
|
+
# Rails5 doesn't work with Ruby 3.x
|
4
|
+
RailsVersions = ruby_2? ? [ 5, 6 ] : [ 6 ]
|
5
|
+
|
3
6
|
describe 'Rails' do
|
4
|
-
|
7
|
+
RailsVersions.each do |rails_major_version| # rubocop:disable Metrics/BlockLength
|
5
8
|
context "#{rails_major_version}" do
|
6
9
|
include_context 'Rails app pg database', "spec/fixtures/rails#{rails_major_version}_users_app" unless use_existing_data?
|
7
10
|
include_context 'rails integration test setup'
|
@@ -239,7 +242,7 @@ describe 'Rails' do
|
|
239
242
|
end
|
240
243
|
|
241
244
|
describe 'with default appmap.yml' do
|
242
|
-
include_context 'Rails app pg database', "spec/fixtures/
|
245
|
+
include_context 'Rails app pg database', "spec/fixtures/rails6_users_app" unless use_existing_data?
|
243
246
|
include_context 'rails integration test setup'
|
244
247
|
|
245
248
|
def run_spec(spec_name)
|
data/spec/railtie_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails_spec_helper'
|
2
2
|
|
3
3
|
describe 'AppMap tracer via Railtie' do
|
4
|
-
include_context 'Rails app pg database', 'spec/fixtures/
|
4
|
+
include_context 'Rails app pg database', 'spec/fixtures/rails6_users_app' do
|
5
5
|
let(:env) { {} }
|
6
6
|
|
7
7
|
let(:cmd) { %(docker-compose run --rm -e RAILS_ENV=development -e APPMAP app ./bin/rails r "puts AppMap.instance_variable_get('@configuration').nil?") }
|
@@ -10,13 +10,13 @@ describe 'AppMap tracer via Railtie' do
|
|
10
10
|
Open3.capture3(env, cmd, chdir: fixture_dir).tap do |result|
|
11
11
|
unless result[2] == 0
|
12
12
|
warn <<~STDERR
|
13
|
-
Failed to run
|
13
|
+
Failed to run rails6_users_app container
|
14
14
|
<<< Output:
|
15
15
|
#{result[0]}
|
16
16
|
#{result[1]}
|
17
17
|
>>> End of output
|
18
18
|
STDERR
|
19
|
-
raise 'Failed to run
|
19
|
+
raise 'Failed to run rails6_users_app container'
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails_spec_helper'
|
2
2
|
|
3
3
|
describe 'SQL events' do
|
4
|
-
include_context 'Rails app pg database', 'spec/fixtures/
|
4
|
+
include_context 'Rails app pg database', 'spec/fixtures/rails6_users_app' do
|
5
5
|
around(:each) do |example|
|
6
6
|
FileUtils.rm_rf tmpdir
|
7
7
|
FileUtils.mkdir_p tmpdir
|
@@ -3,9 +3,9 @@ require 'net/http'
|
|
3
3
|
require 'socket'
|
4
4
|
|
5
5
|
describe 'remote recording', :order => :defined do
|
6
|
-
include_context 'Rails app pg database', 'spec/fixtures/
|
6
|
+
include_context 'Rails app pg database', 'spec/fixtures/rails6_users_app' do
|
7
7
|
before(:all) do
|
8
|
-
fixture_dir = 'spec/fixtures/
|
8
|
+
fixture_dir = 'spec/fixtures/rails6_users_app'
|
9
9
|
start_cmd = 'docker-compose up -d app'
|
10
10
|
run_cmd({ 'ORM_MODULE' => 'sequel', 'APPMAP' => 'true' }, start_cmd, chdir: fixture_dir)
|
11
11
|
Dir.chdir fixture_dir do
|
@@ -44,7 +44,7 @@ describe 'remote recording', :order => :defined do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
after(:all) do
|
47
|
-
fixture_dir = 'spec/fixtures/
|
47
|
+
fixture_dir = 'spec/fixtures/rails6_users_app'
|
48
48
|
run_cmd 'docker-compose rm -fs app', chdir: fixture_dir
|
49
49
|
end
|
50
50
|
|
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.65.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-
|
11
|
+
date: 2021-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|