Sha256: fdb8166e3dcd1f0ab5ab68f87046c86cf714c8477bb3f15f8d42aecc611061ca

Contents?: true

Size: 440 Bytes

Versions: 13

Compression:

Stored size: 440 Bytes

Contents

require 'contracts'

module Fuselage
  module Support
    module WorkDir
      include ::Contracts::Core
      include ::Contracts::Builtin

      Contract None => String
      def workdir
        @workdir ||= ARGV.first.tap do |workdir|
          fail ArgumentError if workdir.nil?
        end
      rescue ArgumentError
        STDERR.puts 'Working directory missing, expected as first argument'
        abort
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
concourse-fuselage-0.5.8 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.5.7 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.5.2 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.5.1 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.5.0 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.4.1 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.4.0 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.3.2 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.3.1 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.3.0 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.2.0 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.1.1 lib/concourse-fuselage/support/work_dir.rb
concourse-fuselage-0.1.0 lib/concourse-fuselage/support/work_dir.rb