Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubygems and bundler with master branch #4789

Merged
merged 101 commits into from Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
9e7b64f
[rubygems/rubygems] Let original exception be re-raised
deivid-rodriguez Jul 23, 2021
a7f7f64
[rubygems/rubygems] Remove unnecessary check
deivid-rodriguez Jul 23, 2021
19cd553
[rubygems/rubygems] Move rescue block around the code that can raise it
deivid-rodriguez Jul 23, 2021
feefdf4
[rubygems/rubygems] Small refactor by DRYing up some logic
deivid-rodriguez Jul 23, 2021
ebe10c2
[rubygems/rubygems] Show all missing gems when using a bundle before …
deivid-rodriguez Jul 23, 2021
8477f38
[rubygems/rubygems] Remove unnecessary exception
deivid-rodriguez Jul 26, 2021
67bd725
[rubygems/rubygems] Remove unnecessary escape sequences
deivid-rodriguez Jul 26, 2021
a4b3b17
[rubygems/rubygems] Give a `bundle install` hint when `bundle list` f…
deivid-rodriguez Jul 26, 2021
5079061
[rubygems/rubygems] Remove unnecessary test repository
deivid-rodriguez Jul 25, 2021
89e8e2e
[rubygems/rubygems] This spec can pass now on ruby 3
deivid-rodriguez Jul 25, 2021
a21aa8e
[rubygems/rubygems] Fix standalone install of default gems
deivid-rodriguez Jul 25, 2021
aa14cb0
[rubygems/rubygems] Completely avoid replacing sources when in multis…
deivid-rodriguez Jul 24, 2021
9340a87
[rubygems/rubygems] We can now avoid source materialization work
deivid-rodriguez Jul 24, 2021
5b1fc08
[rubygems/rubygems] Respect `BUNDLE_USER_CONFIG` if set
deivid-rodriguez Jul 30, 2021
e9b524b
[rubygems/rubygems] Don't sort materialized specs when not necessary
deivid-rodriguez Jul 30, 2021
d6f6fc1
[rubygems/rubygems] Fix unnecessary $LOAD_PATH modification in standa…
deivid-rodriguez Jul 27, 2021
dfea133
[rubygems/rubygems] Remove unnecessary `path` local variable
deivid-rodriguez Jul 30, 2021
cf9b3b2
[rubygems/rubygems] Remove unnecessary `ruby_engine` local variable
deivid-rodriguez Jul 30, 2021
8117dc3
[rubygems/rubygems] Use same criteria for ruby engine as in the final…
deivid-rodriguez Jul 30, 2021
4e06ab7
[rubygems/rubygems] Remove unnecessary `ruby_version` local variable
deivid-rodriguez Jul 30, 2021
457725d
[rubygems/rubygems] Fix standalone generated script to deal with path…
deivid-rodriguez Jul 27, 2021
fda5259
[rubygems/rubygems] Remove redundant part of error message
deivid-rodriguez Jul 31, 2021
937284c
[rubygems/rubygems] Simplify error message building in resolver
deivid-rodriguez Jul 31, 2021
95e3b68
[rubygems/rubygems] Only set local variable in the branch using it
deivid-rodriguez Jul 31, 2021
d1367dd
[rubygems/rubygems] Improve "gem not found in source" errors
deivid-rodriguez Jul 31, 2021
b48e5fc
[rubygems/rubygems] Requiring `bundler/setup` shouldn't try to hit th…
deivid-rodriguez Jul 31, 2021
f44a052
[rubygems/rubygems] The `--local` flag to `bundle install` shouldn't …
deivid-rodriguez Jul 31, 2021
439ab71
[rubygems/rubygems] Remove now unnecessary code
deivid-rodriguez Jul 31, 2021
ba14825
[rubygems/rubygems] typos in UI messages: fix a couple missing spaces…
timsutton Aug 1, 2021
75598a1
[rubygems/rubygems] Exclude gemspec file itself from gem
nobu Dec 20, 2020
11c8ecf
[rubygems/rubygems] Keep file descriptors by default
deivid-rodriguez Aug 3, 2021
b0d4c7b
[rubygems/rubygems] Don't warn default behaviour
deivid-rodriguez Aug 3, 2021
0e1b49f
[rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors`
deivid-rodriguez Aug 3, 2021
fef55c4
[rubygems/rubygems] Simplify overkill usage of shared examples
deivid-rodriguez Aug 4, 2021
ffd3655
[rubygems/rubygems] Remove unnecessary spec manipulation
deivid-rodriguez Oct 28, 2019
6cfc924
[rubygems/rubygems] Remove bad TODO
deivid-rodriguez Oct 28, 2019
1aaf94d
[rubygems/rubygems] Remove misleading comment
deivid-rodriguez Oct 28, 2019
9bb53ea
[rubygems/rubygems] Fix git repo initialization on a path with spaces
deivid-rodriguez Aug 4, 2021
907a2e1
[rubygems/rubygems] Take advantage of `target` being a `Pathname`
deivid-rodriguez Aug 4, 2021
5e5a53f
[rubygems/rubygems] Use `Gem.use_gemdeps` only from binstubs
deivid-rodriguez Oct 28, 2019
03a1b62
[rubygems/rubygems] Move list of exceptions to the `rescue` clause
deivid-rodriguez Apr 13, 2021
019cbe1
[rubygems/rubygems] Simplify rescue of bundler errors
deivid-rodriguez Apr 13, 2021
baec0df
[rubygems/rubygems] Don't use gemdeps on bundler binstub
deivid-rodriguez Oct 29, 2019
fa70421
[rubygems/rubygems] Avoid double CI runs in default Github Actions ge…
deivid-rodriguez Aug 4, 2021
f538329
[rubygems/rubygems] Get a CI matrix configured in default Github Acti…
deivid-rodriguez Aug 4, 2021
f1d2238
[rubygems/rubygems] Refactor reseting `RUBYGEMS_GEMDEPS` in tests
deivid-rodriguez Oct 30, 2019
d34b4d3
[rubygems/rubygems] Recommend `bundle install` rather than `gem insta…
deivid-rodriguez Apr 13, 2021
ef432b5
[rubygems/rubygems] Expect the right permissions on Windows
deivid-rodriguez Aug 5, 2021
a61c5ae
[rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warning
deivid-rodriguez Aug 6, 2021
ab1ab97
[rubygems/rubygems] Disable `RUBYGEMS_GEMDEPS` for bundler spec run
deivid-rodriguez Aug 6, 2021
975aaab
[rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config loca…
deivid-rodriguez Aug 6, 2021
a1c0e8b
[rubygems/rubygems] Also load user installed rubygems plugins
deivid-rodriguez Aug 6, 2021
962ba36
[rubygems/rubygems] Enhance error handling when loading the rubygems/…
daniel-niknam Aug 8, 2021
58dc854
[rubygems/rubygems] Exclude truffleruby from the test for failure of …
daniel-niknam Aug 8, 2021
6abe90e
[rubygems/rubygems] See if parallel installation on Windows works bet…
deivid-rodriguez Aug 5, 2021
1091997
[rubygems/rubygems] Bring `--jobs` documentation up to date
deivid-rodriguez Aug 6, 2021
d10567e
[rubygems/rubygems] Reword the message
daniel-niknam Aug 8, 2021
026d743
[rubygems/rubygems] Replace StandardError with Exception
daniel-niknam Aug 8, 2021
9157a75
[rubygems/rubygems] Remove MacOS specific gem layout
deivid-rodriguez Aug 8, 2021
e2165d3
[rubygems/rubygems] Remove MacOS specific extra GEM_PATH
deivid-rodriguez Aug 8, 2021
9662d71
[rubygems/rubygems] Remove helper method not buying us much
deivid-rodriguez Aug 8, 2021
07274af
[rubygems/rubygems] Remove unused file
deivid-rodriguez Aug 9, 2021
88eb937
[rubygems/rubygems] Fix some failing Bundler tests with old Git.
junaruga Aug 17, 2021
c85835c
[rubygems/rubygems] Restore working `bundle check` behaviour
deivid-rodriguez Aug 18, 2021
f2170cc
[rubygems/rubygems] Explicitly set `allow_cached` to false when setti…
deivid-rodriguez Aug 18, 2021
dcd12c9
[rubygems/rubygems] Fix `bundle check` showing duplicated gems
deivid-rodriguez Aug 18, 2021
e9c4ab4
[rubygems/rubygems] Prefer `require_relative` to `require` for intern…
deivid-rodriguez Apr 22, 2019
ba5e260
[rubygems/rubygems] Pick the last founded gems when fetching metadata
daniel-niknam Aug 19, 2021
b26dd99
[rubygems/rubygems] Refactor Ruby platform priority condition to its …
daniel-niknam Aug 19, 2021
367a801
[rubygems/rubygems] Correctly redact credentials when using x-oauth-b…
mlarraz Aug 19, 2021
29d019d
[rubygems/rubygems] Move some logic to a `save_plugin` method
deivid-rodriguez Aug 20, 2021
5bf9c15
[rubygems/rubygems] Make plugin installation idempotent
deivid-rodriguez Aug 19, 2021
e96d21e
[rubygems/rubygems] Remove unnecessary line
deivid-rodriguez Aug 21, 2021
d435d64
[rubygems/rubygems] Remove more unused code
deivid-rodriguez Aug 21, 2021
cc96c9f
[rubygems/rubygems] Normalize setting `GEM_PATH`
deivid-rodriguez Aug 21, 2021
5189579
[rubygems/rubygems] Bundle path is already expanded
deivid-rodriguez Aug 21, 2021
3075d6c
[rubygems/rubygems] Move `Bundler.rubygems.clear_paths` to a better p…
deivid-rodriguez Aug 21, 2021
5d2c6c8
[rubygems/rubygems] Fix `bundle plugin install` misdetection of insta…
deivid-rodriguez Aug 21, 2021
b30e162
[rubygems/rubygems] Pass second argument to Array#split to ensure onl…
mlarraz Aug 22, 2021
02fbf0f
[rubygems/rubygems] Add a few tests for `Gem::UriParser.parse_uri`
daniel-niknam Aug 21, 2021
3e3fa81
[rubygems/rubygems] Introduce `Gem::PrintableUri` that would redact U…
daniel-niknam Aug 21, 2021
0daaed9
[rubygems/rubygems] Using `Gem::PrintableUri` in `Gem::Commands::Inst…
daniel-niknam Aug 21, 2021
8e49b24
[rubygems/rubygems] Using `Gem::PrintableUri` in `Gem::Request` class
daniel-niknam Aug 21, 2021
0f3f5b3
[rubygems/rubygems] Refactor `Gem::RemoteFetcher::FetchError` initial…
daniel-niknam Aug 21, 2021
ddcce7c
[rubygems/rubygems] Remove trailing `if`
daniel-niknam Aug 22, 2021
a924382
[rubygems/rubygems] Rename `Gem::PrintableUri#parsed_uri?` to `Gem::P…
daniel-niknam Aug 22, 2021
6a4591d
[rubygems/rubygems] Remove defensive guards
daniel-niknam Aug 22, 2021
3d9ef52
[rubygems/rubygems] Refactor `Gem::RemoteFetcher::FetchError.build` b…
daniel-niknam Aug 22, 2021
62555dd
[rubygems/rubygems] Remove `ruby/uri` requirement
daniel-niknam Aug 23, 2021
4d30fa1
[rubygems/rubygems] Remove unused method
daniel-niknam Aug 23, 2021
2b2d821
[rubygems/rubygems] Bring back the empty line that was removed previo…
daniel-niknam Aug 23, 2021
0275212
[rubygems/rubygems] Remove @credential_redacted instance variable
daniel-niknam Aug 23, 2021
5c4cbb7
[rubygems/rubygems] Remove returning self for `Gem::PrintableUri#pars…
daniel-niknam Aug 23, 2021
e98c95e
[rubygems/rubygems] Replacing clone with dup
daniel-niknam Aug 23, 2021
fa86c0c
[rubygems/rubygems] Remove unnecessary tests
daniel-niknam Aug 23, 2021
f8ebe51
[rubygems/rubygems] Add missing key `branches:`
neko314 Aug 28, 2021
69932dd
[rubygems/rubygems] Remove unused require
deivid-rodriguez Aug 26, 2021
00a7fb7
[rubygems/rubygems] Make sure `Gem::Command` is available before usin…
deivid-rodriguez Aug 26, 2021
1d8e1aa
[rubygems/rubygems] Merge `Gem::UriParser` and `Gem::PrintableUri` in…
deivid-rodriguez Aug 24, 2021
c1d443d
[rubygems/rubygems] Remove `syck` traces from `bundler`
deivid-rodriguez Jul 8, 2020
e0a46ba
[rubygems/rubygems] Remove dead code
deivid-rodriguez Aug 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 12 additions & 20 deletions lib/bundler.rb
Expand Up @@ -636,15 +636,19 @@ def reset_rubygems!
@rubygems = nil
end

def configure_gem_home_and_path(path = bundle_path)
configure_gem_path
configure_gem_home(path)
Bundler.rubygems.clear_paths
end

private

def eval_yaml_gemspec(path, contents)
require_relative "bundler/psyched_yaml"

# If the YAML is invalid, Syck raises an ArgumentError, and Psych
# raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
Gem::Specification.from_yaml(contents)
rescue YamlLibrarySyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
rescue ::Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
eval_gemspec(path, contents)
end

Expand All @@ -656,29 +660,17 @@ def eval_gemspec(path, contents)
raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
end

def configure_gem_home_and_path
configure_gem_path
configure_gem_home
bundle_path
end

def configure_gem_path(env = ENV)
blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty?
if !use_system_gems?
def configure_gem_path
unless use_system_gems?
# this needs to be empty string to cause
# PathSupport.split_gem_path to only load up the
# Bundler --path setting as the GEM_PATH.
env["GEM_PATH"] = ""
elsif blank_home
possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
paths = possibles.flatten.compact.uniq.reject(&:empty?)
env["GEM_PATH"] = paths.join(File::PATH_SEPARATOR)
Bundler::SharedHelpers.set_env "GEM_PATH", ""
end
end

def configure_gem_home
Bundler::SharedHelpers.set_env "GEM_HOME", File.expand_path(bundle_path, root)
Bundler.rubygems.clear_paths
def configure_gem_home(path)
Bundler::SharedHelpers.set_env "GEM_HOME", path.to_s
end

def tmp_home_path
Expand Down
14 changes: 5 additions & 9 deletions lib/bundler/cli.rb
Expand Up @@ -73,14 +73,6 @@ def initialize(*args)
Bundler.ui = UI::Shell.new(options)
Bundler.ui.level = "debug" if options["verbose"]
unprinted_warnings.each {|w| Bundler.ui.warn(w) }

if ENV["RUBYGEMS_GEMDEPS"] && !ENV["RUBYGEMS_GEMDEPS"].empty?
Bundler.ui.warn(
"The RUBYGEMS_GEMDEPS environment variable is set. This enables RubyGems' " \
"experimental Gemfile mode, which may conflict with Bundler and cause unexpected errors. " \
"To remove this warning, unset RUBYGEMS_GEMDEPS.", :wrap => true
)
end
end

check_unknown_options!(:except => [:config, :exec])
Expand Down Expand Up @@ -469,14 +461,18 @@ def cache
map aliases_for("cache")

desc "exec [OPTIONS]", "Run the command in context of the bundle"
method_option :keep_file_descriptors, :type => :boolean, :default => false
method_option :keep_file_descriptors, :type => :boolean, :default => true
method_option :gemfile, :type => :string, :required => false
long_desc <<-D
Exec runs a command, providing it access to the gems in the bundle. While using
bundle exec you can require and call the bundled gems as if they were installed
into the system wide RubyGems repository.
D
def exec(*args)
if ARGV.include?("--no-keep-file-descriptors")
SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to")
end

require_relative "cli/exec"
Exec.new(options, args).run
end
Expand Down
7 changes: 1 addition & 6 deletions lib/bundler/cli/exec.rb
Expand Up @@ -12,12 +12,7 @@ def initialize(options, args)
@options = options
@cmd = args.shift
@args = args

if !Bundler.current_ruby.jruby?
@args << { :close_others => !options.keep_file_descriptors? }
elsif options.keep_file_descriptors?
Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
end
@args << { :close_others => !options.keep_file_descriptors? } unless Bundler.current_ruby.jruby?
end

def run
Expand Down
5 changes: 3 additions & 2 deletions lib/bundler/cli/gem.rb
Expand Up @@ -185,14 +185,15 @@ def run
)
end

if File.exist?(target) && !File.directory?(target)
if target.exist? && !target.directory?
Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`."
exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
end

if use_git
Bundler.ui.info "Initializing git repo in #{target}"
`git init #{target}`
require "shellwords"
`git init #{target.to_s.shellescape}`

config[:git_default_branch] = File.read("#{target}/.git/HEAD").split("/").last.chomp
end
Expand Down
12 changes: 3 additions & 9 deletions lib/bundler/cli/install.rb
Expand Up @@ -60,7 +60,7 @@ def run
installer = Installer.install(Bundler.root, definition, options)

Bundler.settings.temporary(:cache_all_platforms => options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
end

Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
Expand All @@ -83,15 +83,9 @@ def run
end

Bundler::CLI::Common.output_fund_metadata_summary
rescue GemNotFound => e
if options[:local] && Bundler.app_cache.exist?
Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
end

raise e
rescue Gem::InvalidSpecificationException => e
rescue Gem::InvalidSpecificationException
Bundler.ui.warn "You have one or more invalid gemspecs that need to be fixed."
raise e
raise
end

private
Expand Down
8 changes: 7 additions & 1 deletion lib/bundler/cli/list.rb
Expand Up @@ -16,7 +16,13 @@ def run
specs = if @only_group.any? || @without_group.any?
filtered_specs_by_groups
else
Bundler.load.specs
begin
Bundler.load.specs
rescue GemNotFound => e
Bundler.ui.error e.message
Bundler.ui.warn "Install missing gems with `bundle install`."
exit 1
end
end.reject {|s| s.name == "bundler" }.sort_by(&:name)

return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
Expand Down
50 changes: 25 additions & 25 deletions lib/bundler/definition.rb
Expand Up @@ -138,7 +138,7 @@ def initialize(lockfile, dependencies, sources, unlock, ruby_version = nil, opti
@unlock[:gems] ||= @dependencies.map(&:name)
else
eager_unlock = expand_dependencies(@unlock[:gems] || [], true)
@unlock[:gems] = @locked_specs.for(eager_unlock, false, false, false).map(&:name)
@unlock[:gems] = @locked_specs.for(eager_unlock, false, false).map(&:name)
end

@dependency_changes = converge_dependencies
Expand Down Expand Up @@ -190,15 +190,7 @@ def resolve_remotely!
#
# @return [Bundler::SpecSet]
def specs
@specs ||= add_bundler_to(resolve.materialize(requested_dependencies))
rescue GemNotFound => e # Handle yanked gem
gem_name, gem_version = extract_gem_info(e)
locked_gem = @locked_specs[gem_name].last
raise if locked_gem.nil? || locked_gem.version.to_s != gem_version || !@remote
raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
"no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
"You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
"removed in order to install."
@specs ||= materialize(requested_dependencies)
end

def new_specs
Expand All @@ -210,9 +202,7 @@ def removed_specs
end

def missing_specs
missing = []
resolve.materialize(requested_dependencies, missing)
missing
resolve.materialize(requested_dependencies).missing_specs
end

def missing_specs?
Expand Down Expand Up @@ -246,7 +236,7 @@ def current_dependencies
def specs_for(groups)
groups = requested_groups if groups.empty?
deps = dependencies_for(groups)
add_bundler_to(resolve.materialize(expand_dependencies(deps)))
materialize(expand_dependencies(deps))
end

def dependencies_for(groups)
Expand Down Expand Up @@ -496,7 +486,23 @@ def unlocking?

private

def add_bundler_to(specs)
def materialize(dependencies)
specs = resolve.materialize(dependencies)
missing_specs = specs.missing_specs

if missing_specs.any?
missing_specs.each do |s|
locked_gem = @locked_specs[s.name].last
next if locked_gem.nil? || locked_gem.version != s.version || !@remote
raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
"no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
"You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
"removed in order to install."
end

raise GemNotFound, "Could not find #{missing_specs.map(&:full_name).join(", ")} in any of the sources"
end

unless specs["bundler"].any?
bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
specs["bundler"] = bundler
Expand All @@ -506,7 +512,7 @@ def add_bundler_to(specs)
end

def precompute_source_requirements_for_indirect_dependencies?
sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
@remote && sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
end

def current_ruby_platform_locked?
Expand Down Expand Up @@ -715,7 +721,7 @@ def converge_locked_specs
@locked_specs.each do |s|
# Replace the locked dependency's source with the equivalent source from the Gemfile
dep = @dependencies.find {|d| s.satisfies?(d) }
s.source = (dep && dep.source) || sources.get(s.source)
s.source = (dep && dep.source) || sources.get(s.source) unless multisource_allowed?

# Don't add a spec to the list if its source is expired. For example,
# if you change a Git gem to RubyGems.
Expand All @@ -733,7 +739,7 @@ def converge_locked_specs
# if we won't need the source (according to the lockfile),
# don't error if the path/git source isn't available
next if @locked_specs.
for(requested_dependencies, false, true, false).
for(requested_dependencies, false, true).
none? {|locked_spec| locked_spec.source == s.source }

raise
Expand All @@ -753,7 +759,7 @@ def converge_locked_specs

resolve = SpecSet.new(converged)
@locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(requested_dependencies & deps), true, true)
resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), false, false, false).reject{|s| @unlock[:gems].include?(s.name) })
resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), false, false).reject{|s| @unlock[:gems].include?(s.name) })
diff = nil

# Now, we unlock any sources that do not have anymore gems pinned to it
Expand Down Expand Up @@ -857,12 +863,6 @@ def lockfiles_equal?(current, proposed, preserve_unknown_sections)
current == proposed
end

def extract_gem_info(error)
# This method will extract the error message like "Could not find foo-1.2.3 in any of the sources"
# to an array. The first element will be the gem name (e.g. foo), the second will be the version number.
error.message.scan(/Could not find (\w+)-(\d+(?:\.\d+)+)/).flatten
end

def compute_requires
dependencies.reduce({}) do |requires, dep|
next requires unless dep.should_include?
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/dsl.rb
Expand Up @@ -457,7 +457,7 @@ def check_rubygems_source_safety
def implicit_global_source_warning
Bundler::SharedHelpers.major_deprecation 2, "This Gemfile does not include an explicit global source. " \
"Not using an explicit global source may result in a different lockfile being generated depending on " \
"the gems you have installed locally before bundler is run." \
"the gems you have installed locally before bundler is run. " \
"Instead, define a global source in your Gemfile like this: source \"https://rubygems.org\"."
end

Expand Down
8 changes: 0 additions & 8 deletions lib/bundler/endpoint_specification.rb
Expand Up @@ -3,7 +3,6 @@
module Bundler
# used for Creating Specifications from the Gemcutter Endpoint
class EndpointSpecification < Gem::Specification
ILLFORMED_MESSAGE = 'Ill-formed requirement ["#<YAML::Syck::DefaultKey'.freeze
include MatchPlatform

attr_reader :name, :version, :platform, :required_rubygems_version, :required_ruby_version, :checksum
Expand Down Expand Up @@ -129,13 +128,6 @@ def parse_metadata(data)

def build_dependency(name, requirements)
Gem::Dependency.new(name, requirements)
rescue ArgumentError => e
raise unless e.message.include?(ILLFORMED_MESSAGE)
puts # we shouldn't print the error message on the "fetching info" status line
raise GemspecError,
"Unfortunately, the gem #{name} (#{version}) has an invalid " \
"gemspec.\nPlease ask the gem author to yank the bad version to fix " \
"this issue. For more information, see http://bit.ly/syck-defaultkey."
end
end
end
2 changes: 1 addition & 1 deletion lib/bundler/errors.rb
Expand Up @@ -122,7 +122,7 @@ def message

class VirtualProtocolError < BundlerError
def message
"There was an error relating to virtualization and file access." \
"There was an error relating to virtualization and file access. " \
"It is likely that you need to grant access to or mount some file system correctly."
end

Expand Down
29 changes: 0 additions & 29 deletions lib/bundler/gemdeps.rb

This file was deleted.

4 changes: 0 additions & 4 deletions lib/bundler/installer.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "rubygems/dependency_installer"
require_relative "worker"
require_relative "installer/parallel_installer"
require_relative "installer/standalone"
Expand Down Expand Up @@ -219,9 +218,6 @@ def installation_parallelization(options)
return jobs
end

# Parallelization has some issues on Windows, so it's not yet the default
return 1 if Gem.win_platform?

Bundler.settings.processor_count
end

Expand Down