@@ -30,10 +30,10 @@ def test_execute_when_already_signed_in_with_same_host
3030 host = 'http://some-gemcutter-compatible-host.org'
3131
3232 util_capture ( nil , host ) { @cmd . execute }
33- old_credentials = YAML . load_file Gem . configuration . credentials_path
33+ old_credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
3434
3535 util_capture ( nil , host ) { @cmd . execute }
36- new_credentials = YAML . load_file Gem . configuration . credentials_path
36+ new_credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
3737
3838 assert_equal old_credentials [ host ] , new_credentials [ host ]
3939 end
@@ -45,7 +45,7 @@ def test_execute_when_already_signed_in_with_different_host
4545 host = 'http://some-gemcutter-compatible-host.org'
4646
4747 util_capture ( nil , host , api_key ) { @cmd . execute }
48- credentials = YAML . load_file Gem . configuration . credentials_path
48+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
4949
5050 assert_equal credentials [ :rubygems_api_key ] , api_key
5151
@@ -60,15 +60,15 @@ def test_execute_with_host_supplied
6060 assert_match %r{Signed in.} , sign_in_ui . output
6161
6262 api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
63- credentials = YAML . load_file Gem . configuration . credentials_path
63+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
6464 assert_equal api_key , credentials [ host ]
6565 end
6666
6767 def test_execute_with_valid_creds_set_for_default_host
6868 util_capture { @cmd . execute }
6969
7070 api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
71- credentials = YAML . load_file Gem . configuration . credentials_path
71+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
7272
7373 assert_equal api_key , credentials [ :rubygems_api_key ]
7474 end
@@ -94,7 +94,7 @@ def test_excute_with_key_name_and_scope
9494 assert_match "show_dashboard [y/N]" , key_name_ui . output
9595 assert_equal "name=test-key&push_rubygem=true" , fetcher . last_request . body
9696
97- credentials = YAML . load_file Gem . configuration . credentials_path
97+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
9898 assert_equal api_key , credentials [ :rubygems_api_key ]
9999 end
100100
0 commit comments