muwu 3.0.0 → 3.2.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/concat +2 -4
- data/lib/muwu/controller/controller.rb +1 -1
- data/lib/muwu/manifest_task_builder/text_item_builder.rb +2 -2
- data/lib/muwu/project/project.rb +8 -8
- data/lib/muwu/project_builder/project_reset_css.rb +5 -5
- data/lib/muwu/project_exception/viewer_missing_home_document.rb +23 -0
- data/lib/muwu/render_html_partial/render_text_item.rb +1 -1
- data/lib/muwu/viewer/viewer.rb +24 -9
- data/lib/muwu.rb +1 -1
- metadata +25 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577c99af43ab26d7d3c9bf2fb9360b1778fb1affbdbce0328b38c0650b2a688a
|
4
|
+
data.tar.gz: 8af68dc1a7130c59efdda85afc0c76876c01d2eac79fb915616557ab0800bc76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be10f4e37e5470ad79fb598eda0bbc02bfe4e76d1dc059f17bf8f32de90576098372691e2979c3a53a8a5d275ebc430bf7be215128755fa14417eeb682fc53b
|
7
|
+
data.tar.gz: eb55d4dd1d75f943fd600f849cd333a0c8c5721dfd2c42067b911a58f3f7d52dba0e3cbb5c429ec3806ce75863fc0419b9253409e00ffe527979c27a881e365c
|
data/lib/muwu/cli/help/concat
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
- muwu concat
|
2
2
|
- Combine all source files from the outline into a single markdown
|
3
3
|
document.
|
4
|
-
|
5
|
-
* Compiling a project will overwrite any previous output files without
|
6
|
-
any warning.
|
7
4
|
|
8
|
-
*
|
5
|
+
* Compiling a project will overwrite any previous output files without
|
6
|
+
any warning.
|
@@ -170,9 +170,9 @@ module Muwu
|
|
170
170
|
file_name_haml = file_basename + '.haml'
|
171
171
|
file_attempt_md = File.join([file_path, file_name_md].flatten)
|
172
172
|
file_attempt_haml = File.join([file_path, file_name_haml].flatten)
|
173
|
-
if File.
|
173
|
+
if File.exist?(file_attempt_md)
|
174
174
|
source_filename = file_attempt_md
|
175
|
-
elsif File.
|
175
|
+
elsif File.exist?(file_attempt_haml)
|
176
176
|
source_filename = file_attempt_haml
|
177
177
|
else
|
178
178
|
source_filename = file_attempt_md
|
data/lib/muwu/project/project.rb
CHANGED
@@ -31,7 +31,7 @@ module Muwu
|
|
31
31
|
|
32
32
|
|
33
33
|
def css_manifest_file_does_exist
|
34
|
-
File.
|
34
|
+
File.exist?(css_manifest_filename) == true
|
35
35
|
end
|
36
36
|
|
37
37
|
|
@@ -110,12 +110,12 @@ module Muwu
|
|
110
110
|
|
111
111
|
|
112
112
|
def metadata_file_does_exist
|
113
|
-
File.
|
113
|
+
File.exist?(metadata_filename) == true
|
114
114
|
end
|
115
115
|
|
116
116
|
|
117
117
|
def metadata_file_does_not_exist
|
118
|
-
File.
|
118
|
+
File.exist?(metadata_filename) == false
|
119
119
|
end
|
120
120
|
|
121
121
|
|
@@ -125,12 +125,12 @@ module Muwu
|
|
125
125
|
|
126
126
|
|
127
127
|
def options_file_does_exist
|
128
|
-
File.
|
128
|
+
File.exist?(options_filename) == true
|
129
129
|
end
|
130
130
|
|
131
131
|
|
132
132
|
def options_file_does_not_exist
|
133
|
-
File.
|
133
|
+
File.exist?(options_filename) == false
|
134
134
|
end
|
135
135
|
|
136
136
|
|
@@ -140,12 +140,12 @@ module Muwu
|
|
140
140
|
|
141
141
|
|
142
142
|
def outline_file_does_exist
|
143
|
-
File.
|
143
|
+
File.exist?(outline_filename) == true
|
144
144
|
end
|
145
145
|
|
146
146
|
|
147
147
|
def outline_file_does_not_exist
|
148
|
-
File.
|
148
|
+
File.exist?(outline_filename) == false
|
149
149
|
end
|
150
150
|
|
151
151
|
|
@@ -258,7 +258,7 @@ module Muwu
|
|
258
258
|
|
259
259
|
|
260
260
|
def path_compiled_does_exist
|
261
|
-
Dir.
|
261
|
+
Dir.exist?(path_compiled)
|
262
262
|
end
|
263
263
|
|
264
264
|
|
@@ -28,11 +28,11 @@ module Muwu
|
|
28
28
|
|
29
29
|
|
30
30
|
def phase_1_verify_or_create_css_folder
|
31
|
-
if Dir.
|
31
|
+
if Dir.exist?(@project.path_config) == false
|
32
32
|
puts "Creating folder #{@project.path_config}"
|
33
33
|
FileUtils.mkdir(@project.path_config)
|
34
34
|
end
|
35
|
-
if Dir.
|
35
|
+
if Dir.exist?(@project.path_css) == false
|
36
36
|
puts "Creating folder #{@project.path_css}"
|
37
37
|
FileUtils.mkdir(@project.path_css)
|
38
38
|
end
|
@@ -40,7 +40,7 @@ module Muwu
|
|
40
40
|
|
41
41
|
|
42
42
|
def phase_2_clear_base_folder
|
43
|
-
if Dir.
|
43
|
+
if Dir.exist?(@project.path_css_base) == true
|
44
44
|
puts "Clearing folder #{@project.path_css_base}"
|
45
45
|
FileUtils.remove_entry_secure(@project.path_css_base)
|
46
46
|
end
|
@@ -56,7 +56,7 @@ module Muwu
|
|
56
56
|
|
57
57
|
|
58
58
|
def phase_4_verify_or_create_colors_folder
|
59
|
-
if Dir.
|
59
|
+
if Dir.exist?(@project.path_css_colors) == false
|
60
60
|
puts "Creating folder #{@project.path_css_colors}"
|
61
61
|
FileUtils.mkdir(@project.path_css_colors)
|
62
62
|
end
|
@@ -82,7 +82,7 @@ module Muwu
|
|
82
82
|
|
83
83
|
|
84
84
|
def phase_7_verify_or_create_extensions_folder
|
85
|
-
if Dir.
|
85
|
+
if Dir.exist?(@project.path_css_extensions) == false
|
86
86
|
folder_source_gem = File.absolute_path(File.join(Muwu::GEM_HOME_LIB, 'muwu','project_builder','assets','config','css','extensions'))
|
87
87
|
folder_destination_project = @project.path_css_extensions
|
88
88
|
puts "Creating folder #{@project.path_css_extensions}"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Muwu
|
2
|
+
module ProjectException
|
3
|
+
class ViewerMissingHomeDocument
|
4
|
+
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
$stderr.puts "#{self.class}"
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
def report
|
12
|
+
"Viewer cannot find a compiled home document."
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def type
|
17
|
+
:view
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/muwu/viewer/viewer.rb
CHANGED
@@ -6,20 +6,35 @@ module Muwu
|
|
6
6
|
|
7
7
|
|
8
8
|
def initialize(project)
|
9
|
-
document_home = project.manifest.find_document_html_by_index(0)
|
10
|
-
|
11
|
-
|
12
|
-
begin
|
13
|
-
system "lynx #{document_home_path}", exception: true
|
14
|
-
rescue Errno::ENOENT
|
15
|
-
raise ProjectExceptionHandler::Fatal.new(ProjectException::LynxNotAvailable.new)
|
16
|
-
end
|
9
|
+
document_home = project.manifest.find_document_html_by_index(0)
|
10
|
+
if document_home
|
11
|
+
@document_home_filepath = File.join(project.path_compiled, document_home.filename)
|
17
12
|
else
|
18
|
-
|
13
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::ViewerMissingHomeDocument.new)
|
19
14
|
end
|
20
15
|
end
|
21
16
|
|
22
17
|
|
18
|
+
public
|
19
|
+
|
20
|
+
|
21
|
+
def view
|
22
|
+
if @document_home_filepath && File.exist?(@document_home_filepath)
|
23
|
+
view_home_document
|
24
|
+
else
|
25
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::ViewerMissingHomeDocument.new)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def view_home_document
|
31
|
+
begin
|
32
|
+
system "lynx #{@document_home_filepath}", exception: true
|
33
|
+
rescue Errno::ENOENT
|
34
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::LynxNotAvailable.new)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
23
38
|
|
24
39
|
end
|
25
40
|
end
|
data/lib/muwu.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muwu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eli Harrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commonmarker
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.23'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.23'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: haml
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: iso-639
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +52,34 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: kramdown
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.4'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.4'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: motion-markdown-it
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '13.0'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '13.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: motion-markdown-it-plugins
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +209,7 @@ files:
|
|
195
209
|
- lib/muwu/project_exception/subcontents_will_be_generated_automatically copy.rb
|
196
210
|
- lib/muwu/project_exception/target_project_folder_already_exists.rb
|
197
211
|
- lib/muwu/project_exception/text_source_file_not_found.rb
|
212
|
+
- lib/muwu/project_exception/viewer_missing_home_document.rb
|
198
213
|
- lib/muwu/project_exception_handler/fatal.rb
|
199
214
|
- lib/muwu/project_options/project_options.rb
|
200
215
|
- lib/muwu/project_options_builder/project_option_validator.rb
|
@@ -250,14 +265,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
265
|
requirements:
|
251
266
|
- - ">="
|
252
267
|
- !ruby/object:Gem::Version
|
253
|
-
version: 2
|
268
|
+
version: '3.2'
|
254
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
255
270
|
requirements:
|
256
271
|
- - ">="
|
257
272
|
- !ruby/object:Gem::Version
|
258
273
|
version: '0'
|
259
274
|
requirements: []
|
260
|
-
rubygems_version: 3.
|
275
|
+
rubygems_version: 3.4.22
|
261
276
|
signing_key:
|
262
277
|
specification_version: 4
|
263
278
|
summary: Markup Writeup
|