Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 84 lines (74 sloc) 2.722 kb
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
1 require 'spec/rake/spectask'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
2 require 'spec/rake/verify_rcov'
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
3
126c307 @nicksieger - Prepping 1.2.1 release
nicksieger authored
4 MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt", "Rakefile",
35308f1 @nicksieger Move stub.rake to top directory, and update release notes and documentat...
nicksieger authored
5 "*.rake", "lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
6
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
7 begin
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
8 File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
9 require 'hoe'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
10 require File.dirname(__FILE__) + '/lib/ci/reporter/version'
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
11 hoe = Hoe.spec("ci_reporter") do |p|
12 p.version = CI::Reporter::VERSION
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
13 p.rubyforge_name = "caldersphere"
14 p.url = "http://caldersphere.rubyforge.org/ci_reporter"
15 p.author = "Nick Sieger"
16 p.email = "nick@nicksieger.com"
17 p.summary = "CI::Reporter allows you to generate reams of XML for use with continuous integration systems."
18 p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
19 p.description = p.paragraphs_of('README.txt', 0...1).join("\n\n")
20 p.extra_deps.reject!{|d| d.first == "hoe"}
21 p.test_globs = ["spec/**/*_spec.rb"]
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
22 p.extra_deps << ['builder', ">= 2.1.2"]
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
23 end
24 hoe.spec.files = MANIFEST
25 hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
26 rescue LoadError
27 puts "You really need Hoe installed to be able to package this gem"
28 end
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
29
30 # Hoe insists on setting task :default => :test
31 # !@#$ no easy way to empty the default list of prerequisites
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
32 # Leave my tasks alone, Hoe
33 %w(default spec rcov).each do |task|
34 Rake::Task[task].prerequisites.clear
35 Rake::Task[task].actions.clear
36 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
37
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
38 # No RCov on JRuby at the moment
39 if RUBY_PLATFORM =~ /java/
40 task :default => :spec
41 else
42 task :default => :rcov
43 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
44
551dcd3 @nicksieger - add spec for attributes that need to be escaped
nicksieger authored
45 Spec::Rake::SpecTask.new do |t|
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
46 t.spec_opts = ["--diff", "unified"]
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
47 end
48
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
49 Spec::Rake::SpecTask.new("spec:rcov") do |t|
cae51ac @nicksieger Bump version to 1.5.3
nicksieger authored
50 t.rcov_opts << '--exclude gems/*'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
51 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
52 end
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
53 # so we don't confuse autotest
54 RCov::VerifyTask.new(:rcov) do |t|
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
55 # Can't get threshold up to 100 unless RSpec backwards compatibility
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
56 # code is dropped
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
57 t.threshold = 98
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
58 t.require_exact_threshold = false
59 end
60 task "spec:rcov" do
61 rm_f "Manifest.txt"
62 end
63 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
64
65 task :generate_output do
8498d2c @mathie Turns out that the reports directory isn't getting nuked between test ru...
mathie authored
66 rm_rf "acceptance/reports"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
67 ENV['CI_REPORTS'] = "acceptance/reports"
68 begin
69 `ruby -Ilib acceptance/test_unit_example_test.rb` rescue nil
70 `ruby -Ilib -S spec --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue nil
e0cf0f0 @mathie We have to require the cucumber loader slightly differently otherwise it...
mathie authored
71 `ruby -Ilib -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber` rescue nil
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
72 ensure
73 ENV.delete 'CI_REPORTS'
74 end
75 end
76 task :acceptance => :generate_output
77
78 Spec::Rake::SpecTask.new(:acceptance_spec) do |t|
79 t.spec_files = FileList['acceptance/verification_spec.rb']
80 end
81 task :acceptance => :acceptance_spec
82
83 task :default => :acceptance
Something went wrong with that request. Please try again.