cyperful 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c54a2f9266b145a049ddf720e90e50ec1250867ab51b51b046792ec36f57438a
4
- data.tar.gz: a6dfac785f965f733c9b5fe41ea99c2437972f1a63dbbb346dfa822f6c2f187b
3
+ metadata.gz: a0cc8a2ac49a7d7223268f31ec69e960e1fa5bf48fa98a92a5f3adc7b14776f7
4
+ data.tar.gz: 73be4bde0f5750a4366814527e890a9425764b885c4c72e5bea3717a9dfb6fa6
5
5
  SHA512:
6
- metadata.gz: 79c77ab5eb6c05c9eb4531964b545ad2580e2a2e8a188835ec7bc5d261087eb05603faaa9ea7fbc16509f4c3e9675c1750bdf96e23c42716e2efcbae93715fab
7
- data.tar.gz: 23bb98e1e7e6bb5f2939461ecfdf7b66bd5d04f06b449696c7ebacde7b8bf4b69396a48451fc3d3fe5e7aa5f199955bab4beaaadc6524c38c05003678998a0b7
6
+ metadata.gz: 3b67bf8da9159ff69167d5397a6e87f04980df7504cd46946710d8f28e3ead1a2ccf43738060c38552542d841ae76c6df70bda92d0e20fb9d5f9fc3395551f08
7
+ data.tar.gz: 5c3cdef286ca10f0f609f3cfd550c138747fa71af31ed9a8ed73006f8b422d46d1b75492383d6f1be83bf6c8ab196e4584522bbeacffa5f9a385920ece28ca06
@@ -301,18 +301,18 @@ class Cyperful::Driver
301
301
  @cyperful_origin = @ui_server.url_origin
302
302
 
303
303
  @ui_server.on_command do |command, params|
304
- case command
305
- when "start"
304
+ case command.to_sym
305
+ when :start
306
306
  # one of: integer (index of a step), true (pause at every step), or nil (don't pause)
307
307
  @pause_at_step = params["pause_at_step"]
308
308
 
309
309
  continue_next_step
310
- when "reset"
310
+ when :reset
311
311
  @pause_at_step = true
312
312
  @step_pausing_queue.enq(:reset)
313
- when "stop"
313
+ when :stop
314
314
  @pause_at_step = true # enable pausing
315
- when "exit"
315
+ when :exit
316
316
  @pause_at_step = true
317
317
 
318
318
  # instead of calling `exit` directly, we need to raise a Cyperful::ExitCommand error
@@ -352,13 +352,13 @@ class Cyperful::Driver
352
352
  if error
353
353
  # get the 4 lines following the first line that includes the source file
354
354
  i = nil
355
- backtrace =
356
- error.backtrace.select do |s|
357
- i ||= 0 if s.include?(@source_filepath)
358
- i += 1 if i
359
- break if i && i > 4
360
- true
361
- end
355
+ backtrace = []
356
+ error.backtrace.each do |s|
357
+ i ||= 0 if s.include?(@source_filepath)
358
+ i += 1 if i
359
+ break if i && i > 4
360
+ backtrace << s
361
+ end
362
362
 
363
363
  warn "\n\nTest failed with error:\n#{error.message}\n#{backtrace.join("\n")}"
364
364
  end