Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlhuda committed Jan 4, 2010
1 parent 75feca1 commit c3c08e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/dsl.rb
Expand Up @@ -132,7 +132,7 @@ def _find_directory_source(path)
return @directory, Pathname.new(path || '') return @directory, Pathname.new(path || '')
end end


path = @environment.filename.dirname.join(path) path = @bundle.gemfile.dirname.join(path)


@directory_sources.each do |s| @directory_sources.each do |s|
if s.location.expand_path.to_s < path.expand_path.to_s if s.location.expand_path.to_s < path.expand_path.to_s
Expand Down
10 changes: 1 addition & 9 deletions lib/bundler/environment.rb
Expand Up @@ -18,14 +18,10 @@ def initialize(bundle)
@system_gems = true @system_gems = true
end end


def filename
@bundle.gemfile
end

def environment_rb(specs, options) def environment_rb(specs, options)
load_paths = load_paths_for_specs(specs, options) load_paths = load_paths_for_specs(specs, options)
bindir = @bundle.bindir.relative_path_from(@bundle.gem_path).to_s 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")) template = File.read(File.join(File.dirname(__FILE__), "templates", "environment.erb"))
erb = ERB.new(template, nil, '-') erb = ERB.new(template, nil, '-')
Expand Down Expand Up @@ -66,10 +62,6 @@ def default_sources
[GemSource.new(@bundle, :uri => "http://gems.rubyforge.org")] [GemSource.new(@bundle, :uri => "http://gems.rubyforge.org")]
end end


def repository
@repository ||= Bundle.new(self)
end

def load_paths_for_specs(specs, options) def load_paths_for_specs(specs, options)
load_paths = [] load_paths = []
specs.each do |spec| specs.each do |spec|
Expand Down

0 comments on commit c3c08e3

Please sign in to comment.