Skip to content

Commit

Permalink
fixes spork plugin discovery when not using Bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Jun 30, 2011
1 parent 40c5962 commit ce760ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/spork/gem_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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. "
[]
Expand Down

0 comments on commit ce760ae

Please sign in to comment.