This commit is contained in:
George Saines 2014-06-12 16:01:39 -07:00
commit 3415b62663
4 changed files with 8 additions and 5 deletions

View file

@ -18,7 +18,7 @@ before_script:
- "mkdir mongo"
- "mongod --dbpath=./mongo --fork --logpath ./mongodb.log"
- "node index.js --unittest &"
- "sleep 5" # to give node a chance to start
- "sleep 10" # to give node a chance to start
script:
- "./node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --captureExceptions"

View file

@ -17,7 +17,7 @@ me.shortString = (ext) -> combine({type: 'string', maxLength: 100}, ext)
me.pct = (ext) -> combine({type: 'number', maximum: 1.0, minimum: 0.0}, ext)
me.date = (ext) -> combine({type: ['object', 'string'], format: 'date-time'}, ext)
# should just be string (Mongo ID), but sometimes mongoose turns them into objects representing those, so we are lenient
me.objectId = (ext) -> schema = combine(['object', 'string'], ext)
me.objectId = (ext) -> schema = combine({type: ['object', 'string'] }, ext)
me.url = (ext) -> combine({type: 'string', format: 'url', pattern: urlPattern}, ext)
PointSchema = me.object {title: "Point", description: "An {x, y} coordinate point.", format: "point2d", required: ["x", "y"]},

View file

@ -3,7 +3,7 @@
.level-content
#control-bar-view
#canvas-wrapper
canvas(width=924, height=589)#surface
canvas(width=1848, height=1178)#surface
#canvas-left-gradient.gradient
#canvas-top-gradient.gradient
#gold-view.secret.expanded

View file

@ -224,8 +224,11 @@ module.exports = class ProfileView extends View
links = ($.extend(true, {}, link) for link in links)
link.icon = @iconForLink link for link in links
context.profileLinks = _.sortBy links, (link) -> not link.icon # icons first
context.sessions = (s.attributes for s in @sessions.models when (s.get('submitted') or s.get('level-id') is 'gridmancer'))
context.sessions.sort (a, b) -> (b.playtime ? 0) - (a.playtime ? 0)
if @sessions
context.sessions = (s.attributes for s in @sessions.models when (s.get('submitted') or s.get('level-id') is 'gridmancer'))
context.sessions.sort (a, b) -> (b.playtime ? 0) - (a.playtime ? 0)
else
context.sessions = []
context
afterRender: ->