dyndoc-ruby 0.8.2 → 0.8.3
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 +4 -4
- data/lib/dyndoc-convert.rb +27 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dfedad69700126ccd77aeef4244d560737ddcb2
|
4
|
+
data.tar.gz: 1f31a9a7794cad05d5b49a778f78bb7361d619b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bb129b3141ba9667741b1905a97ac1162a07d065251974c93870920df6903492a4029b3b7103fd3f61cc2b7f9f890ea1461ce3b98436c5401f753bd1483a816
|
7
|
+
data.tar.gz: 544150c1a03c353c6196e369c8c87bfabf757cf2a05e2a223135832915f47f77c25e229287a03098653f6485052a886d73b4fd704099faef5fa6d70c0a63956f
|
data/lib/dyndoc-convert.rb
CHANGED
@@ -7,6 +7,22 @@ module Dyndoc
|
|
7
7
|
|
8
8
|
@@dyndoc_tmpl_mngr=nil
|
9
9
|
|
10
|
+
def Dyndoc.process_html_file_from_dyn_file(code,html_file,dyn_file,dyn_layout,addr,dyndoc_start)
|
11
|
+
cli=Dyndoc::InteractiveClient.new(code,dyn_file,addr,dyndoc_start)
|
12
|
+
|
13
|
+
if dyn_layout
|
14
|
+
cli=Dyndoc::InteractiveClient.new(File.read(dyn_layout),"",addr) #File.expand_path(dyn_layout),addr)
|
15
|
+
end
|
16
|
+
|
17
|
+
if html_file and Dir.exist? File.dirname(html_file)
|
18
|
+
File.open(html_file,"w") do |f|
|
19
|
+
f << cli.content
|
20
|
+
end
|
21
|
+
else
|
22
|
+
puts cli.content
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
10
26
|
## does notwork when called twice!!!! (ex: jekyll-dyndoc in mode dyndoc)
|
11
27
|
def Dyndoc.convert(input,config={})
|
12
28
|
unless @@dyndoc_tmpl_mngr
|
@@ -173,8 +189,8 @@ module Dyndoc
|
|
173
189
|
end
|
174
190
|
code += "\n" + dyn_post_code if dyn_post_code
|
175
191
|
## TO TEST!!!
|
176
|
-
Dyndoc.warn :cfg,cfg
|
177
|
-
Dyndoc.warn :page,page
|
192
|
+
##Dyndoc.warn :cfg,cfg
|
193
|
+
##Dyndoc.warn :page,page
|
178
194
|
code = "[#rb<]require 'ostruct';cfg = OpenStruct.new(" + cfg.inspect + ");page = OpenStruct.new(" + page.inspect + ")[#>]" +code
|
179
195
|
code = dyn_tags + code if dyn_tags
|
180
196
|
|
@@ -189,19 +205,15 @@ module Dyndoc
|
|
189
205
|
|
190
206
|
dyndoc_start=[:dyndoc_libs,:dyndoc_layout]
|
191
207
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
end
|
202
|
-
else
|
203
|
-
puts cli.content
|
204
|
-
end
|
208
|
+
unless opts[:doc_tag] == "__ALL_DOC_TAG__"
|
209
|
+
Dyndoc.process_html_file_from_dyn_file(code,html_file,dyn_file,dyn_layout,addr,dyndoc_start)
|
210
|
+
else
|
211
|
+
html_files.keys[1..-1].each do |doc_tag|
|
212
|
+
html_file=File.join(html_root,["users",opts[:user]] || [],cfg_files[:urls][doc_tag])
|
213
|
+
p [:html_multi,doc_tag,html_file]
|
214
|
+
Dyndoc.process_html_file_from_dyn_file(code.gsub(/__ALL_DOC_TAG__/,doc_tag),html_file,dyn_file,dyn_layout,addr,dyndoc_start)
|
215
|
+
end
|
216
|
+
end
|
205
217
|
end
|
206
218
|
end
|
207
219
|
|
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: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CQLS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: R4rb
|