rspec-interactive 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +9 -4
- data/lib/rspec-interactive/version.rb +1 -1
- data/lib/rspec-interactive.rb +13 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 448fb430c0970d2d6f3dc12a3a1b6577dde234516d0d7f3fdccc735be784919b
|
4
|
+
data.tar.gz: 650d41f575295fb43d1c97930ae49e4a7fe34aac1d4cb1ca2a7d3fe6a1cb25c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5a4b51199209d0d248e1fc26a2d7e3cb4abf993eb2a61775162eda5107a2a97529bdd58867cb1e870a9c10f9da7c3ef60ce0ccd4ad484f6f900f9c2b0708a6f
|
7
|
+
data.tar.gz: f57523af399e9ca55303101479fbc0940c60095a0ffe93a2092255954fe5be3003bfc82c41c7a416df72a12d72fd4aae0d578b5d7f6da85c1385a9f620950227
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rspec-interactive (0.9.
|
4
|
+
rspec-interactive (0.9.5)
|
5
5
|
listen
|
6
6
|
pry
|
7
7
|
rspec-core
|
@@ -13,6 +13,7 @@ GEM
|
|
13
13
|
coderay (1.1.3)
|
14
14
|
diff-lcs (1.4.4)
|
15
15
|
ffi (1.15.5)
|
16
|
+
ffi (1.15.5-java)
|
16
17
|
listen (3.7.1)
|
17
18
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
18
19
|
rb-inotify (~> 0.9, >= 0.9.10)
|
@@ -20,6 +21,10 @@ GEM
|
|
20
21
|
pry (0.14.1)
|
21
22
|
coderay (~> 1.1)
|
22
23
|
method_source (~> 1.0)
|
24
|
+
pry (0.14.1-java)
|
25
|
+
coderay (~> 1.1)
|
26
|
+
method_source (~> 1.0)
|
27
|
+
spoon (~> 0.0)
|
23
28
|
rb-fsevent (0.11.1)
|
24
29
|
rb-inotify (0.10.1)
|
25
30
|
ffi (~> 1.0)
|
@@ -38,16 +43,16 @@ GEM
|
|
38
43
|
rspec-support (3.9.4)
|
39
44
|
rspec-teamcity (1.0.0)
|
40
45
|
rspec (>= 2.99, >= 2.14.2, < 4)
|
46
|
+
spoon (0.0.6)
|
47
|
+
ffi
|
41
48
|
|
42
49
|
PLATFORMS
|
50
|
+
universal-java-11
|
43
51
|
x86_64-darwin-20
|
44
52
|
|
45
53
|
DEPENDENCIES
|
46
54
|
rspec-expectations
|
47
55
|
rspec-interactive!
|
48
56
|
|
49
|
-
RUBY VERSION
|
50
|
-
ruby 3.0.0p0
|
51
|
-
|
52
57
|
BUNDLED WITH
|
53
58
|
2.2.17
|
data/lib/rspec-interactive.rb
CHANGED
@@ -57,7 +57,7 @@ module RSpec
|
|
57
57
|
load config_file if config_file
|
58
58
|
|
59
59
|
check_rails
|
60
|
-
|
60
|
+
maybe_trap_interrupt
|
61
61
|
configure_pry
|
62
62
|
|
63
63
|
@startup_thread = Thread.start do
|
@@ -95,7 +95,17 @@ module RSpec
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
-
def self.
|
98
|
+
def self.maybe_trap_interrupt
|
99
|
+
return unless RbConfig::CONFIG['ruby_install_name'] == 'jruby'
|
100
|
+
|
101
|
+
# When on JRuby, Pry traps interrupts and raises an Interrupt exception.
|
102
|
+
# Unfortunately, raising Interrupt is not enough when RSpec is running since it
|
103
|
+
# will only cause the current example to fail. We want to kill RSpec entirely
|
104
|
+
# if it is running so here we disable Pry's handling and rewrite it to include
|
105
|
+
# special handling for RSpec.
|
106
|
+
|
107
|
+
Pry.config.should_trap_interrupts = false
|
108
|
+
|
99
109
|
trap('INT') do
|
100
110
|
if @runner
|
101
111
|
# We are on a different thread. There is a race here. Ignore nil.
|
@@ -119,9 +129,6 @@ module RSpec
|
|
119
129
|
end
|
120
130
|
|
121
131
|
def self.configure_pry
|
122
|
-
# Prevent Pry from trapping too. It will break ctrl-c handling.
|
123
|
-
Pry.config.should_trap_interrupts = false
|
124
|
-
|
125
132
|
# Set up IO.
|
126
133
|
Pry.config.input = Readline
|
127
134
|
Pry.config.output = @output_stream
|
@@ -189,6 +196,7 @@ module RSpec
|
|
189
196
|
|
190
197
|
# Run.
|
191
198
|
exit_code = @runner.run
|
199
|
+
ensure
|
192
200
|
@runner = nil
|
193
201
|
|
194
202
|
# Reenable history
|
@@ -198,8 +206,6 @@ module RSpec
|
|
198
206
|
RSpec.clear_examples
|
199
207
|
RSpec.reset
|
200
208
|
@config_cache.replay_configuration
|
201
|
-
ensure
|
202
|
-
@runner = nil
|
203
209
|
end
|
204
210
|
|
205
211
|
def self.rspec_for_server(client, args)
|