From ce760ae336e4c49c222da11c7b45bab9a26a7e50 Mon Sep 17 00:00:00 2001 From: Tim Harper Date: Thu, 30 Jun 2011 12:25:01 -0600 Subject: [PATCH] fixes spork plugin discovery when not using Bundler --- lib/spork/gem_helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spork/gem_helpers.rb b/lib/spork/gem_helpers.rb index 51918c9..11767aa 100644 --- a/lib/spork/gem_helpers.rb +++ b/lib/spork/gem_helpers.rb @@ -19,7 +19,7 @@ def <=>(other) def latest_load_paths case when defined?(Bundler) - $LOAD_PATH.uniq + $LOAD_PATH.map { |p| File.expand_path(p) }.uniq when Gem.respond_to?(:path) Dir["{#{Gem.path.join(',')}}" + "/gems/*"].inject({}) do |h,f| gem_path = GemPath.new(f) @@ -29,7 +29,7 @@ def latest_load_paths h[gem_path.name] = gem_path end h - end.values.map(&:path) + end.values.map { |gem_path| File.expand_path("lib", gem_path.path) }.sort.uniq else STDERR.puts "No mechanism available to scan for other gems implementing spork hooks. " []