# File lib/blimpy/livery.rb, line 7 def self.tarball_directory(directory) if directory.nil? || !(File.directory? directory) raise ArgumentError, "The argument '#{directory}' doesn't appear to be a directory" end directory = File.expand_path(directory) short_name = File.basename(directory) tarball = nil Dir.chdir(File.expand_path(directory + '/../')) do tarball = self.gzip_for_directory(short_name, '/tmp') do |tgz| Archive::Tar::Minitar.pack(short_name, tgz) end end tarball end