Module: ZipUtils::DryRun

Defined in:
lib/more/facets/ziputils.rb

Overview

Dry-run verions of ZipUtils.

This is the same as passing the :dryrun flag to ZipUtils. Which is also equivalent to passing :noop and :verbose together.

Class Method Summary collapse

Class Method Details

.compress(format_extension, folder, file = nil, options = {}) ⇒ Object



264
265
266
267
# File 'lib/more/facets/ziputils.rb', line 264

def compress(format_extension, folder, file=nil, options={})
  options[:dryrun] = true
  ZipUtils.tar_gzip(format_extension, folder, file, options)
end

.tar_bzip2(folder, file = nil, options = {}) ⇒ Object



279
280
281
282
# File 'lib/more/facets/ziputils.rb', line 279

def tar_bzip2(folder, file=nil, options={})
  options[:dryrun] = true
  ZipUtils.untar_bzip2(folder, file, options)
end

.tar_gzip(folder, file = nil, options = {}) ⇒ Object



269
270
271
272
# File 'lib/more/facets/ziputils.rb', line 269

def tar_gzip(folder, file=nil, options={})
  options[:dryrun] = true
  ZipUtils.tar_gzip(folder, file, options)
end

.untar_bzip2(file, options = {}) ⇒ Object



284
285
286
287
# File 'lib/more/facets/ziputils.rb', line 284

def untar_bzip2(file, options={})
  options[:dryrun] = true
  ZipUtils.untar_bzip2(file, options)
end

.untar_gzip(file, options = {}) ⇒ Object



274
275
276
277
# File 'lib/more/facets/ziputils.rb', line 274

def untar_gzip(file, options={})
  options[:dryrun] = true
  ZipUtils.untar_gzip(file, options)
end

.unzip(file, options = {}) ⇒ Object



294
295
296
297
# File 'lib/more/facets/ziputils.rb', line 294

def unzip(file, options={})
  options[:dryrun] = true
  ZipUtils.unzip(file, options)
end

.zip(folder, file = nil, options = {}) ⇒ Object



289
290
291
292
# File 'lib/more/facets/ziputils.rb', line 289

def zip(folder, file=nil, options={})
  options[:dryrun] = true
  ZipUtils.unzip(folder, file, options)
end