Permalink
Browse files

Change :publish_docs task to deploy on my server instead of RubyGems.

  • Loading branch information...
weppos committed Jun 16, 2010
1 parent 04f5136 commit 1f4d4143ccff87b14b2b525492158e6e5f5a25a6
Showing with 14 additions and 0 deletions.
  1. +14 −0 Rakefile
View
@@ -9,9 +9,16 @@ rescue LoadError
hanna = true
end
+module Rake
+ def self.remove_task(task_name)
+ Rake.application.instance_variable_get('@tasks').delete(task_name.to_s)
+ end
+end
+
$:.unshift(File.dirname(__FILE__) + "/lib")
require "whois"
+
# Common package properties
PKG_NAME = ENV["PKG_NAME"] || Whois::GEM
PKG_VERSION = ENV["PKG_VERSION"] || Whois::VERSION
@@ -63,6 +70,13 @@ rescue LoadError
puts "CodeStatistics (Rails) is not available"
end
+Rake.remove_task(:publish_docs)
+desc "Publish documentation to the site"
+task :publish_docs => [:clean, :docs] do
+ sh "rsync -avz --delete doc/ weppos@dads:/home/weppos/ruby-whois.org/api"
+end
+
+
Dir["tasks/**/*.rake"].each do |file|
load(file)
end

0 comments on commit 1f4d414

Please sign in to comment.