Module: Dapp::Dimg::Dapp::Command::BuildContext::Common

Included in:
Dapp
Defined in:
lib/dapp/dimg/dapp/command/build_context/common.rb

Instance Method Summary collapse

Instance Method Details

#build_context_build_tarObject



11
12
13
# File 'lib/dapp/dimg/dapp/command/build_context/common.rb', line 11

def build_context_build_tar
  build_context_path('build.tar')
end

#build_context_directoryObject



19
20
21
# File 'lib/dapp/dimg/dapp/command/build_context/common.rb', line 19

def build_context_directory
  File.expand_path(options[:build_context_directory].to_s)
end

#build_context_images_tarObject



7
8
9
# File 'lib/dapp/dimg/dapp/command/build_context/common.rb', line 7

def build_context_images_tar
  build_context_path('images.tar')
end

#build_context_path(*path) ⇒ Object



15
16
17
# File 'lib/dapp/dimg/dapp/command/build_context/common.rb', line 15

def build_context_path(*path)
  path.compact.map(&:to_s).inject(Pathname.new(build_context_directory), &:+).tap { |p| p.parent.mkpath }
end