From 6f3186df2f329ca2e232bca0fd176bbebfb512cb Mon Sep 17 00:00:00 2001 From: David Simon Date: Wed, 26 Jun 2013 14:29:45 -0400 Subject: [PATCH] Using DEFAULT_CASTLE_NAME in show_path, diff, status --- lib/homesick.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/homesick.rb b/lib/homesick.rb index 2b7b306..de364e5 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -163,15 +163,15 @@ class Homesick < Thor end desc 'status CASTLE', 'Shows the git status of a castle' - def status(castle) + def status(castle = DEFAULT_CASTLE_NAME) 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) + desc 'diff CASTLE', 'Shows the git diff of uncommitted changes in a castle' + def diff(castle = DEFAULT_CASTLE_NAME) check_castle_existance(castle, 'diff') inside repos_dir.join(castle) do git_diff @@ -179,7 +179,7 @@ class Homesick < Thor end 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') say repos_dir.join(castle) end