class Quaker::PathExtensions

Public Instance Methods

expand(services) click to toggle source
# File lib/quaker/path_extensions.rb, line 19
def expand services
  services.each {|_name, spec| expand_service_volumes(spec) }
end
expand_path(volumes_desc, build_path) click to toggle source
# File lib/quaker/path_extensions.rb, line 3
def expand_path volumes_desc, build_path
  parts = volumes_desc.split(':')
  parts[0].gsub!(/^\~/, build_path)
  parts.join(':')
end
expand_service_volumes(spec) click to toggle source
# File lib/quaker/path_extensions.rb, line 9
def expand_service_volumes spec
  build_path = spec['build']
  return unless build_path

  volumes = spec['volumes']
  return unless volumes

  spec['volumes'] = volumes.map{|v| expand_path(v, build_path) }
end