From 8c4cac4d7069cfacc037c2e9feab58cc96b8dcd6 Mon Sep 17 00:00:00 2001 From: Terence Lee Date: Fri, 17 Jun 2011 00:27:44 -0700 Subject: #1240, fix standalone when using the endpoint --- lib/bundler/endpoint_specification.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/bundler/endpoint_specification.rb') diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index e840ed84d9..fd72ddad70 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -18,5 +18,24 @@ module Bundler def fetch_platform @plaftorm end + + # needed for standalone, load required_paths from local gemspec + # after the gem in installed + def require_paths + if _local_specification + _local_specification.require_paths + else + super + end + end + + def _local_specification + eval(File.read(local_specification_path)) if @loaded_from && File.exists?(local_specification_path) + end + + private + def local_specification_path + "#{installation_path}/specifications/#{full_name}.gemspec" + end end end -- cgit v1.2.1