kopia lustrzana https://github.com/c9/core
Add Google OAuth authentication
rodzic
e8ee1210b9
commit
32bfa5dc11
|
@ -55,7 +55,7 @@ global.define = function (id, injects, factory) {
|
|||
fileName = fileName[0];
|
||||
|
||||
if (prefix && prefix.indexOf("text") !== -1) {
|
||||
return fs.readFileSync(fileName);
|
||||
return fs.readFileSync(fileName, "utf8");
|
||||
} else
|
||||
return require(fileName);
|
||||
}.bind(this, mod);
|
||||
|
|
|
@ -5,7 +5,8 @@ define(function(require, exports, module) {
|
|||
|
||||
var providers = {
|
||||
"bitbucket.org": "bitbucket",
|
||||
"github.com": "github"
|
||||
"github.com": "github",
|
||||
"source.developers.google.com": "google",
|
||||
};
|
||||
var defaultProvider = "unknown";
|
||||
|
||||
|
@ -38,6 +39,9 @@ define(function(require, exports, module) {
|
|||
case "github":
|
||||
scm = "git";
|
||||
break;
|
||||
case "google":
|
||||
scm = "git";
|
||||
break;
|
||||
case "bitbucket":
|
||||
scm = parsed.pathname.match(/\.git$/) ? "git": "hg";
|
||||
break;
|
||||
|
@ -58,4 +62,4 @@ define(function(require, exports, module) {
|
|||
return null;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue