diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-17 11:17:19 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-18 00:19:31 +0000 |
| commit | 02279f01ac8408dbb6134a1f636537f3d4e4775f (patch) | |
| tree | 95be028e58383b53ca24414c09f66a4db6a3c1ff | |
| parent | 093dbbbd350cf1288c12287629db932faaab1b55 (diff) | |
[ruby/rubygems] Removed deprecated -C option from gem build
https://github.com/ruby/rubygems/commit/3471646d43
| -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 |
