Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkertkoppes committed Feb 6, 2015
2 parents 3867e50 + 21c4c7f commit e949bd3
Show file tree
Hide file tree
Showing 179 changed files with 17,429 additions and 2,030 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -35,3 +35,5 @@ src/components/*/*
!src/components/requirejs/require.js

!src/components/signature-pad/jquery.signaturepad*.js

!src/components/material-design-icons/sprites
112 changes: 90 additions & 22 deletions Gruntfile.js
Expand Up @@ -31,28 +31,28 @@ module.exports = function(grunt) {

"phonegap": {
config: {
root: "src",
config: "src/config.xml",
html: "fgindex.html",
name: function(){
var pkg = grunt.file.readJSON('package.json');
return pkg.name;
},
debuggable: true,
releases: 'releases',
platforms: ['ios', 'android'],
plugins: [
'org.apache.cordova.file'
],
verbose: true,
releaseName: function(){
var pkg = grunt.file.readJSON('package.json');
return(pkg.name + '-' + pkg.version);
},
remote: {
username: pgbuildconfig.username,
password: pgbuildconfig.password,
platforms: ['ios', 'android']
root: "src",
config: "src/config.xml",
html: "fgindex.html",
name: function(){
var pkg = grunt.file.readJSON('package.json');
return pkg.name;
},
debuggable: true,
releases: 'releases',
platforms: ['ios', 'android','wp8'],
plugins: [
'org.apache.cordova.file'
],
verbose: true,
releaseName: function(){
var pkg = grunt.file.readJSON('package.json');
return(pkg.name + '-' + pkg.version);
},
remote: {
username: pgbuildconfig.username,
password: pgbuildconfig.password,
platforms: ['ios', 'android','wp8']
}
}
},
Expand Down Expand Up @@ -105,6 +105,16 @@ module.exports = function(grunt) {
src: 'challenges/html/*.html',
dest: 'challenges/pdf/'
}
},

jsChallenge: {
options: {

},
files: {
src: 'challenges/xml/*.xml',
dest: 'challenges/js/'
}
}
});

Expand All @@ -117,8 +127,66 @@ module.exports = function(grunt) {
grunt.registerTask('phonegap', ['phonegap:login', 'phonegap:build', 'phonegap:logout']);
grunt.registerTask('phonegap:ios', ['phonegap:login', 'phonegap:build:ios', 'phonegap:logout']);
grunt.registerTask('phonegap:android', ['phonegap:login', 'phonegap:build:android', 'phonegap:logout']);
grunt.registerTask('phonegap:wp8', ['phonegap:login', 'phonegap:build:wp8', 'phonegap:logout']);
grunt.registerTask('html', ['saxon']);
grunt.registerTask('js', ['jsChallenge']);
grunt.registerTask('pdf', ['saxon','http-server', 'phantomJSScreenShot']);
grunt.registerTask('challenge', ['js', 'pdf']); //html is generated with pdf

grunt.registerMultiTask('jsChallenge', function() {
var options = this.options();
var npath = require('path');
var nfs = require('fs');
var Q = require('q');
var done = this.async();
var exec = require('child_process').exec;

function process(filepath,dest) {
return Q.promise(function(resolve,reject) {
var base = npath.basename(filepath, '.html');

var cmd = [
'node',
'"tools/buildchallenge.js"',
'"' + filepath + '"',
'>',
'"' + dest + '"'
].join(' ');

// console.log(cmd);
// resolve()
exec(cmd, function(error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
reject(error);
}
resolve();
});
});
}

this.files.forEach(function(f) {
f.src.filter(function(filepath) {
// Warn on and remove invalid source files (if nonull was set).
if (!grunt.file.exists(filepath)) {
grunt.log.warn('Source file "' + filepath + '" not found.');
return false;
} else {
return true;
}
}).map(function(filepath) {
return function() {
var base = npath.basename(filepath, '.xml');
var dest = npath.resolve(f.dest, base) + '.js';
// console.log(filepath);
// console.log(dest);
return process(filepath,dest);
};
}).reduce(function(pending,promise) {
return pending.then(promise);
},Q()).then(done,done);
});
});

grunt.registerMultiTask('saxon', function() {
var options = this.options();
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Expand Up @@ -26,6 +26,7 @@
"angular-mocks": "~1.2.20",
"angular-bootstrap": "~0.11.0",
"angular-sanitize": "~1.3.3",
"angular-touch": "~1.3.4"
"angular-touch": "~1.3.4",
"material-design-icons": "~1.0.1"
}
}
66 changes: 65 additions & 1 deletion challenges/js/2012.js
Expand Up @@ -567,5 +567,69 @@
return new Error("When Big Dial is on 9, Small Dial must be on 0.")
}
}]
}]
}],
"strings": {
"yes": "Yes",
"no": "No",
"flexibility-name": "Flexibility",
"flexibility-desc": "Robot gets yellow loops to Base.",
"yellowloops-desc": "Yellow Loops in Base",
"medicine-name": "Medicine",
"medicine-desc": "The bottles are arranged randomly before the start of each match (See Field Setup). Robot gets the green medicine bottle to Base without disturbing orange ones.",
"meds-desc": "Green in Base, Orange Not Moved",
"animals-name": "Service Animals",
"animals-desc": "Robot applies force to gray disc, causing dog with phone to move toward Base.",
"dog-desc": "Dog in Base",
"woodwork-name": "Wood Working",
"woodwork-desc": "Robot gets the chair to Base. You fix the chair by hand. Robot brings the chair to the table.",
"chairbase-desc": "Chair Repaired and in Base",
"chairtable-desc": "Chair Repaired and under Table",
"chairposition-error": "Chair cannot be in base AND under the table.",
"videocall-name": "Video Call",
"videocall-desc": "Robot gets the flags to rise.",
"flags-desc": "Flags Fully Upright",
"quilts-name": "Quilts",
"quilts-desc": "Robot adds squares to quilts.",
"quiltsblue-desc": "Blue Squares Touch Target",
"quiltsorange-desc": "Orange Squares Touch Target",
"similarity-name": "Similarity Recognition and Cooperation",
"similarity-desc": "Robot aligns your pointer with the other team’s pointer.",
"coop-desc": "Dials on Both Fields are Parallel",
"ballgame-name": "Ball Game",
"ballgame-desc": "Both teams get points for the total number of balls on the racks at the end of the match, but only one team gets points when their color is at the center.",
"ballcount-desc": "Balls on Rack",
"ballmiddle-desc": "Middle Ball",
"yours": "Yours",
"theirs": "Theirs",
"neither": "Neither",
"noballs-error": "When no balls are left, the middle ball must be 'Neither'.",
"someballs-error": "When some, but not all, balls are left, the middle ball cannot be 'Neither'.",
"allballs-error": "When all balls are left, the middle ball must be 'Neither'.",
"gardening-name": "Gardening",
"gardening-desc": "Robot adds to the garden.",
"plants-desc": "Base of Plants Touch Target",
"stove-name": "Stove",
"stove-desc": "Robot gets all burners to show black.",
"burners-desc": "All Burners are Black",
"bowling-name": "Bowling",
"bowling-desc": "Robot sends balls to knock pins down. If the pins are not all down after the first try using a yellow ball, the referee returns that ball to Base for a second try (this can only happen once per match).",
"pins-desc": "Pins Hit",
"transitions-name": "Transitions",
"transitions-desc": "Robot gets onto the center platform and is there when the match ends.",
"platformslanted-desc": "Robot Only Touches Slanted Platform",
"platformbalanced-desc": "Robot Only Touches Balanced Platform",
"platformclear-desc": "Platform Only Touches Robot and Mat",
"platformstate-error": "Platform cannot be slanted AND balanced.",
"exercise-name": "Strength Exercise",
"exercise-desc": "Robot lifts the west bar to make the weight rise.",
"strength-desc": "Weight raised",
"low": "Low",
"high": "High",
"none": "Not Done",
"training-name": "Cardio Training",
"training-desc": "Robot turns the pinwheel 90° at a time.",
"dialbig-desc": "Dial Big Step",
"dialsmall-desc": "Dial Small Step",
"dialcombination-error": "When Big Dial is on 9, Small Dial must be on 0."
}
}
80 changes: 79 additions & 1 deletion challenges/js/2014.js
Expand Up @@ -828,5 +828,83 @@
return -80
}
}]
}]
}],
"strings": {
"yes": "Yes",
"no": "No",
"engineering-name": "Reverse Engineering",
"engineering-desc": "Todo: Kenny",
"basket-desc": "Basket in Base",
"identical-desc": "Your model is in Base and is identical",
"doors-name": "Opening Doors",
"doors-desc": "Todo: Kenny",
"dooropen-desc": "Door opened by pushing handle down",
"projectbased-name": "Project-Based Learning",
"projectbased-desc": "Todo: Kenny",
"loops-desc": "Loops on scale",
"apprentice-name": "Apprenticeship",
"apprentice-desc": "Todo: Kenny",
"modelshown-desc": "Model presented to Referee",
"touchingcicrle-desc": "Touching circle, not in Base, people Bound",
"apprentice-error": "Model must have been presented for it to be touching the circle",
"search-name": "Search Engine",
"search-desc": "Todo: Kenny",
"wheelspin-desc": "Only Slider caused wheel to spin 1+ times",
"searchloop-desc": "Only correct loop removed",
"sports-name": "Sports",
"sports-desc": "Todo: Kenny",
"ballshot-desc": "Ball shot from east/north of \"Shot Lines\" toward Net",
"ballscored-desc": "Ball touching mat in Net at end of match",
"sports-error": "Ball must have been shot for it to be touching the net",
"competition-name": "Robotics Competition",
"competition-desc": "Todo: Kenny",
"roboticsinsert-desc": "Only Robotics Insert installed",
"competitionloop-desc": "Loop no longer touching model",
"senses-name": "Using the Right Senses",
"senses-desc": "Todo: Kenny",
"sensesloop-desc": "Loop no longer touching model",
"remotecomm-name": "Remote Communication / Learning",
"remotecomm-desc": "Todo: Kenny",
"pullslider-desc": "Referee saw robot pull slider west",
"outsidebox-name": "Thinking Outside the Box",
"outsidebox-desc": "Todo: Kenny",
"bulbup-desc": "Idea model not touching Box, Box never in Base, Bulb faces UP",
"bulbdown-desc": "Idea model not touching Box, Box never in Base, Bulb faces DOWN",
"outsidebox-error": "Bulb cannot face UP and DOWN at the same time",
"community-name": "Community Learning",
"community-desc": "Todo: Kenny",
"communityloop-desc": "Loop no longer touching model",
"cloud-name": "Cloud Access",
"cloud-desc": "Todo: Kenny",
"sdcardup-desc": "SD card is UP due to inserted \"key\"",
"engagement-name": "Engagement",
"engagement-desc": "Todo: Kenny",
"yellow-moved-desc": "Yellow section moved south",
"dial-major-color-desc": "Dial major marker color",
"ticks-past-major-desc": "Ticks past major marker",
"na": "N/A",
"red-10": "Red 10%",
"orange-16": "Orange 16%",
"green-22": "Green 22%",
"blue-28": "Blue 28%",
"red-34": "Red 34%",
"blue-40": "Blue 40%",
"green-46": "Green 46%",
"orange-52": "Orange 52%",
"red-58": "Red 58%",
"ticks-0": "0",
"ticks-1": "1",
"ticks-2": "2",
"ticks-3": "3",
"ticks-4": "4",
"ticks-5": "5",
"engagement-na-error": "Either none or both questions should be answered with \"N/A\"",
"engagement-max-error": "Dial cannot turn that far",
"changing-conditions-name": "Adapting to changing conditions",
"changing-conditions-desc": "Todo: Kenny",
"model-rotated-desc": "Model rotated 90-ish degrees CCW",
"penalties-name": "Penalties",
"penalties-desc": "Todo: Kenny",
"penalties-objective-desc": "Robot, Sprawl, Junk penalties"
}
}

0 comments on commit e949bd3

Please sign in to comment.