gitlab_support_readiness 1.0.14 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/support_readiness/repos/articles.rb +18 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4bdb4e9a13ea79e33f2ec07cd451c6159c45356fcdeaba423b173e670207fd9
|
4
|
+
data.tar.gz: 2a9bdcfb6843924a044e63e6bf222051d75c7e4d0f54937cb0c44f3bf8239c67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59eb6f95cd01d36c54e0fafcb81cffc19d03d4fd464402b9b9c06db9b977b4389c915c6b17ff63da1a67cbc4bdbe8887cc86859ee58e943edd0821b2747a86a4
|
7
|
+
data.tar.gz: 3ee424e0a89f9269cbcac9b0a60a5e7fda16c4001ebc66810451c772e9d32648cebf12a2328fc9b4cc636169f25dba597dd736adfe00f821f3f5f992d190f58d
|
@@ -174,12 +174,28 @@ module Readiness
|
|
174
174
|
# @param object [Hash]
|
175
175
|
# @return [String]
|
176
176
|
def self.markdown_to_html(object)
|
177
|
-
markdown = File.readlines(
|
177
|
+
markdown = File.readlines(path_from_instance(object))
|
178
178
|
body = replace_internal_links(markdown, object)
|
179
179
|
html = Readiness::GitLab::Markdown.convert(@gl_client, body, true, 'gitlab-com/support/support-pages' )
|
180
180
|
data_object_dom(object) + html
|
181
181
|
end
|
182
182
|
|
183
|
+
##
|
184
|
+
# Determines the path based off the instance and object information
|
185
|
+
#
|
186
|
+
# @author Jason Colyer
|
187
|
+
# @since 1.0.15
|
188
|
+
# @param object [Hash]
|
189
|
+
# @return [String]
|
190
|
+
def self.path_from_instance(object)
|
191
|
+
return "#{@location}/managed_content/support-pages/#{object['content_path']}" if @instance == 'Global' && object['section_id'] == 360004459140
|
192
|
+
return "#{@location}/managed_content/knowledge-base/#{object['content_path']}" if @instance == 'Global' && object['section_id'] == 15215649512604
|
193
|
+
return "#{@location}/managed_content/support-pages/#{object['content_path']}" if @instance == 'US Government' && object['section_id'] == 10593044624020
|
194
|
+
return "#{@location}/managed_content/knowledge-base/#{object['content_path']}" if @instance == 'US Government' && object['section_id'] == 29015014994068
|
195
|
+
|
196
|
+
''
|
197
|
+
end
|
198
|
+
|
183
199
|
##
|
184
200
|
# Returns the data_object_dom String
|
185
201
|
#
|
@@ -189,7 +205,7 @@ module Readiness
|
|
189
205
|
# @return [String]
|
190
206
|
def self.data_object_dom(object)
|
191
207
|
<<~STRING
|
192
|
-
<p id="data_object_dom" style="display: none;" data-path="
|
208
|
+
<p id="data_object_dom" style="display: none;" data-path="#{path_from_instance(object)}"> </p>
|
193
209
|
STRING
|
194
210
|
end
|
195
211
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_support_readiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Colyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|