Permalink
Browse files

User destroys project

  • Loading branch information...
1 parent 8ac471e commit d8bb911c4515cea6edf747ab92ae934c25638d8c @joefiorini committed Jan 20, 2012
Showing with 8 additions and 1 deletion.
  1. +7 −0 lib/projit/cli.rb
  2. +1 −1 lib/projit/project_generator.rb
View
@@ -11,5 +11,12 @@ def new(type, name=nil)
Projit::ProjectGenerator.start args
end
+ desc "destroy NAME", "Delete project stored in the directory named NAME"
+ def destroy name
+ path = File.join(Projit.config.projects_home, name)
+ puts "Removing project at #{path.inspect}"
+ FileUtils.rm_rf path
+ end
+
end
end
@@ -71,7 +71,7 @@ def clone_from_git_into(name)
end
def project_path
- Pathname.new project_name
+ Pathname.new File.join(projects_home, project_name)
end
def project_name

0 comments on commit d8bb911

Please sign in to comment.