lib/xcbootstrap/bootstrap.rb in xcbootstrap-0.0.3 vs lib/xcbootstrap/bootstrap.rb in xcbootstrap-0.1.0
- old
+ new
@@ -6,21 +6,19 @@
class Bootstrap
attr_accessor :template_dir
attr_accessor :project_dir
def initialize template_root, template_name, project_dir
- # FileUtils.mkdir_p project_dir
-
@template_dir = File.join template_root, template_name
raise "Invalid template: could not find template directory #{@template_dir}" unless File.directory?(@template_dir)
manifest_file = File.join @template_dir, "manifest.yml"
raise "Invalid template: could not find template manifest #{manifest_file}" unless File.exists?(manifest_file)
@manifest = YAML.load_file manifest_file
raise "Invalid template: manifest file did not contain a hash of file mappings #{manifest_file}" unless manifest_data_is_valid(@manifest)
- @project_dir = File.expand_path(project_dir, Dir.getwd)
+ @project_dir = File.expand_path(project_dir, Dir.pwd)
end
def process
FileUtils.mkdir_p project_dir