require'launchy'# --- Develop and public documentation ---desc"Invoke sphinx 'make build' to generate docs."task:builddocs,[:options]do|t,args|ifargs.options=='pub'path="doc/public"elsepath="docs"endDir.chdir(path)dosh('make html')endenddesc"Show docs in browser (mac and ubuntu)."task:showdocs,[:options]do|t,args|ifargs.options=='pub'path="doc/public"elsepath="docs"endDir.chdir("#{path}/build/html")doLaunchy.open('index.html')endenddesc"Build docs and show them in browser"task:doc,[:options]=>:builddocsdo|t,args|Rake::Task["showdocs"].invoke(args.options)end# --- Develop and public documentation ---