Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 77 lines (67 sloc) 2.486 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 documen…
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'
138c9b9 @nicksieger Updated for 1.3.5 release
nicksieger authored
11 hoe = Hoe.new("ci_reporter", CI::Reporter::VERSION) do |p|
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
12 p.rubyforge_name = "caldersphere"
13 p.url = "http://caldersphere.rubyforge.org/ci_reporter"
14 p.author = "Nick Sieger"
15 p.email = "nick@nicksieger.com"
16 p.summary = "CI::Reporter allows you to generate reams of XML for use with continuous integration systems."
17 p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
18 p.description = p.paragraphs_of('README.txt', 0...1).join("\n\n")
19 p.extra_deps.reject!{|d| d.first == "hoe"}
20 p.test_globs = ["spec/**/*_spec.rb"]
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
21 p.extra_deps << ['builder', ">= 2.1.2"]
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
22 end
23 hoe.spec.files = MANIFEST
24 hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
25 rescue LoadError
26 puts "You really need Hoe installed to be able to package this gem"
27 end
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
28
29 # Hoe insists on setting task :default => :test
30 # !@#$ no easy way to empty the default list of prerequisites
31 Rake::Task['default'].send :instance_variable_set, "@prerequisites", FileList[]
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
32
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
33 # No RCov on JRuby at the moment
34 if RUBY_PLATFORM =~ /java/
35 task :default => :spec
36 else
37 task :default => :rcov
38 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
39
551dcd3 @nicksieger - add spec for attributes that need to be escaped
nicksieger authored
40 Spec::Rake::SpecTask.new do |t|
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
41 t.spec_opts = ["--diff", "unified"]
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
42 end
43
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
44 Spec::Rake::SpecTask.new("spec:rcov") do |t|
45 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
46 end
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
47 # so we don't confuse autotest
48 RCov::VerifyTask.new(:rcov) do |t|
49 # Can't get threshold up to 100 until the RSpec < 1.0 compatibility
50 # code is dropped
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
51 t.threshold = 99
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
52 t.require_exact_threshold = false
53 end
54 task "spec:rcov" do
55 rm_f "Manifest.txt"
56 end
57 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
58
59 task :generate_output do
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
60 rm_f "acceptance/reports/*.xml"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
61 ENV['CI_REPORTS'] = "acceptance/reports"
62 begin
63 `ruby -Ilib acceptance/test_unit_example_test.rb` rescue nil
64 `ruby -Ilib -S spec --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue nil
65 ensure
66 ENV.delete 'CI_REPORTS'
67 end
68 end
69 task :acceptance => :generate_output
70
71 Spec::Rake::SpecTask.new(:acceptance_spec) do |t|
72 t.spec_files = FileList['acceptance/verification_spec.rb']
73 end
74 task :acceptance => :acceptance_spec
75
76 task :default => :acceptance
Something went wrong with that request. Please try again.