From 2acf8b727c020e63bd6fda9c24e3c564a0013d54 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Fri, 14 Aug 2015 12:31:58 +0530 Subject: [PATCH 01/14] Bonfire: Where art thou test case update Added further test cases to check for adhering to the instructions in bonfire properly. --- seed/challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 6f1cf7b9d4..d027bfa3ae 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -582,7 +582,8 @@ ], "tests": [ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", - "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');" + "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", + "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ], "MDNlinks": [ "Global Object", From 6f7495e6cbbbfb432a6062bd48074fad70a9ea6d Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 17 Aug 2015 18:27:33 +0530 Subject: [PATCH 02/14] Added additional test case --- seed/challenges/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index d027bfa3ae..845b55a1c8 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -583,6 +583,7 @@ "tests": [ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", + "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ], "MDNlinks": [ From b9cfc09eb9d65e1c48eae304e33df2161946700b Mon Sep 17 00:00:00 2001 From: AEA2002 Date: Tue, 25 Aug 2015 18:34:31 -0400 Subject: [PATCH 03/14] Minor edit in Find the Nth Character In "Use Bracket Notation to Find the Nth Character in a String" section removed "last" from 'The third last letter of lastName should be..." --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 3465c9dcb1..aa07b4b4b6 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -189,7 +189,7 @@ "Try looking at the secondLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert(thirdLetterOfLastName === 'v', 'The third last letter of lastName should be a \"v\"');" + "assert(thirdLetterOfLastName === 'v', 'The third letter of lastName should be a \"v\"');" ], "challengeSeed": [ "var firstName = \"Ada\";", From eec0d073f19e03d3bee2d4f723c4c383b5c664f1 Mon Sep 17 00:00:00 2001 From: waseem Date: Sat, 29 Aug 2015 04:08:48 +0800 Subject: [PATCH 04/14] Fixed typo for issue 1979 --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index e3e7d573c2..7e14be7b7c 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -718,7 +718,7 @@ " \"enemies\": [\"Water\", \"Dogs\"]", "};", "", - "Objects are useful for storing data in a structured way, and can represents real world objects, like a cats.", + "Objects are useful for storing data in a structured way, and can represents real world objects, like a cat.", "Let's try to make an Object that represents a dog called myDog which contains the properties 'name' (String), 'legs' (Number), 'tails' (Number) and 'friends' (Array)!" ], "tests":[ From beab6a44727c6f97f3ec7f5927b0be2c714638c0 Mon Sep 17 00:00:00 2001 From: bugron Date: Sat, 29 Aug 2015 02:35:06 +0400 Subject: [PATCH 05/14] fixes 'editor.getValue(...).match(...) is null' --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index e3e7d573c2..1a5fb14c10 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -515,7 +515,7 @@ ], "tests":[ "assert((function(){if(typeof(myArray) != 'undefined' && myArray[0] == 3 && myArray[1] == 2 && myArray[2] == 3){return true;}else{return false;}})(), 'myArray should now be [3,2,3]');", - "assert((function(){if(editor.getValue().match(/[0]/g).length >= 1 && editor.getValue().match(/=/g).length >= 2){return true;}else{return false;}})(), 'You should be using indexes to modify the values in myArray');" + "assert((function(){if(editor.getValue().match(/myArray\\[0\\]\\s?=\\s?/g)){return true;}else{return false;}})(), 'You should be using correct index to modify the value in myArray');" ], "challengeSeed":[ "var ourArray = [1,2,3];", From 702dbeceabcfd6601f00fbd186dd80bf5c0162ec Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sat, 29 Aug 2015 09:30:47 -0700 Subject: [PATCH 06/14] change Run code button to Run tests Changes run button copy closes #2846 --- server/views/coursewares/showBonfire.jade | 2 +- server/views/coursewares/showHTML.jade | 2 +- server/views/coursewares/showJS.jade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/views/coursewares/showBonfire.jade b/server/views/coursewares/showBonfire.jade index 8722fe9ff2..cecfa45d30 100644 --- a/server/views/coursewares/showBonfire.jade +++ b/server/views/coursewares/showBonfire.jade @@ -84,7 +84,7 @@ block content | Username not found label.negative-10.btn.btn-primary.btn-block#submitButton i.fa.fa-play - |   Run code (ctrl + enter) + |   Run tests (ctrl + enter) .button-spacer .btn-group.input-group.btn-group-justified label.btn.btn-success#trigger-reset-modal diff --git a/server/views/coursewares/showHTML.jade b/server/views/coursewares/showHTML.jade index a382745dbe..d8f5c48044 100644 --- a/server/views/coursewares/showHTML.jade +++ b/server/views/coursewares/showHTML.jade @@ -32,7 +32,7 @@ block content .negative-bottom-margin-30 label.negative-10.btn.btn-primary.btn-block#submitButton i.fa.fa-play - |   Run code (ctrl + enter) + |   Run tests (ctrl + enter) br if (user) .button-spacer diff --git a/server/views/coursewares/showJS.jade b/server/views/coursewares/showJS.jade index 758e00a8a2..49ffedeaf5 100644 --- a/server/views/coursewares/showJS.jade +++ b/server/views/coursewares/showJS.jade @@ -37,7 +37,7 @@ block content // extra field to distract password tools like lastpass from injecting css into our username field label.negative-10.btn.btn-primary.btn-block#submitButton i.fa.fa-play - |   Run code (ctrl + enter) + |   Run tests (ctrl + enter) .button-spacer .btn-group.input-group.btn-group-justified label.btn.btn-success#trigger-reset-modal From 02ffd553483aa1f6c4460c154af91dc28ecd7203 Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Sun, 30 Aug 2015 01:25:30 +0800 Subject: [PATCH 07/14] expanded description of 'Where art thou' bonfire --- seed/challenges/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 539ce1d349..1660af873f 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -570,6 +570,7 @@ "difficulty": "1.55", "description": [ "Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property values (second argument).", + "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the first and the third objects from the array (the first argument), because they contain the property that was passed on as the second argument.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ From a06ad154356d7019a8916ca846a442da5c08f9a5 Mon Sep 17 00:00:00 2001 From: Ben McMahon Date: Sat, 29 Aug 2015 22:44:19 +0100 Subject: [PATCH 08/14] Small clarification in a bonfire desc --- seed/challenges/basic-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 1660af873f..6ad445009b 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -570,7 +570,7 @@ "difficulty": "1.55", "description": [ "Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property values (second argument).", - "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the first and the third objects from the array (the first argument), because they contain the property that was passed on as the second argument.", + "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ From 4361d6edee3374a920cfab02f7502cda7870fcbc Mon Sep 17 00:00:00 2001 From: Ben McMahon Date: Sat, 29 Aug 2015 23:26:49 +0100 Subject: [PATCH 09/14] Another Small Calrification to bonfire desc --- seed/challenges/basic-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index fea63df28f..cbde7cb108 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -569,7 +569,7 @@ "title": "Where art thou", "difficulty": "1.55", "description": [ - "Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property values (second argument).", + "Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property and value pair (second argument).", "For example, if the first argument is [{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], and the second argument is { last: 'Capulet' }, then you must return the the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], From 20462582f4f699d22cd66599d839468f34a99d28 Mon Sep 17 00:00:00 2001 From: Natac13 Date: Sat, 29 Aug 2015 18:30:16 -0400 Subject: [PATCH 10/14] fixed minor typo where there was a 's' left when the sentence was changed. Issue #2853 --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index fb2d2736da..731ac60ec1 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -718,7 +718,7 @@ " \"enemies\": [\"Water\", \"Dogs\"]", "};", "", - "Objects are useful for storing data in a structured way, and can represents real world objects, like a cat.", + "Objects are useful for storing data in a structured way, and can represent real world objects, like a cat.", "Let's try to make an Object that represents a dog called myDog which contains the properties 'name' (String), 'legs' (Number), 'tails' (Number) and 'friends' (Array)!" ], "tests":[ From 1dd3246f871237fc0333c74b1945a05f57445e08 Mon Sep 17 00:00:00 2001 From: Ben McMahon Date: Sat, 29 Aug 2015 23:39:01 +0100 Subject: [PATCH 11/14] fixed loopback-boot to last safe version for our codebase @berkeleytrue this should temp fix it until loopback etc can be safely bumped up to a newer version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d3f319d570..d35a1c4cf9 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "less-middleware": "~2.0.1", "lodash": "^3.9.3", "loopback": "https://github.com/FreeCodeCamp/loopback.git#fix/no-password", - "loopback-boot": "^2.8.0", + "loopback-boot": "2.8.2", "loopback-component-passport": "https://github.com/FreeCodeCamp/loopback-component-passport.git#feature/flashfailure", "loopback-connector-mongodb": "^1.10.0", "lusca": "~1.0.2", From 28b63c824edc24361927cdcf1107b1b287e315bd Mon Sep 17 00:00:00 2001 From: Natac13 Date: Sat, 29 Aug 2015 18:57:52 -0400 Subject: [PATCH 12/14] fixed the typo of double 'your' words in Delete jQuery Functions. issue #2832 --- seed/challenges/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index 9144407289..062df484ce 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -213,7 +213,7 @@ "assert(!editor.match(/e\"\\);/g) && !editor.match(/t\"\\);/g), 'Delete all three of your jQuery functions from your document ready function.')", "assert(editor.match(/