Class: Bundler::SourceList

### Home Classes Methods

### In Files

- lib/bundler/source_list.rb

### Parent

Object

### Methods

- ::new
- #add_git_source
- #add_path_source
- #add_rubygems_remote
- #add_rubygems_source
- #all_sources
- #cached!
- #get
- #lock_sources
- #remote!
- #replace_sources!
- #rubygems_primary_remotes
- #rubygems_remotes
- #rubygems_sources

### Files

- bundle
- bundle-config
- bundle-config.txt
- bundle-exec
- bundle-exec.txt
- bundle-install
- bundle-install.txt
- bundle-package
- bundle-package.txt
- bundle-platform
- bundle-platform.txt
- bundle-update
- bundle-update.txt
- bundle.txt
- gemfile.5.txt
- Executable
- Gemfile

### Class/Module Index

Quicksearch

- Bundler
- Bundler::BundlerError
- Bundler::CLI
- Bundler::CLI::Binstubs
- Bundler::CLI::Cache
- Bundler::CLI::Check
- Bundler::CLI::Clean
- Bundler::CLI::Common
- Bundler::CLI::Config
- Bundler::CLI::Console
- Bundler::CLI::Exec
- Bundler::CLI::Gem
- Bundler::CLI::Init
- Bundler::CLI::Inject
- Bundler::CLI::Install
- Bundler::CLI::Lock
- Bundler::CLI::Open
- Bundler::CLI::Outdated
- Bundler::CLI::Package
- Bundler::CLI::Platform
- Bundler::CLI::Show
- Bundler::CLI::Update
- Bundler::CLI::Viz
- Bundler::CurrentRuby
- Bundler::CyclicDependencyError
- Bundler::Definition
- Bundler::DepProxy
- Bundler::Dependency
- Bundler::Deployment
- Bundler::Deprecate
- Bundler::DeprecatedError
- Bundler::Dsl
- Bundler::Dsl::DSLError
- Bundler::EndpointSpecification
- Bundler::Env
- Bundler::Environment
- Bundler::Fetcher
- Bundler::Fetcher::AuthenticationRequiredError
- Bundler::Fetcher::BadAuthenticationError
- Bundler::Fetcher::Base
- Bundler::Fetcher::CertificateFailureError
- Bundler::Fetcher::Dependency
- Bundler::Fetcher::Downloader
- Bundler::Fetcher::FallbackError
- Bundler::Fetcher::Index
- Bundler::Fetcher::NetworkDownError
- Bundler::Fetcher::SSLError
- Bundler::GemHelper
- Bundler::GemHelpers
- Bundler::GemInstaller
- Bundler::GemNotFound
- Bundler::GemfileError
- Bundler::GemfileLockNotFound
- Bundler::GemfileNotFound
- Bundler::GemspecError
- Bundler::GitError
- Bundler::Graph
- Bundler::Graph::GraphVizClient
- Bundler::HTTPError
- Bundler::Index
- Bundler::Injector
- Bundler::InstallError
- Bundler::InstallHookError
- Bundler::Installer
- Bundler::InvalidOption
- Bundler::LazySpecification
- Bundler::LockfileError
- Bundler::LockfileParser
- Bundler::MarshalError
- Bundler::MatchPlatform
- Bundler::Molinillo
- Bundler::Molinillo::CircularDependencyError
- Bundler::Molinillo::DependencyGraph
- Bundler::Molinillo::DependencyGraph::Vertex
- Bundler::Molinillo::DependencyState
- Bundler::Molinillo::NoSuchDependencyError
- Bundler::Molinillo::PossibilityState
- Bundler::Molinillo::Resolver
- Bundler::Molinillo::Resolver::Resolution
- Bundler::Molinillo::ResolverError
- Bundler::Molinillo::SpecificationProvider
- Bundler::Molinillo::UI
- Bundler::Molinillo::VersionConflict
- Bundler::PathError
- Bundler::ProductionError
- Bundler::RemoteSpecification
- Bundler::Resolver
- Bundler::Resolver::Molinillo
- Bundler::Resolver::Molinillo::VersionConflict
- Bundler::Resolver::SpecGroup
- Bundler::Retry
- Bundler::RubyDsl
- Bundler::RubyVersion
- Bundler::RubyVersionMismatch
- Bundler::RubygemsIntegration
- Bundler::RubygemsIntegration::AlmostModern
- Bundler::RubygemsIntegration::Ancient
- Bundler::RubygemsIntegration::Future
- Bundler::RubygemsIntegration::Gem
- Bundler::RubygemsIntegration::Legacy
- Bundler::RubygemsIntegration::Legacy::Gem::SourceIndex
- Bundler::RubygemsIntegration::Modern
- Bundler::RubygemsIntegration::MoreFuture
- Bundler::RubygemsIntegration::MoreModern
- Bundler::RubygemsIntegration::Transitional
- Bundler::Runtime
- Bundler::SecurityError
- Bundler::Settings
- Bundler::SharedHelpers
- Bundler::SimilarityDetector
- Bundler::Source
- Bundler::Source::Git
- Bundler::Source::Git::GitCommandError
- Bundler::Source::Git::GitNotAllowedError
- Bundler::Source::Git::GitNotInstalledError
- Bundler::Source::Git::GitProxy
- Bundler::Source::Path
- Bundler::Source::Path::Installer
- Bundler::Source::Rubygems
- Bundler::Source::Rubygems::Remote
- Bundler::SourceList
- Bundler::SpecSet
- Bundler::StubSpecification
- Bundler::SystemRubyVersion
- Bundler::Thor
- Bundler::Thor::Actions
- Bundler::Thor::Actions::ClassMethods
- Bundler::Thor::AmbiguousCommandError
- Bundler::Thor::Base
- Bundler::Thor::Base::ClassMethods
- Bundler::Thor::Command
- Bundler::Thor::DynamicCommand
- Bundler::Thor::Error
- Bundler::Thor::Group
- Bundler::Thor::HiddenCommand
- Bundler::Thor::Invocation
- Bundler::Thor::Invocation::ClassMethods
- Bundler::Thor::InvocationError
- Bundler::Thor::LineEditor
- Bundler::Thor::LineEditor::Basic
- Bundler::Thor::LineEditor::Readline
- Bundler::Thor::LineEditor::Readline::PathCompletion
- Bundler::Thor::MalformattedArgumentError
- Bundler::Thor::RakeCompat
- Bundler::Thor::RequiredArgumentMissingError
- Bundler::Thor::Shell
- Bundler::Thor::Shell::Basic
- Bundler::Thor::Shell::Color
- Bundler::Thor::Shell::HTML
- Bundler::Thor::UndefinedCommandError
- Bundler::Thor::UnknownArgumentError
- Bundler::Thor::Util
- Bundler::UI
- Bundler::UI::RGProxy
- Bundler::UI::Shell
- Bundler::UI::Silent
- Bundler::VersionConflict
- Bundler::Worker
- Bundler::Worker::WrappedException
- Gem
- Gem::Dependency
- Gem::Platform
- Gem::Requirement
- Gem::Specification
- Net
- Net::HTTP
- Net::HTTP::Persistent
- Net::HTTP::Persistent::Error
- Net::HTTP::Persistent::SSLReuse
- ParallelInstaller
- ParallelInstaller::SpecInstallation
- Object

No matching classes.

# Bundler::SourceList

### Attributes

git_sources[R]
path_sources[R]

### Public Class Methods

new() click to toggle source

    # File lib/bundler/source_list.rb, line 6
    def initialize
      @path_sources       = []
      @git_sources        = []
      @rubygems_aggregate = Source::Rubygems.new
      @rubygems_sources   = []
    end

### Public Instance Methods

add_git_source(options = {}) click to toggle source

    # File lib/bundler/source_list.rb, line 17
    def add_git_source(options = {})
      add_source_to_list Source::Git.new(options), git_sources
    end

add_path_source(options = {}) click to toggle source

    # File lib/bundler/source_list.rb, line 13
    def add_path_source(options = {})
      add_source_to_list Source::Path.new(options), path_sources
    end

add_rubygems_remote(uri) click to toggle source

    # File lib/bundler/source_list.rb, line 25
    def add_rubygems_remote(uri)
      @rubygems_aggregate.add_remote(uri)
      @rubygems_aggregate
    end

add_rubygems_source(options = {}) click to toggle source

    # File lib/bundler/source_list.rb, line 21
    def add_rubygems_source(options = {})
      add_source_to_list Source::Rubygems.new(options), @rubygems_sources
    end

all_sources() click to toggle source

    # File lib/bundler/source_list.rb, line 38
    def all_sources
      path_sources + git_sources + rubygems_sources
    end

cached!() click to toggle source

    # File lib/bundler/source_list.rb, line 69
    def cached!
      all_sources.each(&:cached!)
    end

get(source) click to toggle source

    # File lib/bundler/source_list.rb, line 42
    def get(source)
      source_list_for(source).find { |s| source == s }
    end

lock_sources() click to toggle source

    # File lib/bundler/source_list.rb, line 46
    def lock_sources
      lock_sources = (path_sources + git_sources).sort_by(&:to_s)
      lock_sources << combine_rubygems_sources
    end

remote!() click to toggle source

    # File lib/bundler/source_list.rb, line 73
    def remote!
      all_sources.each(&:remote!)
    end

replace_sources!(replacement_sources) click to toggle source

    # File lib/bundler/source_list.rb, line 51
    def replace_sources!(replacement_sources)
      return true if replacement_sources.empty?

      [path_sources, git_sources].each do |source_list|
        source_list.map! do |source|
          replacement_sources.find { |s| s == source } || source
        end
      end

      replacement_rubygems =
        replacement_sources.detect { |s| s.is_a?(Source::Rubygems) }
      @rubygems_aggregate = replacement_rubygems if replacement_rubygems

      # Return true if there were changes
      lock_sources.to_set != replacement_sources.to_set ||
        rubygems_remotes.to_set != replacement_rubygems.remotes.to_set
    end

rubygems_primary_remotes() click to toggle source

    # File lib/bundler/source_list.rb, line 77
    def rubygems_primary_remotes
      @rubygems_aggregate.remotes
    end

rubygems_remotes() click to toggle source

    # File lib/bundler/source_list.rb, line 34
    def rubygems_remotes
      rubygems_sources.map(&:remotes).flatten.uniq
    end

rubygems_sources() click to toggle source

    # File lib/bundler/source_list.rb, line 30
    def rubygems_sources
      @rubygems_sources + [@rubygems_aggregate]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.