Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 11a7aa17bf
...
compare: e8ce4b6c6a
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
4 README.md
@@ -36,7 +36,7 @@ Install nodejs >= 0.8.0 and then install these packages:
On computers that will be used to upload modules to the stockpile, use cpan
to install the required Perl modules:
- sudo cpan JSON
+ sudo cpan LWP::UserAgent Term::ReadKey JSON
Usage
-----
@@ -276,7 +276,7 @@ Leveraging a CDN
In addition to the standard format (`/combo?a&b&c`), Stockpile also accepts a
custom format to allow caching by a CDN like CloudFlare: `/combo~a~b~c`
-To use this format, configure the group as follows:
+To use this format, configure the group for YUI Loader as follows:
comboBase: 'http://host:port/combo~',
comboSep: '~'
View
3  TODO
@@ -35,9 +35,6 @@ ui for stats:
scroll buttons: 5% (<), 25% (<<), all the way (|<)
-npm modules
- load from app directory or npm module
-
animation + history manager when browsing
attach event to Back link
View
27 combo.js
@@ -22,8 +22,8 @@ var mod_fs = require('fs'),
mod_qs = require('querystring'),
mod_compress = require('gzip'),
mod_express = require('express'),
- mod_cluster = require('cluster'),
- mod_os = require('os'),
+ mod_cluster = require('cluster'),
+ mod_os = require('os'),
content_type = require('./server/content-type.js'),
path_util = require('./server/path-util.js');
@@ -182,7 +182,15 @@ function combo(req, res, query)
if (e.cacheKey == key)
{
h.detach();
- send(req, res, response_cache.get(key));
+ var data = response_cache.get(key);
+ if (Y.Lang.isNumber(data)) // response code
+ {
+ res.send(data);
+ }
+ else
+ {
+ send(req, res, data);
+ }
}
});
return;
@@ -199,9 +207,9 @@ function combo(req, res, query)
cache_key_pending[key] = true;
}
- var tasks = new Y.Parallel(),
- results = {},
- code = 200;
+ var tasks = new Y.Parallel(),
+ results = {},
+ http_code = 200;
Y.each(module_list, function(f)
{
@@ -233,7 +241,7 @@ function combo(req, res, query)
else if (err)
{
Y.log(err.message, 'warn', 'combo');
- code = 404;
+ http_code = 404;
callback('');
}
else
@@ -257,10 +265,11 @@ function combo(req, res, query)
tasks.done(function()
{
- if (code != 200)
+ if (http_code != 200)
{
+ response_cache.put(key, http_code);
unblockCache();
- res.send(code);
+ res.send(http_code);
return;
}
View
2  test/config/groups-localhost-user.json
@@ -1,3 +1,3 @@
{
- "test": ["vagrant","travis","lindalj","jafl"]
+ "test": ["vagrant","travis","lindalj","jafl","jolindal"]
}
View
2  test/config/manager-localhost-admin.json
@@ -7,6 +7,6 @@
"auth": "localhost",
"adminport": 8669,
- "admins": ["vagrant","travis","lindalj","jafl"],
+ "admins": ["vagrant","travis","lindalj","jafl","jolindal"],
"mailserver": "yahoo.com"
}

No commit comments for this range

Something went wrong with that request. Please try again.