diff --git a/lib/github-file.coffee b/lib/github-file.coffee index 1db7445..234a449 100644 --- a/lib/github-file.coffee +++ b/lib/github-file.coffee @@ -86,13 +86,22 @@ class GitHubFile # Public validationErrors: -> unless @repo - return ["No repository found for path: #{@filePath}."] + if @filePath + return ["No repository found for path: #{@filePath}"] + else + return ["No repository found for path"] unless @gitUrl() - return ["No URL defined for remote: #{@remoteName()}"] + if @remoteName() + return ["No URL defined for remote filepath: #{@remoteName()}"] + else + return ["No URL defined for remote filepath"] unless @githubRepoUrl() - return ["Remote URL is not hosted on GitHub: #{@gitUrl()}"] + if @gitUrl() + return ["Remote URL is not hosted on GitHub: #{@gitUrl()}"] + else + return ["Remote URL is not hosted on GitHub"] [] diff --git a/marking.txt b/marking.txt new file mode 100644 index 0000000..2c4da91 --- /dev/null +++ b/marking.txt @@ -0,0 +1,5 @@ +We changed the way that the validation errors returned so that if the filePath +was null, it would not show "null" on the user interface. We also changed some of +the wording of errors. +Implementation: 'validationErrors: ->' function +File: lib/github-file.coffee