Skip to content

Upgrading bundler 2 to 4

Breaking2.7.2 → 4.0.23Breaking8Security15Deprecated2New10Changed59Fixed56Other30

Fetching 26 releases from GitHub…24 / 26
BreakingUpgrade verdict

8 breaking changes and 14 security fixes.

  • The internal deprecation helper module is gone.
  • The old -C flag for gem build no longer works.
  • The old has_rdoc methods on gem specifications are gone.
  • The old gem query command is no longer available.
Top 5 of 24 that need code or config changes
Breaking8
Removes unused Gem::Deprecate.
Gem::Deprecate
Removes the deprecated -C option from gem build.
gem build-C
Removes deprecated Gem::Specification#has_rdoc, has_rdoc= and has_rdoc?.
Gem::Specification#has_rdocGem::Specification#has_rdoc=Gem::Specification#has_rdoc?
Removes the deprecated gem query command.
gem query
Removes deprecated Gem::DependencyInstaller#find_gems_with_sources.
Gem::DependencyInstaller#find_gems_with_sources
Removes deprecated methods of RubyGems.
Removes compatibility.rb for RG 4.0.
compatibility.rb
Makes verification methods private.
Security14
Drops setuid, setgid and sticky bits when extracting gems.
Keeps credentials on redirects only within the same origin.
Validates the version field in Gem::Installer#verify_spec.
Gem::Installer#verify_spec
Rejects Bundler redirects that downgrade https to http.
Rejects SafeMarshal collection lengths longer than the remaining input.
SafeMarshal
Restricts UserDefined handling to an explicit class set for Gem::SafeMarshal.
Gem::SafeMarshal
Filters git command output against the configured URI.
Redacts URI userinfo from settings names in the Bundler User-Agent.
Validates gem name before building compact index cache paths.
Adds a --cooldown flag to bundle lock and bundle cache.
--cooldownbundle lockbundle cache
Strips C1 control characters from displayed gem text.
Prevents extraction from escaping destination_dir via pre-existing symlinks.
destination_dir
Restricts what schemes are acceptable in the remote fetcher.
Bumps vendored URI to 1.0.4.
URI
Deprecated2
Deprecates the --default option from the install command.
--defaultgem install
Deprecates Gem::Specification#datadir.
Gem::Specification#datadir

Generated by DepDelta from published Ruby source. Not mixed with prose notes.

  • added: static method Bundler.configure_custom_gemfile(_ = …)
  • removed: class Deployment
  • removed: class Graph
  • removed: class SimilarityDetector
  • removed: const Graph.GRAPH_NAME
  • removed: const Settings.REMEMBERED_KEYS
  • removed: constructor Graph(_, _, _ = …, _ = …, _ = …, _ = …)
  • removed: constructor SimilarityDetector(_)
  • removed: method Graph.viz()
  • removed: method Index.search_all(_)
  • removed: method SharedHelpers.major_deprecation(_, _, removed_message: …, print_caller_location: …)
  • removed: method SimilarityDetector.similar_word_list(_, _ = …)
  • removed: method SimilarityDetector.similar_words(_, _ = …)
  • removed: method SourceList.expired_sources?(_)
  • removed: method SourceList.merged_gem_lockfile_sections!(_)
  • removed: method SourceList.merged_gem_lockfile_sections?()
  • removed: method SourceList.rubygems_remotes()
  • removed: property Graph.edge_options: reader
  • removed: property Graph.groups: reader
  • removed: property Graph.node_options: reader
  • removed: property Graph.output_file: reader
  • removed: property Graph.output_format: reader
  • removed: property Graph.relations: reader
  • removed: protected method SimilarityDetector.levenshtein_distance(_, _, _ = …, _ = …, _ = …)
  • removed: static method CLI.check_deprecated_ext_option(_)
  • removed: static method CLI.deprecated_ext_value?(_)
  • removed: static method Deployment.define_task(_, _ = …, _ = …)
  • removed: static property Installer.ambiguous_gems: accessor
  • changed: constructor Retry(_, _ = …, _ = …) → constructor Retry(_, _ = …, _ = …, _ = …)
  • changed: method CLI.inject(_, _) → method CLI.inject(*)
  • changed: method SelfManager.update_bundler_and_restart_with_it_if_needed(_) → method SelfManager.update_bundler_and_restart_with_it_if_needed(_, pre: …)
  • changed: method SourceList.add_global_rubygems_remote(_) → method SourceList.add_global_rubygems_remote(_, cooldown: …)
  • changed: method SourceMap.all_requirements() → method SourceMap.all_requirements(_ = …)
  • changed: method Worker.enq(_) → method Worker.enq(_, priority: …)
  • added: class RemovedError < BundlerError
  • added: const RubyGemsGemInstaller.MAX_JOBS_PER_GEM
  • added: method CLI.install_or_cli_help()
  • added: method Definition.cooldown_skipped()
  • added: method Definition.release_resolution_memory!()
  • added: method Definition.relevant_deps?(_)
  • added: method Dsl.lockfile(_)
  • added: method Dsl.lockfile_path()
  • added: method EndpointSpecification.raw_require_paths()
  • added: method Fetcher.release_resolution_memory!()
  • added: method GemInstaller.download()
  • added: method LockfileParser.valid?()
  • added: method RubyGemsGemInstaller.build_jobs()
  • added: method Settings.installation_parallelization()
  • added: method SharedHelpers.feature_deprecated!(_)
  • added: method SharedHelpers.feature_removed!(_)
  • added: method SharedHelpers.glob_files_in_dir(_, _)
  • added: method Source.download(*)
  • added: method SourceList.clear_cache()
  • added: method SourceList.release_resolution_memory!()
  • added: property Definition.lockfile: writer
  • added: property EndpointSpecification.created_at: reader
  • added: property RemoteSpecification.created_at: accessor
  • added: property Resolver.cooldown_skipped: reader
  • added: static method CLI.bundler_command_path(_)
  • added: static method CLI.check_invalid_ext_option(_)
  • added: static method CLI.default_command(_ = …)
  • added: static method CLI.invalid_ext_value?(_)
  • added: static property Retry.default_base_delay: accessor
  • removed: class Inject
  • removed: class Viz
  • removed: constructor Inject(_, _, _)
  • removed: constructor Viz(_)
  • removed: method Inject.run()
  • removed: method Viz.run()
  • removed: property Inject.gems: reader
  • removed: property Inject.group: reader
  • removed: property Inject.name: reader
  • removed: property Inject.options: reader
  • removed: property Inject.source: reader
  • removed: property Inject.version: reader
  • removed: property Viz.gem_name: reader
  • removed: property Viz.options: reader
  • added: const Gem.DEFAULT_GITHUB_USERNAME
  • added: method Open.editor_command(_)
  • added: static method Common.output_cooldown_skipped_summary(_ = …)
  • added: static method Common.validate_cooldown!(_)
  • added: static method Common.word_list(_)
  • added: constructor GemRemoteFetcher(*)
  • added: method Base.release_resolution_memory!()
  • added: method CompactIndex.release_resolution_memory!()
  • removed: class GraphVizClient
  • removed: constructor GraphVizClient(_)
  • removed: method GraphVizClient.g()
  • removed: method GraphVizClient.run()
  • removed: method SpecInstallation.all_dependencies()
  • removed: method SpecInstallation.dependencies()
  • removed: method SpecInstallation.ignorable_dependency?(_)
  • added: method SpecInstallation.enqueue_with_priority?()
  • added: method SpecInstallation.ready_to_install?(_)
  • added: property SpecInstallation.dependencies: accessor
  • added: class UnloadedSource
  • added: method Index.up_to_date?(_)
  • added: method UnloadedSource.==(_)
  • added: method UnloadedSource.hash()
  • added: method Source.download(_, _)
  • added: method Base.explicitly_unlocked?(_)
  • removed: class SimilarityScore < Struct.new(:string, :distance)
  • removed: protected method Rubygems.remotes_for_spec(_)
  • changed: constructor RubygemsAggregate(_, _) → constructor RubygemsAggregate(_, _, _ = …)
  • changed: method Rubygems.add_remote(_) → method Rubygems.add_remote(_, cooldown: …)
  • added: method Metadata.checksum_store()
  • added: method Rubygems.clear_cache()
  • added: method Rubygems.cooldown_for(_)
  • added: method Rubygems.download(_, _ = …)
  • added: method Rubygems.release_resolution_memory!()
  • added: property Rubygems.remote_cooldowns: accessor
  • added: protected method Rubygems.remote_spec_for(_)
  • added: static method GitProxy.full_version()
  • added: static method GitProxy.reset()
  • added: static method GitProxy.version()
  • changed: constructor Remote(_) → constructor Remote(_, cooldown: …)
  • added: class REQUIRE_MUTEX < Mutex.new
  • added: method Remote.effective_cooldown()
  • added: property Remote.cooldown: reader
  • added: module SplitCompactIndexEntryOnFirstColon