1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Refine error message to check the push URL instead of just the host

https://github.com/rubygems/rubygems/commit/46990f3292
This commit is contained in:
Jenny Shen 2022-09-19 09:43:17 -04:00 committed by git
parent 0522e31d57
commit 28840d74c2
4 changed files with 7 additions and 7 deletions

View file

@ -213,7 +213,7 @@ module Gem::GemcutterUtilities
say clean_text(response.body)
end
when Net::HTTPPermanentRedirect, Net::HTTPRedirection then
message = "The request has redirected permanently to #{response['location']}. Please check your defined push host."
message = "The request has redirected permanently to #{response['location']}. Please check your defined push host URL."
message = "#{error_prefix}: #{message}" if error_prefix
say clean_text(message)

View file

@ -137,7 +137,7 @@ EOF
end
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, @stub_ui.output
end
@ -198,7 +198,7 @@ EOF
@cmd.add_owners("freewill", ["user-new1@example.com"])
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, @stub_ui.output
end
@ -276,7 +276,7 @@ EOF
@cmd.remove_owners("freewill", ["user-remove1@example.com"])
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, @stub_ui.output
path = "/api/v1/gems/freewill/owners"
@ -293,7 +293,7 @@ EOF
@cmd.add_owners("freewill", ["user-new1@example.com"])
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, @stub_ui.output
end

View file

@ -342,7 +342,7 @@ class TestGemCommandsPushCommand < Gem::TestCase
end
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, @ui.output
end

View file

@ -92,7 +92,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
end
end
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host."
response = "The request has redirected permanently to #{redirected_uri}. Please check your defined push host URL."
assert_match response, ui.output
end