dyndoc-ruby-core 1.1.6 → 1.2.0

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: f63739b8d4b4b0a76036cc7c60ce7dae2f02d53b
4
- data.tar.gz: 6e03518f5b3ff4311b24c575be2e574e475bb635
3
+ metadata.gz: 7ae79ca38d95e8cbca20c77964c32562632aa1d0
4
+ data.tar.gz: d80a75b15083c95c30b330f39077312b643a741c
5
5
  SHA512:
6
- metadata.gz: 76b7afd64d4d0547c5a65d59c77b757a34161f1224430387bbb69bdee16318f46bda32b90b85c0fdf0316052e1c0bda5b888b198adf6daadbbc4d9dc6fdd1946
7
- data.tar.gz: 209bd6f3b33ddf78d26c786a989c65fdfaad780ceed4371a4b38ff11e1d22230656b13599ccdaa0fd0a208e1a19e8ed3b76c124381deaa00c6a513d2b3647195
6
+ metadata.gz: 1853d4d83db83858c5a65f3a97043b01a364b4eedc9c8f83abbe81e505aed78d1b68996ac5b7601df3630b4f222fc7e51754981273cf469747873b73de97e5a3
7
+ data.tar.gz: 4460712f1c09b496e9595b61b8b089b40bea046e22ca5e735e5291411a4c809a3d90e0ebad6f98df991ef328e696bf834710cd8bb837f1ac4ca2b294d934b9a0
@@ -11,6 +11,16 @@ module Dyndoc
11
11
  @@vars
12
12
  end
13
13
 
14
+ @@user_root_doc=nil
15
+
16
+ def Dyndoc.user_root_doc=(user_root_doc)
17
+ @@user_root_doc=user_root_doc
18
+ end
19
+
20
+ def Dyndoc.user_root_doc
21
+ @@user_root_doc
22
+ end
23
+
14
24
  module Ruby
15
25
 
16
26
  class TemplateManager
@@ -1528,31 +1538,33 @@ p call
1528
1538
  when :helpers
1529
1539
  eval_LOAD_HELPERS(res.strip.split("\n"),filter)
1530
1540
  when :path
1531
- #puts "document:path";p res
1532
- unless res.strip.empty?
1533
- paths=res.strip.split("\n").map{|e| e.strip unless e.strip.empty?}.compact
1534
- #p paths
1535
- @tmpl_cfg[:rootDoc]="" unless @tmpl_cfg[:rootDoc]
1536
- #Dyndoc.warn "rootDoc",@tmpl_cfg[:rootDoc]
1537
- rootpaths=@tmpl_cfg[:rootDoc].split(Dyndoc::PATH_SEP)
1538
- #Dyndoc.warn "rootpaths",rootpaths
1539
- newpaths=[]
1540
- paths.each{|e|
1541
- #if File.exist?(e)
1542
- # newpaths << e
1543
- #els
1544
- if e[0,1]=="-" and File.exist?(e[1..-1])
1545
- rootpaths.delete(e[1..-1])
1546
- elsif (ind=e.to_i)<0
1547
- rootpaths.delete_at(-ind-1)
1548
- else
1549
- newpaths << e
1550
- end
1551
- }
1552
- rootpaths=newpaths+rootpaths
1553
- #p rootpaths
1554
- @tmpl_cfg[:rootDoc]=rootpaths.join(Dyndoc::PATH_SEP)
1555
- end
1541
+ #Dyndoc.warn "document:path",res
1542
+ Dyndoc.user_root_doc=res.strip.split("\n").map{|e| e.strip unless e.strip.empty?}.compact.join(Dyndoc::PATH_SEP) unless res.strip.empty?
1543
+
1544
+ #### OBSOLETE from 27/09/2016!!!
1545
+ ### TODO: - operation possibly in init/config.rb
1546
+ # unless res.strip.empty?
1547
+ # #p paths
1548
+ # #Dyndoc.warn "root_doc",@tmpl_cfg[:root_doc]
1549
+ # rootpaths=@tmpl_cfg[:root_doc].split(Dyndoc::PATH_SEP)
1550
+ # #Dyndoc.warn "rootpaths",rootpaths
1551
+ # newpaths=[]
1552
+ # paths.each{|e|
1553
+ # #if File.exist?(e)
1554
+ # # newpaths << e
1555
+ # #els
1556
+ # if e[0,1]=="-" and File.exist?(e[1..-1])
1557
+ # rootpaths.delete(e[1..-1])
1558
+ # elsif (ind=e.to_i)<0
1559
+ # rootpaths.delete_at(-ind-1)
1560
+ # else
1561
+ # newpaths << e
1562
+ # end
1563
+ # }
1564
+ # rootpaths=newpaths+rootpaths
1565
+ # #Dyndoc.warn :last, rootpaths
1566
+ # @tmpl_cfg[:root_doc]=rootpaths.join(Dyndoc::PATH_SEP)
1567
+ # end
1556
1568
  when :first
1557
1569
  Dyndoc.dyn_block[:first]=[] unless Dyndoc.dyn_block[:first]
1558
1570
  Dyndoc.dyn_block[:first]+=b2
@@ -214,6 +214,7 @@ module Dyndoc
214
214
  pathenv = Dyndoc.init_pathenv
215
215
  pathenv += PATH_SEP + File.join(@@dyn_gem_path,"dyndoc") + PATH_SEP + File.join(@@dyn_gem_path,"dyndoc","Std") if File.exists? File.join(@@dyn_gem_path,"dyndoc")
216
216
  # high level of priority since provided by user
217
+ pathenv += PATH_SEP + Dyndoc.user_root_doc if Dyndoc.user_root_doc
217
218
  pathenv += PATH_SEP + ENV["DYNDOC_LIBRARY_PATH"] if ENV["DYNDOC_LIBRARY_PATH"] and !ENV["DYNDOC_LIBRARY_PATH"].empty?
218
219
  pathenv += PATH_SEP + File.join(Dyndoc.cfg_dir[:root_path],"library") if File.exists? File.join(@@cfg_dir[:root_path],"library")
219
220
  pathenv += PATH_SEP + @@cfg_dir[:current_doc_path] if with_currentRoot and !@@cfg_dir[:current_doc_path].empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyndoc-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CQLS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-23 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configliere