muwu 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/muwu/cli/help/summary +1 -1
- data/lib/muwu/cli/help/view +2 -2
- data/lib/muwu/controller/controller_interaction.rb +10 -4
- data/lib/muwu/default/default.rb +2 -8
- data/lib/muwu/helper/html_href_helper.rb +77 -77
- data/lib/muwu/helper/outline_helper.rb +22 -24
- data/lib/muwu/helper/regexp_lib.rb +26 -51
- data/lib/muwu/helper/sanitizer_helper.rb +5 -5
- data/lib/muwu/manifest/manifest.rb +52 -70
- data/lib/muwu/manifest_task/document_html.rb +16 -22
- data/lib/muwu/manifest_task/text.rb +13 -13
- data/lib/muwu/manifest_task/{text_item.rb → topic.rb} +9 -9
- data/lib/muwu/manifest_task_builder/text_builder.rb +24 -24
- data/lib/muwu/manifest_task_builder/{text_item_builder.rb → topic_builder.rb} +48 -74
- data/lib/muwu/project/project.rb +0 -8
- data/lib/muwu/project_builder/assets/config/css/base/html_elements.scss +57 -62
- data/lib/muwu/project_builder/assets/config/css/base/index.scss +3 -2
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_contents.scss +35 -57
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_metadata.scss +2 -14
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_navigator.scss +6 -11
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_subcontents.scss +35 -57
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_text.scss +2 -48
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_title.scss +18 -23
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_topic.scss +38 -0
- data/lib/muwu/project_builder/assets/config/css/colors/dark.scss +33 -31
- data/lib/muwu/project_builder/assets/config/css/colors/index.scss +2 -1
- data/lib/muwu/project_builder/assets/config/css/colors/light.scss +33 -33
- data/lib/muwu/project_builder/project_validator.rb +7 -7
- data/lib/muwu/project_exception/{lynx_not_available.rb → no_html_viewer_configured.rb} +2 -2
- data/lib/muwu/project_exception/{text_source_file_not_found.rb → topic_source_file_not_found.rb} +6 -7
- data/lib/muwu/project_options/project_options.rb +4 -1
- data/lib/muwu/project_options_builder/project_option_validator_key.rb +17 -19
- data/lib/muwu/project_options_builder/project_option_validator_value.rb +42 -59
- data/lib/muwu/render_concat/render_concat.rb +22 -22
- data/lib/muwu/render_html_partial/js_library/navigation.js +1 -1
- data/lib/muwu/render_html_partial/render_contents.rb +139 -139
- data/lib/muwu/render_html_partial/render_document_html.rb +2 -2
- data/lib/muwu/render_html_partial/render_metadata.rb +25 -37
- data/lib/muwu/render_html_partial/render_navigator.rb +39 -39
- data/lib/muwu/render_html_partial/render_subcontents.rb +142 -143
- data/lib/muwu/render_html_partial/render_text.rb +11 -11
- data/lib/muwu/render_html_partial/render_title.rb +21 -21
- data/lib/muwu/render_html_partial/{render_text_item.rb → render_topic.rb} +62 -35
- data/lib/muwu/render_html_partial_builder/render_contents_builder.rb +17 -23
- data/lib/muwu/render_html_partial_builder/render_subcontents_builder.rb +3 -9
- data/lib/muwu/render_html_partial_builder/render_text_builder.rb +11 -11
- data/lib/muwu/render_html_partial_builder/render_topic_builder.rb +281 -0
- data/lib/muwu/render_inspector/render_inspector.rb +58 -58
- data/lib/muwu/viewer/viewer.rb +2 -2
- data/lib/muwu.rb +2 -7
- metadata +30 -78
- data/lib/muwu/project_builder/assets/config/css/base/mixin_text_section_heading.scss +0 -24
- data/lib/muwu/render_html/render_markup_to_html.rb +0 -87
- data/lib/muwu/render_html_partial_builder/render_text_item_builder.rb +0 -274
- data/lib/muwu/var/deflistdiv.rb +0 -239
|
@@ -1,58 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
margin:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
td.number {
|
|
38
|
-
text-align: right;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
>ol {
|
|
43
|
-
list-style-type: none;
|
|
44
|
-
display: block;
|
|
45
|
-
margin: 0rem 0.5rem;
|
|
46
|
-
li {
|
|
47
|
-
margin: ($muwu-root-line-height * 0.5) 0rem;
|
|
48
|
-
a {
|
|
49
|
-
display: inline;
|
|
50
|
-
}
|
|
51
|
-
ol {
|
|
52
|
-
list-style-type: none;
|
|
53
|
-
display: block;
|
|
54
|
-
margin: 0rem 1.5rem;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
[data-document-block='subcontents'] {
|
|
2
|
+
margin: $margin-triple 0;
|
|
3
|
+
}
|
|
4
|
+
[data-subcontents='heading'] {
|
|
5
|
+
font-size: 2.0em;
|
|
6
|
+
margin-bottom: $margin;
|
|
7
|
+
text-align: left;
|
|
8
|
+
}
|
|
9
|
+
[data-subcontents='list'] {
|
|
10
|
+
list-style-type: none;
|
|
11
|
+
display: block;
|
|
12
|
+
margin: 0rem;
|
|
13
|
+
}
|
|
14
|
+
[data-subcontents='list-topic'] {
|
|
15
|
+
margin: $margin-half 0rem;
|
|
16
|
+
}
|
|
17
|
+
[data-subcontents='list-topic'] > [data-subcontents='list'] {
|
|
18
|
+
margin: 0 $margin-half;
|
|
19
|
+
}
|
|
20
|
+
[data-subcontents='table'] {
|
|
21
|
+
border-collapse: collapse;
|
|
22
|
+
}
|
|
23
|
+
[data-subcontents='table-number'] {
|
|
24
|
+
padding: $margin-quarter;
|
|
25
|
+
text-align: right;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
}
|
|
28
|
+
[data-subcontents='table-topic'] {
|
|
29
|
+
padding: $margin-quarter;
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
32
|
+
[data-subcontents='table-topic'] > [data-subcontents='table'] {
|
|
33
|
+
border-collapse: collapse;
|
|
34
|
+
margin-top: $margin-contents-subtable;
|
|
35
|
+
margin-bottom: -($margin-contents-subtable);
|
|
58
36
|
}
|
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
body >div.text {
|
|
4
|
-
margin: ($muwu-root-line-height * 6) 0rem;
|
|
5
|
-
ol {
|
|
6
|
-
padding-left: 1rem;
|
|
7
|
-
}
|
|
8
|
-
ul {
|
|
9
|
-
padding-left: 1rem;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
section[data-section_depth] {
|
|
13
|
-
>.section_number {
|
|
14
|
-
font-weight: bold;
|
|
15
|
-
display: block;
|
|
16
|
-
margin-bottom: none;
|
|
17
|
-
text-decoration: none;
|
|
18
|
-
}
|
|
19
|
-
nav.document_links {
|
|
20
|
-
width: 100%;
|
|
21
|
-
margin: ($muwu-root-line-height * 2) 0rem ($muwu-root-line-height * 4) 0rem;
|
|
22
|
-
text-align: right;
|
|
23
|
-
a.document_link {
|
|
24
|
-
font-size: ($muwu-root-font-size * 0.75);
|
|
25
|
-
margin: 0rem 0.5rem
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
section[data-section_depth='1'] {
|
|
31
|
-
margin: ($muwu-root-line-height * 6) 0;
|
|
32
|
-
@include text_section_heading(($muwu-root-font-size * 1.5), ($muwu-root-line-height * 2));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
section[data-section_depth='2'] {
|
|
36
|
-
margin: ($muwu-root-line-height * 4) 0;
|
|
37
|
-
@include text_section_heading(($muwu-root-font-size * 1.375), ($muwu-root-line-height * 1.5));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
section[data-section_depth='3'] {
|
|
41
|
-
margin: ($muwu-root-line-height * 2) 0;
|
|
42
|
-
@include text_section_heading(($muwu-root-font-size * 1.25), ($muwu-root-line-height * 1.5));
|
|
43
|
-
section[data-section_depth] {
|
|
44
|
-
margin: ($muwu-root-line-height * 2) 0;
|
|
45
|
-
@include text_section_heading(($muwu-root-font-size * 1), ($muwu-root-line-height * 1.5));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
1
|
+
[data-document-block='text'] {
|
|
2
|
+
margin: $margin-triple 0rem;
|
|
49
3
|
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
margin:
|
|
1
|
+
[data-document-block='title'] {
|
|
2
|
+
margin: $margin-triple 0;
|
|
3
3
|
text-align: left;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
margin: ($muwu-root-line-height * 2) 0rem;
|
|
21
|
-
}
|
|
22
|
-
h1:first-child {
|
|
23
|
-
margin-top: 0;
|
|
24
|
-
}
|
|
4
|
+
}
|
|
5
|
+
[data-title-attr='title'] {
|
|
6
|
+
display: block;
|
|
7
|
+
font-size: 2.0em;
|
|
8
|
+
font-weight: bold;
|
|
9
|
+
}
|
|
10
|
+
[data-title-attr='subtitle'] {
|
|
11
|
+
display: block;
|
|
12
|
+
font-size: 1.5em;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
}
|
|
15
|
+
[data-title-attr='author'] {
|
|
16
|
+
display: block;
|
|
17
|
+
font-size: 1.25em;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
margin: $margin-double 0rem;
|
|
25
20
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[data-document-block='topic'] {
|
|
2
|
+
margin: $margin-triple 0rem;
|
|
3
|
+
}
|
|
4
|
+
[data-topic='section-number'] {
|
|
5
|
+
font-weight: bold;
|
|
6
|
+
margin-bottom: $margin-half;
|
|
7
|
+
}
|
|
8
|
+
[data-topic='section-heading'] {
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
margin-bottom: $margin;
|
|
11
|
+
margin-top: $margin-half;
|
|
12
|
+
}
|
|
13
|
+
[data-depth='1'][data-topic='section-heading'] {
|
|
14
|
+
font-size: $font-size-h1;
|
|
15
|
+
}
|
|
16
|
+
[data-depth='1'][data-topic='section-number'] {
|
|
17
|
+
font-size: $font-size-h1;
|
|
18
|
+
}
|
|
19
|
+
[data-depth='2'][data-topic='section-heading'] {
|
|
20
|
+
font-size: 1.375em;
|
|
21
|
+
}
|
|
22
|
+
[data-depth='2'][data-topic='section-number'] {
|
|
23
|
+
font-size: 1.375em;
|
|
24
|
+
}
|
|
25
|
+
[data-depth='3'][data-topic='section-heading'] {
|
|
26
|
+
font-size: 1.25em;
|
|
27
|
+
}
|
|
28
|
+
[data-depth='3'][data-topic='section-number'] {
|
|
29
|
+
font-size: 1.25em;
|
|
30
|
+
}
|
|
31
|
+
[data-topic='navigation'] {
|
|
32
|
+
margin: $margin 0;
|
|
33
|
+
text-align: right;
|
|
34
|
+
}
|
|
35
|
+
[data-topic='navigation-link'] {
|
|
36
|
+
font-size: 0.8em;
|
|
37
|
+
margin: 0 $margin-half;
|
|
38
|
+
}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@media (prefers-color-scheme: dark) {
|
|
2
|
+
body {
|
|
3
|
+
background-color: #141414;
|
|
4
|
+
color: #e4e4e4;
|
|
5
|
+
}
|
|
6
|
+
*:focus {
|
|
7
|
+
background-color: rgba(255, 255, 0, 0.1);
|
|
8
|
+
outline-color: rgba(255, 255, 0, 0.2);
|
|
9
|
+
outline-style: solid;
|
|
10
|
+
outline-width: 1px;
|
|
11
|
+
}
|
|
12
|
+
a {
|
|
13
|
+
color: #ccddff;
|
|
14
|
+
}
|
|
15
|
+
a:visited {
|
|
16
|
+
color: #ddccff;
|
|
17
|
+
}
|
|
18
|
+
a:active {
|
|
19
|
+
color: #ffddcc;
|
|
20
|
+
}
|
|
21
|
+
img {
|
|
22
|
+
background-color: #0b0b0b;
|
|
23
|
+
border-width: 0px;
|
|
24
|
+
border-color: #7f7f7f;
|
|
25
|
+
border-style: solid;
|
|
26
|
+
}
|
|
27
|
+
pre {
|
|
28
|
+
background-color: #0b0b0b;
|
|
29
|
+
border-color: #333333;
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-width: 0px;
|
|
32
|
+
scrollbar-color: #666666 #2c2c2c;
|
|
33
|
+
}
|
|
4
34
|
}
|
|
5
|
-
|
|
6
|
-
div.contents .document_link {
|
|
7
|
-
color: #f8fff0;
|
|
8
|
-
}
|
|
9
|
-
div.navigator .document_link {
|
|
10
|
-
color: #f0f8ff;
|
|
11
|
-
}
|
|
12
|
-
div.subcontents .document_link {
|
|
13
|
-
color: #f8fff0;
|
|
14
|
-
}
|
|
15
|
-
div.text .document_link {
|
|
16
|
-
color: #f8fff0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// a {
|
|
20
|
-
// color: inherit;
|
|
21
|
-
// }
|
|
22
|
-
|
|
23
|
-
img {
|
|
24
|
-
border-width: 0px;
|
|
25
|
-
border-color: #7f7f7f;
|
|
26
|
-
border-style: solid;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
pre {
|
|
30
|
-
background-color: #000000;
|
|
31
|
-
border: 1px #7f7f7f solid;
|
|
32
|
-
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import 'dark';
|
|
2
|
+
@import 'light';
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@media (prefers-color-scheme: light) {
|
|
2
|
+
body {
|
|
3
|
+
background-color: #f4f4f0;
|
|
4
|
+
color: #080808;
|
|
5
|
+
}
|
|
6
|
+
*:focus {
|
|
7
|
+
background-color: rgba(196, 196, 0, 0.25);
|
|
8
|
+
outline-color: rgba(196, 196, 0, 0.5);
|
|
9
|
+
outline-style: solid;
|
|
10
|
+
outline-width: 1px;
|
|
11
|
+
}
|
|
12
|
+
a {
|
|
13
|
+
color: #003377;
|
|
14
|
+
}
|
|
15
|
+
a:visited {
|
|
16
|
+
color: #330077;
|
|
17
|
+
}
|
|
18
|
+
a:active {
|
|
19
|
+
color: #773300;
|
|
20
|
+
}
|
|
21
|
+
img {
|
|
22
|
+
background-color: #e8e8e8;
|
|
23
|
+
border-width: 0px;
|
|
24
|
+
border-color: #000000;
|
|
25
|
+
border-style: solid;
|
|
26
|
+
}
|
|
27
|
+
pre {
|
|
28
|
+
background-color: #e8e8e8;
|
|
29
|
+
border-color: #d0d0d0;
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-width: 0px;
|
|
32
|
+
scrollbar-color: #808080 #bababa;
|
|
33
|
+
}
|
|
4
34
|
}
|
|
5
|
-
|
|
6
|
-
div.contents .document_link {
|
|
7
|
-
color: #002040;
|
|
8
|
-
}
|
|
9
|
-
div.navigator .document_link {
|
|
10
|
-
color: #204000;
|
|
11
|
-
}
|
|
12
|
-
div.subcontents .document_link {
|
|
13
|
-
color: #002040;
|
|
14
|
-
}
|
|
15
|
-
div.text .document_link {
|
|
16
|
-
color: #002040;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// a {
|
|
20
|
-
// color: inherit;
|
|
21
|
-
// }
|
|
22
|
-
|
|
23
|
-
img {
|
|
24
|
-
border-width: 0px;
|
|
25
|
-
border-color: #000000;
|
|
26
|
-
border-style: solid;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
pre {
|
|
30
|
-
background-color: #fcfcfc;
|
|
31
|
-
border: 1px #e0e0e0 solid;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
@@ -139,31 +139,31 @@ module Muwu
|
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
def
|
|
142
|
+
def validate_task_topic(task)
|
|
143
143
|
if task.is_parent_heading
|
|
144
|
-
return
|
|
144
|
+
return validate_task_topic_parent_heading(task)
|
|
145
145
|
elsif task.is_not_parent_heading
|
|
146
|
-
return
|
|
146
|
+
return validate_task_topic_child_heading(task)
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
def
|
|
151
|
+
def validate_task_topic_child_heading(task)
|
|
152
152
|
if task.source_file_does_exist
|
|
153
153
|
return true
|
|
154
154
|
else
|
|
155
|
-
@project.exceptions_add ProjectException::
|
|
155
|
+
@project.exceptions_add ProjectException::TopicSourceFileNotFound.new(task)
|
|
156
156
|
return false
|
|
157
157
|
end
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
def
|
|
161
|
+
def validate_task_topic_parent_heading(task)
|
|
162
162
|
if task.source_file_does_exist
|
|
163
163
|
return true
|
|
164
164
|
else
|
|
165
165
|
if @project.options.warning_if_parent_heading_lacks_source
|
|
166
|
-
@project.exceptions_add ProjectException::
|
|
166
|
+
@project.exceptions_add ProjectException::TopicSourceFileNotFound.new(task)
|
|
167
167
|
return false
|
|
168
168
|
end
|
|
169
169
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module Muwu
|
|
2
2
|
module ProjectException
|
|
3
|
-
class
|
|
3
|
+
class NoHTMLViewerConfigured
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def initialize
|
|
@@ -9,7 +9,7 @@ module Muwu
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def report
|
|
12
|
-
"
|
|
12
|
+
"No HTML viewer configued to run from the 'open' command."
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
|
data/lib/muwu/project_exception/{text_source_file_not_found.rb → topic_source_file_not_found.rb}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
module Muwu
|
|
2
2
|
module ProjectException
|
|
3
|
-
class
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
class TopicSourceFileNotFound
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
def initialize(text_readfile)
|
|
7
7
|
@filename = text_readfile.source_filename
|
|
8
8
|
@numbering = text_readfile.numbering
|
|
9
9
|
@text_root_name = text_readfile.text_root_name
|
|
10
10
|
end
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
13
|
def report
|
|
14
14
|
"file not found `#{@filename}` (#{@text_root_name} #{@numbering})"
|
|
15
15
|
end
|
|
@@ -22,5 +22,4 @@ module Muwu
|
|
|
22
22
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
|
-
end
|
|
26
|
-
|
|
25
|
+
end
|
|
@@ -5,11 +5,11 @@ module Muwu
|
|
|
5
5
|
attr_accessor(
|
|
6
6
|
:generate_navigators_automatically,
|
|
7
7
|
:generate_subcontents_automatically,
|
|
8
|
+
:generate_topic_inner_identifiers,
|
|
8
9
|
:html_head_includes_metadata_tags,
|
|
9
10
|
:html_lang,
|
|
10
11
|
:html_uses_javascript_navigation,
|
|
11
12
|
:markdown_allows_raw_html,
|
|
12
|
-
:markdown_renderer,
|
|
13
13
|
:outline_text_pathnames,
|
|
14
14
|
:output_destination,
|
|
15
15
|
:output_file_css_basename,
|
|
@@ -45,6 +45,9 @@ module Muwu
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
public
|
|
49
|
+
|
|
50
|
+
|
|
48
51
|
def set_option(key, value)
|
|
49
52
|
if Default::PROJECT_OPTIONS.has_key?(key)
|
|
50
53
|
key_ivsym = "@#{key.to_s}"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module Muwu
|
|
2
2
|
class ProjectOptionValidatorKey
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
|
|
5
5
|
include Muwu
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
8
|
def initialize(key_as_provided, value_as_provided, project)
|
|
9
9
|
@project = project
|
|
10
10
|
@key_as_provided = key_as_provided
|
|
@@ -13,26 +13,24 @@ module Muwu
|
|
|
13
13
|
@key_validated = validate_key
|
|
14
14
|
@value_validated = validate_value
|
|
15
15
|
end
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
|
|
17
|
+
|
|
19
18
|
public
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
|
|
20
|
+
|
|
22
21
|
def validated_key
|
|
23
22
|
@key_validated
|
|
24
23
|
end
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
|
|
25
|
+
|
|
27
26
|
def validated_value
|
|
28
27
|
@value_validated
|
|
29
28
|
end
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
|
|
30
|
+
|
|
33
31
|
private
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
|
|
33
|
+
|
|
36
34
|
def validate_key
|
|
37
35
|
key = @key_as_provided.downcase.gsub(/\W/,'_').to_sym
|
|
38
36
|
key_is_valid = Default::PROJECT_OPTIONS.keys.include?(key)
|
|
@@ -50,7 +48,7 @@ module Muwu
|
|
|
50
48
|
ProjectOptionValidatorValue.new(@key_validated, @value_as_provided, @project).validated_value
|
|
51
49
|
end
|
|
52
50
|
end
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
|
|
52
|
+
|
|
55
53
|
end
|
|
56
|
-
end
|
|
54
|
+
end
|