enhanced_errors 2.0.0 → 2.0.1

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: f9b5672dcc4f5583ab60b46799b58676f6ded0dbdec03a6dcd4637d53c5f9f77
4
- data.tar.gz: c6a1faec38495fa64ce018c14bd10248ac38278dd41840137c7dbc6edc083661
3
+ metadata.gz: 1a4579802affa3f4ee55675cadce0a0782e239e95cacdeb3eac12c6a716c913e
4
+ data.tar.gz: 81e803f5ae6f247f6f38b116e92d3d07befed02028927cdb07dad3b7f0b87d28
5
5
  SHA512:
6
- metadata.gz: 00dde7064adf86a435200f8944139f7f6f042e3c797e3a97f38592e4c274b1131b54dbf6964069fa61a36aac5f7560cdeb6a62da3f0996d4f68416727de638d2
7
- data.tar.gz: 17e332764e329e84a749621121eeb281e8c7e69b7b2c66dcb7248bfce81af6f9952d7ef5976e8bea0d72adcba483e5c9a564674256386b807a81a6629eec085c
6
+ metadata.gz: a110f026595e2dc79a65a311844860311f6454d593d5231604c368658526d2830d231c25417338e4b43f18febfc06158c3fa57c607ec47e1cf8dc4d4929077ab
7
+ data.tar.gz: ea199eaedd965fdcae33b99c3709e0ba1b0b492505506a2f9b0cb00daf1773225526670fb0537ade59bf300343e5d8cc32fd76c5906037d5e0522c2b88315e4c
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "enhanced_errors"
3
- spec.version = "2.0.0"
3
+ spec.version = "2.0.1"
4
4
  spec.authors = ["Eric Beland"]
5
5
 
6
6
  spec.summary = "Automatically enhance your errors with messages containing variable values from the moment they were raised."
@@ -30,15 +30,18 @@ class EnhancedErrors
30
30
 
31
31
  # Add @__memoized and @__inspect_output to the skip list so they don't appear in output
32
32
  RSPEC_SKIP_LIST = Set.new([
33
+ :@example,
33
34
  :@fixture_cache,
34
35
  :@fixture_cache_key,
36
+ :@fixture_connections,
35
37
  :@fixture_connection_pools,
38
+ :@loaded_fixtures,
36
39
  :@connection_subscriber,
37
40
  :@saved_pool_configs,
38
- :@loaded_fixtures,
41
+ :@legacy_saved_pool_configs,
39
42
  :@matcher_definitions,
40
- :@__memoized, # Added to skip from output
41
- :@__inspect_output # Added to skip from output
43
+ :@__memoized,
44
+ :@__inspect_output
42
45
  ])
43
46
 
44
47
  RAILS_SKIP_LIST = Set.new([
@@ -188,7 +191,11 @@ class EnhancedErrors
188
191
  @rspec_tracepoint = nil
189
192
 
190
193
  @rspec_tracepoint = TracePoint.new(:b_return) do |tp|
191
- if tp.self.class.name =~ /RSpec::ExampleGroups::[a-zA-Z0-9]+$/ && tp.method_id.nil? && !(tp.path =~ /rspec/)
194
+ # This is super-kluge-y and should be replaced with... something TBD
195
+ if tp.self.class.name =~ /RSpec::ExampleGroups::[A-Z0-9]+.*/ &&
196
+ tp.method_id.nil? &&
197
+ !(tp.path =~ /rspec/) &&
198
+ tp.path =~ /_spec\.rb$/
192
199
  @rspec_example_binding = tp.binding
193
200
  end
194
201
  end
@@ -196,7 +203,8 @@ class EnhancedErrors
196
203
  end
197
204
 
198
205
  def stop_rspec_binding_capture
199
- @rspec_tracepoint.disable if @rspec_tracepoint
206
+ @rspec_tracepoint&.disable
207
+ @rspec_tracepoint = nil
200
208
  binding_info = convert_binding_to_binding_info(@rspec_example_binding) if @rspec_example_binding
201
209
  @rspec_example_binding = nil
202
210
  binding_info
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhanced_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Beland