Added three commands: show_path, status, diff

This commit is contained in:
David Simon
2013-06-25 16:11:08 -04:00
committed by thilko
parent d3cb45f879
commit 92c61f928e
3 changed files with 54 additions and 0 deletions

View File

@@ -162,6 +162,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