Permalink
Browse files

* Nodejitsu compatibility.

  • Loading branch information...
1 parent c6ec5b2 commit 3a7d4f4e4a2e5701aaa9cd4f4c4dab087d6714c8 @audreyt committed Oct 31, 2012
Showing with 33 additions and 19 deletions.
  1. +5 −3 dotcloud.js
  2. +20 −10 package.json
  3. +1 −1 player-graph.js
  4. +1 −1 player.js
  5. +2 −2 sc.js
  6. +4 −2 src/dotcloud.ls
View
@@ -1,14 +1,16 @@
(function(){
this.include = function(){
- var json, env, ref$, this$ = this;
+ var env, json, ref$, this$ = this;
try {
+ env = process.env;
this.io.configure(function(){
return this$.io.set('transports', this$.KEY || this$.POLLING
? ['jsonp-polling']
- : ['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']);
+ : env.SUBDOMAIN && env.NODE_ENV
+ ? ['websocket', 'xhr-polling', 'jsonp-polling']
+ : ['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']);
});
json = require('fs').readFileSync('/home/dotcloud/environment.json', 'utf8');
- env = process.env;
return ref$ = JSON.parse(json), env.REDIS_HOST = ref$.DOTCLOUD_DATA_REDIS_HOST, env.REDIS_PORT = ref$.DOTCLOUD_DATA_REDIS_PORT, env.REDIS_PASS = ref$.DOTCLOUD_DATA_REDIS_PASSWORD, ref$;
} catch (e$) {}
};
View
@@ -1,17 +1,27 @@
-{ "name" : "ethercalc"
- , "description" : "Multi-User Spreadsheet Server"
- , "version" : "0.20121026.162049"
- , "dependencies": {
+{
+ "name": "ethercalc",
+ "description": "Multi-User Spreadsheet Server",
+ "version": "0.20121026.162049-3",
+ "dependencies": {
"redis": "*",
"uuid-pure": "*",
"optimist": "*",
"zappajs": "0.4.x"
- }
- , "devDependencies": {
+ },
+ "devDependencies": {
"LiveScript": "*"
- }
- , "optionalDependencies": {
+ },
+ "optionalDependencies": {
"hiredis": "~0.1"
+ },
+ "directories": {
+ "bin": "./bin"
+ },
+ "subdomain": "ethercalc",
+ "scripts": {
+ "start": "app.js"
+ },
+ "engines": {
+ "node": "0.8.x"
}
- , "directories": { "bin": "./bin" }
-}
+}
View
@@ -207,7 +207,7 @@
return true;
};
GraphVerticalBar = function(spreadsheet, range, gview, gtype, helpflag){
- var values, labels, str, nitems, byrow, maxheight, totalwidth, maxval, minval, i, cr, cr1, cell, val, profChartVals, profChartLabels, canv, ctx, colors, barColor, colorList, eachwidth, zeroLine, yScale, gChart, profChartUrl;
+ var values, labels, str, nitems, byrow, maxheight, totalwidth, minval, maxval, i, cr, cr1, cell, val, profChartVals, profChartLabels, canv, ctx, colors, barColor, colorList, eachwidth, zeroLine, yScale, gChart, profChartUrl;
values = [];
labels = [];
if (helpflag || !range) {
View
@@ -79,7 +79,7 @@
};
return this$.on({
data: function(){
- var ss, editor, user, ref$, ecell, peerClass, find, cr, cell, origCR, origCell, parts, line, cmdstr, refreshCmd;
+ var ss, editor, user, ref$, ecell, peerClass, find, cr, cell, origCR, origCell, parts, cmdstr, line, refreshCmd;
if (!((typeof SocialCalc != 'undefined' && SocialCalc !== null) && SocialCalc.isConnected)) {
return;
}
View
4 sc.js
@@ -37,7 +37,7 @@
});
};
SC._init = function(snapshot, log, DB, room, io){
- var sandbox, SocialCalc, ss, parts, line, cmdstr;
+ var sandbox, SocialCalc, ss, parts, cmdstr, line;
log == null && (log = []);
if (SC[room] != null) {
SC[room]._doClearCache();
@@ -190,7 +190,7 @@
});
Object.defineProperty(prototype, 'outerHTML', {
get: function(){
- var tag, attrs, style, k, v, css;
+ var tag, attrs, style, css, k, v;
tag = this.tag, attrs = this.attrs, style = this.style;
css = style.cssText || (function(){
var ref$, results$ = [];
View
@@ -1,10 +1,12 @@
@include = -> try
+ {env} = process
@io.configure ~> @io.set \transports if @KEY or @POLLING
then <[ jsonp-polling ]>
- else <[ websocket flashsocket xhr-polling jsonp-polling ]>
+ else if env.SUBDOMAIN and env.NODE_ENV
+ then <[ websocket xhr-polling jsonp-polling ]>
+ else <[ websocket flashsocket xhr-polling jsonp-polling ]>
json = require \fs .readFileSync \/home/dotcloud/environment.json \utf8
- {env} = process
{
DOTCLOUD_DATA_REDIS_HOST: env.REDIS_HOST

0 comments on commit 3a7d4f4

Please sign in to comment.