Sha256: b94d376d9458c6b6763cedd66d9f186ec66773c18a37a1bd2424ec9bf2bff5e9

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

module CircleCI
  module CoverageReporter
    # Encapsulate a CircleCI artifact
    #
    # @attr path [String] abstract path to the artifact in CircleCI container
    # @attr url [String] URL of the artifact
    Artifact = Struct.new(:path, :url) do
      # @param value [String]
      # @return [Boolean]
      def match?(value)
        path.end_with?(value)
      end

      # @return [String] content of the artifact
      def body
        @body ||= CoverageReporter.client.get(url).body
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
circleci-coverage_reporter-0.7.0 lib/circleci/coverage_reporter/artifact.rb
circleci-coverage_reporter-0.6.0 lib/circleci/coverage_reporter/artifact.rb