Add punctuation to log messages

This commit is contained in:
Bob Van Landuyt 2017-06-14 15:21:51 +02:00 committed by Bob Van Landuyt
parent 171f2d97dc
commit 8c850380a9
3 changed files with 6 additions and 4 deletions

View file

@ -145,8 +145,9 @@ module Gitlab
yield(path_before_rename, path_after_rename)
rescue StandardError => e
failed_reverts << rename_info
say "Renaming #{type} from back to #{path_before_rename} failed. "\
"Review the error and try again by running the `down` action. \n"\
say "Renaming #{type} from #{path_after_rename} back to "\
"#{path_before_rename} failed. Review the error and try "\
"again by running the `down` action. \n"\
"#{e.message}: \n #{e.backtrace.join("\n")}"
end
end

View file

@ -50,7 +50,7 @@ module Gitlab
rename_namespace_dependencies(namespace, current_path, path_before_rename)
else
say "Couldn't rename namespace from #{current_path} back to #{path_before_rename} "\
say "Couldn't rename namespace from #{current_path} back to #{path_before_rename}, "\
"namespace was renamed, or no longer exists at the expected path"
end
end

View file

@ -33,12 +33,13 @@ module Gitlab
matches_path = MigrationClasses::Route.arel_table[:path].matches(current_path)
project = MigrationClasses::Project.joins(:route)
.where(matches_path).first
if project
perform_rename(project, current_path, path_before_rename)
move_project_folders(project, current_path, path_before_rename)
else
say "Couldn't rename Project from #{current_path} back to "\
say "Couldn't rename project from #{current_path} back to "\
"#{path_before_rename}, project was renamed or no longer "\
"exists at the expected path."