Using DEFAULT_CASTLE_NAME in show_path, diff, status

This commit is contained in:
David Simon
2013-06-26 14:29:45 -04:00
committed by thilko
parent 92c61f928e
commit 6f3186df2f

View File

@@ -163,15 +163,15 @@ class Homesick < Thor
end end
desc 'status CASTLE', 'Shows the git status of a castle' desc 'status CASTLE', 'Shows the git status of a castle'
def status(castle) def status(castle = DEFAULT_CASTLE_NAME)
check_castle_existance(castle, 'status') check_castle_existance(castle, 'status')
inside repos_dir.join(castle) do inside repos_dir.join(castle) do
git_status git_status
end end
end end
desc 'diff CASTLE', 'Shows the git diff of a castle' desc 'diff CASTLE', 'Shows the git diff of uncommitted changes in a castle'
def diff(castle) def diff(castle = DEFAULT_CASTLE_NAME)
check_castle_existance(castle, 'diff') check_castle_existance(castle, 'diff')
inside repos_dir.join(castle) do inside repos_dir.join(castle) do
git_diff git_diff
@@ -179,7 +179,7 @@ class Homesick < Thor
end end
desc 'show_path CASTLE', 'Prints the path of a castle' desc 'show_path CASTLE', 'Prints the path of a castle'
def show_path(castle) def show_path(castle = DEFAULT_CASTLE_DAME)
check_castle_existance(castle, 'show_path') check_castle_existance(castle, 'show_path')
say repos_dir.join(castle) say repos_dir.join(castle)
end end