Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (69 sloc) 2.65 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|
cae51ac @nicksieger Bump version to 1.5.3
nicksieger authored
45 t.rcov_opts << '--exclude gems/*'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
46 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
47 end
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
48 # so we don't confuse autotest
49 RCov::VerifyTask.new(:rcov) do |t|
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
50 # Can't get threshold up to 100 unless RSpec backwards compatibility
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
51 # code is dropped
5b0c3bd @nicksieger Add backward compatibility method
nicksieger authored
52 t.threshold = 98
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
53 t.require_exact_threshold = false
54 end
55 task "spec:rcov" do
56 rm_f "Manifest.txt"
57 end
58 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
59
60 task :generate_output do
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
61 rm_f "acceptance/reports/*.xml"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
62 ENV['CI_REPORTS'] = "acceptance/reports"
63 begin
64 `ruby -Ilib acceptance/test_unit_example_test.rb` rescue nil
65 `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…
mathie authored
66 `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
67 ensure
68 ENV.delete 'CI_REPORTS'
69 end
70 end
71 task :acceptance => :generate_output
72
73 Spec::Rake::SpecTask.new(:acceptance_spec) do |t|
74 t.spec_files = FileList['acceptance/verification_spec.rb']
75 end
76 task :acceptance => :acceptance_spec
77
78 task :default => :acceptance
Something went wrong with that request. Please try again.