diff options
| -rw-r--r-- | lib/rubygems/commands/build_command.rb | 7 | ||||
| -rw-r--r-- | test/rubygems/test_gem_commands_build_command.rb | 10 | ||||
| -rw-r--r-- | test/rubygems/test_gem_commands_help_command.rb | 2 |
3 files changed, 1 insertions, 18 deletions
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb index 2ec8324141..cfe1f8ec3c 100644 --- a/lib/rubygems/commands/build_command.rb +++ b/lib/rubygems/commands/build_command.rb @@ -25,13 +25,6 @@ class Gem::Commands::BuildCommand < Gem::Command add_option "-o", "--output FILE", "output gem with the given filename" do |value, options| options[:output] = value end - - add_option "-C PATH", "Run as if gem build was started in <PATH> instead of the current working directory." do |value, options| - options[:build_path] = value - end - deprecate_option "-C", - version: "4.0", - extra_msg: "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead" end def arguments # :nodoc: diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb index d44126d204..9339f41f7c 100644 --- a/test/rubygems/test_gem_commands_build_command.rb +++ b/test/rubygems/test_gem_commands_build_command.rb @@ -43,16 +43,6 @@ class TestGemCommandsBuildCommand < Gem::TestCase assert_includes Gem.platforms, Gem::Platform.local end - def test_handle_deprecated_options - use_ui @ui do - @cmd.handle_options %w[-C ./test/dir] - end - - assert_equal "WARNING: The \"-C\" option has been deprecated and will be removed in Rubygems 4.0. " \ - "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead\n", - @ui.error - end - def test_options_filename gemspec_file = File.join(@tempdir, @gem.spec_name) diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb index 01ab4aab2f..4ce7285d1f 100644 --- a/test/rubygems/test_gem_commands_help_command.rb +++ b/test/rubygems/test_gem_commands_help_command.rb @@ -36,7 +36,7 @@ class TestGemCommandsHelpCommand < Gem::TestCase def test_gem_help_build util_gem "build" do |out, err| - assert_match(/-C PATH *Run as if gem build was started in <PATH>/, out) + assert_match(/--platform PLATFORM\s+Specify the platform of gem to build/, out) assert_equal "", err end end |
