kopia lustrzana https://github.com/c9/core
Merge pull request +14986 from c9/all-allow-numbers-in-provider
Allow numbers in provider so c9admin workspull/378/head
commit
dda434d116
|
@ -2,8 +2,8 @@ var fs = require("fs");
|
||||||
|
|
||||||
exports.parse = function(hostname) {
|
exports.parse = function(hostname) {
|
||||||
|
|
||||||
var m1 = hostname.match(/^([0-9a-z-]+?)-([a-z]+)-([a-z]+)-([0-9]+)-([a-z0-9]+)$/);
|
var m1 = hostname.match(/^([0-9a-z-]+?)-([0-9a-z]+)-([a-z]+)-([0-9]+)-([a-z0-9]+)$/);
|
||||||
var m2 = hostname.match(/^([0-9a-z-]+?)-([a-z]+)-([a-z]+)-([a-z0-9]+)-([a-z0-9]{4})$/);
|
var m2 = hostname.match(/^([0-9a-z-]+?)-([0-9a-z]+)-([a-z]+)-([a-z0-9]+)-([a-z0-9]{4})$/);
|
||||||
|
|
||||||
if (m1) {
|
if (m1) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -23,5 +23,6 @@ describe(__filename, function() {
|
||||||
assertServerName(hostname.parse("newclient-gce-eu-prod-d4fg"), "newclient", "gce", "eu", "d4fg", "prod");
|
assertServerName(hostname.parse("newclient-gce-eu-prod-d4fg"), "newclient", "gce", "eu", "d4fg", "prod");
|
||||||
assertServerName(hostname.parse("ide-old-gce-usw-02-prod"), "ide-old", "gce", "usw", "02", "prod");
|
assertServerName(hostname.parse("ide-old-gce-usw-02-prod"), "ide-old", "gce", "usw", "02", "prod");
|
||||||
assertServerName(hostname.parse("docker-premium-eu-115-prod"), "docker", "premium", "eu", "115", "prod");
|
assertServerName(hostname.parse("docker-premium-eu-115-prod"), "docker", "premium", "eu", "115", "prod");
|
||||||
|
assertServerName(hostname.parse("docker-c9admin-usw-389-prod"), "docker", "c9admin", "usw", "389", "prod");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue