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
| 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 {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
| 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
| 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
| // 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/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
| #!/usr/bin/env ringo | |
| // Lives in: `ringowiki/db/` | |
| var fs = require('fs'); | |
| var path = fs.path('Page'); | |
| fs.list(path).forEach(function (file) { | |
| var filePath = fs.join(path, file); |
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 Person = require('ringo/storage/hibernate').defineClass('Person', { | |
| table: 'persons', cacheable: false, props: { | |
| firstName: {type: 'string', nullable: false}, | |
| lastName: {type: 'string', nullable: false}, | |
| birthDate: {type: 'timestamp', nullable: false}, | |
| birthYear: {type: 'integer'}, | |
| vitae: {column: 'resume', type: 'text', unique: true} | |
| }}); |
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
| Index: src/org/ringojs/wrappers/Storable.java | |
| =================================================================== | |
| --- src/org/ringojs/wrappers/Storable.java (revision 8afdca5b125784a121643a029b843cec33577e64) | |
| +++ src/org/ringojs/wrappers/Storable.java Sun Apr 11 19:10:01 CEST 2010 | |
| @@ -85,7 +85,7 @@ | |
| } | |
| @JSStaticFunction | |
| - public static Scriptable defineClass(Scriptable store, String type, Object mapping) | |
| + public static Scriptable defineClass(Scriptable store, String type, Object mapping, Object settings) |