olddoc 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/GIT-VERSION-GEN +1 -1
- data/lib/olddoc/news_atom.rb +48 -24
- data/lib/olddoc/news_rdoc.rb +0 -1
- data/lib/oldweb/class.rhtml +1 -1
- data/olddoc.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c5d6ab7ac1202af4b9831610a7e49acf23e633
|
4
|
+
data.tar.gz: cf125761aea6c4860794a68f9c63c8039532f403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70640d38fd02f1df57e340d0535682462a71c1d409618051cf56118eb9bc5a827591d753d3793d89ce3b27b0b54b1b591ed64664c4abf0f645ce667d2ea7e9ff
|
7
|
+
data.tar.gz: 2db66bd166e5a4189803c09cfd72c3254b57bd42ff597010916acbcf1ef04933a9e01f1535e1f8887b1fad9165ed6cd98f562d2774030378e9ab74518ee844eb
|
data/GIT-VERSION-GEN
CHANGED
data/lib/olddoc/news_atom.rb
CHANGED
@@ -1,11 +1,33 @@
|
|
1
1
|
# Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
|
2
2
|
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
|
-
require 'builder'
|
4
3
|
|
5
4
|
module Olddoc::NewsAtom # :nodoc:
|
6
5
|
include Olddoc::History
|
7
6
|
include Olddoc::Readme
|
8
7
|
|
8
|
+
def x(dst, tag, text = nil, attrs = nil)
|
9
|
+
if Hash === text
|
10
|
+
attrs = text
|
11
|
+
text = nil
|
12
|
+
end
|
13
|
+
if attrs
|
14
|
+
attrs = attrs.map { |k,v| "#{k}=#{v.encode(xml: :attr)}" }
|
15
|
+
attrs = "\n#{attrs.join("\n")}"
|
16
|
+
end
|
17
|
+
case text
|
18
|
+
when nil
|
19
|
+
if block_given?
|
20
|
+
dst << "<#{tag}#{attrs}>"
|
21
|
+
yield
|
22
|
+
dst << "</#{tag}>"
|
23
|
+
else
|
24
|
+
dst << "<#{tag}#{attrs}/>"
|
25
|
+
end
|
26
|
+
else
|
27
|
+
dst << "<#{tag}#{attrs}>#{text.encode(xml: :text)}</#{tag}>"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
9
31
|
# generates an Atom feed based on git tags in the document directory
|
10
32
|
def news_atom_xml
|
11
33
|
project_name, short_desc, _ = readme_metadata
|
@@ -14,34 +36,36 @@ module Olddoc::NewsAtom # :nodoc:
|
|
14
36
|
atom_uri.path += "NEWS.atom.xml"
|
15
37
|
news_uri = @rdoc_uri.dup
|
16
38
|
news_uri.path += "NEWS.html"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
x
|
21
|
-
x
|
22
|
-
x
|
23
|
-
x
|
39
|
+
|
40
|
+
dst = ''
|
41
|
+
x(dst, 'feed', xmlns: 'http://www.w3.org/2005/Atom') do
|
42
|
+
x(dst, 'id', atom_uri.to_s)
|
43
|
+
x(dst, 'title', "#{project_name} news")
|
44
|
+
x(dst, 'subtitle', short_desc)
|
45
|
+
x(dst, 'link', rel: 'alternate', type: 'text/html', href: news_uri.to_s)
|
46
|
+
x(dst, 'updated', new_tags.empty? ? '1970-01-01:00:00:00Z'
|
47
|
+
: new_tags[0][:time])
|
24
48
|
new_tags.each do |tag|
|
25
|
-
x
|
26
|
-
x
|
27
|
-
x
|
28
|
-
x
|
29
|
-
x
|
30
|
-
x
|
31
|
-
x
|
49
|
+
x(dst, 'entry') do
|
50
|
+
x(dst, 'title', tag[:subject])
|
51
|
+
x(dst, 'updated', tag[:time])
|
52
|
+
x(dst, 'published', tag[:time])
|
53
|
+
x(dst, 'author') do
|
54
|
+
x(dst, 'name', tag[:tagger_name])
|
55
|
+
x(dst, 'email', tag[:tagger_email])
|
32
56
|
end
|
33
57
|
uri = tag_uri(tag[:tag]).to_s
|
34
|
-
x
|
35
|
-
x
|
36
|
-
x
|
37
|
-
x
|
38
|
-
x
|
39
|
-
end
|
40
|
-
end
|
58
|
+
x(dst, 'link', rel: 'alternate', type: 'text/html', href: uri)
|
59
|
+
x(dst, 'id', uri)
|
60
|
+
x(dst, 'content', type: 'xhtml') do
|
61
|
+
x(dst, 'div', xmlns: 'http://www.w3.org/1999/xhtml') do
|
62
|
+
x(dst, 'pre', tag[:body])
|
63
|
+
end # div
|
64
|
+
end # content
|
41
65
|
end # entry
|
42
|
-
end # new_tags
|
66
|
+
end # new_tags.each
|
43
67
|
end # feed
|
44
|
-
[
|
68
|
+
[ dst, new_tags ]
|
45
69
|
end
|
46
70
|
|
47
71
|
def news_atom(dest = "NEWS.atom.xml")
|
data/lib/olddoc/news_rdoc.rb
CHANGED
data/lib/oldweb/class.rhtml
CHANGED
@@ -46,7 +46,7 @@ id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details">
|
|
46
46
|
seq ? " #{h(seq.strip)}" : "" %><%
|
47
47
|
end %></b> <%= method_srclink(method) %></pre><%=
|
48
48
|
method.comment ? method.description.strip : nd %><%
|
49
|
-
if method.calls_super %>Calls superclass method<%=
|
49
|
+
if method.calls_super %>Calls superclass method <%=
|
50
50
|
method.superclass_method ?
|
51
51
|
method.formatter.link(method.superclass_method.full_name,
|
52
52
|
method.superclass_method.full_name) : nil
|
data/olddoc.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: olddoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- olddoc hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -30,20 +30,6 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '6.0'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: builder
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '3.2'
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '3.2'
|
47
33
|
description: |-
|
48
34
|
olddoc contains old-fashioned document generators for those who do not
|
49
35
|
wish to impose bloated, new-fangled web cruft on their readers.
|