diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-15 15:23:52 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-09 10:49:50 +0200 |
commit | 92030b549d9f13add7304011a2badac3754e6e7e (patch) | |
tree | e1bc9146139190c3bee286cbe8e41c47a52079bd | |
parent | c5aeb225ffa6acd6ba9e80c9e753e2c912c584bf (diff) | |
download | bundler-92030b549d9f13add7304011a2badac3754e6e7e.tar.gz |
Remove more uneeded stuff
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 6f5f2b9cf2..e4a6e49111 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -198,10 +198,6 @@ module Bundler Gem::ConfigMap end - def repository_subdirectories - %w[cache doc gems specifications] - end - def clear_paths Gem.clear_paths end @@ -210,10 +206,6 @@ module Bundler Gem.bin_path(gem, bin, ver) end - def path_separator - File::PATH_SEPARATOR - end - def preserve_paths # this is a no-op outside of RubyGems 1.8 yield @@ -248,36 +240,12 @@ module Bundler EXT_LOCK end - def fetch_specs(all, pre, &blk) - require "rubygems/spec_fetcher" - specs = Gem::SpecFetcher.new.list(all, pre) - specs.each { yield } if block_given? - specs - end - def fetch_prerelease_specs fetch_specs(false, true) rescue Gem::RemoteFetcher::FetchError {} # if we can't download them, there aren't any end - # TODO: This is for older versions of RubyGems... should we support the - # X-Gemfile-Source header on these old versions? - # Maybe the newer implementation will work on older RubyGems? - # It seems difficult to keep this implementation and still send the header. - def fetch_all_remote_specs(remote) - old_sources = Bundler.rubygems.sources - Bundler.rubygems.sources = [remote.uri.to_s] - # Fetch all specs, minus prerelease specs - spec_list = fetch_specs(true, false) - # Then fetch the prerelease specs - fetch_prerelease_specs.each {|k, v| spec_list[k].concat(v) } - - spec_list.values.first - ensure - Bundler.rubygems.sources = old_sources - end - def with_build_args(args) ext_lock.synchronize do old_args = build_args @@ -290,15 +258,6 @@ module Bundler end end - def install_with_build_args(args) - with_build_args(args) { yield } - end - - def gem_from_path(path, policy = nil) - require "rubygems/format" - Gem::Format.from_file_by_path(path, policy) - end - def spec_from_gem(path, policy = nil) require "rubygems/security" require "bundler/psyched_yaml" @@ -317,23 +276,10 @@ module Bundler end end - def build(spec, skip_validation = false) - require "rubygems/builder" - Gem::Builder.new(spec).build - end - def build_gem(gem_dir, spec) build(spec) end - def download_gem(spec, uri, path) - uri = Bundler.settings.mirror_for(uri) - fetcher = Gem::RemoteFetcher.new(configuration[:http_proxy]) - Bundler::Retry.new("download gem from #{uri}").attempts do - fetcher.download(spec, uri, path) - end - end - def security_policy_keys %w[High Medium Low AlmostNo No].map {|level| "#{level}Security" } end @@ -614,14 +560,6 @@ module Bundler end end - def all_specs - Gem::Specification.to_a - end - - def find_name(name) - Gem::Specification.find_all_by_name name - end - def fetch_specs(source, remote, name) path = source + "#{name}.#{Gem.marshal_version}.gz" fetcher = gem_remote_fetcher |