Rakefile in tabs_on_rails-1.1.0 vs Rakefile in tabs_on_rails-1.2.0
- old
+ new
@@ -80,11 +80,11 @@
task :gemspec do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, "w") {|f| f << spec.to_ruby }
end
-desc "Remove any temporary products, including gemspec."
+desc "Remove any temporary products, including gemspec"
task :clean => [:clobber] do
rm "#{spec.name}.gemspec"
end
desc "Remove any generated file"
@@ -94,11 +94,11 @@
task :package => [:gemspec]
begin
require "rcov/rcovtask"
- desc "Create a code coverage report."
+ desc "Create a code coverage report"
Rcov::RcovTask.new do |t|
t.test_files = FileList["test/**/*_test.rb"]
t.ruby_opts << "-Itest -x mocha,rcov,Rakefile"
t.verbose = true
end
@@ -115,6 +115,12 @@
CodeStatistics.new(["TabsOnRails", "lib"],
["Tests", "test"]).to_s
end
rescue LoadError
puts "CodeStatistics (Rails) is not available"
+end
+
+desc "Publish documentation to the site"
+task :publish_rdoc => [:clobber_rdoc, :rdoc] do
+ ENV["username"] || raise(ArgumentError, "Missing ssh username")
+ sh "rsync -avz --delete rdoc/ #{ENV["username"]}@code:/var/www/apps/code/#{PKG_NAME}/api"
end