def directories_to_compact
      builds = Dir.entries builds_dir
      builds.select! {|e| File.directory? builds_dir(e) }
      builds.reject! {|e| %w{. ..}.include? e }
      builds.sort!
      
      builds = builds[0..-(@num_builds_to_leave+1)]
      builds.reject! {|e| @builds_to_leave.include?(e) || @builds_to_leave.include?(builds_dir(e, 'export'))}

      builds
    end
def directories_to_compact
      builds = Dir.entries builds_dir
      builds.select! {|e| File.directory? builds_dir(e) }
      builds.reject! {|e| %w{. ..}.include? e }
      builds.sort!
      
      builds = builds[0..-(@num_builds_to_leave+1)]
      builds.reject! {|e| @builds_to_leave.include?(e) || @builds_to_leave.include?(builds_dir(e, 'export'))}

      builds
    end
def directories_to_compact builds = Dir . entries builds_dir builds . select! { | e | File . directory? builds_dir ( e ) } builds . reject! { | e | %w{ . .. } . include? e } builds . sort! builds = builds [ 0 .. - ( @num_builds_to_leave + 1 ) ] builds . reject! { | e | @builds_to_leave . include? ( e ) || @builds_to_leave . include? ( builds_dir ( e , 'export' ) ) } builds end
Build the list of directories to compact according to the options
Build the list of directories to compact according to the options