lib/liberty_buildpack/container/common_paths.rb
# Validates if a pathname is valid and considred relative.  When valid, the pathname will be converted to its
# symbolic representation of a relative path. Ex: a relative_pathname of ./something/dir will return ../..
Validates if a pathname is valid and considred relative.  When valid, the pathname will be converted to its
symbolic representation of a relative path. Ex: a relative_pathname of ./something/dir will return ../
Validates if a pathname is valid and considred relative . When valid the pathname will be converted to its symbolic representation of a relative path . Ex : a relative_pathname of . / something / dir will return .. /
def valid_relative_string(relative_pathname)
      if relative_pathname.nil? || relative_pathname.empty? || (relative_pathname.include? ' ')
        raise 'relative_location provided to common_paths must be nonempty and without spaces'
      end
      begin
        Pathname.new(CURRENT_DIR).relative_path_from(Pathname.new(relative_pathname)).to_s unless relative_pathname.eql? CURRENT_DIR
      rescue
        raise 'paths provided to CommonPaths must be a relative, subdirectory, and a valid Pathname'
      end
    end
def valid_relative_string ( relative_pathname ) if relative_pathname . nil? || relative_pathname . empty? || ( relative_pathname . include? ' ' ) raise 'relative_location provided to common_paths must be nonempty and without spaces' end begin Pathname . new ( CURRENT_DIR ) . relative_path_from ( Pathname . new ( relative_pathname ) ) . to_s unless relative_pathname . eql? CURRENT_DIR rescue raise 'paths provided to CommonPaths must be a relative, subdirectory, and a valid Pathname' end end
Validates if a pathname is valid and considred relative.
Validates if a pathname is valid and considred relative .
relative_pathname