appmap 0.25.0 → 0.25.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d42f8555b02b0478b8927c249f6dfa54c9326b7e3122cd5a0b91b5d1fb308fbb
4
- data.tar.gz: 525faceacd156300098b897f7ef7789d94d42601f9ccec5d3bfad0f41b62ac54
3
+ metadata.gz: 6ee5199f1f1f4c05ba3837f3caf04adb9798bb223c3bf0deb71cdd80216181a0
4
+ data.tar.gz: 3aeb05be87430862426a25075a236d54d2d20bb0a1d893b71b1eaa63c8c44c01
5
5
  SHA512:
6
- metadata.gz: 8290dde850c68b07c51baa70c074a283907c77c15093c8d6ed9b151da66f1dbad866f37beef6a12c2897195b8b18d147a839dd049336fd52fa1b48fb5e3d8ab1
7
- data.tar.gz: '035025557325693fd0a158ce007dab265ec2646a3cf2e729f42348ac0986081f4356a1cec1e66c1bc7d9608025c6889b497e52ec6f510612a3fb5cedd220f22d'
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
@@ -133,6 +133,7 @@ module AppMap
133
133
  return_value = base_method.call(*args, &block)
134
134
  rescue
135
135
  exception = $ERROR_INFO
136
+ raise
136
137
  ensure
137
138
  with_disabled_hook.call do
138
139
  after_hook.call(call_event, defined_class, method, start_time, return_value, exception)
@@ -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
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.25.0'
6
+ VERSION = '0.25.2'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.2'
9
9
  end
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
- ExceptionMethod.new.raise_exception
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
@@ -5,3 +5,7 @@ require 'yaml'
5
5
  require 'English'
6
6
  require 'webdrivers/chromedriver'
7
7
  require 'appmap'
8
+
9
+ RSpec.configure do |config|
10
+ config.example_status_persistence_file_path = "tmp/rspec_failed_examples.txt"
11
+ end
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.0
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-13 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport