lib/omnibus/compressor.rb
def for_current_system(compressors)
      family = Ohai["platform_family"]

      if family == "mac_os_x"
        if compressors.include?(:dmg)
          return DMG
        end

        if compressors.include?(:tgz)
          return TGZ
        end
      end

      if compressors.include?(:tgz)
        return TGZ
      else
        log.info(log_key) { "No compressor defined for `#{family}'." }
        return Null
      end
    end
def for_current_system(compressors)
      family = Ohai["platform_family"]

      if family == "mac_os_x"
        if compressors.include?(:dmg)
          return DMG
        end

        if compressors.include?(:tgz)
          return TGZ
        end
      end

      if compressors.include?(:tgz)
        return TGZ
      else
        log.info(log_key) { "No compressor defined for `#{family}'." }
        return Null
      end
    end
Determine the best compressor for the current system. This method returns
 the class, not an instance of the class.

 @example
   Compressor.for_current_system([:dmg, :tgz]) #=> Packager::DMG

 @param [Array<Symbol>] compressors
   the list of configured compressors

 @return [~Compressor::Base]