Merge pull request +14986 from c9/all-allow-numbers-in-provider

Allow numbers in provider so c9admin works
pull/378/head
Tim Robinson 2016-10-26 19:43:54 -07:00 zatwierdzone przez GitHub
commit dda434d116
2 zmienionych plików z 3 dodań i 2 usunięć

4
node_modules/c9/hostname.js wygenerowano vendored
Wyświetl plik

@ -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 {

1
node_modules/c9/hostname_test.js wygenerowano vendored
Wyświetl plik

@ -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");
}); });
}); });