From f82dc905a215fb470edadf805afde95c9899eede Mon Sep 17 00:00:00 2001 From: Joshua Nichols Date: Wed, 27 Oct 2010 08:36:14 -0400 Subject: [PATCH] Tweaks to track. Don't add & commit newly tracked file. Also fix tests to not be spitting out to stdout. --- lib/homesick.rb | 5 ----- spec/homesick_spec.rb | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/homesick.rb b/lib/homesick.rb index b8b7bca..86612fe 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -85,11 +85,6 @@ class Homesick < Thor castle_path = castle_dir(castle) mv absolute_path, castle_path - inside castle_path do - system "git add #{file.basename}" - system "git commit -m \"Added #{file.basename}\"" - end - inside home_dir do absolute_path = castle_dir(castle) + file.basename home_path = home_dir + file diff --git a/spec/homesick_spec.rb b/spec/homesick_spec.rb index e8007a0..d7b15d3 100644 --- a/spec/homesick_spec.rb +++ b/spec/homesick_spec.rb @@ -106,6 +106,7 @@ describe Homesick do end @homesick.should_receive(:mv).with(some_rc_file, castle_path) + @homesick.should_receive(:ln_s).with(castle_path + some_rc_file.basename, some_rc_file) @homesick.track(some_rc_file.to_s, 'castle_repo') end end