From 8be3cdb6a036457b8e637727ce7f4afe21b6d29c 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 0bc33fc..8db424f 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -162,15 +162,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 @@ -178,7 +178,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