Class Sprout::ZipTask
In: sprout/lib/sprout/tasks/zip_task.rb
Parent: Rake::FileTask

The ZipTask should accept any directory as input and either an expected zip file name or directory where one will be created for output. The resulting zip file will only be generated if a file in the input directory has a newer timestamp than the existing zip file


excludes   input   output  


excludes  [W]  Array of file names that should not be added to the zip archive. The default value of this property is:
  @excludes = ['.', '..', '.svn', '.cvs', '.DS_Store', '.git', 'CVS', 'Thumbs.db']
input  [W]  The file or folder that should be archived.

If input is a directory, all of it‘s contents will be recursively added to the archive (excluding any files that match excludes of course).

If input is a file, a new archive will be created with a similar file name and only that file will be added to the archive.

output  [W]  Zip archive file to create. Usually, the name of the zip task will be used for this property, but in cases where you want a particular task name and a different output file, you can set this parameter.

Public Instance methods


# File sprout/lib/sprout/tasks/zip_task.rb, line 81
    def excludes
      @excludes ||= ['.', '..', '.svn', '.cvs', '.DS_Store', '.git', 'CVS', 'Thumbs.db']


# File sprout/lib/sprout/tasks/zip_task.rb, line 73
    def input
      @input ||= nil


# File sprout/lib/sprout/tasks/zip_task.rb, line 69
    def output
      @output ||= nil