Permalink
Browse files

1.2.2 release: CI_CAPTURE to control stdout/stderr capture

git-svn-id: http://svn.caldersphere.net/svn/main/rubyforge/ci_reporter/trunk@83 b03c2d0b-2f10-0410-a2f9-fc8001506dfa
  • Loading branch information...
1 parent 5b94fd3 commit a26f68c75de0e31480fc5004b7e17b745a5f9b28 @nicksieger nicksieger committed Apr 4, 2007
Showing with 16 additions and 5 deletions.
  1. +4 −0 History.txt
  2. +5 −0 README.txt
  3. +1 −1 Rakefile
  4. +6 −4 lib/ci/reporter/test_suite.rb
View
@@ -1,3 +1,7 @@
+== 1.2.2
+
+- Responds to environment variable CI_CAPTURE: if set to "off", stdout/stderr capture will be disabled.
+
== 1.2.1
- Add license and copyright information (finally)
View
@@ -42,6 +42,11 @@ If for some reason you can't use the above technique to inject CI::Reporter (e.g
There's a bit of a chicken and egg problem because rubygems needs to be loaded before you can require any CI::Reporter files. If you cringe hard-coding a full path to a specific version of the gem, you can also copy the +rspec_loader+ file into your project and require it directly -- the contents are version-agnostic and are not likely to change in future releases.
+== Environment Variables
+
+* +CI_REPORTS+: if set, points to a directory where report files will be written.
+* +CI_CAPTURE+: if set to value "off", stdout/stderr capture will be disabled.
+
== License
This software is released under an MIT license. For details, see the LICENSE.txt file included with the distribution. The software is copyright (c) 2006-2007 Nick Sieger <nicksieger@gmail.com>.
View
@@ -4,7 +4,7 @@ require 'hoe'
MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt", "Rakefile",
"lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
-Hoe.new("ci_reporter", "1.3") do |p|
+Hoe.new("ci_reporter", "1.2.2") do |p|
p.rubyforge_name = "caldersphere"
p.url = "http://caldersphere.rubyforge.org/ci_reporter"
p.author = "Nick Sieger"
@@ -47,8 +47,10 @@ def initialize(name)
# Starts timing the test suite.
def start
@start = Time.now
- @capture_out = OutputCapture.new($stdout) {|io| $stdout = io }
- @capture_err = OutputCapture.new($stderr) {|io| $stderr = io }
+ unless ENV['CI_CAPTURE'] == "off"
+ @capture_out = OutputCapture.new($stdout) {|io| $stdout = io }
+ @capture_err = OutputCapture.new($stderr) {|io| $stderr = io }
+ end
end
# Finishes timing the test suite.
@@ -57,8 +59,8 @@ def finish
self.time = Time.now - @start
self.failures = testcases.select {|tc| tc.failure? }.size
self.errors = testcases.select {|tc| tc.error? }.size
- self.stdout = @capture_out.finish
- self.stderr = @capture_err.finish
+ self.stdout = @capture_out.finish if @capture_out
+ self.stderr = @capture_err.finish if @capture_err
end
# Creates the xml builder instance used to create the report xml document.

0 comments on commit a26f68c

Please sign in to comment.