Sha256: e09354ca1cf1eb7410246a05a485593f56d67ae417498b580947acb9857b0837
Contents?: true
Size: 625 Bytes
Versions: 11
Compression:
Stored size: 625 Bytes
Contents
module Octopress class Scaffold attr_reader :path, :force def initialize(args, options) @path = File.expand_path(args.join(" "), Dir.pwd) @force = !!options['force'] @blank = !!options['blank'] end def write if !@force && (File.exist?(path + '/_templates') || File.exist?(path + '/_octopress.yml')) abort "Some files already exist. Use --force to overwrite." end FileUtils.cp_r scaffold_path + '/.', path puts "Octopress scaffold added to #{path}." end def scaffold_path Octopress.gem_dir('scaffold') end end end
Version data entries
11 entries across 11 versions & 1 rubygems