dyndoc-ruby 0.9.14 → 0.9.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 331c3c5c280c6a6df854b0404466d34252d47889
4
- data.tar.gz: 58aa269ffdf01e6868e25613fa1d8a78000fc349
3
+ metadata.gz: 65042ee656666efc391b0d149f34b18fe8b11eef
4
+ data.tar.gz: 10ef6ac6b795ffd07f2f9c28379fe0db1932cf4b
5
5
  SHA512:
6
- metadata.gz: eaeb3aefee802d2b1a1a7f2e9e2e51d6b410a2716a3794fd8ba44f9fa3a006cf7d5fa4c1656a6b02a92159fb931b7a037d9744938ac69d8d99cbf15bf303cc1a
7
- data.tar.gz: 55daab8dec69571791e481ea7ec95d1e4f91430690c1f9f45ac65adef0f30323165bef88b8a9820faae2b76edf34a5320602e301e2ba9ee80d51c500567c388e
6
+ metadata.gz: afd5d171236ee2e1a959ea9880440bdc7b62bf7e7c4954b9a9577e555c50d2172145e376a385c7c025e63fe6c606e0ebbc5a04b0f74a8c8f43485e1c93d906f3
7
+ data.tar.gz: 9634aa1e8630bd606b51ee2b00dbe9b7abd155b4813b9ba4375e21d60b1d22914723cd859702ad870f194b37fe9c9c9ceae367a0192e9a7ae0708b3461c3e299
data/bin/dyn-ctl CHANGED
@@ -14,7 +14,7 @@ when "start"
14
14
  `#{srv} status`.empty?
15
15
  end
16
16
  if status.any?
17
- message="at #{Time.now}: " + status.each_with_index.map { |e,i| e ? SRVS[i] : nil}.compact.join("+") + " stopped and restarted!"
17
+ message="at #{Time.now}: " + status.each_with_index.map { |e,i| e ? "["+SRVS[i]+"]" : nil}.compact.join("+") + " stopped and restarted!"
18
18
  if RUBY_PLATFORM =~ /darwin/
19
19
  ##p lint_error
20
20
  cmd_to_display="display notification \"#{message}\" with title \"dyn status\""
@@ -1,5 +1,6 @@
1
1
  require 'socket' # Get sockets from stdlib
2
2
  require "dyndoc-core"
3
+ require 'dyndoc-converter'
3
4
 
4
5
 
5
6
  module Dyndoc
@@ -31,11 +32,26 @@ module Dyndoc
31
32
  end
32
33
  end
33
34
 
35
+ def post_process_from_format(content,fmt)
36
+ case fmt
37
+ when :rmd
38
+ ::Dyndoc::Converter.markdown(content)
39
+ when :adoc
40
+ ::Dyndoc::Converter.asciidoctor(content)
41
+ when :ttm
42
+ ::Dyndoc::Converter.ttm(content,"-e2 -r -y1 -L").gsub(/<mtable[^>]*>/,"<mtable>").gsub("\\ngtr","<mtext>&ngtr;</mtext>").gsub("\\nless","<mtext>&nless;</mtext>").gsub("&#232;","<mtext>&egrave;</mtext>")
43
+ end
44
+ end
45
+
34
46
 
35
47
  def process_dyndoc(content)
36
48
  ##Dyndoc.warn :process_dyndoc_content,content
37
49
  @content=@tmpl_mngr.parse(content)
38
50
  ##Dyndoc.warn :content, @content
51
+ ## depending on extension
52
+ if @tmpl_filename =~ /_(rmd|adoc|ttm)\.dyn$/
53
+ @content=post_process_from_format(@content,$1.to_sym)
54
+ end
39
55
  @tmpl_mngr.filterGlobal.envir["body.content"]=Dyndoc::Utils.protect_dyn_block_for_atom(@content)
40
56
  ##Dyndoc.warn :body_content,@tmpl_mngr.filterGlobal.envir["body.content"]
41
57
  if @tmpl_filename
@@ -155,6 +155,8 @@ module Dyndoc
155
155
  if cfg["layout"][0] == "~"
156
156
  user,*pa=cfg["layout"][1..-1].split("/")
157
157
  cfg_tmp=File.join(sys_root,"public","users",user,"layout",pa)+".dyn"
158
+ cfg_tmp=File.join(sys_root,"public","users",user,pa[0...-1],"layout",pa[-1])+".dyn" unless File.exists? cfg_tmp
159
+ cfg_tmp=File.join(sys_root,"public","users",user,pa) unless File.exists? cfg_tmp
158
160
  else
159
161
  cfg_tmp=File.join(sys_root,"system","layout",cfg["layout"]+".dyn")
160
162
  end
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.9.14
4
+ version: 0.9.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - RCqls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-28 00:00:00.000000000 Z
11
+ date: 2016-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: R4rb