public
Description: Warbler chirpily constructs .war files of your Rails applications.
Homepage: http://warbler.kenai.com/pages/Home
Clone URL: git://github.com/nicksieger/warbler.git
nicksieger (author)
Wed Aug 26 17:45:54 -0700 2009
commit  77d54b4a28a855c6f79ac42092e66e87ff320d56
tree    1b9516fc2c740ef8e0748882db5af232e3222d3e
parent  fc8ac1c54371ccf4cca28866964f83a6ea1ec1f5
warbler / Rakefile
100644 60 lines (50 sloc) 1.924 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
 
MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSES.txt", "Rakefile",
  "*.erb", "bin/*", "generators/**/*", "lib/**/*", "spec/**/*.rb", "tasks/**/*.rake"]
 
begin
  File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
  require 'hoe'
  require File.dirname(__FILE__) + '/lib/warbler/version'
  hoe = Hoe.spec("warbler") do |p|
    p.version = Warbler::VERSION
    p.rubyforge_name = "caldersphere"
    p.url = "http://caldersphere.rubyforge.org/warbler"
    p.author = "Nick Sieger"
    p.email = "nick@nicksieger.com"
    p.summary = "Warbler chirpily constructs .war files of your Rails applications."
    p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
    p.description = p.paragraphs_of('README.txt', 1...2).join("\n\n")
    p.extra_deps += [['rake', '>= 0.7.3'], ['jruby-jars', '>= 1.3.1']]
    p.test_globs = ["spec/**/*_spec.rb"]
  end
  hoe.spec.files = MANIFEST
  hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
 
  task :gemspec do
    File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
  end
  task :package => :gemspec
rescue LoadError
  puts "You really need Hoe installed to be able to package this gem"
end
 
# Hoe insists on setting task :default => :test
# !@#$ no easy way to empty the default list of prerequisites
Rake::Task['default'].send :instance_variable_set, "@prerequisites", FileList[]
Rake::Task['default'].send :instance_variable_set, "@actions", []
 
if defined?(JRUBY_VERSION)
  task :default => :spec
else
  task :default => :rcov_verify
end
 
Spec::Rake::SpecTask.new do |t|
  t.spec_opts ||= []
  t.spec_opts << "--options" << "spec/spec.opts"
end
 
Spec::Rake::SpecTask.new("spec:rcov") do |t|
  t.rcov = true
end
 
# so we don't confuse autotest
RCov::VerifyTask.new(:rcov_verify) do |t|
  t.threshold = 100
end
 
task :rcov_verify => "spec:rcov"