Sha256: c558e5d91520cd9c8119bf96d5d79f5d96b75068bc9e39b551a4f77ea7e99543

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

require 'json'
require_relative 'step'

module Fuselage
  class Check < Step
    Contract None => Maybe[HashOf[String, String]]
    def version
      config['version']
    end

    Contract None => HashOf[String, String]
    def latest
      fail NotImplementedError
    end

    Contract HashOf[String, String] => ArrayOf[HashOf[String, String]]
    def since(version)
      fail NotImplementedError
    end

    Contract None => ArrayOf[HashOf[String, String]]
    def output
      JSON.dump version.nil? ? [latest] : since(version)
    end

    Contract None => String
    def run
      p output.tap { |string| STDERR.puts string if debugging? }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
concourse-fuselage-0.3.1 lib/concourse-fuselage/check.rb
concourse-fuselage-0.3.0 lib/concourse-fuselage/check.rb