gitlab_support_readiness 1.0.14 → 1.0.15
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/support_readiness/repos/articles.rb +17 -1
- 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: cf9c83725418f6c7404ca2fe4ec2422cf73be0ada3076d4e2d8ea0f876f4a128
|
4
|
+
data.tar.gz: 6df0cda8a6614f87dfffc7e11e574ec53394eaff5ef675c07edffe526378027a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b8bc33f8fdff1a47dc87f678428c8376e5adf8c21696a36aa757e2d690957d90e89b8e92ad2ee94ce7eeb73182c52df5458d114b07ed833f63a18d71087dfa
|
7
|
+
data.tar.gz: 2cac360672478f0dba339d7593efd777bbaab738921049ac4bce8c7e80d9882062bd76a416863ad66d6897efeb39e7c8156370396ac24cc1e6c23538c207a5e0
|
@@ -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
|
#
|
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.15
|
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
|