Sha256: ae0c23e16cfecc28fb3b473a59533a2f2d46e809eccff3c6770a6744e3a3e3f1

Contents?: true

Size: 846 Bytes

Versions: 4

Compression:

Stored size: 846 Bytes

Contents

require 'json'
require_relative 'step'
require_relative 'support/build_metadata'
require_relative 'support/params'
require_relative 'support/work_dir'

module Fuselage
  class In < Step
    include Support::BuildMetadata
    include Support::Params
    include Support::WorkDir

    Contract None => HashOf[String, String]
    def version
      @version ||= config.fetch 'version'
    rescue KeyError
      STDERR.puts 'Configuration payload is missing version'
      abort
    end

    Contract None => ArrayOf[Maybe[HashOf[String, String]]]
    def metadata
      []
    end

    Contract None => String
    def output
      JSON.dump version: version, metadata: metadata
    end

    Contract None => Any
    def fetch!
      fail NotImplementedError
    end

    Contract None => String
    def run
      fetch!
      super
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
concourse-fuselage-0.5.8 lib/concourse-fuselage/in.rb
concourse-fuselage-0.5.7 lib/concourse-fuselage/in.rb
concourse-fuselage-0.5.2 lib/concourse-fuselage/in.rb
concourse-fuselage-0.5.1 lib/concourse-fuselage/in.rb