Module: Gitlab::Ci::Parsers

Defined in:
lib/gitlab/ci/parsers.rb,
lib/gitlab/ci/parsers/test/junit.rb,
lib/gitlab/ci/parsers/parser_error.rb,
lib/gitlab/ci/parsers/terraform/tfplan.rb,
lib/gitlab/ci/parsers/coverage/cobertura.rb,
lib/gitlab/ci/parsers/accessibility/pa11y.rb

Defined Under Namespace

Modules: Accessibility, Coverage, Terraform, Test

Constant Summary collapse

ParserNotFoundError =
Class.new(ParserError)
ParserError =
Class.new(StandardError)

Class Method Summary collapse

Class Method Details

.fabricate!(file_type) ⇒ Object


17
18
19
20
21
# File 'lib/gitlab/ci/parsers.rb', line 17

def self.fabricate!(file_type)
  parsers.fetch(file_type.to_sym).new
rescue KeyError
  raise ParserNotFoundError, "Cannot find any parser matching file type '#{file_type}'"
end

.parsersObject


8
9
10
11
12
13
14
15
# File 'lib/gitlab/ci/parsers.rb', line 8

def self.parsers
  {
    junit: ::Gitlab::Ci::Parsers::Test::Junit,
    cobertura: ::Gitlab::Ci::Parsers::Coverage::Cobertura,
    terraform: ::Gitlab::Ci::Parsers::Terraform::Tfplan,
    accessibility: ::Gitlab::Ci::Parsers::Accessibility::Pa11y
  }
end