Rakefile in sinatra-0.1.7 vs Rakefile in sinatra-0.2.0
- old
+ new
@@ -1,35 +1,29 @@
+require 'rubygems'
require 'rake/testtask'
-require 'ftools'
+require 'rake/rdoctask'
+require 'echoe'
-Version = '0.1.0'
+task :default => :test
-begin
- require 'rubygems'
- gem 'echoe'
- ENV['RUBY_FLAGS'] = ""
- require 'echoe'
+Rake::RDocTask.new do |rd|
+ rd.main = "README.rdoc"
+ rd.rdoc_files += ["README.rdoc"]
+ rd.rdoc_files += Dir.glob("lib/**/*.rb")
+ rd.rdoc_dir = 'doc'
+end
- Echoe.new('sinatra') do |p|
- p.rubyforge_name = 'sinatra'
- p.dependencies = ['mongrel >=1.0.1', 'rack >=0.2.0']
- p.summary = "Sinatra is a classy web-framework dressed in a DSL"
- p.description = "Sinatra is a classy web-framework dressed in a DSL"
- p.url = "http://sinatra.rubyforge.org/"
- p.author = 'Blake Mizerany'
- p.email = "blake.mizerany@gmail.com"
- p.test_pattern = 'test/**/*_test.rb'
- p.include_rakefile = true
- p.rdoc_pattern = ['README', 'LICENSE'] + Dir.glob('lib/**/*.rb') + Dir.glob('vendor/**/*.rb')
- p.docs_host = "bmizerany@rubyforge.org:/var/www/gforge-projects/"
- end
-
-rescue LoadError
+Rake::TestTask.new do |t|
+ ENV['SINATRA_ENV'] = 'test'
+ t.pattern = File.dirname(__FILE__) + "/test/*_test.rb"
end
-desc 'Clear all the log files from here down'
-task :remove_logs do
- Dir.glob(Dir.pwd + '/**/*.log') do |logfile|
- FileUtils.rm(logfile)
- puts 'Removed: %s' % logfile
- end
+Echoe.new("sinatra") do |p|
+ p.author = "Blake Mizerany"
+ p.summary = "Classy web-development dressed in a DSL"
+ p.url = "http://www.sinatrarb.com"
+ p.docs_host = "sinatrarb.com:/var/www/blakemizerany.com/public/docs/"
+ p.dependencies = ["mongrel >=1.0.1", "rack >= 0.3.0"]
+ p.install_message = "*** Be sure to checkout the site for helpful tips! sinatrarb.com ***"
+ p.include_rakefile = true
end
+