Sha256: 3d553d87ce4b14005a06abeb5ec4e40e06224118271b3f0b94c673d66685fe6f

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

module Pronto
  module Formatter
    def self.get(names)
      names ||= 'text'
      Array(names).map { |name| FORMATTERS[name.to_s] || TextFormatter }
        .uniq.map(&:new)
    end

    def self.names
      FORMATTERS.keys
    end

    FORMATTERS = {
      'github' => GithubFormatter,
      'github_status' => GithubStatusFormatter,
      'github_combined_status' => GithubCombinedStatusFormatter,
      'github_pr' => GithubPullRequestFormatter,
      'github_pr_review' => GithubPullRequestReviewFormatter,
      'gitlab' => GitlabFormatter,
      'gitlab_mr' => GitlabMergeRequestReviewFormatter,
      'bitbucket' => BitbucketFormatter,
      'bitbucket_pr' => BitbucketPullRequestFormatter,
      'bitbucket_server_pr' => BitbucketServerPullRequestFormatter,
      'json' => JsonFormatter,
      'checkstyle' => CheckstyleFormatter,
      'text' => TextFormatter,
      'null' => NullFormatter
    }.freeze
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pronto-0.11.1 lib/pronto/formatter/formatter.rb
pronto-0.11.0 lib/pronto/formatter/formatter.rb