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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 448fb430c0970d2d6f3dc12a3a1b6577dde234516d0d7f3fdccc735be784919b
4
- data.tar.gz: 650d41f575295fb43d1c97930ae49e4a7fe34aac1d4cb1ca2a7d3fe6a1cb25c6
3
+ metadata.gz: 19e7c3fad7abad85f3523490ddfcfd3d6091e042d99fd940c6a9a19991e7dc06
4
+ data.tar.gz: 02d25e506765d4f0c40b8b3e64ae751f6da34e06af9e845830bdc05071fc8112
5
5
  SHA512:
6
- metadata.gz: d5a4b51199209d0d248e1fc26a2d7e3cb4abf993eb2a61775162eda5107a2a97529bdd58867cb1e870a9c10f9da7c3ef60ce0ccd4ad484f6f900f9c2b0708a6f
7
- data.tar.gz: f57523af399e9ca55303101479fbc0940c60095a0ffe93a2092255954fe5be3003bfc82c41c7a416df72a12d72fd4aae0d578b5d7f6da85c1385a9f620950227
6
+ metadata.gz: 89b49ff9d0e888b8304e0c70a2fded4dd780381750fed960af5f282246accc6ae6d52eb71c5402d2be31bfb9a827c64e04cffcb7f4935d12d97e3d632843a8bf
7
+ data.tar.gz: 36320560582c44d1459e0590aa469f56e70b5411d8c3c88a499ca9f46c5075163aa3778869f65bb5cfd85dc3fc7dd196fff65c87733b5b0057352353583215c6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-interactive (0.9.5)
4
+ rspec-interactive (0.9.6)
5
5
  listen
6
6
  pry
7
7
  rspec-core
@@ -4,7 +4,7 @@ class Pry
4
4
  alias_method :old_eval, :eval
5
5
 
6
6
  def eval(line, options = {})
7
- RSpec::Interactive.eval do
7
+ RSpec::Interactive.eval(line, options) do
8
8
  old_eval(line, options)
9
9
  end
10
10
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Interactive
5
- VERSION = "0.9.6"
5
+ VERSION = "0.9.7"
6
6
  end
7
7
  end
@@ -61,11 +61,8 @@ module RSpec
61
61
  configure_pry
62
62
 
63
63
  @startup_thread = Thread.start do
64
- @startup_output = StringOutput.new
65
- Stdio.capture2(stdout: @startup_output, stderr: @startup_output) do
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
- exit_code = @runner.run
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
- # Prevent the debugger from being used. The server isn't interactive.
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
- exit_code = @runner.run
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-interactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Dower