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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 040cceb4e53838dc33cb011e6d0163e7d513c01ae5f23d960fda05b3834b6f80
4
- data.tar.gz: 48b1fbc4f2cdd9b4df38b830c56caec822217f13f99fe15afef007382ed000d3
3
+ metadata.gz: cf9c83725418f6c7404ca2fe4ec2422cf73be0ada3076d4e2d8ea0f876f4a128
4
+ data.tar.gz: 6df0cda8a6614f87dfffc7e11e574ec53394eaff5ef675c07edffe526378027a
5
5
  SHA512:
6
- metadata.gz: 4537f6217a3ed63769dc1a169645149f953b50e1b89cb738c8c840637d7de97d239d189eb0ec55575a8bd8e03d8e5edc11f5a75b9cc1cf7f3232c004de886012
7
- data.tar.gz: 73d03554d595711e854bd6c2666f9f275acc657b5713347c3f88be08c1319e67d097d67589a89d8aa50e0b86e22e8ecd2ab683d2d350b1ab4b537a9c6883ef37
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("#{@location}/managed_content/pages/#{object['content_path']}")
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.14
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-15 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport