Sha256: 134624e737fdb011cabc4ee14c03a26497a68070c57e6efc24277712bc7f22cb

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 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 => 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

4 entries across 4 versions & 1 rubygems

Version Path
concourse-fuselage-0.5.0 lib/concourse-fuselage/check.rb
concourse-fuselage-0.4.1 lib/concourse-fuselage/check.rb
concourse-fuselage-0.4.0 lib/concourse-fuselage/check.rb
concourse-fuselage-0.3.2 lib/concourse-fuselage/check.rb