@@ -30,10 +30,10 @@ def test_execute_when_already_signed_in_with_same_host
30
30
host = 'http://some-gemcutter-compatible-host.org'
31
31
32
32
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
34
34
35
35
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
37
37
38
38
assert_equal old_credentials [ host ] , new_credentials [ host ]
39
39
end
@@ -45,7 +45,7 @@ def test_execute_when_already_signed_in_with_different_host
45
45
host = 'http://some-gemcutter-compatible-host.org'
46
46
47
47
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
49
49
50
50
assert_equal credentials [ :rubygems_api_key ] , api_key
51
51
@@ -60,15 +60,15 @@ def test_execute_with_host_supplied
60
60
assert_match %r{Signed in.} , sign_in_ui . output
61
61
62
62
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
63
- credentials = YAML . load_file Gem . configuration . credentials_path
63
+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
64
64
assert_equal api_key , credentials [ host ]
65
65
end
66
66
67
67
def test_execute_with_valid_creds_set_for_default_host
68
68
util_capture { @cmd . execute }
69
69
70
70
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
71
- credentials = YAML . load_file Gem . configuration . credentials_path
71
+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
72
72
73
73
assert_equal api_key , credentials [ :rubygems_api_key ]
74
74
end
@@ -94,7 +94,7 @@ def test_excute_with_key_name_and_scope
94
94
assert_match "show_dashboard [y/N]" , key_name_ui . output
95
95
assert_equal "name=test-key&push_rubygem=true" , fetcher . last_request . body
96
96
97
- credentials = YAML . load_file Gem . configuration . credentials_path
97
+ credentials = YAML . unsafe_load_file Gem . configuration . credentials_path
98
98
assert_equal api_key , credentials [ :rubygems_api_key ]
99
99
end
100
100
0 commit comments