rdoc-generator-sixfish 0.3.1 → 0.5.0.pre20180710102525
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.editorconfig +16 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/ChangeLog +675 -0
- data/History.md +20 -16
- data/Manifest.txt +29 -0
- data/README.md +24 -30
- data/data/rdoc-generator-sixfish/css/sixfish.css +1184 -2
- data/data/rdoc-generator-sixfish/css/sixfish.css.map +7 -1
- data/data/rdoc-generator-sixfish/fa/light.js +0 -0
- data/data/rdoc-generator-sixfish/fa/light.svg +0 -0
- data/data/rdoc-generator-sixfish/fa/loader.js +1 -0
- data/data/rdoc-generator-sixfish/fa/regular.js +1 -0
- data/data/rdoc-generator-sixfish/fa/regular.svg +662 -0
- data/data/rdoc-generator-sixfish/fa/solid.js +1 -0
- data/data/rdoc-generator-sixfish/fa/solid.svg +662 -0
- data/data/rdoc-generator-sixfish/images/glyphicons-28-search.png +0 -0
- data/data/rdoc-generator-sixfish/js/jquery-3.1.1.js +10220 -0
- data/data/rdoc-generator-sixfish/js/sixfish.min.js +99 -0
- data/data/rdoc-generator-sixfish/templates/class.tmpl +180 -179
- data/data/rdoc-generator-sixfish/templates/file.tmpl +16 -4
- data/data/rdoc-generator-sixfish/templates/index.tmpl +48 -77
- data/data/rdoc-generator-sixfish/templates/layout.tmpl +51 -71
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc/generator/sixfish.rb +66 -45
- data/lib/sixfish.rb +9 -10
- data/spec/rdoc/generator/sixfish_spec.rb +16 -22
- data/spec/sixfish_spec.rb +5 -1
- data.tar.gz.sig +3 -2
- metadata +163 -63
- metadata.gz.sig +0 -0
- data/data/rdoc-generator-sixfish/css/fa-solid-900.515704be.ttf +0 -0
- data/data/rdoc-generator-sixfish/css/fa-solid-900.7ba04835.svg +0 -1
- data/data/rdoc-generator-sixfish/css/fa-solid-900.8c589fd1.eot +0 -0
- data/data/rdoc-generator-sixfish/css/fa-solid-900.c7b072c6.woff +0 -0
- data/data/rdoc-generator-sixfish/css/fa-solid-900.f2049a98.woff2 +0 -0
- data/data/rdoc-generator-sixfish/js/sixfish.js +0 -39
- data/data/rdoc-generator-sixfish/js/sixfish.js.map +0 -1
- data/lib/inversion/template/striptag.rb +0 -42
- data/lib/sixfish/patches.rb +0 -73
@@ -1,42 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
# frozen_string_literal: true
|
3
|
-
# vim: set noet nosta sw=4 ts=4 :
|
4
|
-
|
5
|
-
require 'uri'
|
6
|
-
require 'inversion/template' unless defined?( Inversion::Template )
|
7
|
-
require 'inversion/template/attrtag'
|
8
|
-
|
9
|
-
# Inversion strip tag.
|
10
|
-
#
|
11
|
-
# This tag strips markup from a template attribute.
|
12
|
-
#
|
13
|
-
# == Syntax
|
14
|
-
#
|
15
|
-
# <?strip foo.bar ?>
|
16
|
-
#
|
17
|
-
class Inversion::Template::StripTag < Inversion::Template::AttrTag
|
18
|
-
include Inversion::Escaping
|
19
|
-
|
20
|
-
|
21
|
-
HTML_TAG = %r{
|
22
|
-
<
|
23
|
-
/?
|
24
|
-
\p{Alnum}+
|
25
|
-
(
|
26
|
-
\s+
|
27
|
-
\S+="[^\"]*"
|
28
|
-
)*
|
29
|
-
\s*
|
30
|
-
>
|
31
|
-
}xi
|
32
|
-
|
33
|
-
|
34
|
-
### Render the method chains against the attributes of the specified +render_state+
|
35
|
-
### and return them.
|
36
|
-
def render( render_state )
|
37
|
-
raw = super or return nil
|
38
|
-
return raw.gsub(HTML_TAG, '')
|
39
|
-
end
|
40
|
-
|
41
|
-
end # class Inversion::Template::StripTag
|
42
|
-
|
data/lib/sixfish/patches.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'rdoc/markup/to_html'
|
5
|
-
|
6
|
-
require 'sixfish' unless defined?( Sixfish )
|
7
|
-
|
8
|
-
|
9
|
-
module Sixfish::Patches
|
10
|
-
|
11
|
-
LIST_TYPE_TO_HTML = {
|
12
|
-
:BULLET => ['<ul>', '</ul>'],
|
13
|
-
:LABEL => ['<dl class="rdoc-list label-list">', '</dl>'],
|
14
|
-
:LALPHA => ['<ol style="list-style-type: lower-alpha">', '</ol>'],
|
15
|
-
:NOTE => [
|
16
|
-
'<table class="rdoc-list note-list table"><tbody>',
|
17
|
-
'</tbody></table>'
|
18
|
-
],
|
19
|
-
:NUMBER => ['<ol>', '</ol>'],
|
20
|
-
:UALPHA => ['<ol style="list-style-type: upper-alpha">', '</ol>'],
|
21
|
-
}
|
22
|
-
|
23
|
-
|
24
|
-
def html_list_name(list_type, open_tag)
|
25
|
-
tags = Sixfish::Patches::LIST_TYPE_TO_HTML[list_type]
|
26
|
-
raise RDoc::Error, "Invalid list type: #{list_type.inspect}" unless tags
|
27
|
-
tags[open_tag ? 0 : 1]
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
def list_item_start(list_item, list_type)
|
32
|
-
case list_type
|
33
|
-
when :BULLET, :LALPHA, :NUMBER, :UALPHA then
|
34
|
-
"<li>"
|
35
|
-
when :LABEL, :NOTE then
|
36
|
-
Array(list_item.label).map do |label|
|
37
|
-
"<tr><td>#{to_html label}\n"
|
38
|
-
end.join << "</td><td>"
|
39
|
-
else
|
40
|
-
raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
def list_end_for(list_type)
|
46
|
-
case list_type
|
47
|
-
when :BULLET, :LALPHA, :NUMBER, :UALPHA then
|
48
|
-
"</li>"
|
49
|
-
when :LABEL, :NOTE then
|
50
|
-
"</td></tr>"
|
51
|
-
else
|
52
|
-
raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
|
57
|
-
def accept_heading( heading )
|
58
|
-
level = [6, heading.level].min
|
59
|
-
label = heading.label @code_object
|
60
|
-
|
61
|
-
@res << if @options.output_decoration
|
62
|
-
"\n<h#{level} id=\"#{label}\">"
|
63
|
-
else
|
64
|
-
"\n<h#{level}>"
|
65
|
-
end
|
66
|
-
|
67
|
-
@res << to_html(heading.text)
|
68
|
-
@res << "</h#{level}>\n"
|
69
|
-
end
|
70
|
-
|
71
|
-
end # module Sixfish::Patches
|
72
|
-
|
73
|
-
|