dyndoc-ruby 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dyndoc-html-servers.rb +21 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8723bdb859aae5e91938015ec532b9fb896f20acef9ffa6e035e54e48debd7f3
|
4
|
+
data.tar.gz: e3e6db01504a19b2b50318ad7ce985711eebee860f8b3dfd7875216eee4fb04c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd8c4aa4ec42053a1c1227fad45122d77f96780f6b853998c63565f090cb99a6e2e470a89c016dcae1db250c00618e1fad3b52493267e73847bc33a1df2c20a
|
7
|
+
data.tar.gz: 235cabc8a20637344b9ae44960e6a55f8292bd8739167919cebcc2c31a8667ad95199719af12006af7e3b9d76a2e7b2eeda2b9e56ec2a967662e8f2bc76a8686
|
data/lib/dyndoc-html-servers.rb
CHANGED
@@ -248,6 +248,23 @@ module Dyndoc
|
|
248
248
|
Thin::Runner.new(arg).run!
|
249
249
|
end
|
250
250
|
|
251
|
+
def HtmlServers.create_html_page(dyn_file,html_file,opts,pages_root)
|
252
|
+
|
253
|
+
Dyndoc.cli_convert_from_file(dyn_file[1..-1],html_file, opts)
|
254
|
+
## fix html_file for _rmd, _adoc and _ttm
|
255
|
+
if html_file =~ /^(.*)_(rmd|adoc|ttm)\.html$/
|
256
|
+
html_file = $1+".html"
|
257
|
+
end
|
258
|
+
if html_file =~ /^(.*)_erb\.html$/
|
259
|
+
erb_page=File.join(pages_root,$1)
|
260
|
+
if File.exists? erb_page+"_erb.html"
|
261
|
+
FileUtils.mv erb_page+"_erb.html",erb_page+".erb"
|
262
|
+
end
|
263
|
+
html_file = "erb"+$1
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
251
268
|
def HtmlServers.dyn_html_filewatcher(cfg={}) #cfg
|
252
269
|
require 'dyndoc-convert'
|
253
270
|
require 'dyndoc-edit'
|
@@ -310,18 +327,8 @@ module Dyndoc
|
|
310
327
|
##p [:opts,opts,:current_doc_tag,opts[:current_doc_tag]]
|
311
328
|
state=""
|
312
329
|
begin
|
313
|
-
|
314
|
-
|
315
|
-
if html_file =~ /^(.*)_(rmd|adoc|ttm)\.html$/
|
316
|
-
html_file = $1+".html"
|
317
|
-
end
|
318
|
-
if html_file =~ /^(.*)_erb\.html$/
|
319
|
-
erb_page=File.join(pages_root,$1)
|
320
|
-
if File.exists? erb_page+"_erb.html"
|
321
|
-
FileUtils.mv erb_page+"_erb.html",erb_page+".erb"
|
322
|
-
end
|
323
|
-
html_file = "erb"+$1
|
324
|
-
end
|
330
|
+
HtmlServers.create_html_page(dyn_file,html_file,opts,pages_root)
|
331
|
+
|
325
332
|
puts dyn_file[1..-1]+(dyn_public_edit_file.empty? ? "" : "*")+" processed => "+html_file+" created!"
|
326
333
|
options[:first] = html_file != old_html_file
|
327
334
|
if html_file != old_html_file
|
@@ -332,8 +339,8 @@ module Dyndoc
|
|
332
339
|
else
|
333
340
|
Dyndoc::Browser.reload
|
334
341
|
end
|
335
|
-
rescue
|
336
|
-
state="error: "
|
342
|
+
rescue => e
|
343
|
+
state="error: #{e.message} =>"
|
337
344
|
ensure
|
338
345
|
notify_file=filename.split("/")
|
339
346
|
if (ind=notify_file.index ".edit")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RCqls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: R4rb
|