diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 9d4d8bb9..91ec321c 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -132,7 +132,7 @@ def _find_directory_source(path) return @directory, Pathname.new(path || '') end - path = @environment.filename.dirname.join(path) + path = @bundle.gemfile.dirname.join(path) @directory_sources.each do |s| if s.location.expand_path.to_s < path.expand_path.to_s diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb index 78dc0112..6dcf3823 100644 --- a/lib/bundler/environment.rb +++ b/lib/bundler/environment.rb @@ -18,14 +18,10 @@ def initialize(bundle) @system_gems = true end - def filename - @bundle.gemfile - end - def environment_rb(specs, options) load_paths = load_paths_for_specs(specs, options) bindir = @bundle.bindir.relative_path_from(@bundle.gem_path).to_s - filename = self.filename.relative_path_from(@bundle.gem_path).to_s + filename = @bundle.gemfile.relative_path_from(@bundle.gem_path).to_s template = File.read(File.join(File.dirname(__FILE__), "templates", "environment.erb")) erb = ERB.new(template, nil, '-') @@ -66,10 +62,6 @@ def default_sources [GemSource.new(@bundle, :uri => "http://gems.rubyforge.org")] end - def repository - @repository ||= Bundle.new(self) - end - def load_paths_for_specs(specs, options) load_paths = [] specs.each do |spec|