origen_doc_helpers 0.8.3 → 0.8.4
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8be9c5912f22281328dbe445399a4c394e028c3a10a68b107f8feccd73b46adb
|
4
|
+
data.tar.gz: f75142d4ea1e47002fb66463ff2f66ca34a0d408a0759259a4b4e3db800dfea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef308ae1289cc4d23405fba1146b9b349f17ed13cdb0d26a9330eaa45d68904e444ea60623aa8015711a2bf84c374831c101ee639bc947c1f0640c24cef40b01
|
7
|
+
data.tar.gz: 7be71f335ea1d0e6a3820abbab497c17ff346051ce0d79758806c6c2b2ae09e355f58ba8221ba42d5ba0e5075900766341c5aa541339a97736d22623031e1ba3
|
data/config/version.rb
CHANGED
@@ -44,7 +44,11 @@ module OrigenDocHelpers
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def index_page_template
|
47
|
-
|
47
|
+
if File.exist?("#{Origen.root}/app/")
|
48
|
+
@index_page_template ||= "#{Origen.root!}/app/templates/flow_index.md.erb"
|
49
|
+
else
|
50
|
+
@index_page_template ||= "#{Origen.root!}/templates/flow_index.md.erb"
|
51
|
+
end
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|
@@ -100,11 +104,19 @@ module OrigenDocHelpers
|
|
100
104
|
end
|
101
105
|
|
102
106
|
def flow_page_template
|
103
|
-
|
107
|
+
if File.exist?("#{Origen.root}/app/")
|
108
|
+
@flow_page_template ||= "#{Origen.root!}/app/templates/flow_page.md.erb"
|
109
|
+
else
|
110
|
+
@flow_page_template ||= "#{Origen.root!}/templates/flow_page.md.erb"
|
111
|
+
end
|
104
112
|
end
|
105
113
|
|
106
114
|
def flow_template
|
107
|
-
|
115
|
+
if File.exist?("#{Origen.root}/app/")
|
116
|
+
@flow_template ||= "#{Origen.root!}/app/templates/shared/test/_flow.md.erb"
|
117
|
+
else
|
118
|
+
@flow_template ||= "#{Origen.root!}/templates/shared/test/_flow.md.erb"
|
119
|
+
end
|
108
120
|
end
|
109
121
|
end
|
110
122
|
end
|
@@ -257,7 +257,11 @@ END
|
|
257
257
|
@_doc_root_dirs ||= {}
|
258
258
|
return @_doc_root_dirs[f] if @_doc_root_dirs[f]
|
259
259
|
unless File.exist?(f)
|
260
|
-
|
260
|
+
if File.exist?("#{Origen.root}/app/")
|
261
|
+
f = Pathname.new("#{Origen.root}/app/templates/web/#{f}")
|
262
|
+
else
|
263
|
+
f = Pathname.new("#{Origen.root}/templates/web/#{f}")
|
264
|
+
end
|
261
265
|
unless f.exist?
|
262
266
|
fail "#{options[:root]} does not exist!"
|
263
267
|
end
|
@@ -289,7 +293,11 @@ END
|
|
289
293
|
end
|
290
294
|
|
291
295
|
def _root_path(options)
|
292
|
-
|
296
|
+
if File.exist?("#{Origen.root}/app/templates/web")
|
297
|
+
root = Pathname.new("#{Origen.root}/app/templates/web")
|
298
|
+
else
|
299
|
+
root = Pathname.new("#{Origen.root}/templates/web")
|
300
|
+
end
|
293
301
|
_doc_root_dir(options).relative_path_from(root)
|
294
302
|
end
|
295
303
|
end
|
@@ -43,7 +43,11 @@ module OrigenDocHelpers
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def index_page_template
|
46
|
-
|
46
|
+
if File.exist?("#{Origen.root}/app/")
|
47
|
+
@index_page_template ||= "#{Origen.root!}/app/templates/model_index.md.erb"
|
48
|
+
else
|
49
|
+
@index_page_template ||= "#{Origen.root!}/templates/model_index.md.erb"
|
50
|
+
end
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
@@ -156,7 +160,11 @@ module OrigenDocHelpers
|
|
156
160
|
end
|
157
161
|
|
158
162
|
def model_page_template
|
159
|
-
|
163
|
+
if File.exist?("#{Origen.root}/app/")
|
164
|
+
@model_page_template ||= "#{Origen.root!}/app/templates/model_page.md.erb"
|
165
|
+
else
|
166
|
+
@model_page_template ||= "#{Origen.root!}/templates/model_page.md.erb"
|
167
|
+
end
|
160
168
|
end
|
161
169
|
end
|
162
170
|
end
|
@@ -25,7 +25,11 @@ module OrigenDocHelpers
|
|
25
25
|
@index = options[:index]
|
26
26
|
@root = Pathname.new(options[:root])
|
27
27
|
if @root.absolute?
|
28
|
-
|
28
|
+
if File.exist?("#{Origen.root}/app/")
|
29
|
+
@root = @root.relative_path_from(Pathname.new("#{Origen.root}/app/templates/web"))
|
30
|
+
else
|
31
|
+
@root = @root.relative_path_from(Pathname.new("#{Origen.root}/templates/web"))
|
32
|
+
end
|
29
33
|
end
|
30
34
|
require 'nokogiri'
|
31
35
|
end
|
@@ -116,7 +120,11 @@ module OrigenDocHelpers
|
|
116
120
|
end
|
117
121
|
|
118
122
|
def topic_wrapper_string
|
119
|
-
|
123
|
+
if File.exist?("#{Origen.root}/app/")
|
124
|
+
@topic_wrapper_string ||= File.read("#{Origen.root!}/app/templates/pdf/topic_wrapper.html")
|
125
|
+
else
|
126
|
+
@topic_wrapper_string ||= File.read("#{Origen.root!}/templates/pdf/topic_wrapper.html")
|
127
|
+
end
|
120
128
|
end
|
121
129
|
end
|
122
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_doc_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|