From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1C6011F54E for ; Mon, 22 Aug 2022 18:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1661191748; bh=MVHBo+xihv0xQoSX1o4tdnU+3dA60rHlX26t+TRiUKE=; h=From:To:Subject:Date:From; b=I8To594855NINP5mtyvbh9Bb8UpZOQ/G9R1Ji9BckEjqqs8KiygZ4aU2tagSDBSLq IRG1xZ4efF5/+ytRzSCXtfwQTzvDxUptA4snA+HD/S5CTgpgT/WrbD1enTKgM3Aqbj U81uCtoOwPluCi8cnDOpVIxXREIhAcbPSkXEHo8I= From: Eric Wong To: mwrap-public@80x24.org Subject: [PATCH] various doc updates Date: Mon, 22 Aug 2022 18:09:08 +0000 Message-Id: <20220822180908.22203-1-mwrap-public@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Copyright years are unnecessary churn and probably aren't necessary: https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/ add POP3 and IMAP archive info, and drop the outdated link to the live demo since I no longer have the resources to run it. Finally, add rdoc (olddoc) + rsync support --- .document | 1 + .gitignore | 3 +++ .olddoc.yml | 4 +++- README | 12 +++++++----- Rakefile | 30 +++++++++++++++++++++++++++++- bin/mwrap | 2 +- ext/mwrap/extconf.rb | 2 +- ext/mwrap/mwrap.c | 2 +- lib/mwrap_rack.rb | 8 +++----- test/test_mwrap.rb | 2 +- 10 files changed, 50 insertions(+), 16 deletions(-) diff --git a/.document b/.document index 4ca33e3..4385cfe 100644 --- a/.document +++ b/.document @@ -1,2 +1,3 @@ ext/mwrap/mwrap.c lib/mwrap_rack.rb +README diff --git a/.gitignore b/.gitignore index aa3606c..f670b62 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ /pkg /*.gem /doc +/NEWS +/NEWS.atom.xml +/LATEST diff --git a/.olddoc.yml b/.olddoc.yml index dac0353..bfecbaf 100644 --- a/.olddoc.yml +++ b/.olddoc.yml @@ -5,4 +5,6 @@ rdoc_url: https://80x24.org/mwrap/ ml_url: https://80x24.org/mwrap-public/ public_email: mwrap-public@80x24.org nntp_url: - - nntp://news.public-inbox.org/inbox.comp.lang.ruby.mwrap +- nntps://news.public-inbox.org/inbox.comp.lang.ruby.mwrap +imap_url: +- imaps://;AUTH=ANONYMOUS@80x24.org/inbox.comp.lang.ruby.mwrap.0 diff --git a/README b/README index 3a20258..f387bc4 100644 --- a/README +++ b/README @@ -67,16 +67,18 @@ first two columns to find the hottest malloc locations. mwrap 2.0.0+ also supports a Rack application endpoint, it is documented at: - https://80x24.org/mwrap/MwrapRack.html +https://80x24.org/mwrap/MwrapRack.html == Known problems * 32-bit machines are prone to overflow (WONTFIX) -== Mail archives and list: +== Public mail archives and contact info: - https://80x24.org/mwrap-public/ - nntp://80x24.org/inbox.comp.lang.ruby.mwrap +* https://80x24.org/mwrap-public/ +* nntps://80x24.org/inbox.comp.lang.ruby.mwrap +* imaps://;AUTH=ANONYMOUS@80x24.org/inbox.comp.lang.ruby.mwrap.0 +* https://80x24.org/mwrap-public/_/text/help/#pop3 No subscription will ever be required to post, but HTML mail will be rejected: @@ -88,7 +90,7 @@ will be rejected: git clone https://80x24.org/mwrap.git Send all patches and pull requests (use "git request-pull" to format) to -the mailing list. We do not use centralized or proprietary messaging +mwrap-public@80x24.org. We do not use centralized or proprietary messaging systems. == License diff --git a/Rakefile b/Rakefile index 50bfa89..255d346 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -# Copyright (C) 2018 mwrap hackers +# Copyright (C) mwrap hackers # License: GPL-2.0+ require 'rake/testtask' begin @@ -14,3 +14,31 @@ task :default => :compile c_files = File.readlines('MANIFEST').grep(%r{ext/.*\.[ch]$}).map!(&:chomp!) task 'compile:mwrap' => c_files + +olddoc = ENV['OLDDOC'] || 'olddoc' +rdoc = ENV['RDOC'] || 'rdoc' +task :rsync_docs do + require 'fileutils' + top = %w(README COPYING LATEST NEWS NEWS.atom.xml) + system("git", "set-file-times") + dest = ENV["RSYNC_DEST"] || "80x24.org:/srv/80x24/mwrap/" + FileUtils.rm_rf('doc') + sh "#{olddoc} prepare" + sh "#{rdoc} -f dark216" # dark216 requires olddoc 1.7+ + File.unlink('doc/created.rid') rescue nil + File.unlink('doc/index.html') rescue nil + FileUtils.cp(top, 'doc') + sh "#{olddoc} merge" + + Dir['doc/**/*'].each do |txt| + st = File.stat(txt) + if st.file? + gz = "#{txt}.gz" + tmp = "#{gz}.#$$" + sh("gzip --rsyncable -9 <#{txt} >#{tmp}") + File.utime(st.atime, st.mtime, tmp) # make nginx gzip_static happy + File.rename(tmp, gz) + end + end + sh("rsync --chmod=Fugo=r #{ENV['RSYNC_OPT']} -av doc/ #{dest}/") +end diff --git a/bin/mwrap b/bin/mwrap index 9f67dab..212078c 100755 --- a/bin/mwrap +++ b/bin/mwrap @@ -1,6 +1,6 @@ #!/usr/bin/ruby # frozen_string_literal: true -# Copyright (C) 2018 mwrap hackers +# Copyright (C) mwrap hackers # License: GPL-2.0+ require 'mwrap' mwrap_so = $".grep(%r{/mwrap\.so\z})[0] or abort "mwrap.so not loaded" diff --git a/ext/mwrap/extconf.rb b/ext/mwrap/extconf.rb index 254a3bb..512ab82 100644 --- a/ext/mwrap/extconf.rb +++ b/ext/mwrap/extconf.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -# Copyright (C) 2018 mwrap hackers +# Copyright (C) mwrap hackers # License: GPL-2.0+ require 'mkmf' diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c index a097b2e..85b847b 100644 --- a/ext/mwrap/mwrap.c +++ b/ext/mwrap/mwrap.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 mwrap hackers + * Copyright (C) mwrap hackers * License: GPL-2.0+ */ #define _LGPL_SOURCE /* allows URCU to inline some stuff */ diff --git a/lib/mwrap_rack.rb b/lib/mwrap_rack.rb index e45b26d..53380b9 100644 --- a/lib/mwrap_rack.rb +++ b/lib/mwrap_rack.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2018 all contributors +# Copyright (C) all contributors # License: GPL-2.0+ # frozen_string_literal: true require 'mwrap' @@ -17,9 +17,6 @@ require 'cgi' # map('/MWRAP') { run(MwrapRack.new) } # map('/') { run(your_normal_app) } # -# A live demo is available at https://80x24.org/MWRAP/ -# (warning the demo machine is 32-bit, so counters will overflow) -# # This module is only available in mwrap 2.0.0+ class MwrapRack module HtmlResponse # :nodoc: @@ -115,10 +112,11 @@ class MwrapRack end GC_STAT_URL = 'https://docs.ruby-lang.org/en/trunk/GC.html#method-c-stat' - GC_STAT_HELP = <<~"" + GC_STAT_HELP = <<~EOM

Non-Infinity lifespans can indicate fragmentation.

See #{GC_STAT_URL} for info on GC.stat values. + EOM def each Mwrap.quiet do diff --git a/test/test_mwrap.rb b/test/test_mwrap.rb index c506554..eaa65cb 100644 --- a/test/test_mwrap.rb +++ b/test/test_mwrap.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -# Copyright (C) 2018 mwrap hackers +# Copyright (C) mwrap hackers # License: GPL-2.0+ require 'test/unit' require 'mwrap'