Skip to content

Commit

Permalink
+ Removed pkgs/sources/lib/sources.rb
Browse files Browse the repository at this point in the history
+ Gem.sources no longer tries to load sources gem. Only uses default_sources.
  • Loading branch information
zenspider committed Apr 4, 2011
1 parent c4785ee commit e72e92f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
13 changes: 2 additions & 11 deletions lib/rubygems.rb
Expand Up @@ -1013,23 +1013,14 @@ def self.source_index
# default_sources if it is not installed.

def self.sources
if @sources.empty? then
begin
gem 'sources', '> 0.0.1'
require 'sources'
rescue LoadError
@sources = default_sources
end
end

@sources
@sources ||= default_sources
end

##
# Need to be able to set the sources without calling
# Gem.sources.replace since that would cause an infinite loop.

def self.sources=(new_sources)
def self.sources= new_sources
@sources = new_sources
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/local_remote_options.rb
Expand Up @@ -76,7 +76,7 @@ def add_clear_sources_option
add_option(:"Local/Remote", '--clear-sources',
'Clear the gem sources') do |value, options|

Gem.sources.clear
Gem.sources = nil
options[:sources_cleared] = true
end
end
Expand Down
3 changes: 0 additions & 3 deletions pkgs/sources/lib/sources.rb

This file was deleted.

14 changes: 0 additions & 14 deletions pkgs/sources/sources.gemspec

This file was deleted.

0 comments on commit e72e92f

Please sign in to comment.