)]}'
{"horizon/static/framework/util/q/q.extensions.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e73d23ca70fdfbe4b7c231f7b7bdc1fa565a2ed3","unresolved":false,"context_lines":[{"line_number":133,"context_line":"     * as a promise in a list of promises"},{"line_number":134,"context_line":"     *"},{"line_number":135,"context_line":"     * @param check"},{"line_number":136,"context_line":"     * the boolean condition to wrap"},{"line_number":137,"context_line":"     *"},{"line_number":138,"context_line":"     * @return"},{"line_number":139,"context_line":"     * the promise object"}],"source_content_type":"text/javascript","patch_set":3,"id":"5a710552_ad85c707","line":136,"updated":"2015-12-16 00:10:47.000000000","message":"Perhaps specify whether this honors anything that is truthy or is strictly boolean.\n\ne.g.: https://github.com/openstack/horizon/blob/master/horizon/static/framework/util/filters/filters.js#L35","commit_id":"fb68438d9396d777708e981423b7c49e76e8fc7a"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"4bf255cb46ffb44ea2f6d1ca285f1bf3c0525b06","unresolved":false,"context_lines":[{"line_number":133,"context_line":"     * as a promise in a list of promises"},{"line_number":134,"context_line":"     *"},{"line_number":135,"context_line":"     * @param check"},{"line_number":136,"context_line":"     * the boolean condition to wrap"},{"line_number":137,"context_line":"     *"},{"line_number":138,"context_line":"     * @return"},{"line_number":139,"context_line":"     * the promise object"}],"source_content_type":"text/javascript","patch_set":3,"id":"3a7e1126_aff755f4","line":136,"in_reply_to":"5a710552_ad85c707","updated":"2015-12-16 21:20:17.000000000","message":"Done","commit_id":"fb68438d9396d777708e981423b7c49e76e8fc7a"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"9fc85d7d8200b6eb4a43f52b1f299d6901c5725c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"     * Wrap a condition in a a promise so it can be used"},{"line_number":133,"context_line":"     * as a promise in a list of promises."},{"line_number":134,"context_line":"     * Only If the condition evaluates to true,"},{"line_number":135,"context_line":"     * the promise resolves else is rejected."},{"line_number":136,"context_line":"     *"},{"line_number":137,"context_line":"     * @param {expression} check"},{"line_number":138,"context_line":"     * the boolean condition to wrap"}],"source_content_type":"text/javascript","patch_set":13,"id":"fa69d971_97a8eb8e","line":135,"updated":"2016-01-05 03:16:29.000000000","message":"I think this needs to be renamed and this description improved:\n\n1. It\u0027s not clear that the \"check\" is not a callable, it\u0027s a straight boolean. It doesn\u0027t wrap a condition. It doesn\u0027t actually accept something that\u0027s \"evaluated\" it just accepts a value. Perhaps: \"If passed true, the promise resolves.\"\n\n2. as I mentioned above it\u0027s misleading to say that the function wraps a condition - the condition is evaluated before the function is invoked. Therefore from the name \"wrapInPromise\", it\u0027s not clear what is actually being done - how is the \"check\" value being \"wrapped\"? It\u0027s not, in my mind. What\u0027s actually being done here is a simple promise is being returned which is pre-coded to be resolved or rejected. So perhaps \"booleanPromise\", \"resolveIfTrue\" or something like that?\n\n\nSo, here\u0027s my suggestion...\n\nbooleanPromise()\n\"Create a promise that is pre-set to resolve if true is passed in, otherwise it is pre-set to reject.\"","commit_id":"30cb1813cf9d36ada892b2a1907420a1ba65f6e1"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"c50875bde66a38016f3e6d357fa916159af9122c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"     * Wrap a condition in a a promise so it can be used"},{"line_number":133,"context_line":"     * as a promise in a list of promises."},{"line_number":134,"context_line":"     * Only If the condition evaluates to true,"},{"line_number":135,"context_line":"     * the promise resolves else is rejected."},{"line_number":136,"context_line":"     *"},{"line_number":137,"context_line":"     * @param {expression} check"},{"line_number":138,"context_line":"     * the boolean condition to wrap"}],"source_content_type":"text/javascript","patch_set":13,"id":"fa69d971_9679ad84","line":135,"in_reply_to":"fa69d971_97a8eb8e","updated":"2016-01-05 17:33:09.000000000","message":"Thanks for the suggestions. I\u0027ve changed it to booleanAsPromise. Changed the documentation","commit_id":"30cb1813cf9d36ada892b2a1907420a1ba65f6e1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"90b3560de587f7a4bbcd5d8e10ce575f248960d2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    }"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    /**"},{"line_number":132,"context_line":"     * Create a promise that resolves to true, otherwise is rejected."},{"line_number":133,"context_line":"     *"},{"line_number":134,"context_line":"     * @param {expression} value"},{"line_number":135,"context_line":"     * the boolean condition to wrap"}],"source_content_type":"text/javascript","patch_set":14,"id":"fa69d971_27d446bb","line":132,"updated":"2016-01-05 20:56:19.000000000","message":"s/to/if","commit_id":"00c147e5529721fd343b1657ac3a692f8e61f9a1"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"5414e9aa88bc0b7368149b47844f4450e43c2501","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    }"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    /**"},{"line_number":132,"context_line":"     * Create a promise that resolves to true, otherwise is rejected."},{"line_number":133,"context_line":"     *"},{"line_number":134,"context_line":"     * @param {expression} value"},{"line_number":135,"context_line":"     * the boolean condition to wrap"}],"source_content_type":"text/javascript","patch_set":14,"id":"fa69d971_ada57747","line":132,"in_reply_to":"fa69d971_27d446bb","updated":"2016-01-05 21:11:10.000000000","message":"Done","commit_id":"00c147e5529721fd343b1657ac3a692f8e61f9a1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"90b3560de587f7a4bbcd5d8e10ce575f248960d2","unresolved":false,"context_lines":[{"line_number":132,"context_line":"     * Create a promise that resolves to true, otherwise is rejected."},{"line_number":133,"context_line":"     *"},{"line_number":134,"context_line":"     * @param {expression} value"},{"line_number":135,"context_line":"     * the boolean condition to wrap"},{"line_number":136,"context_line":"     *"},{"line_number":137,"context_line":"     * @return {promise}"},{"line_number":138,"context_line":"     * the promise object"}],"source_content_type":"text/javascript","patch_set":14,"id":"fa69d971_07e6e2af","line":135,"updated":"2016-01-05 20:56:19.000000000","message":"\"boolean value to test\"","commit_id":"00c147e5529721fd343b1657ac3a692f8e61f9a1"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"5414e9aa88bc0b7368149b47844f4450e43c2501","unresolved":false,"context_lines":[{"line_number":132,"context_line":"     * Create a promise that resolves to true, otherwise is rejected."},{"line_number":133,"context_line":"     *"},{"line_number":134,"context_line":"     * @param {expression} value"},{"line_number":135,"context_line":"     * the boolean condition to wrap"},{"line_number":136,"context_line":"     *"},{"line_number":137,"context_line":"     * @return {promise}"},{"line_number":138,"context_line":"     * the promise object"}],"source_content_type":"text/javascript","patch_set":14,"id":"fa69d971_2d70a7db","line":135,"in_reply_to":"fa69d971_07e6e2af","updated":"2016-01-05 21:11:10.000000000","message":"Done","commit_id":"00c147e5529721fd343b1657ac3a692f8e61f9a1"}],"horizon/static/framework/util/q/q.extensions.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e73d23ca70fdfbe4b7c231f7b7bdc1fa565a2ed3","unresolved":false,"context_lines":[{"line_number":81,"context_line":"      it(\u0027should resolve the promise if condition evaluates to true\u0027, function() {"},{"line_number":82,"context_line":"        service.wrapInPromise(false).then(angular.noop, failTest);"},{"line_number":83,"context_line":"      });"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    });"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    function failTest() {"}],"source_content_type":"text/javascript","patch_set":3,"id":"5a710552_8d26cb66","line":84,"updated":"2015-12-16 00:10:47.000000000","message":"What about null or undefined cases?\n\nSee the tests here:\n\nhttps://github.com/openstack/horizon/blob/master/horizon/static/framework/util/filters/filters.spec.js#L7-L38","commit_id":"fb68438d9396d777708e981423b7c49e76e8fc7a"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"4bf255cb46ffb44ea2f6d1ca285f1bf3c0525b06","unresolved":false,"context_lines":[{"line_number":81,"context_line":"      it(\u0027should resolve the promise if condition evaluates to true\u0027, function() {"},{"line_number":82,"context_line":"        service.wrapInPromise(false).then(angular.noop, failTest);"},{"line_number":83,"context_line":"      });"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    });"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    function failTest() {"}],"source_content_type":"text/javascript","patch_set":3,"id":"3a7e1126_4fdd916f","line":84,"in_reply_to":"5a710552_8d26cb66","updated":"2015-12-16 21:20:17.000000000","message":"Done","commit_id":"fb68438d9396d777708e981423b7c49e76e8fc7a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c4c0667021b9f13d86c97cb247d1fd6836f3e8e4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        $scope.$apply();"},{"line_number":88,"context_line":"        service.wrapInPromise({}).then(angular.noop, failTest);"},{"line_number":89,"context_line":"        $scope.$apply();"},{"line_number":90,"context_line":"        service.wrapInPromise(\u0027A\u0027).then(angular.noop, failTest);"},{"line_number":91,"context_line":"        $scope.$apply();"},{"line_number":92,"context_line":"        service.wrapInPromise(7).then(angular.noop, failTest);"},{"line_number":93,"context_line":"        $scope.$apply();"}],"source_content_type":"text/javascript","patch_set":4,"id":"3a7e1126_f6876d10","line":90,"updated":"2015-12-17 00:57:22.000000000","message":"Some of these conditions are a little funny.  Are they really desired or should the check not be truthy?  Just wondering about the use case.","commit_id":"064ad7b23cf17f1a9ba21d036c70c4d8a05f432c"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"784e14a5ce02f55edf7859f9d2f093f26fec2c71","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        $scope.$apply();"},{"line_number":88,"context_line":"        service.wrapInPromise({}).then(angular.noop, failTest);"},{"line_number":89,"context_line":"        $scope.$apply();"},{"line_number":90,"context_line":"        service.wrapInPromise(\u0027A\u0027).then(angular.noop, failTest);"},{"line_number":91,"context_line":"        $scope.$apply();"},{"line_number":92,"context_line":"        service.wrapInPromise(7).then(angular.noop, failTest);"},{"line_number":93,"context_line":"        $scope.$apply();"}],"source_content_type":"text/javascript","patch_set":4,"id":"3a7e1126_cf3724e2","line":90,"in_reply_to":"3a7e1126_f6876d10","updated":"2015-12-17 07:22:12.000000000","message":"I sort of went ahead and did along the line of the filter. When you put in review comments, I realized that the assumption was wrong.\n\nHave fixed the tests to ascertain only boolean true to resolve, all else rejects. That way it\u0027s quite strict.","commit_id":"064ad7b23cf17f1a9ba21d036c70c4d8a05f432c"}]}
