Skip to content

Commit

Permalink
[rubygems/rubygems] Cancel bundle console deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and matzbot committed Nov 11, 2024
1 parent d1f921e commit a1148d4
Show file tree
Hide file tree
Showing 34 changed files with 36 additions and 62 deletions.
10 changes: 4 additions & 6 deletions lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,10 @@ def open(name)
Open.new(options, name).run
end

unless Bundler.feature_flag.bundler_3_mode?
desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
def console(group = nil)
require_relative "cli/console"
Console.new(options, group).run
end
desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
def console(group = nil)
require_relative "cli/console"
Console.new(options, group).run
end

desc "version", "Prints Bundler version information"
Expand Down
4 changes: 0 additions & 4 deletions lib/bundler/cli/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ def initialize(options, group)
end

def run
message = "bundle console will be replaced by `bin/console` generated by `bundle gem <name>`"
removed_message = "bundle console has been replaced by `bin/console` generated by `bundle gem <name>`"
Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message

group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require
ARGV.clear

Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-add.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-ADD" "1" "October 2024" ""
.TH "BUNDLE\-ADD" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-binstubs.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-BINSTUBS" "1" "October 2024" ""
.TH "BUNDLE\-BINSTUBS" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-cache.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-CACHE" "1" "October 2024" ""
.TH "BUNDLE\-CACHE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-check.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-CHECK" "1" "October 2024" ""
.TH "BUNDLE\-CHECK" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-clean.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-CLEAN" "1" "October 2024" ""
.TH "BUNDLE\-CLEAN" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-config.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-CONFIG" "1" "October 2024" ""
.TH "BUNDLE\-CONFIG" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
.SH "SYNOPSIS"
Expand Down
6 changes: 2 additions & 4 deletions lib/bundler/man/bundle-console.1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-CONSOLE" "1" "October 2024" ""
.TH "BUNDLE\-CONSOLE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
\fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
.SH "SYNOPSIS"
\fBbundle console\fR [GROUP]
.SH "DESCRIPTION"
Expand All @@ -29,7 +29,5 @@ $ bundle console
Resolving dependencies\|\.\|\.\|\.
[1] pry(main)>
.fi
.SH "NOTES"
This command was deprecated in Bundler 2\.1 and will be removed in 3\.0\. Use \fBbin/console\fR script, which can be generated by \fBbundle gem <NAME>\fR\.
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
7 changes: 1 addition & 6 deletions lib/bundler/man/bundle-console.1.ronn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bundle-console(1) -- Deprecated way to open an IRB session with the bundle pre-loaded
bundle-console(1) -- Open an IRB session with the bundle pre-loaded
=====================================================================================

## SYNOPSIS
Expand Down Expand Up @@ -34,11 +34,6 @@ the shell from the following:
Resolving dependencies...
[1] pry(main)>

## NOTES

This command was deprecated in Bundler 2.1 and will be removed in 3.0.
Use `bin/console` script, which can be generated by `bundle gem <NAME>`.

## SEE ALSO

[Gemfile(5)](https://bundler.io/man/gemfile.5.html)
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-doctor.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-DOCTOR" "1" "October 2024" ""
.TH "BUNDLE\-DOCTOR" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-exec.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-EXEC" "1" "October 2024" ""
.TH "BUNDLE\-EXEC" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-gem.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-GEM" "1" "October 2024" ""
.TH "BUNDLE\-GEM" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-help.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-HELP" "1" "October 2024" ""
.TH "BUNDLE\-HELP" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-info.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-INFO" "1" "October 2024" ""
.TH "BUNDLE\-INFO" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-init.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-INIT" "1" "October 2024" ""
.TH "BUNDLE\-INIT" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-inject.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-INJECT" "1" "October 2024" ""
.TH "BUNDLE\-INJECT" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-install.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-INSTALL" "1" "October 2024" ""
.TH "BUNDLE\-INSTALL" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-list.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-LIST" "1" "October 2024" ""
.TH "BUNDLE\-LIST" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-lock.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-LOCK" "1" "October 2024" ""
.TH "BUNDLE\-LOCK" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-open.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-OPEN" "1" "October 2024" ""
.TH "BUNDLE\-OPEN" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-outdated.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-OUTDATED" "1" "October 2024" ""
.TH "BUNDLE\-OUTDATED" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-platform.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-PLATFORM" "1" "October 2024" ""
.TH "BUNDLE\-PLATFORM" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-plugin.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-PLUGIN" "1" "October 2024" ""
.TH "BUNDLE\-PLUGIN" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-plugin\fR \- Manage Bundler plugins
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-pristine.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-PRISTINE" "1" "October 2024" ""
.TH "BUNDLE\-PRISTINE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-remove.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-REMOVE" "1" "October 2024" ""
.TH "BUNDLE\-REMOVE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-show.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-SHOW" "1" "October 2024" ""
.TH "BUNDLE\-SHOW" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-update.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-UPDATE" "1" "October 2024" ""
.TH "BUNDLE\-UPDATE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-version.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-VERSION" "1" "October 2024" ""
.TH "BUNDLE\-VERSION" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle-viz.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE\-VIZ" "1" "October 2024" ""
.TH "BUNDLE\-VIZ" "1" "November 2024" ""
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/bundle.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "BUNDLE" "1" "October 2024" ""
.TH "BUNDLE" "1" "November 2024" ""
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/man/gemfile.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with nRonn/v0.11.1
.\" https://github.com/n-ronn/nronn/tree/0.11.1
.TH "GEMFILE" "5" "October 2024" ""
.TH "GEMFILE" "5" "November 2024" ""
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/commands/console_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe "bundle console", bundler: "< 3", readline: true do
RSpec.describe "bundle console", readline: true do
before :each do
build_repo2 do
# A minimal fake pry console
Expand Down
13 changes: 0 additions & 13 deletions spec/bundler/other/major_deprecation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,19 +574,6 @@
end
end

context "bundle console" do
before do
bundle "console", raise_on_error: false
end

it "prints a deprecation warning", bundler: "< 3" do
expect(deprecations).to include \
"bundle console will be replaced by `bin/console` generated by `bundle gem <name>`"
end

pending "fails with a helpful message", bundler: "3"
end

context "bundle viz", :realworld do
before do
realworld_system_gems "ruby-graphviz --version 1.2.5"
Expand Down

0 comments on commit a1148d4

Please sign in to comment.