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

Commit

Permalink
Rename repository to bundle in sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlhuda committed Jan 4, 2010
1 parent 12c740f commit 028d412
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def install(options = {})

# TODO: clean this up
sources.each do |s|
s.repository = self
s.bundle = self
s.local = options[:cached]
end

Expand Down Expand Up @@ -88,7 +88,7 @@ def prune(options = {})
dependencies, sources = @environment.gem_dependencies, @environment.sources

sources.each do |s|
s.repository = self
s.bundle = self
s.local = true
end

Expand Down
8 changes: 4 additions & 4 deletions lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class GitSourceError < StandardError ; end
# Represents a source of rubygems. Initially, this is only gem repositories, but
# eventually, this will be git, svn, HTTP
class Source
attr_accessor :repository, :local
attr_accessor :bundle, :local

def initialize(options) ; end

Expand Down Expand Up @@ -50,7 +50,7 @@ class RubygemsRetardation < StandardError; end
def download(spec)
Bundler.logger.info "Downloading #{spec.full_name}.gem"

destination = repository.path
destination = bundle.path

unless destination.writable?
raise RubygemsRetardation, "destination: #{destination} is not writable"
Expand Down Expand Up @@ -125,7 +125,7 @@ def to_s
def download(spec)
gemfile = Pathname.new(spec.loaded_from)
gemfile = gemfile.dirname.join('..', 'cache', "#{spec.full_name}.gem")
repository.cache(gemfile)
bundle.cache(gemfile)
end

private
Expand Down Expand Up @@ -298,7 +298,7 @@ def initialize(options)

def location
# TMP HAX to get the *.gemspec reading to work
repository.path.join('dirs', File.basename(@uri, '.git'))
bundle.path.join('dirs', File.basename(@uri, '.git'))
end

def gems
Expand Down

0 comments on commit 028d412

Please sign in to comment.