Sha256: 7ff1419c27cc10eb9750223871f5af980f2344a0959971545635064056399af7
Contents?: true
Size: 759 Bytes
Versions: 7
Compression:
Stored size: 759 Bytes
Contents
require 'fileutils' require 'find' begin require 'archive/tar/minitar' rescue LoadError puts "You must gem install archive-tar-minitar to use the merb app generator" exit! end module Merb class AppGenerator SKELETON = File.expand_path File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'examples/skeleton.tar') def self.run(path) @path = path @path = File.expand_path(@path) if File.exists? @path STDERR.puts "ERROR: Path #{@path} already exists! Aborting!" exit 1 end puts "Copying skeleton app to '#@path'" # Unpacks 'test.tar' to 'x', creating 'x' if necessary. Archive::Tar::Minitar.unpack(SKELETON, @path) puts 'Done' end end end
Version data entries
7 entries across 7 versions & 1 rubygems