Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 105 lines (92 sloc) 3.25 kb
f29353a @nicksieger More changes for README extension rename
nicksieger authored
1 MANIFEST = FileList["History.txt", "Manifest.txt", "README.rdoc", "LICENSE.txt", "Rakefile",
35308f1 @nicksieger Move stub.rake to top directory, and update release notes and documentat...
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'
847e42d @nicksieger Add a gemfile for easier install of dependencies
nicksieger authored
7 Hoe.plugin :rubyforge
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
8 require File.dirname(__FILE__) + '/lib/ci/reporter/version'
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
9 hoe = Hoe.spec("ci_reporter") do |p|
10 p.version = CI::Reporter::VERSION
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
11 p.rubyforge_name = "caldersphere"
f29353a @nicksieger More changes for README extension rename
nicksieger authored
12 p.readme_file = "README.rdoc"
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
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")
f29353a @nicksieger More changes for README extension rename
nicksieger authored
18 p.description = p.paragraphs_of('README.rdoc', 0...1).join("\n\n")
19 p.extra_rdoc_files += ["README.rdoc"]
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
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
a5302a5 @nicksieger Update README dates and switch to Darkfish RDoc
nicksieger authored
25 hoe.spec.rdoc_options += ["-SHN", "-f", "darkfish"]
26
27 task :gemspec do
28 File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
29 end
30 task :package => :gemspec
8a2ce16 @nicksieger Prepare for 1.3.2 release
nicksieger authored
31 rescue LoadError
32 puts "You really need Hoe installed to be able to package this gem"
33 end
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
34
35 # Hoe insists on setting task :default => :test
36 # !@#$ no easy way to empty the default list of prerequisites
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
37 # Leave my tasks alone, Hoe
38 %w(default spec rcov).each do |task|
fc3cef0 @nicksieger Get working with modern Cucumber, drop support for 0.3
nicksieger authored
39 next unless Rake::Task.task_defined?(task)
ef2e3dc @nicksieger Rakefile updated for recent hoe
nicksieger authored
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
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
51 RSpecTask = begin
52 require 'rspec/core/rake_task'
53 @spec_bin = 'rspec'
54 RSpec::Core::RakeTask
55 rescue LoadError
56 require 'spec/rake/spectask'
57 @spec_bin = 'spec'
58 Spec::Rake::SpecTask
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
59 end
60
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
61 RSpecTask.new do |t|
62 end
63
64 RSpecTask.new("spec:rcov") do |t|
65 t.rcov_opts = ['--exclude gems/*']
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
66 t.rcov = true
bfdcd21 @nicksieger - Prepare for 1.0 release; last set of changes in current svn location
nicksieger authored
67 end
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
68
69 begin
70 require 'spec/rake/verify_rcov'
71 # so we don't confuse autotest
72 RCov::VerifyTask.new(:rcov) do |t|
73 # Can't get threshold up to 100 unless RSpec backwards compatibility
74 # code is dropped
bfdf923 @nicksieger More cleanup - require rubygems outside of the codebase
nicksieger authored
75 t.threshold = 95
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
76 t.require_exact_threshold = false
77 end
78 rescue LoadError
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
79 end
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
80
1f39c76 @nicksieger - Make builder dependency explicit
nicksieger authored
81 task "spec:rcov" do
82 rm_f "Manifest.txt"
83 end
84 task :rcov => "spec:rcov"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
85
86 task :generate_output do
8498d2c @mathie Turns out that the reports directory isn't getting nuked between test ru...
mathie authored
87 rm_rf "acceptance/reports"
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
88 ENV['CI_REPORTS'] = "acceptance/reports"
89 begin
bfdf923 @nicksieger More cleanup - require rubygems outside of the codebase
nicksieger authored
90 `ruby -Ilib -rubygems -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb` rescue puts "Warning: #{$!}"
91 `ruby -Ilib -rubygems -S #{@spec_bin} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb` rescue puts "Warning: #{$!}"
92 `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
93 ensure
94 ENV.delete 'CI_REPORTS'
95 end
96 end
97 task :acceptance => :generate_output
98
423e7b5 @nicksieger The RSpec 2 upgrade. First pass, tests running under RSpec 1 and 2
nicksieger authored
99 RSpecTask.new(:acceptance_spec) do |t|
100 t.pattern = FileList['acceptance/verification_spec.rb']
6da80dc @nicksieger Add start of acceptance tests
nicksieger authored
101 end
102 task :acceptance => :acceptance_spec
103
104 task :default => :acceptance
Something went wrong with that request. Please try again.