Sha256: 6e0fda76397e500233737b2aad3201cac1e815fd6aaaa9c0b0af0dade68ca610

Contents?: true

Size: 297 Bytes

Versions: 7

Compression:

Stored size: 297 Bytes

Contents

module Percheron
  module Actions
    module Base
      def base_dir
        container.dockerfile.dirname.to_s
      end

      def in_working_directory(new_dir)
        old_dir = Dir.pwd
        Dir.chdir(new_dir)
        yield
      ensure
        Dir.chdir(old_dir)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
percheron-0.7.6 lib/percheron/actions/base.rb
percheron-0.7.5 lib/percheron/actions/base.rb
percheron-0.7.4 lib/percheron/actions/base.rb
percheron-0.7.3 lib/percheron/actions/base.rb
percheron-0.7.2 lib/percheron/actions/base.rb
percheron-0.7.1 lib/percheron/actions/base.rb
percheron-0.7.0 lib/percheron/actions/base.rb