dyndoc-ruby 0.9.16 → 0.9.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65042ee656666efc391b0d149f34b18fe8b11eef
4
- data.tar.gz: 10ef6ac6b795ffd07f2f9c28379fe0db1932cf4b
3
+ metadata.gz: 7cc121c259fd5163b90033b2435068a99ddaf71f
4
+ data.tar.gz: 5aa20262aa934934b5bb3859a99d11e3cbbc88a0
5
5
  SHA512:
6
- metadata.gz: afd5d171236ee2e1a959ea9880440bdc7b62bf7e7c4954b9a9577e555c50d2172145e376a385c7c025e63fe6c606e0ebbc5a04b0f74a8c8f43485e1c93d906f3
7
- data.tar.gz: 9634aa1e8630bd606b51ee2b00dbe9b7abd155b4813b9ba4375e21d60b1d22914723cd859702ad870f194b37fe9c9c9ceae367a0192e9a7ae0708b3461c3e299
6
+ metadata.gz: 6337908a9e9ffba759dfcb407501237e53e9ff9b7fe62fc5e95a18e436add7ba71304885c9348bd14da492eaa5deb2620a2254bcd98a1182ca76afa51f64f066
7
+ data.tar.gz: 39035a910109d0742fe2d5c4526ac80f0a200694ab2c1277dbb1adedd23620cf0b03352158382e15c33c8b34f625aa75da5303dd5f20c1ff28c93e931a48428e
@@ -14,6 +14,11 @@ module Dyndoc
14
14
  cli=Dyndoc::InteractiveClient.new(File.read(dyn_layout),"",addr) #File.expand_path(dyn_layout),addr)
15
15
  end
16
16
 
17
+ ## fix html_file for _rmd, _adoc and _ttm
18
+ if html_file =~ /^(.*)_(rmd|adoc|ttm)\.html$/
19
+ html_file = $1+".html"
20
+ end
21
+
17
22
  if html_file and Dir.exist? File.dirname(html_file)
18
23
  File.open(html_file,"w") do |f|
19
24
  f << cli.content
@@ -128,7 +133,8 @@ module Dyndoc
128
133
  if b[0].empty? and b.length>4
129
134
  require 'yaml'
130
135
  page=YAML.load(b[2])
131
- cfg.merge!(page)
136
+ ##p [:page,page]
137
+ cfg.merge!(page) if page
132
138
  code=b[4..-1].join("")
133
139
  end
134
140
  end
@@ -137,6 +143,9 @@ module Dyndoc
137
143
  dyn_root= cfg["dyn_root"] || opts[:dyn_root] || File.expand_path("..",dyn_file)
138
144
  html_root= cfg["html_root"] || opts[:html_root] || File.expand_path("..",dyn_file)
139
145
  sys_root = cfg["sys_root"] || opts[:sys_root] || File.expand_path('..',dyn_root)
146
+ cfg["dyn_root"] = dyn_root
147
+ cfg["html_root"] = html_root
148
+ cfg["sys_root"] = sys_root
140
149
  ##p [:sys_root,dyn_root,sys_root]
141
150
 
142
151
  ## Dyn Model: generally helps to define a style (layout, preload, postload)
@@ -243,8 +252,7 @@ module Dyndoc
243
252
  end
244
253
  code += "\n" + dyn_post_code if dyn_post_code
245
254
  ## TO TEST!!!
246
- ##
247
- Dyndoc.warn :cfg,cfg
255
+ ##Dyndoc.warn :cfg,cfg
248
256
  ##Dyndoc.warn :page,page
249
257
  code = "[#rb<]require 'ostruct';cfg = OpenStruct.new(" + cfg.inspect + ");page = OpenStruct.new(" + page.inspect + ")[#>]" +code
250
258
  code = dyn_tags + code if dyn_tags
@@ -259,6 +267,7 @@ module Dyndoc
259
267
  code_path << "\n" << File.join(sys_root,'system','dynlib')
260
268
  code_path << "\n" << File.join(opts[:dyn_root],'dynlib')
261
269
  code_path << "\n" << opts[:dyn_root] << "\n"
270
+ code_path << "\n" << "[#require]RodaSrvCore" << "\n"
262
271
  code_path << "[#main][#<]\n"
263
272
  code = code_path + code
264
273
 
@@ -380,6 +389,7 @@ module Dyndoc
380
389
  # dyn_root can be overwritten by cfg
381
390
  # defines the root of relative predefined dyn (pre, post, ...) files
382
391
  dyn_root= cfg["dyn_root"] || opts[:dyn_root] || File.expand_path("..",dyn_file)
392
+ cfg["dyn_root"] = dyn_root
383
393
 
384
394
  cfg["layout"] = cfg["pre"] = cfg["post"] = cfg["model"] if cfg["model"]
385
395
 
@@ -456,7 +466,8 @@ module Dyndoc
456
466
  code_path << "[#main][#<]\n"
457
467
  code = code_path + code
458
468
 
459
- ### Dyndoc.warn :code,code
469
+ ###
470
+ Dyndoc.warn :code,code
460
471
 
461
472
  dyndoc_start=[:dyndoc_libs,:dyndoc_layout]
462
473
 
@@ -78,7 +78,11 @@ module Dyndoc
78
78
  html_file=opts[:html_files][opts[:current_doc_tag]] # No more default # || html_files[""]
79
79
  ##p [:opts,opts,:current_doc_tag,opts[:current_doc_tag]]
80
80
  Dyndoc.cli_convert_from_file(dyn_file[1..-1],html_file, opts)
81
- puts dyn_file[1..-1]+" processed!"
81
+ ## fix html_file for _rmd, _adoc and _ttm
82
+ if html_file =~ /^(.*)_(rmd|adoc|ttm)\.html$/
83
+ html_file = $1+".html"
84
+ end
85
+ puts dyn_file[1..-1]+" processed => "+html_file+" created!"
82
86
  if RUBY_PLATFORM =~ /darwin/
83
87
  options[:first] = html_file != old_html_file
84
88
  if html_file != old_html_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyndoc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.16
4
+ version: 0.9.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - RCqls