From 8e52784dcd48aeced8b76c754f97b6da54bb0465 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Jan 2015 03:58:35 +0000 Subject: switch docs + website to olddoc wrongdoc was difficult to maintain because of the tidy-ffi dependency and the HTML5 changes in Darkfish could not be handled well by Tidy. olddoc is superior as it generates leaner HTML which loads faster, requires less scrolling and less processing power to render. Aesthetic comparisons are subjective of course but completely unimportant compared to speed and accessibility. The presence of images and CSS on the old (Darkfish-based) site probably set unreasonable expectations as to my ability and willingness to view such things. No more, the new website is entirely simple HTML which renders well with even the wimpiest browser. --- .document | 1 - .gitignore | 4 ++-- .olddoc.yml | 15 +++++++++++++++ .wrongdoc.yml | 11 ----------- GNUmakefile | 39 ++++++++++++++------------------------- HACKING | 8 +++----- unicorn.gemspec | 8 ++++---- 7 files changed, 38 insertions(+), 48 deletions(-) create mode 100644 .olddoc.yml delete mode 100644 .wrongdoc.yml diff --git a/.document b/.document index 4092597..0160176 100644 --- a/.document +++ b/.document @@ -10,7 +10,6 @@ SIGNALS KNOWN_ISSUES TODO NEWS -ChangeLog LATEST lib/unicorn.rb lib/unicorn/configurator.rb diff --git a/.gitignore b/.gitignore index 19a82d6..ad92808 100644 --- a/.gitignore +++ b/.gitignore @@ -15,11 +15,11 @@ ext/unicorn_http/unicorn_http.c log/ pkg/ /vendor -/NEWS -/ChangeLog +/NEWS* /.manifest /GIT-VERSION-FILE /man /tmp /LATEST /lib/unicorn/version.rb +/*_1 diff --git a/.olddoc.yml b/.olddoc.yml new file mode 100644 index 0000000..063c1c6 --- /dev/null +++ b/.olddoc.yml @@ -0,0 +1,15 @@ +--- +cgit_url: http://bogomips.org/unicorn.git +git_url: git://bogomips.org/unicorn.git +rdoc_url: http://unicorn.bogomips.org/ +ml_url: http://bogomips.org/unicorn-public/ +merge_html: + unicorn_1: Documentation/unicorn.1.html + unicorn_rails_1: Documentation/unicorn_rails.1.html +noindex: +- Unicorn::Const +- LATEST +- TODO +- unicorn_rails_1 +public_email: unicorn-public@bogomips.org +private_email: unicorn@bogomips.org diff --git a/.wrongdoc.yml b/.wrongdoc.yml deleted file mode 100644 index 3c3cbaf..0000000 --- a/.wrongdoc.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -cgit_url: http://bogomips.org/unicorn.git -git_url: git://bogomips.org/unicorn.git -rdoc_url: http://unicorn.bogomips.org/ -ml_url: http://bogomips.org/unicorn-public/ -changelog_start: v1.1.5 -merge_html: - unicorn_1: Documentation/unicorn.1.html - unicorn_rails_1: Documentation/unicorn_rails.1.html -public_email: unicorn-public@bogomips.org -private_email: unicorn@bogomips.org diff --git a/GNUmakefile b/GNUmakefile index 6916b6e..d7f0118 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,6 +8,8 @@ RUBY = ruby RAKE = rake RAGEL = ragel RSYNC = rsync +OLDDOC = olddoc +RDOC = rdoc GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @./GIT-VERSION-GEN @@ -152,35 +154,31 @@ clean: man html: $(MAKE) -C Documentation install-$@ -pkg_extra := GIT-VERSION-FILE lib/unicorn/version.rb ChangeLog LATEST NEWS \ +pkg_extra := GIT-VERSION-FILE lib/unicorn/version.rb LATEST NEWS \ $(ext)/unicorn_http.c $(man1_paths) -ChangeLog: GIT-VERSION-FILE .wrongdoc.yml - wrongdoc prepare - -.manifest: ChangeLog $(ext)/unicorn_http.c man +.manifest: $(ext)/unicorn_http.c man (git ls-files && for i in $@ $(pkg_extra); do echo $$i; done) | \ LC_ALL=C sort > $@+ cmp $@+ $@ || mv $@+ $@ $(RM) $@+ -doc: .document $(ext)/unicorn_http.c man html .wrongdoc.yml - for i in $(man1_rdoc); do echo > $$i; done +PLACEHOLDERS = $(man1_rdoc) +doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS) find bin lib -type f -name '*.rbc' -exec rm -f '{}' ';' $(RM) -r doc - wrongdoc all + $(OLDDOC) prepare + $(RDOC) -f oldweb + $(OLDDOC) merge install -m644 COPYING doc/COPYING install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/ install -m644 $(man1_paths) doc/ tar cf - $$(git ls-files examples/) | (cd doc && tar xf -) - $(RM) $(man1_rdoc) # publishes docs to http://unicorn.bogomips.org publish_doc: -git set-file-times $(MAKE) doc - find doc/images -type f | \ - TZ=UTC xargs touch -d '1970-01-01 00:00:02' doc/rdoc.css $(MAKE) doc_gz chmod 644 $$(find doc -type f) $(RSYNC) -av doc/ unicorn.bogomips.org:/srv/unicorn/ @@ -188,27 +186,15 @@ publish_doc: # Create gzip variants of the same timestamp as the original so nginx # "gzip_static on" can serve the gzipped versions directly. -doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$') +doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.gz$$') doc_gz: for i in $(docs); do \ gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done ifneq ($(VERSION),) -rfproject := mongrel rfpackage := unicorn pkggem := pkg/$(rfpackage)-$(VERSION).gem pkgtgz := pkg/$(rfpackage)-$(VERSION).tgz -release_notes := release_notes-$(VERSION) -release_changes := release_changes-$(VERSION) - -release-notes: $(release_notes) -release-changes: $(release_changes) -$(release_changes): - wrongdoc release_changes > $@+ - $(VISUAL) $@+ && test -s $@+ && mv $@+ $@ -$(release_notes): - wrongdoc release_notes > $@+ - $(VISUAL) $@+ && test -s $@+ && mv $@+ $@ # ensures we're actually on the tagged $(VERSION), only used for release verify: @@ -244,7 +230,7 @@ $(pkgtgz): .manifest fix-perms package: $(pkgtgz) $(pkggem) -release: verify package $(release_notes) $(release_changes) +release: verify package # push gem to Gemcutter gem push $(pkggem) else @@ -252,5 +238,8 @@ gem install-gem: GIT-VERSION-FILE $(MAKE) $@ VERSION=$(GIT_VERSION) endif +$(PLACEHOLDERS): + echo olddoc_placeholder > $@ + .PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man .PHONY: test-install diff --git a/HACKING b/HACKING index acb9f9d..9b4da1b 100644 --- a/HACKING +++ b/HACKING @@ -57,10 +57,8 @@ programming experience will come in handy (or be learned) here. === Documentation -We use RDoc 2.5.x with Darkfish for documentation as much as possible, -if you're on Ruby 1.8 you want to install the latest "rdoc" gem. Due to -the lack of RDoc-to-manpage converters we know about, we're writing -manpages in Markdown and converting to troff/HTML with Pandoc. +Due to the lack of RDoc-to-manpage converters we know about, we're +writing manpages in Markdown and converting to troff/HTML with Pandoc. Please wrap documentation at 72 characters-per-line or less (long URLs are exempt) so it is comfortably readable from terminals. @@ -114,7 +112,7 @@ don't email the git mailing list or maintainer with Unicorn patches :) In order to build the gem, you must install the following components: - * wrongdoc + * olddoc (RubyGem) * pandoc You can build the Unicorn gem with the following command: diff --git a/unicorn.gemspec b/unicorn.gemspec index 8623d44..fc6f475 100644 --- a/unicorn.gemspec +++ b/unicorn.gemspec @@ -1,8 +1,8 @@ # -*- encoding: binary -*- ENV["VERSION"] or abort "VERSION= must be specified" manifest = File.readlines('.manifest').map! { |x| x.chomp! } -require 'wrongdoc' -extend Wrongdoc::Gemspec +require 'olddoc' +extend Olddoc::Gemspec name, summary, title = readme_metadata # don't bother with tests that fork, not worth our time to get working @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.extensions = %w(ext/unicorn_http/extconf.rb) s.extra_rdoc_files = extra_rdoc_files(manifest) s.files = manifest - s.homepage = Wrongdoc.config[:rdoc_url] + s.homepage = Olddoc.config['rdoc_url'] s.rdoc_options = rdoc_options s.test_files = test_files @@ -37,7 +37,7 @@ Gem::Specification.new do |s| s.add_dependency(%q, '~> 0.7') s.add_development_dependency('test-unit', '~> 3.0') - s.add_development_dependency('wrongdoc', '~> 1.8') + s.add_development_dependency('olddoc', '~> 1.0') s.licenses = ["GPLv2+", "Ruby 1.8"] end -- cgit v1.2.3-24-ge0c7