lib/metaforce/job/deploy.rb
def zip_file
      path = Dir.mktmpdir
      File.join(path, 'deploy.zip').tap do |path|
        Zip::File.open(path, Zip::File::CREATE) do |zip|
          Dir["#{@path}/**/**"].each do |file|
            zip.add(file.sub("#{File.dirname(@path)}/", ''), file)
          end
        end
      end
    end
def zip_file
      path = Dir.mktmpdir
      File.join(path, 'deploy.zip').tap do |path|
        Zip::File.open(path, Zip::File::CREATE) do |zip|
          Dir["#{@path}/**/**"].each do |file|
            zip.add(file.sub("#{File.dirname(@path)}/", ''), file)
          end
        end
      end
    end
Internal: Creates a zip file with the contents of the directory.