docrb-html 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +1 -1
- data/.rubocop.yml +32 -15
- data/Gemfile +11 -1
- data/Gemfile.lock +52 -2
- data/assets/breadcrumb.scss +0 -1
- data/assets/class_header.scss +1 -0
- data/assets/constant_display.scss +16 -0
- data/assets/doc_box.scss +34 -4
- data/assets/documentation_block.scss +29 -1
- data/assets/field_block.scss +46 -0
- data/assets/js/filtering.js +3 -3
- data/assets/links.scss +0 -2
- data/assets/method_argument.scss +2 -8
- data/assets/method_display.scss +4 -0
- data/assets/method_list.scss +40 -0
- data/assets/reference.scss +1 -1
- data/assets/style.scss +3 -0
- data/assets/svg.scss +37 -0
- data/assets/symbol.scss +1 -1
- data/assets/text_block.scss +9 -9
- data/bin/smoke +5 -0
- data/{renderer.gemspec → docrb-html.gemspec} +2 -0
- data/exe/docrb-html +1 -1
- data/lib/docrb-html.rb +165 -0
- data/lib/renderer/component/attribute.rb +9 -0
- data/lib/renderer/component/attribute_display.rb +17 -0
- data/lib/renderer/component/constant_display.rb +9 -0
- data/lib/renderer/component/doc_box.rb +26 -18
- data/lib/renderer/component/documentation_comment.rb +9 -0
- data/lib/renderer/component/field_block.rb +9 -0
- data/lib/renderer/component/method_argument.rb +19 -63
- data/lib/renderer/component/method_display.rb +1 -1
- data/lib/renderer/component/method_list.rb +1 -1
- data/lib/renderer/component/reference.rb +23 -12
- data/lib/renderer/component/text_block.rb +1 -7
- data/lib/renderer/component.rb +4 -4
- data/lib/renderer/core_extensions.rb +12 -1
- data/lib/renderer/entities/attribute.rb +17 -0
- data/lib/renderer/entities/attribute_definition.rb +23 -0
- data/lib/renderer/entities/base.rb +58 -0
- data/lib/renderer/entities/class.rb +17 -0
- data/lib/renderer/entities/container.rb +52 -0
- data/lib/renderer/entities/method.rb +18 -0
- data/lib/renderer/entities/method_argument.rb +27 -0
- data/lib/renderer/entities/method_definition.rb +25 -0
- data/lib/renderer/entities/module.rb +29 -0
- data/lib/renderer/entities/reference.rb +103 -0
- data/lib/renderer/entities/source_definition.rb +17 -0
- data/lib/renderer/entities.rb +30 -0
- data/lib/renderer/helpers.rb +77 -19
- data/lib/renderer/markdown.rb +62 -0
- data/lib/renderer/metadata.rb +10 -26
- data/lib/renderer/template.rb +4 -6
- data/lib/renderer/version.rb +1 -1
- data/script/makecomponent +1 -1
- data/templates/attribute.erb +10 -0
- data/templates/attribute_display.erb +22 -0
- data/templates/breadcrumb.erb +9 -9
- data/templates/class_header.erb +6 -7
- data/templates/component_list.erb +14 -8
- data/templates/constant_display.erb +13 -0
- data/templates/doc_box.erb +40 -31
- data/templates/documentation_block.erb +2 -11
- data/templates/documentation_comment.erb +23 -0
- data/templates/field_block.erb +15 -0
- data/templates/method_argument.erb +4 -4
- data/templates/method_display.erb +14 -21
- data/templates/method_list.erb +52 -8
- data/templates/reference.erb +10 -7
- data/templates/text_block.erb +13 -14
- metadata +60 -8
- data/lib/renderer/defs/specialized_object.rb +0 -172
- data/lib/renderer/defs/specialized_projection.rb +0 -31
- data/lib/renderer/defs.rb +0 -180
- data/lib/renderer.rb +0 -131
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ab65a6bab83355b8532920f7dfa26d9f9e05d99fbe6cdbe1677a9b75695861
|
4
|
+
data.tar.gz: e69e29e51b3e4bc491e058259be007910032607cce30e0e7223a4a1adad23c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935815ac11006ab359e5c489f57266d8de17691bc9035a45cd7564e8b3142e927313cef65e41401e1e713422ad77d3c3f7653c9cf0d9167eb8f3cb77c285ff05
|
7
|
+
data.tar.gz: 9e57cd852acb2f6bc459206e81088088bd85be92600a973e911c6cddb0e266c384e08b978cb53c7e0b364778358ec515cf21c7d86ede85b91a501c38b5e11103
|
data/.editorconfig
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 3.2
|
3
|
+
SuggestExtensions: false
|
3
4
|
NewCops: enable
|
4
5
|
|
5
6
|
Style/StringLiterals:
|
@@ -13,40 +14,56 @@ Style/StringLiteralsInInterpolation:
|
|
13
14
|
Layout/LineLength:
|
14
15
|
Max: 120
|
15
16
|
|
16
|
-
|
17
|
-
|
17
|
+
Layout/FirstHashElementIndentation:
|
18
|
+
EnforcedStyle: consistent
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
Layout/EndAlignment:
|
21
|
+
EnforcedStyleAlignWith: start_of_line
|
21
22
|
|
22
|
-
|
23
|
-
|
23
|
+
Layout/MultilineMethodCallIndentation:
|
24
|
+
EnforcedStyle: indented
|
24
25
|
|
25
|
-
|
26
|
+
Style/Documentation:
|
26
27
|
Enabled: false
|
27
28
|
|
28
|
-
|
29
|
+
Layout/CaseIndentation:
|
30
|
+
EnforcedStyle: end
|
31
|
+
|
32
|
+
Layout/FirstArgumentIndentation:
|
33
|
+
EnforcedStyle: consistent_relative_to_receiver
|
34
|
+
|
35
|
+
Layout/ArgumentAlignment:
|
36
|
+
EnforcedStyle: with_fixed_indentation
|
37
|
+
|
38
|
+
Style/EmptyCaseCondition:
|
29
39
|
Enabled: false
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
- bin/*
|
41
|
+
Metrics/BlockLength:
|
42
|
+
Enabled: false
|
34
43
|
|
35
|
-
Metrics/
|
44
|
+
Metrics/ClassLength:
|
36
45
|
Enabled: false
|
37
46
|
|
38
47
|
Metrics/ModuleLength:
|
39
48
|
Enabled: false
|
40
49
|
|
41
|
-
|
50
|
+
Metrics/MethodLength:
|
42
51
|
Enabled: false
|
43
52
|
|
44
|
-
|
53
|
+
Metrics/AbcSize:
|
45
54
|
Enabled: false
|
46
55
|
|
47
|
-
|
56
|
+
Metrics/CyclomaticComplexity:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Metrics/PerceivedComplexity:
|
48
60
|
Enabled: false
|
49
61
|
|
50
62
|
Style/FrozenStringLiteralComment:
|
51
63
|
Exclude:
|
52
64
|
- lib/renderer/helpers.rb
|
65
|
+
- lib/renderer/template.rb
|
66
|
+
|
67
|
+
Naming/FileName:
|
68
|
+
Exclude:
|
69
|
+
- lib/docrb-html.rb
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,33 +1,83 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
docrb-html (0.
|
4
|
+
docrb-html (0.3.0)
|
5
5
|
nokogiri (~> 1.14)
|
6
|
+
redcarpet (~> 3.6)
|
7
|
+
rouge (~> 4.1)
|
6
8
|
sassc (~> 2.4)
|
7
9
|
|
8
10
|
GEM
|
9
11
|
remote: https://rubygems.org/
|
10
12
|
specs:
|
13
|
+
ast (2.4.2)
|
14
|
+
awesome_print (1.9.2)
|
11
15
|
byebug (11.1.3)
|
16
|
+
diff-lcs (1.5.0)
|
12
17
|
ffi (1.15.5)
|
18
|
+
json (2.6.3)
|
19
|
+
language_server-protocol (3.17.0.3)
|
13
20
|
nokogiri (1.14.2-arm64-darwin)
|
14
21
|
racc (~> 1.4)
|
15
22
|
nokogiri (1.14.2-x86_64-darwin)
|
16
23
|
racc (~> 1.4)
|
17
24
|
nokogiri (1.14.2-x86_64-linux)
|
18
25
|
racc (~> 1.4)
|
26
|
+
parallel (1.23.0)
|
27
|
+
parser (3.2.2.4)
|
28
|
+
ast (~> 2.4.1)
|
29
|
+
racc
|
19
30
|
racc (1.6.2)
|
31
|
+
rainbow (3.1.1)
|
32
|
+
rake (13.0.6)
|
33
|
+
redcarpet (3.6.0)
|
34
|
+
regexp_parser (2.8.2)
|
35
|
+
rexml (3.2.6)
|
36
|
+
rouge (4.2.0)
|
37
|
+
rspec (3.12.0)
|
38
|
+
rspec-core (~> 3.12.0)
|
39
|
+
rspec-expectations (~> 3.12.0)
|
40
|
+
rspec-mocks (~> 3.12.0)
|
41
|
+
rspec-core (3.12.2)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-expectations (3.12.3)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-mocks (3.12.6)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.12.0)
|
49
|
+
rspec-support (3.12.1)
|
50
|
+
rubocop (1.57.2)
|
51
|
+
json (~> 2.3)
|
52
|
+
language_server-protocol (>= 3.17.0)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 3.2.2.4)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8, < 3.0)
|
57
|
+
rexml (>= 3.2.5, < 4.0)
|
58
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
61
|
+
rubocop-ast (1.30.0)
|
62
|
+
parser (>= 3.2.1.0)
|
63
|
+
ruby-progressbar (1.13.0)
|
20
64
|
sassc (2.4.0)
|
21
65
|
ffi (~> 1.9)
|
66
|
+
unicode-display_width (2.5.0)
|
22
67
|
|
23
68
|
PLATFORMS
|
24
69
|
arm64-darwin-22
|
70
|
+
arm64-darwin-23
|
25
71
|
x86_64-darwin-22
|
26
72
|
x86_64-linux
|
27
73
|
|
28
74
|
DEPENDENCIES
|
29
|
-
|
75
|
+
awesome_print
|
76
|
+
byebug
|
30
77
|
docrb-html!
|
78
|
+
rake (~> 13.0)
|
79
|
+
rspec (~> 3.0)
|
80
|
+
rubocop (~> 1.21)
|
31
81
|
|
32
82
|
BUNDLED WITH
|
33
83
|
2.4.2
|
data/assets/breadcrumb.scss
CHANGED
data/assets/class_header.scss
CHANGED
data/assets/doc_box.scss
CHANGED
@@ -13,7 +13,6 @@ div.doc-box-base {
|
|
13
13
|
|
14
14
|
.left {
|
15
15
|
flex: 1;
|
16
|
-
max-width: 100%;
|
17
16
|
flex-wrap: wrap;
|
18
17
|
|
19
18
|
.section-container {
|
@@ -53,6 +52,37 @@ div.doc-box-base {
|
|
53
52
|
.faded {
|
54
53
|
@include faded;
|
55
54
|
}
|
55
|
+
|
56
|
+
.doc-block {
|
57
|
+
margin-top: 8px;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.constant-container {
|
62
|
+
margin-bottom: 12px;
|
63
|
+
|
64
|
+
.decoration {
|
65
|
+
display: inline-block;
|
66
|
+
margin-right: 8px;
|
67
|
+
margin-left: -18px;
|
68
|
+
}
|
69
|
+
|
70
|
+
.name {
|
71
|
+
@include mono;
|
72
|
+
color: #FFAB42;
|
73
|
+
}
|
74
|
+
|
75
|
+
.label {
|
76
|
+
@include label;
|
77
|
+
}
|
78
|
+
|
79
|
+
.faded {
|
80
|
+
@include faded;
|
81
|
+
}
|
82
|
+
|
83
|
+
.doc-block {
|
84
|
+
margin-top: 8px;
|
85
|
+
}
|
56
86
|
}
|
57
87
|
}
|
58
88
|
|
@@ -71,9 +101,9 @@ div.doc-box-base {
|
|
71
101
|
}
|
72
102
|
|
73
103
|
a {
|
74
|
-
|
75
|
-
|
76
|
-
|
104
|
+
color: #FFF;
|
105
|
+
@include body;
|
106
|
+
text-decoration: none;
|
77
107
|
}
|
78
108
|
}
|
79
109
|
}
|
@@ -1,5 +1,33 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
.documentation-comment-base, div.documentation-block-base {
|
3
|
+
line-height: 1.5;
|
2
4
|
.faded {
|
3
5
|
@include faded;
|
4
6
|
}
|
7
|
+
|
8
|
+
.inline { display: inline-block }
|
9
|
+
|
10
|
+
.method-ref {
|
11
|
+
@include mono;
|
12
|
+
}
|
13
|
+
|
14
|
+
code {
|
15
|
+
@include mono;
|
16
|
+
font-size: 95%;
|
17
|
+
padding: 3px 4px;
|
18
|
+
background-color: #29292B;
|
19
|
+
border-radius: 3px;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.unknown-object {
|
24
|
+
@include body;
|
25
|
+
display: inline-block;
|
26
|
+
padding: 0.2em 0.4em;
|
27
|
+
margin: 0;
|
28
|
+
font-size: 85%;
|
29
|
+
background: #ffd842;
|
30
|
+
border-radius: 6px;
|
31
|
+
text-shadow: 0 0 1px #988128;
|
32
|
+
color: black;
|
5
33
|
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
.field-block-base {
|
2
|
+
margin-left: 8px;
|
3
|
+
|
4
|
+
.documentation-comment-base {
|
5
|
+
display: inline-block;
|
6
|
+
}
|
7
|
+
|
8
|
+
h3 {
|
9
|
+
@include faded;
|
10
|
+
text-transform: uppercase;
|
11
|
+
margin: 15px 0 0;
|
12
|
+
font-size: 0.8em;
|
13
|
+
font-weight: 500;
|
14
|
+
letter-spacing: 2px;
|
15
|
+
line-height: 1;
|
16
|
+
}
|
17
|
+
|
18
|
+
table {
|
19
|
+
margin-bottom: 5px;
|
20
|
+
border-spacing: 10px 5px;
|
21
|
+
|
22
|
+
.name {
|
23
|
+
@include mono;
|
24
|
+
color: white;
|
25
|
+
vertical-align: top;
|
26
|
+
}
|
27
|
+
|
28
|
+
.value {
|
29
|
+
vertical-align: center;
|
30
|
+
.inline > .html {
|
31
|
+
margin: 0;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
code {
|
37
|
+
padding: 0.2em 0.4em;
|
38
|
+
margin: 0;
|
39
|
+
font-size: 85%;
|
40
|
+
white-space: break-spaces;
|
41
|
+
background: #48484d;
|
42
|
+
border-radius: 6px;
|
43
|
+
text-shadow: 0 0 3px black;
|
44
|
+
color: white;
|
45
|
+
}
|
46
|
+
}
|
data/assets/js/filtering.js
CHANGED
@@ -20,9 +20,9 @@
|
|
20
20
|
'[data-visibility="internal"]': !hideInternalCheck.checked,
|
21
21
|
'[data-visibility="private"]': !hidePrivateCheck.checked,
|
22
22
|
'[data-type="attribute"]': !hideAttrsCheck.checked,
|
23
|
-
'[data-origin="
|
24
|
-
'[data-origin="
|
25
|
-
'[data-origin="
|
23
|
+
'[data-origin="inherited"]': !hideInheritedCheck.checked,
|
24
|
+
'[data-origin="included"]': showIncludedCheck.checked,
|
25
|
+
'[data-origin="extended"]': showExtendedCheck.checked,
|
26
26
|
});
|
27
27
|
const attrs = ["data-visibility", "data-type", "data-origin"];
|
28
28
|
const filters = Object.keys(determineVisibility());
|
data/assets/links.scss
CHANGED
data/assets/method_argument.scss
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
div.method-argument-base {
|
2
2
|
color: #FFAB42;
|
3
|
-
display: inline;
|
4
3
|
display: flex;
|
5
4
|
|
6
5
|
span { display: inline-block; }
|
@@ -63,13 +62,8 @@ div.method-argument-base {
|
|
63
62
|
.simple-argument {
|
64
63
|
&.symbol { color: #CF91C9; }
|
65
64
|
&.number { color: #FF724C; }
|
66
|
-
&.string {
|
67
|
-
color: #8CC98F;
|
68
|
-
:before, :after {
|
69
|
-
content: '"';
|
70
|
-
color: #39B6B5;
|
71
|
-
}
|
72
|
-
}
|
65
|
+
&.string { color: #8CC98F; }
|
73
66
|
&.plain { color: white; }
|
67
|
+
&.call { color: white; }
|
74
68
|
}
|
75
69
|
}
|
data/assets/method_display.scss
CHANGED
data/assets/method_list.scss
CHANGED
@@ -3,6 +3,46 @@ div.method-list-base {
|
|
3
3
|
margin-bottom: 23px;
|
4
4
|
}
|
5
5
|
|
6
|
+
.override-info-box {
|
7
|
+
@include faded;
|
8
|
+
padding-top: 8px;
|
9
|
+
font-size: 85%;
|
10
|
+
a {
|
11
|
+
@include mono;
|
12
|
+
font-size: inherit;
|
13
|
+
opacity: 80%;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.overridden-by-block {
|
18
|
+
@include faded;
|
19
|
+
font-size: 85%;
|
20
|
+
padding-top: 8px;
|
21
|
+
|
22
|
+
span {
|
23
|
+
@include mono;
|
24
|
+
font-size: inherit;
|
25
|
+
}
|
26
|
+
|
27
|
+
summary {
|
28
|
+
cursor: pointer;
|
29
|
+
}
|
30
|
+
|
31
|
+
a {
|
32
|
+
font-size: inherit;
|
33
|
+
opacity: 85%;
|
34
|
+
}
|
35
|
+
|
36
|
+
ul {
|
37
|
+
padding-top: 5px;
|
38
|
+
padding-left: 25px;
|
39
|
+
|
40
|
+
li {
|
41
|
+
padding-bottom: 8px;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
6
46
|
.doc-block {
|
7
47
|
margin-top: 8px;
|
8
48
|
}
|
data/assets/reference.scss
CHANGED
data/assets/style.scss
CHANGED
data/assets/svg.scss
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
.svg-container {
|
2
|
+
cursor: help;
|
3
|
+
position: relative;
|
4
|
+
|
5
|
+
.svg-title {
|
6
|
+
@include body;
|
7
|
+
cursor: default;
|
8
|
+
padding: 0.4em 0.8em;
|
9
|
+
white-space: break-spaces;
|
10
|
+
background: #48484d;
|
11
|
+
border-radius: 6px;
|
12
|
+
text-shadow: 0 0 3px black;
|
13
|
+
|
14
|
+
display: none;
|
15
|
+
position: absolute;
|
16
|
+
font-size: 14px;
|
17
|
+
color: white;
|
18
|
+
left: 22px;
|
19
|
+
top: -5px;
|
20
|
+
|
21
|
+
&::before {
|
22
|
+
content: '';
|
23
|
+
display: block;
|
24
|
+
background-color: #48484d;
|
25
|
+
height: 10px;
|
26
|
+
width: 10px;
|
27
|
+
position: absolute;
|
28
|
+
top: calc(50% - 5px);
|
29
|
+
left: -5px;
|
30
|
+
transform: rotate(45deg);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&:hover {
|
35
|
+
.svg-title { display: block; }
|
36
|
+
}
|
37
|
+
}
|
data/assets/symbol.scss
CHANGED
data/assets/text_block.scss
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
div.text-block-base {
|
2
2
|
.html {
|
3
|
-
display:
|
3
|
+
display: flex;
|
4
|
+
flex-wrap: wrap;
|
5
|
+
|
4
6
|
&.inline {
|
5
|
-
display: inline;
|
7
|
+
display: inline-block;
|
6
8
|
}
|
7
9
|
|
8
|
-
margin-bottom: 12px;
|
9
10
|
&.no-margin {
|
10
11
|
margin-bottom: 0;
|
11
12
|
}
|
12
13
|
|
13
14
|
@include body;
|
14
15
|
color: #FFFFFF;
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
border-radius: 3px;
|
16
|
+
|
17
|
+
.documentation-comment-base { display: inline-block; }
|
18
|
+
|
19
|
+
span {
|
20
|
+
white-space: pre-wrap;
|
21
21
|
}
|
22
22
|
}
|
23
23
|
}
|
data/bin/smoke
ADDED
data/exe/docrb-html
CHANGED