Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rubygems/commands/fetch_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def check_version # :nodoc:
if options[:version] != Gem::Requirement.default &&
get_all_gem_names.size > 1
alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:>=2'`"
terminate_interaction 1
end
end
Expand Down
4 changes: 3 additions & 1 deletion lib/rubygems/commands/help_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class Gem::Commands::HelpCommand < Gem::Command
To depend on a specific set of versions:
gem 'rake', '~> 10.3', '>= 10.3.2'
gem 'rake', '>= 10.3.2'
# or for multiple version restrictions
gem 'rake', '>= 10.3.2', "< 13"
RubyGems will require the gem name when activating the gem using
the RUBYGEMS_GEMDEPS environment variable or Gem::use_gemdeps. Use the
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/commands/install_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def check_version # :nodoc:
if options[:version] != Gem::Requirement.default &&
get_all_gem_names.size > 1
alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem install 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem install 'my_gem:1.0.0' 'my_other_gem:>=2'`"
terminate_interaction 1
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/commands/uninstall_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def check_version # :nodoc:
if options[:version] != Gem::Requirement.default &&
get_all_gem_names.size > 1
alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:>=2'`"
terminate_interaction 1
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_gem_commands_fetch_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_execute_two_version
execute_with_term_error

msg = "ERROR: Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:>=2'`"

assert_empty @ui.output
assert_equal msg, @ui.error.chomp
Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_gem_commands_install_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def test_execute_two_version
assert_empty @cmd.installed_specs

msg = "ERROR: Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem install 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem install 'my_gem:1.0.0' 'my_other_gem:>=2'`"

assert_empty @ui.output
assert_equal msg, @ui.error.chomp
Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_gem_commands_uninstall_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def test_execute_two_version
end

msg = "ERROR: Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
" version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:>=2'`"

assert_empty @ui.output
assert_equal msg, @ui.error.lines.last.chomp
Expand Down
Loading