)]}'
{"src/keystone.js":[{"author":{"_account_id":8735,"name":"Vitaly Kramskikh","email":"vkramskikh@mirantis.com","username":"vkramskikh"},"change_message_id":"a2554a3b5e6509167cdc271d82a539338b2492ef","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            let link \u003d version.links[i];"},{"line_number":77,"context_line":"            if (link.rel \u003d\u003d\u003d \u0027self\u0027 \u0026\u0026 link.href) {"},{"line_number":78,"context_line":"              return link.href;"},{"line_number":79,"context_line":"            }"},{"line_number":80,"context_line":"          }"},{"line_number":81,"context_line":"        }"},{"line_number":82,"context_line":"        throw new Error(\"No service endpoint discovered.\");"}],"source_content_type":"text/javascript","patch_set":1,"id":"3ac371cc_8c570057","line":79,"updated":"2016-08-18 13:54:20.000000000","message":"ES6\u0027s for..of could be used here","commit_id":"45709692fed3940579d42544343d99a72d8fe200"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"c04f291ab610b342a37e194231b543893feb3bcf","unresolved":false,"context_lines":[{"line_number":65,"context_line":"   * @returns {Promise.\u003cT\u003e|*} A promise which will resolve with the endpoint URL string."},{"line_number":66,"context_line":"   */"},{"line_number":67,"context_line":"  serviceEndpoint () {"},{"line_number":68,"context_line":"    if (!this._endpointPromise) {"},{"line_number":69,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":70,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":71,"context_line":"          if (version.links) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_de6177aa","line":68,"updated":"2016-08-24 16:07:47.000000000","message":"Shouldn\u0027t you declare this variable as null in the constructor?","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"86f4988eb229d9958b9e31e369fe3f2125381e2c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"   * @returns {Promise.\u003cT\u003e|*} A promise which will resolve with the endpoint URL string."},{"line_number":66,"context_line":"   */"},{"line_number":67,"context_line":"  serviceEndpoint () {"},{"line_number":68,"context_line":"    if (!this._endpointPromise) {"},{"line_number":69,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":70,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":71,"context_line":"          if (version.links) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_92afeb2a","line":68,"in_reply_to":"1ac06dbe_579e0508","updated":"2016-08-24 18:51:33.000000000","message":"Urgh, didn\u0027t explain myself.\n\nIn a nutshell, it\u0027s not required to be in the constructor, since undefined \u003d\u003d false \u003d\u003d null in javascript. Declaring it there... well, I suppose I could, but as it\u0027s not strictly required, I prefer to have fewer lines of code to keep track of.","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"012a624b1d3cdbb2b05dcf2f3fd727d2a60b41ba","unresolved":false,"context_lines":[{"line_number":65,"context_line":"   * @returns {Promise.\u003cT\u003e|*} A promise which will resolve with the endpoint URL string."},{"line_number":66,"context_line":"   */"},{"line_number":67,"context_line":"  serviceEndpoint () {"},{"line_number":68,"context_line":"    if (!this._endpointPromise) {"},{"line_number":69,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":70,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":71,"context_line":"          if (version.links) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_579e0508","line":68,"in_reply_to":"1ac06dbe_de6177aa","updated":"2016-08-24 18:31:29.000000000","message":"Not necessarily.","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"c04f291ab610b342a37e194231b543893feb3bcf","unresolved":false,"context_lines":[{"line_number":69,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":70,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":71,"context_line":"          if (version.links) {"},{"line_number":72,"context_line":"            for (let i \u003d 0; i \u003c version.links.length; i++) {"},{"line_number":73,"context_line":"              let link \u003d version.links[i];"},{"line_number":74,"context_line":"              if (link.rel \u003d\u003d\u003d \u0027self\u0027 \u0026\u0026 link.href) {"},{"line_number":75,"context_line":"                return link.href;"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_1e2aef2c","line":72,"updated":"2016-08-24 16:07:47.000000000","message":"foreach ?","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"1b20c30c676b20d4141175355978dce7bf3bd46f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":66,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":67,"context_line":"          if (version.links) {"},{"line_number":68,"context_line":"            for (let i \u003d 0; i \u003c version.links.length; i++) {"},{"line_number":69,"context_line":"              let link \u003d version.links[i];"},{"line_number":70,"context_line":"              if (link.rel \u003d\u003d\u003d \u0027self\u0027 \u0026\u0026 link.href) {"},{"line_number":71,"context_line":"                return link.href;"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa7ab95a_36633bde","line":68,"updated":"2016-08-26 15:24:15.000000000","message":"Maybe use \"Array.prototype.find\" ?\n version.links.find((link) \u003d\u003e {\n     return link.rel \u003d\u003d\u003d \u0027self\u0027 \u0026\u0026 link.href;\n });\n\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find","commit_id":"5b2db185d7e8c6d896a0839d356d224167e2ed31"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"702f347c641b089f82d8c4a04fd605d3f1f88615","unresolved":false,"context_lines":[{"line_number":65,"context_line":"      this._endpointPromise \u003d this.version()"},{"line_number":66,"context_line":"        .then((version) \u003d\u003e {"},{"line_number":67,"context_line":"          if (version.links) {"},{"line_number":68,"context_line":"            for (let i \u003d 0; i \u003c version.links.length; i++) {"},{"line_number":69,"context_line":"              let link \u003d version.links[i];"},{"line_number":70,"context_line":"              if (link.rel \u003d\u003d\u003d \u0027self\u0027 \u0026\u0026 link.href) {"},{"line_number":71,"context_line":"                return link.href;"}],"source_content_type":"text/javascript","patch_set":7,"id":"fa7ab95a_fabff15d","line":68,"in_reply_to":"fa7ab95a_36633bde","updated":"2016-08-26 17:24:04.000000000","message":"Definitely feasible. Given that the code works, and loops are generally more of a per-developer syntax preference, I\u0027m declining to update this.","commit_id":"5b2db185d7e8c6d896a0839d356d224167e2ed31"}],"test/unit/keystoneTest.js":[{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"c04f291ab610b342a37e194231b543893feb3bcf","unresolved":false,"context_lines":[{"line_number":150,"context_line":"          expect(endpoint).toEqual(\u0027http://192.168.99.99/identity_v2_admin/v3/\u0027);"},{"line_number":151,"context_line":"          done();"},{"line_number":152,"context_line":"        })"},{"line_number":153,"context_line":"        .catch(() \u003d\u003e done.fail());"},{"line_number":154,"context_line":"    });"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    it(\"Should throw an exception if no endpoint is provided.\", (done) \u003d\u003e {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_5e78e72b","line":153,"updated":"2016-08-24 16:07:47.000000000","message":"So if the catch gets called, the test will fail but we won\u0027t have detail on the error. I know this is a generic comment for all reviews, but I\u0027d like to know what you think about that","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"012a624b1d3cdbb2b05dcf2f3fd727d2a60b41ba","unresolved":false,"context_lines":[{"line_number":150,"context_line":"          expect(endpoint).toEqual(\u0027http://192.168.99.99/identity_v2_admin/v3/\u0027);"},{"line_number":151,"context_line":"          done();"},{"line_number":152,"context_line":"        })"},{"line_number":153,"context_line":"        .catch(() \u003d\u003e done.fail());"},{"line_number":154,"context_line":"    });"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    it(\"Should throw an exception if no endpoint is provided.\", (done) \u003d\u003e {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_9724fdc6","line":153,"in_reply_to":"1ac06dbe_5e78e72b","updated":"2016-08-24 18:31:29.000000000","message":"Good point. Let me see if passing the raw error to the handler will work.","commit_id":"e443dc571ca3522836ef05f43656561530555de9"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"86f4988eb229d9958b9e31e369fe3f2125381e2c","unresolved":false,"context_lines":[{"line_number":150,"context_line":"          expect(endpoint).toEqual(\u0027http://192.168.99.99/identity_v2_admin/v3/\u0027);"},{"line_number":151,"context_line":"          done();"},{"line_number":152,"context_line":"        })"},{"line_number":153,"context_line":"        .catch(() \u003d\u003e done.fail());"},{"line_number":154,"context_line":"    });"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    it(\"Should throw an exception if no endpoint is provided.\", (done) \u003d\u003e {"}],"source_content_type":"text/javascript","patch_set":5,"id":"1ac06dbe_8d398edb","line":153,"in_reply_to":"1ac06dbe_9724fdc6","updated":"2016-08-24 18:51:33.000000000","message":"Right - so it\u0027s possible to do this: `catch((param) \u003d\u003e done.fail(param));`, and the test will fail with the output of `param.toString()`. In the couple of tests that I did, the output wasn\u0027t terribly useful (once it was \"[[Object],[Object]]\" and once it was \"TypeError\").\n\nHowever, since it could actually be useful, while just calling fail() is not really useful, I\u0027m up for updating this.","commit_id":"e443dc571ca3522836ef05f43656561530555de9"}]}
