Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 90 lines (79 sloc) 2.901 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" }
a5302a5 @nicksieger Update README dates and switch to Darkfish RDoc
nicksieger authored
26 hoe.spec.rdoc_options += ["-SHN", "-f", "darkfish"]
27
28 task :gemspec do
29 File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
30 end
31 task :package => :gemspec
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
32 rescue LoadError
33 puts "You really need Hoe installed to be able to package this gem"
34 end
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
35
36 # Hoe insists on setting task :default => :test
37 # !@#$ no easy way to empty the default list of prerequisites
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
38 # Leave my tasks alone, Hoe
39 %w(default spec rcov).each do |task|
40 Rake::Task[task].prerequisites.clear
41 Rake::Task[task].actions.clear
42 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
43
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
44 # No RCov on JRuby at the moment
45 if RUBY_PLATFORM =~ /java/
46 task :default => :spec
47 else
48 task :default => :rcov
49 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
50
551dcd3 @nicksieger - add spec for attributes that need to be escaped
nicksieger authored
51 Spec::Rake::SpecTask.new do |t|
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
52 t.spec_opts = ["--diff", "unified"]
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
53 end
54
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
55 Spec::Rake::SpecTask.new("spec:rcov") do |t|
cae51ac @nicksieger Bump version to 1.5.3
nicksieger authored
56 t.rcov_opts << '--exclude gems/*'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
57 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
58 end
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
59 # so we don't confuse autotest
60 RCov::VerifyTask.new(:rcov) do |t|
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
61 # Can't get threshold up to 100 unless RSpec backwards compatibility
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
62 # code is dropped
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
63 t.threshold = 98
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
64 t.require_exact_threshold = false
65 end
66 task "spec:rcov" do
67 rm_f "Manifest.txt"
68 end
69 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
70
71 task :generate_output do
8498d2c @mathie Turns out that the reports directory isn't getting nuked between test ru...
mathie authored
72 rm_rf "acceptance/reports"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
73 ENV['CI_REPORTS'] = "acceptance/reports"
74 begin
75 `ruby -Ilib acceptance/test_unit_example_test.rb` rescue nil
76 `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
77 `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
78 ensure
79 ENV.delete 'CI_REPORTS'
80 end
81 end
82 task :acceptance => :generate_output
83
84 Spec::Rake::SpecTask.new(:acceptance_spec) do |t|
85 t.spec_files = FileList['acceptance/verification_spec.rb']
86 end
87 task :acceptance => :acceptance_spec
88
89 task :default => :acceptance
Something went wrong with that request. Please try again.