From d8291edae0d822c2b6e5c1043b2fa930846a82f8 Mon Sep 17 00:00:00 2001 From: Jason Buckner Date: Sat, 24 Nov 2012 23:18:48 -0800 Subject: [PATCH] splits up castle commit from castle push for more fine-grained control --- README.markdown | 4 ++++ lib/homesick.rb | 14 +++++++++++++- spec/homesick_spec.rb | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index c58edfe..63e3d36 100644 --- a/README.markdown +++ b/README.markdown @@ -37,6 +37,10 @@ To pull your castle (or all castles): homesick pull --all|CASTLE +To commit your castle's changes: + + homesick commit CASTLE + To push your castle: homesick push CASTLE diff --git a/lib/homesick.rb b/lib/homesick.rb index 8dff9c5..3416d14 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -78,6 +78,12 @@ class Homesick < Thor end + desc "commit CASTLE", "Commit the specified castle's changes" + def commit(name) + commit_castle name + + end + desc "push CASTLE", "Push the specified castle" def push(name) push_castle name @@ -196,10 +202,16 @@ class Homesick < Thor end end + def commit_castle(castle) + check_castle_existance(castle, "commit") + inside repos_dir.join(castle) do + git_commit_all + end + end + def push_castle(castle) check_castle_existance(castle, "push") inside repos_dir.join(castle) do - git_commit_all git_push end end diff --git a/spec/homesick_spec.rb b/spec/homesick_spec.rb index efc92ca..81fafb7 100644 --- a/spec/homesick_spec.rb +++ b/spec/homesick_spec.rb @@ -144,6 +144,12 @@ describe "homesick" do end + describe "commit" do + + xit "needs testing" + + end + describe "push" do xit "needs testing"