Sha256: e1b84ff9f0f49d3d3f2e3913d15c664db73fd16628196534c8dd8b6dbcb2f065

Contents?: true

Size: 292 Bytes

Versions: 12

Compression:

Stored size: 292 Bytes

Contents

module Percheron
  module Actions
    module Base
      def base_dir
        unit.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

12 entries across 12 versions & 1 rubygems

Version Path
percheron-0.8.1 lib/percheron/actions/base.rb
percheron-0.8.0 lib/percheron/actions/base.rb
percheron-0.7.16 lib/percheron/actions/base.rb
percheron-0.7.15 lib/percheron/actions/base.rb
percheron-0.7.14 lib/percheron/actions/base.rb
percheron-0.7.13 lib/percheron/actions/base.rb
percheron-0.7.12 lib/percheron/actions/base.rb
percheron-0.7.11 lib/percheron/actions/base.rb
percheron-0.7.10 lib/percheron/actions/base.rb
percheron-0.7.9 lib/percheron/actions/base.rb
percheron-0.7.8 lib/percheron/actions/base.rb
percheron-0.7.7 lib/percheron/actions/base.rb