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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b9cc00d550f704b40f42c5b9082a0be65cafe79a35084840c1e304aff46c4a4
4
- data.tar.gz: 64101f110b1e983bb42494910c7898a5d41bb6a4865156b7402d7d24d5f763a5
3
+ metadata.gz: 577c99af43ab26d7d3c9bf2fb9360b1778fb1affbdbce0328b38c0650b2a688a
4
+ data.tar.gz: 8af68dc1a7130c59efdda85afc0c76876c01d2eac79fb915616557ab0800bc76
5
5
  SHA512:
6
- metadata.gz: fd06f9f0e7c0cdfbadd1a833c2e8ef7475ae8005dec20e6fb0d83dbc688b6bd157dc226e82beb45ef969aea720f2b777563d7ce3a264b03dc19c25df68b616a8
7
- data.tar.gz: 8a575c78319de6e524947ff67b3b484949e593d022cdcf05be6436b3d6e7cb12845cec1fce540c15b966ba269491695e002f62ef9f91a6d48db9086e2064c514
6
+ metadata.gz: 6be10f4e37e5470ad79fb598eda0bbc02bfe4e76d1dc059f17bf8f32de90576098372691e2979c3a53a8a5d275ebc430bf7be215128755fa14417eeb682fc53b
7
+ data.tar.gz: eb55d4dd1d75f943fd600f849cd333a0c8c5721dfd2c42067b911a58f3f7d52dba0e3cbb5c429ec3806ce75863fc0419b9253409e00ffe527979c27a881e365c
@@ -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
- * This feature is still experimental.
5
+ * Compiling a project will overwrite any previous output files without
6
+ any warning.
@@ -149,7 +149,7 @@ module Muwu
149
149
  if @project.does_not_have_crucial_files
150
150
  reply_folder_does_not_have_valid_project
151
151
  else
152
- Viewer.new(@project)
152
+ Viewer.new(@project).view
153
153
  end
154
154
  end
155
155
 
@@ -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.exists?(file_attempt_md)
173
+ if File.exist?(file_attempt_md)
174
174
  source_filename = file_attempt_md
175
- elsif File.exists?(file_attempt_haml)
175
+ elsif File.exist?(file_attempt_haml)
176
176
  source_filename = file_attempt_haml
177
177
  else
178
178
  source_filename = file_attempt_md
@@ -31,7 +31,7 @@ module Muwu
31
31
 
32
32
 
33
33
  def css_manifest_file_does_exist
34
- File.exists?(css_manifest_filename) == true
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.exists?(metadata_filename) == true
113
+ File.exist?(metadata_filename) == true
114
114
  end
115
115
 
116
116
 
117
117
  def metadata_file_does_not_exist
118
- File.exists?(metadata_filename) == false
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.exists?(options_filename) == true
128
+ File.exist?(options_filename) == true
129
129
  end
130
130
 
131
131
 
132
132
  def options_file_does_not_exist
133
- File.exists?(options_filename) == false
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.exists?(outline_filename) == true
143
+ File.exist?(outline_filename) == true
144
144
  end
145
145
 
146
146
 
147
147
  def outline_file_does_not_exist
148
- File.exists?(outline_filename) == false
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.exists?(path_compiled)
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.exists?(@project.path_config) == false
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.exists?(@project.path_css) == false
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.exists?(@project.path_css_base) == true
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.exists?(@project.path_css_colors) == false
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.exists?(@project.path_css_extensions) == false
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
@@ -155,7 +155,7 @@ module Muwu
155
155
 
156
156
  def source_file_exists
157
157
  if @source_filename_absolute
158
- File.exists?(@source_filename_absolute)
158
+ File.exist?(@source_filename_absolute)
159
159
  end
160
160
  end
161
161
 
@@ -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).filename
10
- document_home_path = File.join(project.path_compiled, document_home)
11
- if File.exists?(document_home_path)
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
- puts "Compiled document not found: #{document_home_path}"
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
@@ -1,7 +1,7 @@
1
1
  module Muwu
2
2
 
3
3
 
4
- VERSION = '3.0.0'
4
+ VERSION = '3.2.0'
5
5
 
6
6
  GEM_HOME_LIB = File.absolute_path(File.join(File.dirname(__FILE__)))
7
7
  GEM_HOME_LIB_MUWU = File.absolute_path(File.join(GEM_HOME_LIB, 'muwu'))
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.0.0
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: 2020-11-14 00:00:00.000000000 Z
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.21'
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.21'
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: '5.1'
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: '5.1'
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: '8.4'
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: '8.4'
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.5.1
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.1.2
275
+ rubygems_version: 3.4.22
261
276
  signing_key:
262
277
  specification_version: 4
263
278
  summary: Markup Writeup