Skip to content

Commit

Permalink
Define isGitRepo in outer context
Browse files Browse the repository at this point in the history
  • Loading branch information
quaertym committed Oct 29, 2014
1 parent a436140 commit 13e116e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ EmberCLIDependencyChecker.prototype.updateRequired = function(name, version, ver
return true;
}

var isGitRepo = function(str) {
return (/^git(\+(ssh|https?))?:\/\//i).test(str) || (/\.git\/?$/i).test(str) || (/^git@/i).test(str);
};

if (isGitRepo(version)) {
var parts = version.split('#');
if (parts.length === 2) {
Expand Down Expand Up @@ -151,4 +147,8 @@ function DependencyError(message) {
DependencyError.prototype = Error.prototype;
DependencyError.prototype.constructor = DependencyError;

var isGitRepo = function(str) {
return (/^git(\+(ssh|https?))?:\/\//i).test(str) || (/\.git\/?$/i).test(str) || (/^git@/i).test(str);
};

module.exports = EmberCLIDependencyChecker;

0 comments on commit 13e116e

Please sign in to comment.