rspec-interactive 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rspec-interactive/pry.rb +1 -1
- data/lib/rspec-interactive/version.rb +1 -1
- data/lib/rspec-interactive.rb +13 -18
- 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: 19e7c3fad7abad85f3523490ddfcfd3d6091e042d99fd940c6a9a19991e7dc06
|
4
|
+
data.tar.gz: 02d25e506765d4f0c40b8b3e64ae751f6da34e06af9e845830bdc05071fc8112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89b49ff9d0e888b8304e0c70a2fded4dd780381750fed960af5f282246accc6ae6d52eb71c5402d2be31bfb9a827c64e04cffcb7f4935d12d97e3d632843a8bf
|
7
|
+
data.tar.gz: 36320560582c44d1459e0590aa469f56e70b5411d8c3c88a499ca9f46c5075163aa3778869f65bb5cfd85dc3fc7dd196fff65c87733b5b0057352353583215c6
|
data/Gemfile.lock
CHANGED
data/lib/rspec-interactive.rb
CHANGED
@@ -61,11 +61,8 @@ module RSpec
|
|
61
61
|
configure_pry
|
62
62
|
|
63
63
|
@startup_thread = Thread.start do
|
64
|
-
@
|
65
|
-
|
66
|
-
@config_cache.record_configuration { @configuration.configure_rspec.call }
|
67
|
-
start_file_watcher
|
68
|
-
end
|
64
|
+
@config_cache.record_configuration { @configuration.configure_rspec.call }
|
65
|
+
start_file_watcher
|
69
66
|
|
70
67
|
if server
|
71
68
|
@server_thread = Thread.start do
|
@@ -195,7 +192,7 @@ module RSpec
|
|
195
192
|
end
|
196
193
|
|
197
194
|
# Run.
|
198
|
-
|
195
|
+
@runner.run
|
199
196
|
ensure
|
200
197
|
@runner = nil
|
201
198
|
|
@@ -210,12 +207,13 @@ module RSpec
|
|
210
207
|
|
211
208
|
def self.rspec_for_server(client, args)
|
212
209
|
@command_mutex.synchronize do
|
213
|
-
|
210
|
+
output = ClientOutput.new(client)
|
214
211
|
disable_pry = ENV['DISABLE_PRY']
|
215
|
-
ENV['DISABLE_PRY'] = 'true'
|
216
212
|
|
217
|
-
output = ClientOutput.new(client)
|
218
213
|
Stdio.capture(stdout: output, stderr: output) do
|
214
|
+
# Prevent the debugger from being used. The server isn't interactive.
|
215
|
+
ENV['DISABLE_PRY'] = 'true'
|
216
|
+
|
219
217
|
@runner = RSpec::Interactive::Runner.new(parse_args(args))
|
220
218
|
|
221
219
|
refresh
|
@@ -239,15 +237,16 @@ module RSpec
|
|
239
237
|
RSpec.configuration.formatter = Spec::Runner::Formatter::TeamcityFormatter
|
240
238
|
|
241
239
|
# Run.
|
242
|
-
|
240
|
+
@runner.run
|
241
|
+
ensure
|
242
|
+
@runner = nil
|
243
|
+
ENV['DISABLE_PRY'] = disable_pry
|
243
244
|
|
244
245
|
# Reset
|
245
246
|
RSpec.clear_examples
|
246
247
|
RSpec.reset
|
247
248
|
@config_cache.replay_configuration
|
248
249
|
end
|
249
|
-
ensure
|
250
|
-
ENV['DISABLE_PRY'] = disable_pry
|
251
250
|
end
|
252
251
|
end
|
253
252
|
|
@@ -259,8 +258,8 @@ module RSpec
|
|
259
258
|
end
|
260
259
|
end
|
261
260
|
|
262
|
-
def self.eval(&block)
|
263
|
-
if Thread.current.thread_variable_get('holding_lock')
|
261
|
+
def self.eval(line, options, &block)
|
262
|
+
if line.nil? || Thread.current.thread_variable_get('holding_lock')
|
264
263
|
yield
|
265
264
|
else
|
266
265
|
@command_mutex.synchronize do
|
@@ -271,10 +270,6 @@ module RSpec
|
|
271
270
|
end
|
272
271
|
@startup_thread.join
|
273
272
|
@startup_thread = nil
|
274
|
-
unless @startup_output.string.empty?
|
275
|
-
@output_stream.puts(@startup_output.string)
|
276
|
-
end
|
277
|
-
@startup_output = nil
|
278
273
|
end
|
279
274
|
yield
|
280
275
|
ensure
|