Permalink
Browse files

Remove dependency on rubygems when requiring builder (rescue LoadError).

  • Loading branch information...
1 parent 58f9973 commit ad6d666c136a4376a80fffdee1b766c236c96d19 @jarib jarib committed Oct 28, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/ci/reporter/test_suite.rb
@@ -65,8 +65,12 @@ def finish
# Creates the xml builder instance used to create the report xml document.
def create_builder
- require 'rubygems'
- gem 'builder'
+ begin
+ require 'rubygems'
+ gem 'builder'
+ rescue LoadError
+ end
+
require 'builder'
# :escape_attrs is obsolete in a newer version, but should do no harm
Builder::XmlMarkup.new(:indent => 2, :escape_attrs => true)

0 comments on commit ad6d666

Please sign in to comment.