Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
More cleanup - require rubygems outside of the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksieger committed Oct 12, 2010
1 parent 82063df commit bfdf923
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Rakefile
Expand Up @@ -70,7 +70,7 @@ begin
RCov::VerifyTask.new(:rcov) do |t| RCov::VerifyTask.new(:rcov) do |t|
# Can't get threshold up to 100 unless RSpec backwards compatibility # Can't get threshold up to 100 unless RSpec backwards compatibility
# code is dropped # code is dropped
t.threshold = 98 t.threshold = 95
t.require_exact_threshold = false t.require_exact_threshold = false
end end
rescue LoadError rescue LoadError
Expand All @@ -85,9 +85,9 @@ task :generate_output do
rm_rf "acceptance/reports" rm_rf "acceptance/reports"
ENV['CI_REPORTS'] = "acceptance/reports" ENV['CI_REPORTS'] = "acceptance/reports"
begin begin
`ruby -Ilib -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb` rescue puts "Warning: #{$!}" `ruby -Ilib -rubygems -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb` rescue puts "Warning: #{$!}"
`ruby -Ilib -S #{@spec_bin} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue puts "Warning: #{$!}" `ruby -Ilib -rubygems -S #{@spec_bin} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue puts "Warning: #{$!}"
`ruby -Ilib -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber` rescue puts "Warning: #{$!}" `ruby -Ilib -rubygems -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber` rescue puts "Warning: #{$!}"
ensure ensure
ENV.delete 'CI_REPORTS' ENV.delete 'CI_REPORTS'
end end
Expand Down
9 changes: 1 addition & 8 deletions lib/ci/reporter/cucumber.rb
Expand Up @@ -3,17 +3,10 @@
# software license details. # software license details.


require 'ci/reporter/core' require 'ci/reporter/core'
tried_gem = false require 'cucumber'
begin begin
require 'cucumber'
require 'cucumber/ast/visitor' require 'cucumber/ast/visitor'
rescue LoadError rescue LoadError
unless tried_gem
tried_gem = true
require 'rubygems'
gem 'cucumber'
retry
end
end end


module CI module CI
Expand Down
6 changes: 0 additions & 6 deletions lib/ci/reporter/test_suite.rb
Expand Up @@ -66,12 +66,6 @@ def finish


# Creates the xml builder instance used to create the report xml document. # Creates the xml builder instance used to create the report xml document.
def create_builder def create_builder
begin
require 'rubygems'
gem 'builder'
rescue LoadError
end

require 'builder' require 'builder'
# :escape_attrs is obsolete in a newer version, but should do no harm # :escape_attrs is obsolete in a newer version, but should do no harm
Builder::XmlMarkup.new(:indent => 2, :escape_attrs => true) Builder::XmlMarkup.new(:indent => 2, :escape_attrs => true)
Expand Down

0 comments on commit bfdf923

Please sign in to comment.