Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (90 sloc) 3.21 kB
126c307 @nicksieger - Prepping 1.2.1 release
nicksieger authored
1 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
2 "*.rake", "lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
3
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
4 begin
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
5 File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
6 require 'hoe'
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
7 require File.dirname(__FILE__) + '/lib/ci/reporter/version'
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
8 hoe = Hoe.spec("ci_reporter") do |p|
9 p.version = CI::Reporter::VERSION
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
10 p.rubyforge_name = "caldersphere"
11 p.url = "http://caldersphere.rubyforge.org/ci_reporter"
12 p.author = "Nick Sieger"
13 p.email = "nick@nicksieger.com"
14 p.summary = "CI::Reporter allows you to generate reams of XML for use with continuous integration systems."
15 p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
16 p.description = p.paragraphs_of('README.txt', 0...1).join("\n\n")
17 p.extra_deps.reject!{|d| d.first == "hoe"}
18 p.test_globs = ["spec/**/*_spec.rb"]
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
19 p.extra_deps << ['builder', ">= 2.1.2"]
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
20 end
21 hoe.spec.files = MANIFEST
22 hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
a5302a5 @nicksieger Update README dates and switch to Darkfish RDoc
nicksieger authored
23 hoe.spec.rdoc_options += ["-SHN", "-f", "darkfish"]
24
25 task :gemspec do
26 File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
27 end
28 task :package => :gemspec
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
29 rescue LoadError
30 puts "You really need Hoe installed to be able to package this gem"
31 end
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
32
33 # Hoe insists on setting task :default => :test
34 # !@#$ no easy way to empty the default list of prerequisites
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
35 # Leave my tasks alone, Hoe
36 %w(default spec rcov).each do |task|
fc3cef0 @nicksieger Get working with modern Cucumber, drop support for 0.3
nicksieger authored
37 next unless Rake::Task.task_defined?(task)
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
38 Rake::Task[task].prerequisites.clear
39 Rake::Task[task].actions.clear
40 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
41
28d371d @nicksieger Tagging 1.5.1
nicksieger authored
42 # No RCov on JRuby at the moment
43 if RUBY_PLATFORM =~ /java/
44 task :default => :spec
45 else
46 task :default => :rcov
47 end
f30cd1b @nicksieger - first version of junit report formatter; should be able to be
nicksieger authored
48
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
49 RSpecTask = begin
50 require 'rspec/core/rake_task'
51 @spec_bin = 'rspec'
52 RSpec::Core::RakeTask
53 rescue LoadError
54 require 'spec/rake/spectask'
55 @spec_bin = 'spec'
56 Spec::Rake::SpecTask
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
57 end
58
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
59 RSpecTask.new do |t|
60 end
61
62 RSpecTask.new("spec:rcov") do |t|
63 t.rcov_opts = ['--exclude gems/*']
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
64 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
65 end
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
66
67 begin
68 require 'spec/rake/verify_rcov'
69 # so we don't confuse autotest
70 RCov::VerifyTask.new(:rcov) do |t|
71 # Can't get threshold up to 100 unless RSpec backwards compatibility
72 # code is dropped
bfdf923 @nicksieger More cleanup - require rubygems outside of the codebase
nicksieger authored
73 t.threshold = 95
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
74 t.require_exact_threshold = false
75 end
76 rescue LoadError
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
77 end
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
78
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
79 task "spec:rcov" do
80 rm_f "Manifest.txt"
81 end
82 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
83
84 task :generate_output do
8498d2c @mathie Turns out that the reports directory isn't getting nuked between test…
mathie authored
85 rm_rf "acceptance/reports"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
86 ENV['CI_REPORTS'] = "acceptance/reports"
87 begin
bfdf923 @nicksieger More cleanup - require rubygems outside of the codebase
nicksieger authored
88 `ruby -Ilib -rubygems -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb` rescue puts "Warning: #{$!}"
89 `ruby -Ilib -rubygems -S #{@spec_bin} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue puts "Warning: #{$!}"
90 `ruby -Ilib -rubygems -rci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber acceptance/cucumber` rescue puts "Warning: #{$!}"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
91 ensure
92 ENV.delete 'CI_REPORTS'
93 end
94 end
95 task :acceptance => :generate_output
96
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
97 RSpecTask.new(:acceptance_spec) do |t|
98 t.pattern = FileList['acceptance/verification_spec.rb']
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
99 end
100 task :acceptance => :acceptance_spec
101
102 task :default => :acceptance
Something went wrong with that request. Please try again.