From 995eefdf9f09f1a4621e3aab0184c5ae2787ca0c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 May 2019 02:30:29 +0000 Subject: proxy_pass: document as a public API Might as well... this has been in use at YHBT.net for ~4 years at this point. And given nginx has new corporate overlords, maybe a decidedly non-enterprisey alternative is worth "marketing" :P Previous discussion from 2016: https://YHBT.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/ --- Rakefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 3eb0219..65862f2 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,24 @@ require 'tempfile' include Rake::DSL -gendocs = %w(NEWS NEWS.atom.xml) +apidoc = { + 'doc/Yahns.html' => 'lib/yahns.rb', + 'doc/Yahns/ProxyPass.html' => 'lib/yahns/proxy_pass.rb' +} + +task apidoc.keys[0] => apidoc.values do + rdoc = ENV['rdoc'] || 'rdoc' + system("git", "set-file-times", *(apidoc.values)) + sh "#{rdoc} -f dark216" # dark216 requires olddoc 1.7+ + + apidoc.each do |dst, src| + src = File.stat(src) + File.utime(src.atime, src.mtime, dst) + end +end + +gendocs = %W(NEWS NEWS.atom.xml #{apidoc.keys[0]}) +task html: apidoc.keys[0] task rsync_docs: gendocs do dest = ENV["RSYNC_DEST"] || "yhbt.net:/srv/yhbt/yahns/" top = %w(INSTALL HACKING README COPYING) @@ -28,6 +45,7 @@ task rsync_docs: gendocs do files = `git ls-files Documentation/*.txt`.split(/\n/) files.concat(top) files.concat(gendocs) + files.concat(%w(doc/Yahns.html)) files.concat(%w(yahns yahns-rackup yahns_config).map! { |x| "Documentation/#{x}.txt" }) -- cgit v1.2.3-24-ge0c7