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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dyndoc-html-servers.rb +21 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 874ff2bfd3cfd0a3cbc30680e7ddadb68be8a3c417d85582e05c699855a96cec
4
- data.tar.gz: c47643d6023b0c525a23944127f578eb4c519cc19d35302deb7fdc4724f248f7
3
+ metadata.gz: 8723bdb859aae5e91938015ec532b9fb896f20acef9ffa6e035e54e48debd7f3
4
+ data.tar.gz: e3e6db01504a19b2b50318ad7ce985711eebee860f8b3dfd7875216eee4fb04c
5
5
  SHA512:
6
- metadata.gz: 43fc0de9ab39f1dbee93acd2d3bedc272b21b154227dfe5a3c2c943816ae3f23a0e1b8372b2fd773181c5bd033d022d681900baf88c3c1ab64d686ca8ad698ad
7
- data.tar.gz: 0ead492497f229e9b37b04196336e3910db2611c1af3bd9d8fcf23a2943c7703b3e9def436ede1b3c0753e32670931dd7c0bc08bbb7eda3db40b3c39abbbd301
6
+ metadata.gz: 0cd8c4aa4ec42053a1c1227fad45122d77f96780f6b853998c63565f090cb99a6e2e470a89c016dcae1db250c00618e1fad3b52493267e73847bc33a1df2c20a
7
+ data.tar.gz: 235cabc8a20637344b9ae44960e6a55f8292bd8739167919cebcc2c31a8667ad95199719af12006af7e3b9d76a2e7b2eeda2b9e56ec2a967662e8f2bc76a8686
@@ -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
- Dyndoc.cli_convert_from_file(dyn_file[1..-1],html_file, opts)
314
- ## fix html_file for _rmd, _adoc and _ttm
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.0
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-05 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: R4rb