diff --git a/lib/rspecq/worker.rb b/lib/rspecq/worker.rb index 42a334d..a4421d3 100644 --- a/lib/rspecq/worker.rb +++ b/lib/rspecq/worker.rb @@ -163,13 +163,10 @@ def reset_rspec_state! # Their errors will be reported in the normal flow, when they're picked up # as jobs by a worker. def files_to_example_ids(files) - # TODO: do this programatically - cmd = "DISABLE_SPRING=1 bundle exec rspec --dry-run --format json #{files.join(' ')}" + cmd = "DISABLE_SPRING=1 bundle exec rspec --dry-run --format json #{files.join(' ')} 2>&1" out = `#{cmd}` if !$?.success? - puts out - puts $?.inspect rspec_output = begin JSON.parse(out) rescue JSON::ParserError @@ -184,7 +181,6 @@ def files_to_example_ids(files) ) pp rspec_output - puts return files end @@ -201,6 +197,8 @@ def elapsed(since) Process.clock_gettime(Process::CLOCK_MONOTONIC) - since end + # Prints msg to standard output and emits an event to Sentry, if the + # SENTRY_DSN environment variable is set. def log_event(msg, level, additional={}) puts msg