lib/dyndoc-convert.rb in dyndoc-ruby-0.7.5 vs lib/dyndoc-convert.rb in dyndoc-ruby-0.7.6
- old
+ new
@@ -107,10 +107,12 @@
if cfg["post"]
cfg_tmp=File.join(dyn_root,cfg["post"])
dyn_post_code=File.read(cfg_tmp) unless dyn_post_code and File.exist? cfg_tmp
end
+
+
## deal with html_file
html_file=File.join(html_root,cfg["html_file"] || html_file)
unless File.exist? html_file
dirname=File.dirname(html_file)
require 'fileutils'
@@ -127,9 +129,10 @@
code_pre += '[#require]'+"\n"+dyn_libs if dyn_libs
code = code_pre + '[#main][#>]' + code
end
code += "\n" + dyn_post_code if dyn_post_code
## TO TEST!!!
+ code = "[#rb<]require 'ostruct';cfg = OpenStruct.new(" + cfg.inspect + ")[#>]" +code
code = "[#rb<]page = " + page.inspect + "[#>]" +code if page
code = dyn_tags + code if dyn_tags
dyndoc_start=[:dyndoc_libs,:dyndoc_layout]
cli=Dyndoc::InteractiveClient.new(code,dyn_file,addr,dyndoc_start)