about summary refs log tree commit homepage
path: root/lib/oldweb.rb
DateCommit message (Collapse)
2020-07-26allow multiple rdoc_url and cgit_url values
Might as well, since domain name ownership is a shaky thing and ICANN may try to screw the world over once again.
2019-12-15replace URI.escape with CGI.escape
The former is obsolete, apparently.
2019-04-22add dark216 color scheme for power savings
"oldweb" remains for compatibility and we still have minimal styling. Some browsers (e.g. Firefox 67.0a1 via "ui.systemUsesDarkTheme") are adding support for the "prefers-color-scheme" @media query. So this allows pages to respect user choice when it comes to dark or light schemes. OLED and CRT displays measure significant power savings when using dark schemes. Dark themes work better with less ambient light, so favoring darkness can lead to overall power savings even with CCFL and LED-lit displays.
2019-01-06fall back to cgit_url and git_url if "source_code" is not defined
Some projects are too lazy to update or upgrade, but cgit/git URLs are "git clone"-able.
2019-01-02oldweb: work around annoying ERB deprecation in Ruby 2.6
Updated patch by: Takashi Kokubun at https://bugs.ruby-lang.org/issues/15478
2017-01-24oldweb: use native String#encode for (X)HTML escaping
This allows us to avoid loading the 'cgi' library.
2017-01-24oldweb: use flat_map instead of flatten.map chain
`flat_map' was introduced in Ruby 1.9.2 and reduces the amount of garbage we generate.
2017-01-24oldweb: apply LessHtml monkey patch late, at runtime
RDoc will load oldweb.rb regardless of whether it is used or not, so do not apply our monkey patching to reduce HTML generated by RDoc::Markup::ToHtml until we initialize Oldweb. Thanks to Daniel Ferreira for noticing this in [ruby-talk:437390]: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/437390 <CAPL_2g25ir4ZBJo652ao1EYB59ZvFHhpGef1V14QOV2SeVXLeA@mail.gmail.com> This still assumes any Ruby VM instance (currently synonymous with an OS process in Ruby 2.4) will only use one RDoc template in its lifetime and not switch between them. More work will be required to support switching between `oldweb' and other templates within the same VM instance, but that's not a priority for me.
2016-01-07nodoc some internals
We don't want to advertise an API we'd have to support long-term
2016-01-07copyright updates for 2016
While we're at it, switch to the shorter, SPDX-approved "GPL-3.0+" identifier instead of the more verbose "GPLv3 or later" for consistency. The formatting changed slightly to allow us to use the update-copyright script in gnulib[1] In the future: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright [1] git://git.savannah.gnu.org/gnulib.git
2015-10-30oldweb: fix relative path normalization
We must explicitly convert Pathname to string before comparing against '.' to prevent ugly './' prefixes in relative paths from showing up.
2015-01-08initial commit
Template based on Darkfish, but heavily stripped down.