YUKI Hiroshi
null+****@clear*****
Tue Dec 25 16:45:48 JST 2012
YUKI Hiroshi 2012-12-25 16:45:48 +0900 (Tue, 25 Dec 2012) New Revision: f6d88b9b96acfd05c29dfff96f260d4c1c1d867c https://github.com/groonga/gcs/commit/f6d88b9b96acfd05c29dfff96f260d4c1c1d867c Log: Return creation date as a part of "arn" correctly Modified files: lib/database/domain.js tools/scenario-runner.js Modified: lib/database/domain.js (+7 -4) =================================================================== --- lib/database/domain.js 2012-12-25 16:42:20 +0900 (b938e74) +++ lib/database/domain.js 2012-12-25 16:45:48 +0900 (b0f44f6) @@ -307,9 +307,12 @@ Domain.prototype = { return this; }, + get domainCreationDate() { + return this.getCreationDate('self') || new Date(); + }, + get domainId() { - var id = this.getCreationDate('self') || new Date(); - return id.getTime() + '/' + this.name; + return this.domainCreationDate.getTime() + '/' + this.name; }, get searchableDocumentsCount() { @@ -341,10 +344,10 @@ Domain.prototype = { }, get documentsArn() { - return 'arn:aws:cs:us-east-1:' + this.id + ':doc/' + this.name; + return 'arn:aws:cs:us-east-1:' + this.domainCreationDate.getTime() + ':doc/' + this.name; }, get searchArn() { - return 'arn:aws:cs:us-east-1:' + this.id + ':search/' + this.name; + return 'arn:aws:cs:us-east-1:' + this.domainCreationDate.getTime() + ':search/' + this.name; }, documentsEndpoint: function(endpointBase) { if (!endpointBase) throw new Error('endpointBase must be specified'); Modified: tools/scenario-runner.js (+1 -1) =================================================================== --- tools/scenario-runner.js 2012-12-25 16:42:20 +0900 (2635edf) +++ tools/scenario-runner.js 2012-12-25 16:45:48 +0900 (a8c6951) @@ -412,7 +412,7 @@ Response.prototype = { break; case 'Arn': - normalized = value.replace(/^(arn:aws:cs:us-east-1:)[^:]+(:\d+\/[^\/]+)$/, '$1%DOMAIN_ID%$2'); + normalized = value.replace(/^(arn:aws:cs:us-east-1:)\d+(:(?:doc|search)\/[^\/]+)$/, '$1%DOMAIN_ID%$2'); break; case 'Endpoint': -------------- next part -------------- HTML����������������������������... ダウンロード