blob: f74ef95a832cbfa8b0ba400930cb8f4a4c450c63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# frozen_string_literal: true
module Gitlab
module Ci
class Config
module Yaml
class << self
def load!(content, project: nil)
Loader.new(content, project: project).to_result.then do |result|
##
# raise an error for backwards compatibility
#
raise result.error unless result.valid?
result.content
end
end
def load_result!(content, project: nil)
Loader.new(content, project: project).to_result
end
end
end
end
end
end
|