diff options
Diffstat (limited to 'db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb')
-rw-r--r-- | db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb index 8a351cf27a3..ac7eac0ea7c 100644 --- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb +++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb @@ -1,3 +1,4 @@ +# rubocop:disable all # Loops through old importer projects that kept a token/password in the import URL # and encrypts the credentials into a separate field in project#import_data # #down method not supported @@ -24,11 +25,11 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration def process_projects_with_wrong_url projects_with_wrong_import_url.each do |project| begin - import_url = Gitlab::ImportUrl.new(project["import_url"]) + import_url = Gitlab::UrlSanitizer.new(project["import_url"]) update_import_url(import_url, project) update_import_data(import_url, project) - rescue URI::InvalidURIError + rescue Addressable::URI::InvalidURIError nullify_import_url(project) end end |