Class: Bundler::RubygemsIntegration::Future
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Bundler::RubygemsIntegration
|
Defined in: | lib/bundler/rubygems_integration.rb |
Overview
RubyGems 2.0
Constant Summary
::Bundler::RubygemsIntegration
- Inherited
Class Method Summary
::Bundler::RubygemsIntegration
- Inherited
Instance Attribute Summary
::Bundler::RubygemsIntegration
- Inherited
Instance Method Summary
- #all_specs
- #build(spec, skip_validation = false)
- #download_gem(spec, uri, path)
- #fetch_all_remote_specs(remote)
- #fetch_specs(source, remote, name)
- #find_name(name)
- #gem_from_path(path, policy = nil)
- #gem_remote_fetcher
- #install_with_build_args(args)
- #path_separator
- #repository_subdirectories
- #stub_rubygems(specs)
::Bundler::RubygemsIntegration
- Inherited
Constructor Details
This class inherits a constructor from Bundler::RubygemsIntegration
Instance Method Details
#all_specs
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 739
def all_specs Gem::Specification.to_a end
#build(spec, skip_validation = false)
[ GitHub ]#download_gem(spec, uri, path)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 767
def download_gem(spec, uri, path) uri = Bundler.settings.mirror_for(uri) fetcher = gem_remote_fetcher fetcher.headers = { "X-Gemfile-Source" => spec.remote.original_uri.to_s } if spec.remote.original_uri Bundler::Retry.new("download gem from #{uri}").attempts do fetcher.download(spec, uri, path) end end
#fetch_all_remote_specs(remote)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 758
def fetch_all_remote_specs(remote) source = remote.uri.is_a?(URI) ? remote.uri : URI.parse(source.to_s) specs = fetch_specs(source, remote, "specs") pres = fetch_specs(source, remote, "prerelease_specs") || [] specs.concat(pres) end
#fetch_specs(source, remote, name)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 747
def fetch_specs(source, remote, name) path = source + "#{name}.#{Gem.marshal_version}.gz" fetcher = gem_remote_fetcher fetcher.headers = { "X-Gemfile-Source" => remote.original_uri.to_s } if remote.original_uri string = fetcher.fetch_path(path) Bundler.load_marshal(string) rescue Gem::RemoteFetcher::FetchError => e # it's okay for prerelease to fail raise e unless name == "prerelease_specs" end
#find_name(name)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 743
def find_name(name) Gem::Specification.find_all_by_name name end
#gem_from_path(path, policy = nil)
[ GitHub ]#gem_remote_fetcher
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 776
def gem_remote_fetcher require "resolv" proxy = configuration[:http_proxy] dns = Resolv::DNS.new Bundler::GemRemoteFetcher.new(proxy, dns) end
#install_with_build_args(args)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 799
def install_with_build_args(args) yield end
#path_separator
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 803
def path_separator Gem.path_separator end
#repository_subdirectories
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 795
def repository_subdirectories Gem::REPOSITORY_SUBDIRECTORIES end
#stub_rubygems(specs)
[ GitHub ]# File 'lib/bundler/rubygems_integration.rb', line 727
def stub_rubygems(specs) Gem::Specification.all = specs Gem.post_reset do Gem::Specification.all = specs end redefine_method((class << Gem; self; end), :finish_resolve) do |*| [] end end