Sha256: 5709cbe8de448ecbff89d6b05d448ca8f3d5f94622bcd4a4d0d9560c56dd3c84

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 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
      version.nil? ? [latest] : since(version)
    end

    Contract None => String
    def run
      p JSON.dump output
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
concourse-fuselage-0.2.0 lib/concourse-fuselage/check.rb
concourse-fuselage-0.1.1 lib/concourse-fuselage/check.rb