Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
require namespaced files without breaking specs
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Aug 25, 2011
1 parent 0a080f6 commit 653e1ea
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/bundler/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@ def require(*groups)
end
rescue LoadError => e
REGEXPS.find { |r| r =~ e.message }
raise if dep.autorequire || $1 != required_file

if dep.name.include?('-')
begin
namespaced_file = dep.name.gsub('-', '/')
Kernel.require namespaced_file
rescue LoadError
REGEXPS.find { |r| r =~ e.message }
raise if dep.autorequire || $1 != namespaced_file
end
else
raise if dep.autorequire || $1 != required_file
end
end
end
end
Expand Down

0 comments on commit 653e1ea

Please sign in to comment.