Skip to content

Commit 02279f0

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Removed deprecated -C option from gem build
ruby/rubygems@3471646d43
1 parent 093dbbb commit 02279f0

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

lib/rubygems/commands/build_command.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ def initialize
2525
add_option "-o", "--output FILE", "output gem with the given filename" do |value, options|
2626
options[:output] = value
2727
end
28-
29-
add_option "-C PATH", "Run as if gem build was started in <PATH> instead of the current working directory." do |value, options|
30-
options[:build_path] = value
31-
end
32-
deprecate_option "-C",
33-
version: "4.0",
34-
extra_msg: "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead"
3528
end
3629

3730
def arguments # :nodoc:

test/rubygems/test_gem_commands_build_command.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ def test_handle_options
4343
assert_includes Gem.platforms, Gem::Platform.local
4444
end
4545

46-
def test_handle_deprecated_options
47-
use_ui @ui do
48-
@cmd.handle_options %w[-C ./test/dir]
49-
end
50-
51-
assert_equal "WARNING: The \"-C\" option has been deprecated and will be removed in Rubygems 4.0. " \
52-
"-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead\n",
53-
@ui.error
54-
end
55-
5646
def test_options_filename
5747
gemspec_file = File.join(@tempdir, @gem.spec_name)
5848

test/rubygems/test_gem_commands_help_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_gem_help_platforms
3636

3737
def test_gem_help_build
3838
util_gem "build" do |out, err|
39-
assert_match(/-C PATH *Run as if gem build was started in <PATH>/, out)
39+
assert_match(/--platform PLATFORM\s+Specify the platform of gem to build/, out)
4040
assert_equal "", err
4141
end
4242
end

0 commit comments

Comments
 (0)