Sha256: bd171e0607ebc9da11d14ffa4b15e5277baf772cd0534a3372d63ba87dc0ef6e
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
# # project.rb # bolt # # Created by Ben McRedmond on 2010-01-08. # Copyright 2010 Ben McRedmond. All rights reserved. # require 'bolt/base' module Bolt class Project < Base # Takes an ostruct options object created by parsing ARGV def initialize() @default_directories = [$config.pages, $config.views, $config.lib, $config.resources] @default_files = {$config.config => "default_files/config.yml"} end # Creates all nessecary directories and files for a new Bolt Project def run create_directory_structure create_files end private # Creates all the default directories using either defaults # specified in lib/bolt.rb or by options on the command line def create_directory_structure create_directory($config.base_dir, :base_dir => true) unless File.directory?($config.base_dir) @default_directories.each {|directory| create_directory(directory)} end # Creates all the default files using either defaults specified # in lib/bolt.rb or by options on the command line def create_files @default_files.each {|file, template| create_file(file, :copy_from => $BOLT_BASE + template)} end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
benofsky-bolt-0.2.0 | lib/bolt/project.rb |
benofsky-bolt-0.1.10 | lib/bolt/project.rb |
benofsky-bolt-0.1.9 | lib/bolt/project.rb |