Rakefile in ci_reporter-1.6.5 vs Rakefile in ci_reporter-1.6.6
- old
+ new
@@ -1,23 +1,27 @@
-MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt", "Rakefile",
+require 'bundler/setup'
+
+MANIFEST = FileList["History.txt", "Manifest.txt", "README.rdoc", "LICENSE.txt", "Rakefile",
"*.rake", "lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
begin
File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
require 'hoe'
Hoe.plugin :rubyforge
require File.dirname(__FILE__) + '/lib/ci/reporter/version'
hoe = Hoe.spec("ci_reporter") do |p|
p.version = CI::Reporter::VERSION
p.rubyforge_name = "caldersphere"
+ p.readme_file = "README.rdoc"
p.url = "http://caldersphere.rubyforge.org/ci_reporter"
p.author = "Nick Sieger"
p.email = "nick@nicksieger.com"
+ p.readme_file = 'README.rdoc'
p.summary = "CI::Reporter allows you to generate reams of XML for use with continuous integration systems."
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
- p.description = p.paragraphs_of('README.txt', 0...1).join("\n\n")
- p.extra_deps.reject!{|d| d.first == "hoe"}
+ p.description = p.paragraphs_of('README.rdoc', 0...1).join("\n\n")
+ p.extra_rdoc_files += ["README.rdoc"]
p.test_globs = ["spec/**/*_spec.rb"]
p.extra_deps << ['builder', ">= 2.1.2"]
end
hoe.spec.files = MANIFEST
hoe.spec.rdoc_options += ["-SHN", "-f", "darkfish"]
@@ -82,14 +86,22 @@
task :rcov => "spec:rcov"
task :generate_output do
rm_rf "acceptance/reports"
ENV['CI_REPORTS'] = "acceptance/reports"
+ if ENV['RUBYOPT']
+ opts = ENV['RUBYOPT']
+ ENV['RUBYOPT'] = nil
+ else
+ opts = "-rubygems"
+ end
begin
- `ruby -Ilib -rubygems -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.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 -rubygems -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber` rescue puts "Warning: #{$!}"
+ result_proc = proc {|ok,*| puts "Failures above are expected." unless ok }
+ ruby "-Ilib #{opts} -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb", &result_proc
+ ruby "-Ilib #{opts} -S #{@spec_bin} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb", &result_proc
+ ruby "-Ilib #{opts} -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber", &result_proc
ensure
+ ENV['RUBYOPT'] = opts if opts != "-rubygems"
ENV.delete 'CI_REPORTS'
end
end
task :acceptance => :generate_output