Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
botic committed Sep 5, 2017
2 parents e7f8b0c + 436b13c commit b81398a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/ringo/args.js
Expand Up @@ -57,7 +57,7 @@ exports.Parser = function() {
* Add an option to the parser.
* @param {String} shortName the short option name (without leading hyphen)
* @param {String} longName the long option name (without leading hyphens)
* @param {String} argument the name of the argument if the option requires one, or null
* @param {String} argument display name of the option's value, or null if the argument is a singular switch
* @param {String} helpText the help text to display for the option
* @returns {Object} this parser for chained invocation
*/
Expand Down
14 changes: 14 additions & 0 deletions modules/ringo/jsgi/connector.js
Expand Up @@ -162,6 +162,20 @@ function writeBody(response, body, charset) {
* otherwise the request is aborted by the Servlet container.
* A negative value lets the async operation never time out. Defaults to 30 seconds.
* @see <a href="http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-oth-JSpec/">Servlet 3.0 specification - &lt;async-supported&gt;</a>
* @example const response = new AsyncResponse(request, 10000);
* response.start(200, {"Content-Type": "text/plain"});
*
* // this functions returns a ringo promise
* doSomeAsyncStuff().then(function(data) {
* // write out result
* response.write(data);
* response.close();
* }, function() {
* // just close the connection in case of an error
* response.close();
* });
*
* return response;
*/
function AsyncResponse(request, timeout) {
if (!request || !request.env) {
Expand Down
2 changes: 1 addition & 1 deletion modules/ringo/utils/files.js
Expand Up @@ -90,7 +90,7 @@ function resolveId(parent, child) {
* @param {String} suffix the suffix of the temporary file; may be undefined or null
* @param {String} directory optional directory in which to create the file. Pass undefined
* to use the system's default location for temporary files
* @returns {File} the temporary file
* @returns {String} the temporary file's path
*/
function createTempFile(prefix, suffix, directory) {
suffix = suffix || null;
Expand Down
4 changes: 2 additions & 2 deletions modules/ringo/utils/http.js
Expand Up @@ -248,8 +248,8 @@ function encodeObjectComponent(object, prefix, buffer) {
}

/**
* Encode an object's properties into an URL encoded string. If a property contains an array as value,
* the array will be serialized.
* Serializes an object's properties into an URL-encoded query string.
* If a property contains an array as value, the array will be serialized.
* @param {Object} object an object
* @param {String} separator optional string delimiting key-value pairs in the URL, defaults to `&`
* @param {String} equals optional string delimiting a key from its value, defaults to `=`
Expand Down
2 changes: 1 addition & 1 deletion test/ringo/jsgi/asyncresponse_test.js
Expand Up @@ -22,7 +22,7 @@ exports.testAsync = function() {
"host": "localhost",
"port": 8282,
"app": function(request) {
var response = new AsyncResponse(request, 2000, true);
var response = new AsyncResponse(request, 2000);
response.start(200, {"Content-Type": "text/plain"});
spawn(function() {
var max = 5;
Expand Down

0 comments on commit b81398a

Please sign in to comment.