rspec-debug 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/debug/version.rb +1 -1
- data/lib/rspec/debug.rb +10 -19
- data/rspec-debug.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cbd773e36f58624d41ea037678f19d0017766e07c12edf717e591ed9e1744a0
|
4
|
+
data.tar.gz: 39e26f4334c9c4d35ede590d252ae6282d3b3ab652853e63a3dac1c39b6a2a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62d10caa883bff3aa1bac384c4074500fb8ad7cbd267c349744088e000f1ebac78cd41f3e3708a86644ccb07eb99eb3005e5c7f3b5ab9749f6d1544c9727e84e
|
7
|
+
data.tar.gz: 55fa5fe0c8bab7a26c98c0aec8b7be06402ee74a35cacb53474ed6b82d48eb3fe1e36008d9e68f8df2e2236398d8481c983a8b355f09e9120834887cffcd8d52
|
data/lib/rspec/debug/version.rb
CHANGED
data/lib/rspec/debug.rb
CHANGED
@@ -15,26 +15,17 @@ module RSpec
|
|
15
15
|
|
16
16
|
if example_block
|
17
17
|
example_block = Proc.new do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
frames = DEBUGGER__.capture_frames(nil)
|
22
|
-
frames.delete_if{|e| /(exe|bin|lib)\/rspec/ =~ e.path}
|
23
|
-
exc.instance_variable_set(:@__debugger_postmortem_frames, frames)
|
24
|
-
}
|
25
|
-
|
26
|
-
postmortem_hook.enable
|
27
|
-
begin
|
28
|
-
self.instance_eval(&orig_example_block)
|
29
|
-
ensure
|
30
|
-
postmortem_hook.disable
|
31
|
-
end
|
18
|
+
e = DEBUGGER__::SESSION.capture_exception_frames /(exe|bin|lib)\/rspec/ do
|
19
|
+
self.instance_exec(&orig_example_block)
|
20
|
+
end
|
32
21
|
|
33
|
-
|
34
|
-
STDERR.puts
|
35
|
-
|
22
|
+
if e
|
23
|
+
STDERR.puts <<~MSG
|
24
|
+
Failure:
|
25
|
+
#{e.message}
|
26
|
+
MSG
|
36
27
|
DEBUGGER__::SESSION.enter_postmortem_session e
|
37
|
-
raise
|
28
|
+
raise e
|
38
29
|
end
|
39
30
|
end # Proc.new
|
40
31
|
end
|
@@ -42,8 +33,8 @@ module RSpec
|
|
42
33
|
super
|
43
34
|
end
|
44
35
|
end
|
36
|
+
|
45
37
|
prepend DebugAtStop
|
46
38
|
end
|
47
39
|
end
|
48
40
|
end
|
49
|
-
|
data/rspec-debug.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3.
|
19
|
+
version: 1.3.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3.
|
26
|
+
version: 1.3.3
|
27
27
|
description: invoke debugger if spec fails
|
28
28
|
email:
|
29
29
|
- ko1@atdot.net
|