class ShellCommands

   def initialize(path)
     Dir.chdir path
   end

   def rvm_trust!
     %x[rvm rvmrc trust]
   end

   def rvm_load!
     %x[rvm rvmrc load]
   end

   def gem_pristine!
     %x[gem pristine --all]
   end

   def bundle_install!
     %x[bundle install]
   end

   def run_tests!
     message = %x[rake]
     success = $?.to_i == 0
     {:success => success, :message => message}
   end
end
