mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -05:00
576 lines
17 KiB
CoffeeScript
576 lines
17 KiB
CoffeeScript
JobProfileView = require 'views/user/JobProfileView'
|
||
|
||
responses =
|
||
'/db/user/joe/nameToID':'512ef4805a67a8c507000001'
|
||
|
||
'/db/user/512ef4805a67a8c507000001': {
|
||
"_id": "512ef4805a67a8c507000001",
|
||
"__v": 47,
|
||
"email": "livelily@gmail.com",
|
||
"emailSubscriptions": [
|
||
"announcement",
|
||
"notification",
|
||
"developer",
|
||
"level_creator",
|
||
"tester",
|
||
"article_editor",
|
||
"translator",
|
||
"support"
|
||
],
|
||
"facebookID": "4301215",
|
||
"firstName": "Nick",
|
||
"gender": "male",
|
||
"lastName": "Winter",
|
||
"name": "Nick!",
|
||
"photoURL": "db/user/512ef4805a67a8c507000001/nick_wizard.png",
|
||
"volume": 0,
|
||
"wizardColor1": 0.4,
|
||
"testGroupNumber": 217,
|
||
"mailChimp": {
|
||
"leid": "70264209",
|
||
"euid": "c4418e2abd",
|
||
"email": "livelily@gmail.com"
|
||
},
|
||
"hourOfCode": true,
|
||
"hourOfCodeComplete": true,
|
||
"signedCLA": "Fri Jan 03 2014 14:40:18 GMT-0800 (PST)",
|
||
"wizard": {
|
||
"colorConfig": {
|
||
"boots": {
|
||
"lightness": 0.1647058823529412,
|
||
"saturation": 0.023809523809523805,
|
||
"hue": 0
|
||
},
|
||
"spell": {
|
||
"hue": 0.7490196078431373,
|
||
"saturation": 0.4106280193236715,
|
||
"lightness": 0.5941176470588235
|
||
},
|
||
"cloud": {
|
||
"lightness": 0.14,
|
||
"saturation": 1,
|
||
"hue": 0
|
||
},
|
||
"clothes": {
|
||
"lightness": 0.1411764705882353,
|
||
"saturation": 0,
|
||
"hue": 0
|
||
},
|
||
"trim": {
|
||
"hue": 0.5,
|
||
"saturation": 0.009900990099009936,
|
||
"lightness": 0.19803921568627453
|
||
}
|
||
}
|
||
},
|
||
"aceConfig": {
|
||
"liveCompletion": true,
|
||
"indentGuides": true,
|
||
"invisibles": true,
|
||
"keyBindings": "emacs",
|
||
"behaviors": true,
|
||
"language": "javascript"
|
||
},
|
||
"lastLevel": "drink-me",
|
||
"gplusID": "110703832132860599877",
|
||
"jobProfile": {
|
||
"photoURL": "db/user/512ef4805a67a8c507000001/nick_bokeh_small.jpg",
|
||
"links": [
|
||
# {
|
||
# "name": "Twitter",
|
||
# "link": "https://twitter.com/nwinter"
|
||
# },
|
||
# {
|
||
# "name": "Facebook",
|
||
# "link": "https://www.facebook.com/nwinter"
|
||
# },
|
||
{
|
||
"name": "LinkedIn",
|
||
"link": "https://www.linkedin.com/in/nwinter"
|
||
},
|
||
{
|
||
"name": "Blog",
|
||
"link": "http://blog.nickwinter.net/"
|
||
},
|
||
{
|
||
"name": "Personal Site",
|
||
"link": "http://www.nickwinter.net/"
|
||
},
|
||
{
|
||
"name": "GitHub",
|
||
"link": "https://github.com/nwinter"
|
||
},
|
||
{
|
||
"name": "G+",
|
||
"link": "https://plus.google.com/u/0/+NickWinter"
|
||
}
|
||
],
|
||
"projects": [
|
||
{
|
||
"name": "The Motivation Hacker",
|
||
"description": "I wrote a book. *The Motivation Hacker* shows you how to summon extreme amounts of motivation to accomplish anything you can think of. From precommitment to rejection therapy, this is your field guide to getting yourself to want to do everything you always wanted to want to do.",
|
||
"picture": "db/user/512ef4805a67a8c507000001/the_motivation_hacker_thumb.jpg",
|
||
"link": "http://www.nickwinter.net/motivation-hacker"
|
||
},
|
||
{
|
||
"name": "Quantified Mind",
|
||
"description": "Quantified Mind is a tool that quickly, reliably, and comprehensively measures your basic cognitive abilities. We've adapted tests used by psychologists to a practical web application that you can use whenever, wherever, and as often as you want.",
|
||
"picture": "db/user/512ef4805a67a8c507000001/screenshot.png",
|
||
"link": "http://www.quantified-mind.com/"
|
||
},
|
||
{
|
||
"link": "https://github.com/nwinter/telepath-logger",
|
||
"name": "Telepath",
|
||
"description": "A happy Mac keylogger for Quantified Self purposes. It also now serves as a time lapse heads-up-display thing. I used it to make a [time-lapse video of myself working an 120-hour workweek](http://blog.nickwinter.net/the-120-hour-workweek-epic-coding-time-lapse).",
|
||
"picture": "db/user/512ef4805a67a8c507000001/687474703a2f2f63646e2e736574742e636f6d2f696d616765732f757365722f32303133313131303139353534393937375a30356665633666623234623937323263373733636231303537613130626336365f66726f6e742e6a7067"
|
||
}
|
||
],
|
||
"education": [
|
||
{
|
||
"school": "Oberlin College",
|
||
"degree": "BA Computer Science, Mathematics, and East Asian Studies, highest honors in CS",
|
||
"duration": "Aug 2004 - May 2008",
|
||
"description": "Cofounded Oberlin Street Art and did all sorts of crazy missions without telling anyone about it."
|
||
}
|
||
],
|
||
"work": [
|
||
{
|
||
"employer": "CodeCombat",
|
||
"role": "Cofounder",
|
||
"duration": "Jan 2013 - present",
|
||
"description": "Programming a programming game for learning programming to be a programming programmer of programmatic programs."
|
||
},
|
||
{
|
||
"employer": "Skritter",
|
||
"role": "Cofounder",
|
||
"duration": "May 2008 - present",
|
||
"description": "I coded, I designed, I marketed, I businessed, I wrote, I drudged, I cheffed, I laughed, I cried. But mostly I emailed. God, so much email."
|
||
}
|
||
],
|
||
"visa": "Authorized to work in the US",
|
||
"longDescription": "I cofounded Skritter, am working on CodeCombat, helped with Quantified Mind, live in San Francisco, went to Oberlin College, wrote a book about motivation hacking, and can do anything.\n\nI like hacking on startups, pigs with dogs for feet, and Smash Bros. I dislike shoes, mortality, and Java.\n\nDo you love hiring renegade maverick commandos who can't abide the system? Are you looking to hire the sample job profile candidate of the job profile system? Are you just testing this thing? If your answer is yes, yes yes!–then let us talk.",
|
||
"shortDescription": "Maniac two-time startup cofounder looking to test the system and see what a job profile might look like. Can't nobody hold him down.",
|
||
"experience": 6,
|
||
"skills": [
|
||
"python",
|
||
"coffeescript",
|
||
"node",
|
||
"ios",
|
||
"objective-c",
|
||
"javascript",
|
||
"app-engine",
|
||
"mongodb",
|
||
"web dev",
|
||
"django",
|
||
"backbone",
|
||
"chinese",
|
||
"qs",
|
||
"writing"
|
||
],
|
||
"country": "USA",
|
||
"city": "San Francisco",
|
||
"active": false,
|
||
"lookingFor": "Full-time",
|
||
"name": "Nick Winter",
|
||
"updated": "2014-07-12T01:48:42.980Z",
|
||
"jobTitle": "Mutant Code Gorilla"
|
||
},
|
||
"jobProfileApproved": false,
|
||
"emails": {
|
||
"anyNotes": {
|
||
"enabled": true
|
||
},
|
||
"generalNews": {
|
||
"enabled": true
|
||
},
|
||
"archmageNews": {
|
||
"enabled": true
|
||
},
|
||
"artisanNews": {
|
||
"enabled": true
|
||
},
|
||
"adventurerNews": {
|
||
"enabled": true
|
||
},
|
||
"scribeNews": {
|
||
"enabled": true
|
||
},
|
||
"diplomatNews": {
|
||
"enabled": true
|
||
},
|
||
"ambassadorNews": {
|
||
"enabled": true
|
||
}
|
||
},
|
||
"activity": {
|
||
"viewed_by_employer": {
|
||
"last": "2014-06-19T20:21:43.747Z",
|
||
"count": 6,
|
||
"first": "2014-06-12T01:37:38.278Z"
|
||
},
|
||
"view_candidate": {
|
||
"first": "2014-06-10T19:59:30.773Z",
|
||
"count": 661,
|
||
"last": "2014-07-11T02:14:40.131Z"
|
||
},
|
||
"login": {
|
||
"first": "2014-06-10T21:55:08.968Z",
|
||
"count": 22,
|
||
"last": "2014-07-16T16:32:31.661Z"
|
||
},
|
||
"contacted_by_employer": {
|
||
"first": "2014-06-19T20:24:51.870Z",
|
||
"count": 1,
|
||
"last": "2014-06-19T20:24:51.870Z"
|
||
}
|
||
},
|
||
"slug": "nick",
|
||
"jobProfileNotes": "Nick used to be the **#1 Brawlwood player** on CodeCombat. He wrote most of the game engine, so that's totally cheating. Now other players have surpassed him by emulating his moves and improving his strategy. If you like the sixth Rocky movie, you might still want to hire this aging hero even in his fading senescence.",
|
||
"simulatedFor": 2363,
|
||
"simulatedBy": 103674,
|
||
"preferredLanguage": "en-US",
|
||
"anonymous": false,
|
||
"permissions": [
|
||
"admin"
|
||
],
|
||
"autocastDelay": 90019001,
|
||
"music": false,
|
||
"dateCreated": "2013-02-28T06:09:04.743Z"
|
||
},
|
||
|
||
'/db/user/512ef4805a67a8c507000001/level.sessions/employer': [
|
||
{
|
||
"_id": "53179b49b483edfcdb7ef13e",
|
||
"level": {
|
||
"original": "53173f76c269d400000543c2",
|
||
"majorVersion": 0
|
||
},
|
||
"code": {
|
||
},
|
||
"submitted": false,
|
||
"teamSpells": {
|
||
"ogres": [
|
||
"programmable-brawler/chooseAction",
|
||
"programmable-shaman/chooseAction",
|
||
"ogre-base/chooseAction"
|
||
],
|
||
"humans": [
|
||
"programmable-librarian/chooseAction",
|
||
"programmable-tharin/chooseAction",
|
||
"human-base/chooseAction"
|
||
]
|
||
},
|
||
"levelID": "dungeon-arena",
|
||
"levelName": "Dungeon Arena",
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 33,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "53336ee91506ed33756f73e5",
|
||
"level": {
|
||
"original": "533353722a61b7ca6832840c",
|
||
"majorVersion": 0
|
||
},
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"humans": [
|
||
"programmable-coin/chooseAction",
|
||
"tharin/chooseAction",
|
||
"wizard-purple/chooseAction"
|
||
]
|
||
},
|
||
"levelID": "gold-rush",
|
||
"levelName": "Resource gathering multiplayer",
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 0,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "52ae32cbef42c52f1300000d",
|
||
"level": {
|
||
"original": "52ae2460ef42c52f13000008",
|
||
"majorVersion": 0
|
||
},
|
||
"levelID": "gridmancer",
|
||
"levelName": "Gridmancer",
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"humans": [
|
||
"thoktar"
|
||
]
|
||
},
|
||
"submitted": false,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 302,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "5334901f0a0f9b286f57382c",
|
||
"level": {
|
||
"original": "533353722a61b7ca6832840c",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "humans",
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"common": [
|
||
"coin-generator-9000/chooseAction"
|
||
],
|
||
"humans": [
|
||
"tharin/chooseAction"
|
||
],
|
||
"ogres": [
|
||
"mak-fod/chooseAction"
|
||
]
|
||
},
|
||
"levelID": "gold-rush",
|
||
"levelName": "Gold Rush",
|
||
"totalScore": 39.23691444835561,
|
||
"submitted": true,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 1158,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "52dea9b77e486eeb97000001",
|
||
"level": {
|
||
"original": "52d97ecd32362bc86e004e87",
|
||
"majorVersion": 0
|
||
},
|
||
"levelID": "brawlwood",
|
||
"levelName": "Brawlwood",
|
||
"code": {
|
||
},
|
||
"totalScore": 24.138610165979667,
|
||
"teamSpells": {
|
||
"humans": [
|
||
"programmable-artillery/chooseAction",
|
||
"programmable-artillery/hear",
|
||
"programmable-soldier/chooseAction",
|
||
"programmable-soldier/hear",
|
||
"s-arrow-tower/chooseAction",
|
||
"programmable-archer/chooseAction",
|
||
"programmable-archer/hear",
|
||
"human-base/chooseAction",
|
||
"human-base/hear"
|
||
],
|
||
"ogres": [
|
||
"programmable-shaman/chooseAction",
|
||
"programmable-shaman/hear",
|
||
"n-beam-tower/chooseAction",
|
||
"programmable-thrower/chooseAction",
|
||
"programmable-thrower/hear",
|
||
"programmable-munchkin/chooseAction",
|
||
"programmable-munchkin/hear",
|
||
"ogre-base/chooseAction",
|
||
"ogre-base/hear"
|
||
]
|
||
},
|
||
"team": "humans",
|
||
"submitted": true,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 0,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "535701331bfa9bba14b5e03d",
|
||
"level": {
|
||
"original": "53558b5a9914f5a90d7ccddb",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "ogres",
|
||
"levelID": "greed",
|
||
"levelName": "Greed",
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"humans": [
|
||
"human-base/chooseAction"
|
||
],
|
||
"ogres": [
|
||
"ogre-base/chooseAction"
|
||
],
|
||
"common": [
|
||
"well/chooseAction"
|
||
]
|
||
},
|
||
"totalScore": 36.77589873873074,
|
||
"submitted": true,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 12893,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "5356fc2e1bfa9bba14b5e039",
|
||
"level": {
|
||
"original": "53558b5a9914f5a90d7ccddb",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "humans",
|
||
"levelID": "greed",
|
||
"levelName": "Greed",
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"humans": [
|
||
"human-base/chooseAction"
|
||
],
|
||
"ogres": [
|
||
"ogre-base/chooseAction"
|
||
],
|
||
"common": [
|
||
"well/chooseAction"
|
||
]
|
||
},
|
||
"totalScore": 31.538998178536794,
|
||
"submitted": true,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 15648,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "52fd5bf7e3c53130231726e1",
|
||
"level": {
|
||
"original": "52d97ecd32362bc86e004e87",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "ogres",
|
||
"levelID": "brawlwood",
|
||
"levelName": "Brawlwood",
|
||
"submitted": true,
|
||
"totalScore": 53.73511062513137,
|
||
"teamSpells": {
|
||
"humans": [
|
||
"programmable-artillery/chooseAction",
|
||
"programmable-artillery/hear",
|
||
"programmable-soldier/chooseAction",
|
||
"programmable-soldier/hear",
|
||
"s-arrow-tower/chooseAction",
|
||
"programmable-archer/chooseAction",
|
||
"programmable-archer/hear",
|
||
"human-base/chooseAction",
|
||
"human-base/hear"
|
||
],
|
||
"ogres": [
|
||
"programmable-shaman/chooseAction",
|
||
"programmable-shaman/hear",
|
||
"n-beam-tower/chooseAction",
|
||
"programmable-thrower/chooseAction",
|
||
"programmable-thrower/hear",
|
||
"programmable-munchkin/chooseAction",
|
||
"programmable-munchkin/hear",
|
||
"ogre-base/chooseAction",
|
||
"ogre-base/hear"
|
||
]
|
||
},
|
||
"code": {
|
||
},
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 178,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "5317ad4909098828ed071f4d",
|
||
"level": {
|
||
"original": "53173f76c269d400000543c2",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "humans",
|
||
"levelID": "dungeon-arena",
|
||
"levelName": "Dungeon Arena",
|
||
"submitted": true,
|
||
"totalScore": 38.19039674380126,
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"ogres": [
|
||
"programmable-brawler/chooseAction",
|
||
"programmable-shaman/chooseAction",
|
||
"ogre-base/chooseAction"
|
||
],
|
||
"humans": [
|
||
"programmable-librarian/chooseAction",
|
||
"programmable-tharin/chooseAction",
|
||
"human-base/chooseAction"
|
||
]
|
||
},
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 9753,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "53361c80948ad7a777a10d9c",
|
||
"level": {
|
||
"original": "533353722a61b7ca6832840c",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "ogres",
|
||
"levelID": "gold-rush",
|
||
"levelName": "Gold Rush",
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"common": [
|
||
"coin-generator-9000/chooseAction"
|
||
],
|
||
"humans": [
|
||
"tharin/chooseAction"
|
||
],
|
||
"ogres": [
|
||
"mak-fod/chooseAction"
|
||
]
|
||
},
|
||
"totalScore": 40.73558595296533,
|
||
"submitted": true,
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 1014,
|
||
"codeLanguage": "javascript"
|
||
},
|
||
{
|
||
"_id": "531920069f44be00001a7aef",
|
||
"level": {
|
||
"original": "53173f76c269d400000543c2",
|
||
"majorVersion": 0
|
||
},
|
||
"team": "ogres",
|
||
"levelID": "dungeon-arena",
|
||
"levelName": "Dungeon Arena",
|
||
"submitted": true,
|
||
"totalScore": 26.50666470188054,
|
||
"code": {
|
||
},
|
||
"teamSpells": {
|
||
"ogres": [
|
||
"programmable-brawler/chooseAction",
|
||
"programmable-shaman/chooseAction",
|
||
"ogre-base/chooseAction"
|
||
],
|
||
"humans": [
|
||
"programmable-librarian/chooseAction",
|
||
"programmable-tharin/chooseAction",
|
||
"human-base/chooseAction"
|
||
]
|
||
},
|
||
"submittedCodeLanguage": "javascript",
|
||
"playtime": 1786,
|
||
"codeLanguage": "javascript"
|
||
}
|
||
]
|
||
|
||
module.exports = ->
|
||
me.isAdmin = -> false
|
||
me.set('permissions', ['employer'])
|
||
v = new JobProfileView({}, 'joe')
|
||
for url, responseBody of responses
|
||
requests = jasmine.Ajax.requests.filter(url)
|
||
if not requests.length
|
||
console.error "could not find response for <#{url}>", responses
|
||
continue
|
||
request = requests[0]
|
||
request.response({status: 200, responseText: JSON.stringify(responseBody)})
|
||
# v.$el = v.$el.find('.main-content-area')
|
||
v
|