* [PATCH 0/4] bunch of updates for 1.2
@ 2016-01-07 1:36 Eric Wong
2016-01-07 1:36 ` [PATCH 1/4] bold class bar to highlight current page Eric Wong
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 1:36 UTC (permalink / raw)
To: olddoc-public
A few minor fixes and copyright update for 2016
4 changes:
bold class bar to highlight current page
copyright updates for 2016
tail: shorten the footer section
head: use old-style <meta> tags for compatibility
Documentation/GNUmakefile | 4 ++--
GNUmakefile | 4 ++--
Rakefile | 4 ++--
lib/olddoc.rb | 4 ++--
lib/olddoc/gemspec.rb | 2 ++
lib/olddoc/history.rb | 4 ++--
lib/olddoc/merge.rb | 4 ++--
lib/olddoc/news_atom.rb | 4 ++--
lib/olddoc/news_rdoc.rb | 6 +++---
lib/olddoc/prepare.rb | 4 ++--
lib/olddoc/readme.rb | 4 ++--
lib/oldweb.rb | 4 ++--
lib/oldweb/_head.rhtml | 10 +++++++---
lib/oldweb/_sidebar_classes.rhtml | 6 +++++-
lib/oldweb/_tail.rhtml | 38 +++++++++++++++-----------------------
olddoc.gemspec | 4 ++--
16 files changed, 54 insertions(+), 52 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] bold class bar to highlight current page
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
@ 2016-01-07 1:36 ` Eric Wong
2016-01-07 1:36 ` [PATCH 2/4] copyright updates for 2016 Eric Wong
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 1:36 UTC (permalink / raw)
To: olddoc-public; +Cc: Eric Wong
This matches the behavior of the normal (non-RDoc) page bar.
---
| 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--git a/lib/oldweb/_sidebar_classes.rhtml b/lib/oldweb/_sidebar_classes.rhtml
index 66f7fbf..0622dbc 100644
--- a/lib/oldweb/_sidebar_classes.rhtml
+++ b/lib/oldweb/_sidebar_classes.rhtml
@@ -19,8 +19,12 @@ unless @modsort.empty?
else
parts.shift
end
+ name = parts.join('::')
+ if defined?(current) && current == mod
+ name = "<b>#{name}</b>"
+ end
%><a
-href="<%= rel_prefix %><%= mod.path %>"><%= parts.join('::') %></a>
+href="<%= rel_prefix %><%= mod.path %>"><%= name %></a>
<%
end
end
--
EW
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] copyright updates for 2016
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
2016-01-07 1:36 ` [PATCH 1/4] bold class bar to highlight current page Eric Wong
@ 2016-01-07 1:36 ` Eric Wong
2016-01-07 1:36 ` [PATCH 3/4] tail: shorten the footer section Eric Wong
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 1:36 UTC (permalink / raw)
To: olddoc-public; +Cc: Eric Wong
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
---
Documentation/GNUmakefile | 4 ++--
GNUmakefile | 4 ++--
Rakefile | 4 ++--
lib/olddoc.rb | 4 ++--
lib/olddoc/gemspec.rb | 2 ++
lib/olddoc/history.rb | 4 ++--
lib/olddoc/merge.rb | 4 ++--
lib/olddoc/news_atom.rb | 4 ++--
lib/olddoc/news_rdoc.rb | 6 +++---
lib/olddoc/prepare.rb | 4 ++--
lib/olddoc/readme.rb | 4 ++--
lib/oldweb.rb | 4 ++--
olddoc.gemspec | 4 ++--
13 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
index 5e47833..0de5043 100644
--- a/Documentation/GNUmakefile
+++ b/Documentation/GNUmakefile
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
all::
INSTALL = install
diff --git a/GNUmakefile b/GNUmakefile
index 1087882..f67cab6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
all::
pkg = olddoc
RUBY = ruby
diff --git a/Rakefile b/Rakefile
index a466d6c..1cbd0f9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'tempfile'
include Rake::DSL
task :rsync_docs do
diff --git a/lib/olddoc.rb b/lib/olddoc.rb
index 18495e2..1621f85 100644
--- a/lib/olddoc.rb
+++ b/lib/olddoc.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
module Olddoc
VERSION = '1.1.2'
diff --git a/lib/olddoc/gemspec.rb b/lib/olddoc/gemspec.rb
index 73382ab..f5f008d 100644
--- a/lib/olddoc/gemspec.rb
+++ b/lib/olddoc/gemspec.rb
@@ -1,3 +1,5 @@
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# helper methods for gemspecs
module Olddoc::Gemspec
include Olddoc::Readme
diff --git a/lib/olddoc/history.rb b/lib/olddoc/history.rb
index b817d2d..595994d 100644
--- a/lib/olddoc/history.rb
+++ b/lib/olddoc/history.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'uri'
module Olddoc::History
diff --git a/lib/olddoc/merge.rb b/lib/olddoc/merge.rb
index da5bd07..b5dae65 100644
--- a/lib/olddoc/merge.rb
+++ b/lib/olddoc/merge.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
class Olddoc::Merge
def initialize(opts)
diff --git a/lib/olddoc/news_atom.rb b/lib/olddoc/news_atom.rb
index 7c63db2..a093e64 100644
--- a/lib/olddoc/news_atom.rb
+++ b/lib/olddoc/news_atom.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'builder'
module Olddoc::NewsAtom
diff --git a/lib/olddoc/news_rdoc.rb b/lib/olddoc/news_rdoc.rb
index cc51bec..e8c6a34 100644
--- a/lib/olddoc/news_rdoc.rb
+++ b/lib/olddoc/news_rdoc.rb
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
+#
require 'tempfile'
module Olddoc::NewsRdoc
diff --git a/lib/olddoc/prepare.rb b/lib/olddoc/prepare.rb
index 1ed66a0..f42bd04 100644
--- a/lib/olddoc/prepare.rb
+++ b/lib/olddoc/prepare.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'uri'
class Olddoc::Prepare
diff --git a/lib/olddoc/readme.rb b/lib/olddoc/readme.rb
index e593517..423d18b 100644
--- a/lib/olddoc/readme.rb
+++ b/lib/olddoc/readme.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# helpers for parsing the top-level README file
module Olddoc::Readme
diff --git a/lib/oldweb.rb b/lib/oldweb.rb
index 12ce876..af62050 100644
--- a/lib/oldweb.rb
+++ b/lib/oldweb.rb
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# Loosely derived from Darkfish in the main rdoc distribution
require 'rdoc'
require 'erb'
diff --git a/olddoc.gemspec b/olddoc.gemspec
index 79f4579..def2265 100644
--- a/olddoc.gemspec
+++ b/olddoc.gemspec
@@ -1,5 +1,5 @@
-# Copyright (C) 2015, all contributors <olddoc-public@80x24.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
+# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
$LOAD_PATH << 'lib'
require 'olddoc'
extend Olddoc::Gemspec
--
EW
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] tail: shorten the footer section
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
2016-01-07 1:36 ` [PATCH 1/4] bold class bar to highlight current page Eric Wong
2016-01-07 1:36 ` [PATCH 2/4] copyright updates for 2016 Eric Wong
@ 2016-01-07 1:36 ` Eric Wong
2016-01-07 1:36 ` [PATCH 4/4] head: use old-style <meta> tags for compatibility Eric Wong
2016-01-07 3:37 ` [PATCH 5/4] nodoc some internals Eric Wong
4 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 1:36 UTC (permalink / raw)
To: olddoc-public; +Cc: Eric Wong
Not every project uses git, and some misguided ones even
allow HTML email (not sure why those projects would be interested
in olddoc, though).
Anyways, the olddoc-public@80x24.org account will always be
configured to reject HTML email (or it'll be eaten by a spam filter).
---
lib/oldweb/_tail.rhtml | 38 +++++++++++++++-----------------------
1 file changed, 15 insertions(+), 23 deletions(-)
diff --git a/lib/oldweb/_tail.rhtml b/lib/oldweb/_tail.rhtml
index 522c312..0879572 100644
--- a/lib/oldweb/_tail.rhtml
+++ b/lib/oldweb/_tail.rhtml
@@ -3,27 +3,19 @@ public_email = @old_cfg['public_email']
private_email = @old_cfg['private_email']
ml_url = @old_cfg['ml_url']
nntp_url = @old_cfg['nntp_url']
-git_doc = 'https://kernel.org/pub/software/scm/git/docs/'
-se_url = "#{git_doc}git-send-email.html"
-rp_url = "#{git_doc}git-request-pull.html"
-if public_email && ml_url %><hr /><p>
-We love to hear from you!<br />
-Email patches (using <a
-href="<%= se_url %>">git send-email</a>),
-pull requests (formatted using <a
-href="<%= rp_url %>">git request-pull</a>), questions, bug reports,
-suggestions, etc. to us publically at:<br /><a
-href="mailto:<%= public_email %>"><%= public_email %></a><br />
-Mail archives are available at: <a
-href="<%= ml_url %>"><%= ml_url %></a><br />
-Please send plain-text email only and do not waste bandwidth on HTML mail,
-HTML mail will not be read.<br />
-Quote as little as reasonable and do not <a
-href="http://catb.org/jargon/html/T/top-post.html">top post</a>.<br /><% end
-if nntp_url %>NNTP archives are available at: <a
-href="<%= nntp_url %>"><%= nntp_url %></a><% end
-if private_email %>
-For sensitive topics, email us privately at:
-<a
-href="mailto:<%= private_email %>"><%= private_email %></a><% end %>
+if public_email && ml_url %><hr /><pre>
+mail archives: <a
+href="<%= ml_url %>"><%= ml_url %></a> mailto:<a
+href="mailto:<%= public_email %>"><%=
+public_email
+%></a>
+<% end
+if nntp_url %>NNTP archives: <a
+href="<%= nntp_url %>"><%= nntp_url %></a>
+<%
+end
+if private_email
+%>private mail: <a
+href="mailto:<%= private_email %>"><%= private_email %></a><%
+end %></pre>
--
EW
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] head: use old-style <meta> tags for compatibility
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
` (2 preceding siblings ...)
2016-01-07 1:36 ` [PATCH 3/4] tail: shorten the footer section Eric Wong
@ 2016-01-07 1:36 ` Eric Wong
2016-01-07 3:37 ` [PATCH 5/4] nodoc some internals Eric Wong
4 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 1:36 UTC (permalink / raw)
To: olddoc-public; +Cc: Eric Wong
This wastes some bandwidth, but we are olddoc, after all,
and care about old browsers more than new ones.
---
lib/oldweb/_head.rhtml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/oldweb/_head.rhtml b/lib/oldweb/_head.rhtml
index 9a9242c..ae4d5e9 100644
--- a/lib/oldweb/_head.rhtml
+++ b/lib/oldweb/_head.rhtml
@@ -1,7 +1,11 @@
-<meta charset="<%= @options.charset %>"><title><%= h @title %></title><%
-if rdoc_url = @old_cfg['rdoc_url'] %><link
+<title><%= h @title %></title><%
+if rdoc_url = @old_cfg['rdoc_url']
+%><link
rel="alternate"
title="Atom feed"
href="<%= rdoc_url %>NEWS.atom.xml"
type="application/atom+xml" /><%
-end %>
+end
+%><meta
+http-equiv="Content-Type"
+content="text/html; <%= @options.charset %>">
--
EW
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/4] nodoc some internals
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
` (3 preceding siblings ...)
2016-01-07 1:36 ` [PATCH 4/4] head: use old-style <meta> tags for compatibility Eric Wong
@ 2016-01-07 3:37 ` Eric Wong
4 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2016-01-07 3:37 UTC (permalink / raw)
To: olddoc-public
We don't want to advertise an API we'd have to support
long-term
---
lib/olddoc.rb | 4 ++--
lib/olddoc/gemspec.rb | 2 +-
lib/olddoc/history.rb | 2 +-
lib/olddoc/merge.rb | 2 +-
lib/olddoc/news_atom.rb | 2 +-
lib/olddoc/news_rdoc.rb | 2 +-
lib/olddoc/prepare.rb | 2 +-
lib/olddoc/readme.rb | 2 +-
lib/oldweb.rb | 52 +++++++++++++++++++++++++++----------------------
lib/rdoc/discover.rb | 2 ++
10 files changed, 40 insertions(+), 32 deletions(-)
diff --git a/lib/olddoc.rb b/lib/olddoc.rb
index 1621f85..d9bc384 100644
--- a/lib/olddoc.rb
+++ b/lib/olddoc.rb
@@ -1,7 +1,7 @@
# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
-module Olddoc
- VERSION = '1.1.2'
+module Olddoc # :nodoc:
+ VERSION = '1.1.2' # :nodoc:
autoload :Gemspec, 'olddoc/gemspec'
autoload :History, 'olddoc/history'
diff --git a/lib/olddoc/gemspec.rb b/lib/olddoc/gemspec.rb
index f5f008d..f9f6417 100644
--- a/lib/olddoc/gemspec.rb
+++ b/lib/olddoc/gemspec.rb
@@ -1,7 +1,7 @@
# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# helper methods for gemspecs
-module Olddoc::Gemspec
+module Olddoc::Gemspec # :nodoc:
include Olddoc::Readme
def extra_rdoc_files(manifest)
diff --git a/lib/olddoc/history.rb b/lib/olddoc/history.rb
index 595994d..dcdf0fe 100644
--- a/lib/olddoc/history.rb
+++ b/lib/olddoc/history.rb
@@ -2,7 +2,7 @@
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'uri'
-module Olddoc::History
+module Olddoc::History # :nodoc:
def initialize_history
@tags = @old_summaries = nil
end
diff --git a/lib/olddoc/merge.rb b/lib/olddoc/merge.rb
index b5dae65..de5e2ae 100644
--- a/lib/olddoc/merge.rb
+++ b/lib/olddoc/merge.rb
@@ -1,7 +1,7 @@
# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
-class Olddoc::Merge
+class Olddoc::Merge # :nodoc:
def initialize(opts)
@merge_html = opts["merge_html"] || {}
end
diff --git a/lib/olddoc/news_atom.rb b/lib/olddoc/news_atom.rb
index a093e64..a9e8002 100644
--- a/lib/olddoc/news_atom.rb
+++ b/lib/olddoc/news_atom.rb
@@ -2,7 +2,7 @@
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'builder'
-module Olddoc::NewsAtom
+module Olddoc::NewsAtom # :nodoc:
include Olddoc::History
include Olddoc::Readme
diff --git a/lib/olddoc/news_rdoc.rb b/lib/olddoc/news_rdoc.rb
index e8c6a34..2427591 100644
--- a/lib/olddoc/news_rdoc.rb
+++ b/lib/olddoc/news_rdoc.rb
@@ -4,7 +4,7 @@
#
require 'tempfile'
-module Olddoc::NewsRdoc
+module Olddoc::NewsRdoc # :nodoc:
include Olddoc::History
def puts_tag(fp, tag)
diff --git a/lib/olddoc/prepare.rb b/lib/olddoc/prepare.rb
index f42bd04..f902fff 100644
--- a/lib/olddoc/prepare.rb
+++ b/lib/olddoc/prepare.rb
@@ -2,7 +2,7 @@
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
require 'uri'
-class Olddoc::Prepare
+class Olddoc::Prepare # :nodoc:
include Olddoc::NewsRdoc
include Olddoc::NewsAtom
include Olddoc::Readme
diff --git a/lib/olddoc/readme.rb b/lib/olddoc/readme.rb
index 423d18b..0b3ee97 100644
--- a/lib/olddoc/readme.rb
+++ b/lib/olddoc/readme.rb
@@ -2,7 +2,7 @@
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# helpers for parsing the top-level README file
-module Olddoc::Readme
+module Olddoc::Readme # :nodoc:
def readme_path
'README'
diff --git a/lib/oldweb.rb b/lib/oldweb.rb
index af62050..a5da1cc 100644
--- a/lib/oldweb.rb
+++ b/lib/oldweb.rb
@@ -8,11 +8,15 @@ require 'yaml'
require 'cgi'
require 'uri'
+# oldweb is an \RDoc template and not intended as a programming API.
+# You may specify it as an \RDoc formatter:
+#
+# rdoc -f oldweb ...
class Oldweb
- RDoc::RDoc.add_generator(self)
- include ERB::Util
- attr_reader :class_dir
- attr_reader :file_dir
+ RDoc::RDoc.add_generator(self) # :nodoc:
+ include ERB::Util # :nodoc:
+ attr_reader :class_dir # :nodoc:
+ attr_reader :file_dir # :nodoc:
# description of the generator
DESCRIPTION = 'minimal HTML generator'
@@ -20,7 +24,7 @@ class Oldweb
# version of this generator
VERSION = '1'
- def initialize(store, options)
+ def initialize(store, options) # :nodoc:
# just because we're capable of generating UTF-8 to get human names
# right does not mean we should overuse it for quotation marks and such,
# our clients may not have the necessary fonts.
@@ -76,7 +80,7 @@ class Oldweb
end
end
- def generate
+ def generate # :nodoc:
setup
generate_class_files
generate_file_files
@@ -90,13 +94,13 @@ class Oldweb
end if src
end
- def rel_path(out_file)
+ def rel_path(out_file) # :nodoc:
rel_prefix = @outputdir.relative_path_from(out_file.dirname)
rel_prefix.to_s == '.' ? '' : "#{rel_prefix}/"
end
# called standalone by servelet
- def generate_class(klass, template_file = nil)
+ def generate_class(klass, template_file = nil) # :nodoc:
setup
current = klass
template_file ||= @template_dir + 'class.rhtml'
@@ -108,7 +112,7 @@ class Oldweb
end
# Generate a documentation file for each class and module
- def generate_class_files
+ def generate_class_files # :nodoc:
setup
template_file = @template_dir + 'class.rhtml'
current = nil
@@ -122,7 +126,7 @@ class Oldweb
end
# Generate a documentation file for each file
- def generate_file_files
+ def generate_file_files # :nodoc:
setup
@files.each do |file|
generate_page(file) if file.text?
@@ -130,7 +134,7 @@ class Oldweb
end
# Generate a page file for +file+
- def generate_page(file, out_file = @outputdir + file.path)
+ def generate_page(file, out_file = @outputdir + file.path) # :nodoc:
setup
template_file = @template_dir + 'page.rhtml'
rel_prefix = rel_path(out_file)
@@ -152,7 +156,7 @@ class Oldweb
end
# Generates the 404 page for the RDoc servlet
- def generate_servlet_not_found(message)
+ def generate_servlet_not_found(message) # :nodoc:
setup
template_file = @template_dir + 'servlet_not_found.rhtml'
rel_prefix = ''
@@ -164,7 +168,7 @@ class Oldweb
end
# Generates the servlet root page for the RDoc servlet
- def generate_servlet_root(installed)
+ def generate_servlet_root(installed) # :nodoc:
setup
template_file = @template_dir + 'servlet_root.rhtml'
@@ -178,7 +182,7 @@ class Oldweb
e!(e, "error generating servlet_root: #{e.message} (#{e.class})")
end
- def generate_table_of_contents
+ def generate_table_of_contents # :nodoc:
setup
template_file = @template_dir + 'table_of_contents.rhtml'
out_file = @outputdir + 'table_of_contents.html'
@@ -190,7 +194,7 @@ class Oldweb
e!(e, "error generating table_of_contents.html: #{e.message} (#{e.class})")
end
- def setup
+ def setup # :nodoc:
return if @outputdir
@outputdir = Pathname.new(@options.op_dir).expand_path(@base_dir)
return unless @store
@@ -201,7 +205,7 @@ class Oldweb
end
# Creates a template from its components and the +body_file+.
- def assemble_template(body_file)
+ def assemble_template(body_file) # :nodoc:
body = body_file.read
head = @template_dir + '_head.rhtml'
tail = @template_dir + '_tail.rhtml'
@@ -211,7 +215,7 @@ class Oldweb
# Renders the ERb contained in +file_name+ relative to the template
# directory and returns the result based on the current context.
- def render(file_name)
+ def render(file_name) # :nodoc:
template_file = @template_dir + file_name
template = template_for(template_file, false, RDoc::ERBPartial)
template.filename = template_file.to_s
@@ -222,7 +226,7 @@ class Oldweb
# it out to +out_file+.
# Both +template_file+ and +out_file+ should be Pathname-like objects.
# An io will be yielded which must be captured by binding in the caller.
- def render_template(template_file, out_file = nil) # :yield: io
+ def render_template(template_file, out_file = nil) # :nodoc:
io_output = out_file && !@dry_run && @file_output
erb_klass = io_output ? RDoc::ERBIO : ERB
template = template_for(template_file, true, erb_klass)
@@ -242,14 +246,14 @@ class Oldweb
# Creates the result for +template+ with +context+. If an error is raised a
# Pathname +template_file+ will indicate the file where the error occurred.
- def template_result(template, context, template_file)
+ def template_result(template, context, template_file) # :nodoc:
template.filename = template_file.to_s
template.result(context)
rescue NoMethodError => e
e!(e, "Error while evaluating #{template_file.expand_path}: #{e.message}")
end
- def template_for(file, page = true, klass = ERB)
+ def template_for(file, page = true, klass = ERB) # :nodoc:
template = @template_cache[file]
return template if template
@@ -268,11 +272,11 @@ class Oldweb
@template_cache[file] = template
end
- def e!(e, msg)
+ def e!(e, msg) # :nodoc:
raise RDoc::Error, msg, e.backtrace
end
- def method_srclink(m)
+ def method_srclink(m) # :nodoc:
url = @old_vcs_url or return ""
line = m.line or return ""
path = URI.escape(m.file_name)
@@ -280,7 +284,7 @@ class Oldweb
end
# reach into RDoc internals to generate less HTML
- module LessHtml
+ module LessHtml # :nodoc:
def accept_verbatim(verbatim)
@res << "\n<pre>#{CGI.escapeHTML(verbatim.text.rstrip)}</pre>\n"
end
@@ -296,8 +300,10 @@ class Oldweb
end
end
+# :stopdoc:
class RDoc::Markup::ToHtml # :nodoc:
remove_method :accept_heading
remove_method :accept_verbatim
include Oldweb::LessHtml
end
+# :startdoc:
diff --git a/lib/rdoc/discover.rb b/lib/rdoc/discover.rb
index e497514..9450f42 100644
--- a/lib/rdoc/discover.rb
+++ b/lib/rdoc/discover.rb
@@ -1,5 +1,7 @@
+# :stopdoc:
begin
gem 'rdoc', '~> 4.1'
require_relative '../olddoc'
rescue Gem::LoadError
end unless defined?(Olddoc)
+# :startdoc:
--
EW
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-07 3:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 1:36 [PATCH 0/4] bunch of updates for 1.2 Eric Wong
2016-01-07 1:36 ` [PATCH 1/4] bold class bar to highlight current page Eric Wong
2016-01-07 1:36 ` [PATCH 2/4] copyright updates for 2016 Eric Wong
2016-01-07 1:36 ` [PATCH 3/4] tail: shorten the footer section Eric Wong
2016-01-07 1:36 ` [PATCH 4/4] head: use old-style <meta> tags for compatibility Eric Wong
2016-01-07 3:37 ` [PATCH 5/4] nodoc some internals Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/olddoc.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).