This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/core/array.js b/modules/core/array.js | |
index 138131b..e35a1cd 100644 | |
--- a/modules/core/array.js | |
+++ b/modules/core/array.js | |
@@ -135,7 +135,7 @@ Object.defineProperty(Array.prototype, "partition", { | |
falses.push(this[i]); | |
} | |
} | |
- return [trues, falses] | |
+ return [trues, falses]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// an-app/config.js | |
// [...] | |
exports.urls = ["./actions"]; // Simply an array of module names now. | |
// an-app/actions.js | |
// [...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/ringo/webapp/websocket.js b/modules/ringo/webapp/websocket.js | |
index 17ecc55..c3105cd 100644 | |
--- a/modules/ringo/webapp/websocket.js | |
+++ b/modules/ringo/webapp/websocket.js | |
@@ -59,6 +59,14 @@ exports.addWebSocket = function(context, path, onconnect) { | |
return outbound.isOpen(); | |
}, | |
/** | |
+ * Get the outbound WebSocket connection. | |
+ * @name WebSocket.instance.getOutbound |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actions.js b/actions.js | |
index cccc9f0..a87d4bb 100644 | |
--- a/actions.js | |
+++ b/actions.js | |
@@ -28,7 +28,7 @@ exports.edit = function(req, name) { | |
exports.list = function(req) { | |
return Response.skin(module.resolve('./skins/list.html'), { | |
- pages: Page.all().sort(strings.Sorter('name'))}); | |
+ pages: Page.query().orderBy('name').select()}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {html5} = require('hiccup/page'); | |
var {htmlResponse} = require('stick/helpers'); | |
var text = 'Hello World!'; | |
var markup = html5(['head', ['title', text]], ['body', ['h1', text]]); | |
var app = exports.app = require('stick').Application() | |
.configure('error', 'notfound', 'route') | |
.get('/', function (req) htmlResponse(markup)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {html5} = require('hiccup/page'), | |
{Application} = require('stick'), | |
{Response} = require('stick/helpers'); | |
var text = 'Hello World!', | |
markup = html5(['head', ['title', text]], ['body', ['h1', text]]), | |
app = exports.app = Application('error', 'notfound', 'route') | |
.get('/', function (req) Response.html(markup)); | |
if (require.main === module) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('ringo/httpclient'); | |
var {AsyncResponse} = require('ringo/webapp/async'); | |
var app = exports.app = require('stick').Application() | |
.configure('error', 'notfound', 'route', 'params'); | |
app.get('/proxy/*', function (req, path) { | |
var response = new AsyncResponse(req); | |
// Fetch MP3 from AWS S3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (win) { | |
win.$mp = win.$mp || {}; | |
win.$mp.makeMvcPipe = function () { | |
var _loadStyleSheet = function (path, media, fn, scope) { | |
var sheet, cssRules; | |
var head = document.getElementsByTagName('head')[0]; | |
var link = document.createElement('link'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ringo | |
>> set = new java.util.HashSet(['foo', 'bar']) | |
[java.util.HashSet [foo, bar]] | |
>> for each (var element in Iterator(set)) print(element) | |
foo | |
bar | |
>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.app = (req) -> | |
status: 200 | |
headers: | |
'Content-Type': 'text/plain' | |
body: ['Hello World!'] | |
if require.main is module | |
require('ringo/httpserver').main module.id |