Added three commands: show_path, status, diff

This commit is contained in:
David Simon
2013-06-25 16:11:08 -04:00
parent 4aa76ce444
commit 99760c27af
3 changed files with 54 additions and 0 deletions

View File

@@ -161,6 +161,28 @@ class Homesick < Thor
end
end
desc 'status CASTLE', 'Shows the git status of a castle'
def status(castle)
check_castle_existance(castle, 'status')
inside repos_dir.join(castle) do
git_status
end
end
desc 'diff CASTLE', 'Shows the git diff of a castle'
def diff(castle)
check_castle_existance(castle, 'diff')
inside repos_dir.join(castle) do
git_diff
end
end
desc 'show_path CASTLE', 'Prints the path of a castle'
def show_path(castle)
check_castle_existance(castle, 'show_path')
say repos_dir.join(castle)
end
desc 'generate PATH', 'generate a homesick-ready git repo at PATH'
def generate(castle)
castle = Pathname.new(castle).expand_path