Permalink
Browse files

Merge pull request #59 from grosser/dotspin

do not fail with missing root or missing .spin
  • Loading branch information...
2 parents a17e7ae + dbd3d8f commit b8e6822e96ad224ec00bfc6b3836579c911a37bc @jstorimer committed Jul 26, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/spin
View
5 bin/spin
@@ -60,7 +60,7 @@ end
def serve(force_rspec, force_testunit, time, push_results, preload)
root_path = rails_root(preload) and Dir.chdir(root_path)
file = socket_file
- Spin.parse_hook_file(root_path)
+ Spin.parse_hook_file(root_path) if root_path
# We delete the tmp file for the Unix socket if it already exists. The file
# is scoped to the `pwd`, so if it already exists then it must be from an
@@ -291,7 +291,8 @@ module Spin
end
def self.parse_hook_file(root)
- load(root.join(".spin.rb"))
+ file = root.join(".spin.rb")
+ load(file) if File.exist?(file)
end
private

0 comments on commit b8e6822

Please sign in to comment.