]> git.wincent.com - wikitext.git/commitdiff
Make Yardoc upload site configurable
authorWincent Colaiuta <win@wincent.com>
Mon, 26 Jul 2010 17:26:01 +0000 (19:26 +0200)
committerWincent Colaiuta <win@wincent.com>
Mon, 26 Jul 2010 17:26:01 +0000 (19:26 +0200)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
.gitignore
Rakefile

index db45bafbd53a71400b892cf7ff342e3d50975009..bea3565e765796e9d464a73ab0e5554af712d3e4 100644 (file)
@@ -2,3 +2,4 @@ pkg
 html
 .specification
 .yardoc/
+.config.yml
index 28af41e5a3ef00603fc9c366f048b15fbd8fb86b..fb1a46137b40672d92eddf5178262d88bfbc67cf 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -78,9 +78,13 @@ task :yard do
   sh 'yardoc -o html --title Wikitext doc/*.rb - doc/RELEASE-NOTES'
 end
 
-desc 'Upload YARD HTML to RubyForge website'
+desc 'Upload YARD HTML'
 task :upload_yard => :yard do
-  sh 'scp -r html/* rubyforge.org:/var/www/gforge-projects/wikitext/'
+  require 'yaml'
+  config = YAML.load_file('.config.yml')
+  raise ':yardoc_host not configured' unless config.has_key?(:yardoc_host)
+  raise ':yardoc_path not configured' unless config.has_key?(:yardoc_path)
+  sh "scp -r html/* #{config[:yardoc_host]}:#{config[:yardoc_path]}"
 end
 
 desc 'Build gem ("gem build")'