Skip to content

Commit 76199e6

Browse files
VEBT-1165 Fix EightKeys file download URL (#1310)
* VEBT-1165 Fix EightKeys file download URL The current URL for the Eight Keys file requires following several redirects before the file is actually delivered. Since curl doesn't follow redirects by default, the wrong data is 'downloaded'. I.e. is the html of a 301 redirect page that is downloaded and treated as a xls file, which of course breaks things. The easy fix is to update the URL to the end of the redirect chain that actually delivers the file. * fix no_key_api_downloader spec based on newly-implemented EightKey url
1 parent f38a3c8 commit 76199e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/utilities/no_key_apis/no_key_api_downloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class NoKeyApiDownloader
2222
'AccreditationAction' => [' -X POST', 'https://ope.ed.gov/dapip/api/downloadFiles/accreditationDataFiles'],
2323
'AccreditationInstituteCampus' => [' -X POST', 'https://ope.ed.gov/dapip/api/downloadFiles/accreditationDataFiles'],
2424
'AccreditationRecord' => [' -X POST', 'https://ope.ed.gov/dapip/api/downloadFiles/accreditationDataFiles'],
25-
'EightKey' => [' -X GET', 'https://www2.ed.gov/documents/military/8-keys-sites.xls'],
25+
'EightKey' => [' -X GET', 'https://www.ed.gov/sites/ed/files/documents/military/8-keys-sites.xls'],
2626
'Hcm' => ['', 'https://studentaid.gov/sites/default/files/Schools-on-HCM-December2023.xlsx'],
2727
'IpedsHd' => [' -X GET', 'https://nces.ed.gov/ipeds/datacenter/data/HD2022.zip'],
2828
'IpedsIc' => [' -X GET', 'https://nces.ed.gov/ipeds/datacenter/data/IC2022.zip'],

spec/utilities/no_key_apis/no_key_api_downloader_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
expect(nkad.class_nm).to eq('EightKey')
2525
expect(nkad.curl_command).to include('-X GET')
2626
expect(nkad.curl_command).to include('tmp/eight_key.xls')
27-
expect(nkad.curl_command).to include('https://www2.ed.gov/documents/military/8-keys-sites.xls')
27+
expect(nkad.curl_command).to include('https://www.ed.gov/sites/ed/files/documents/military/8-keys-sites.xls')
2828
expect(nkad.curl_command).not_to include('-d')
2929
end
3030

0 commit comments

Comments
 (0)