appmap 0.25.0 → 0.25.2
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 +10 -0
- data/lib/appmap/event.rb +1 -1
- data/lib/appmap/hook.rb +1 -0
- data/lib/appmap/rails/sql_handler.rb +0 -5
- data/lib/appmap/version.rb +1 -1
- data/spec/hook_spec.rb +13 -1
- data/spec/spec_helper.rb +4 -0
- data/test/cli_test.rb +1 -1
- 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: 6ee5199f1f1f4c05ba3837f3caf04adb9798bb223c3bf0deb71cdd80216181a0
|
4
|
+
data.tar.gz: 3aeb05be87430862426a25075a236d54d2d20bb0a1d893b71b1eaa63c8c44c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc4042fe8d7f56a87b205145fcd9e520beb946d27f1e17f5134f4a5127f7ca9c2ee8645cf8377339c34cf814b4faf348894d91f20d31a68e743ede3d5d863419
|
7
|
+
data.tar.gz: 3c4dba46e95a77b51030065af14e9987f66294ba396a38ef396b79d86b37540d36229670b170e4f632972b563369184d0fa1a4e5b4c18d99d1deb5243b166014
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# v0.25.2
|
2
|
+
|
3
|
+
* Stop checking a whitelist to see if each SQL query should be recorded. Record
|
4
|
+
all queries.
|
5
|
+
|
6
|
+
# v0.25.1
|
7
|
+
|
8
|
+
* Ensure that caught exceptions are re-raised.
|
9
|
+
* Add safety around indexing potentially nil backtrace locations.
|
10
|
+
|
1
11
|
# v0.25.0
|
2
12
|
|
3
13
|
* Reports `exceptions` in [function return attributes](https://github.com/applandinc/appmap#function-return-attributes).
|
data/lib/appmap/event.rb
CHANGED
@@ -139,7 +139,7 @@ module AppMap
|
|
139
139
|
next_exception = exception
|
140
140
|
exceptions = []
|
141
141
|
while next_exception
|
142
|
-
exception_backtrace = next_exception.backtrace_locations[0
|
142
|
+
exception_backtrace = next_exception.backtrace_locations.try(:[], 0)
|
143
143
|
exceptions << {
|
144
144
|
class: next_exception.class.name,
|
145
145
|
message: next_exception.message,
|
data/lib/appmap/hook.rb
CHANGED
@@ -102,9 +102,6 @@ module AppMap
|
|
102
102
|
Thread.current[reentry_key] = true
|
103
103
|
begin
|
104
104
|
sql = payload[:sql].strip
|
105
|
-
sql_upper = sql.upcase
|
106
|
-
|
107
|
-
return unless WHITELIST.find { |keyword| sql_upper.index(keyword) == 0 }
|
108
105
|
|
109
106
|
# Detect whether a function call within a specified filename is present in the call stack.
|
110
107
|
find_in_backtrace = lambda do |file_name, function_name = nil|
|
@@ -143,8 +140,6 @@ module AppMap
|
|
143
140
|
Thread.current[reentry_key] = nil
|
144
141
|
end
|
145
142
|
end
|
146
|
-
|
147
|
-
WHITELIST = %w[SELECT INSERT UPDATE DELETE].freeze
|
148
143
|
end
|
149
144
|
end
|
150
145
|
end
|
data/lib/appmap/version.rb
CHANGED
data/spec/hook_spec.rb
CHANGED
@@ -351,7 +351,19 @@ describe 'AppMap class Hooking' do
|
|
351
351
|
:lineno: 9
|
352
352
|
YAML
|
353
353
|
test_hook_behavior 'spec/fixtures/hook/exception_method.rb', events_yaml do
|
354
|
-
|
354
|
+
begin
|
355
|
+
ExceptionMethod.new.raise_exception
|
356
|
+
rescue
|
357
|
+
# don't let the exception fail the test
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
362
|
+
it 're-raises exceptions' do
|
363
|
+
RSpec::Expectations.configuration.on_potential_false_positives = :nothing
|
364
|
+
|
365
|
+
invoke_test_file 'spec/fixtures/hook/exception_method.rb' do
|
366
|
+
expect { ExceptionMethod.new.raise_exception }.to raise_exception
|
355
367
|
end
|
356
368
|
end
|
357
369
|
end
|
data/spec/spec_helper.rb
CHANGED
data/test/cli_test.rb
CHANGED
@@ -119,7 +119,7 @@ class CLITest < Minitest::Test
|
|
119
119
|
`#{File.expand_path '../exe/appmap', __dir__} record -o #{OUTPUT_FILENAME} ./lib/cli_record_test/main.rb`
|
120
120
|
end
|
121
121
|
|
122
|
-
upload_output = `./exe/appmap upload --no-open #{OUTPUT_FILENAME}`
|
122
|
+
upload_output = `./exe/appmap upload --org default --user admin --no-open #{OUTPUT_FILENAME}`
|
123
123
|
assert_equal 0, $CHILD_STATUS.exitstatus
|
124
124
|
# Example: 93e1e07d-4b39-49ac-82bf-27d63e296cae
|
125
125
|
assert_match(/Scenario Id/, upload_output)
|
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.25.
|
4
|
+
version: 0.25.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Gilpin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04
|
11
|
+
date: 2020-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|