From 3f6ee4424863070e42b8a8dc71c5b1f3efa1702b Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Sun, 25 Jan 2015 21:16:44 -0800 Subject: [PATCH] add the first new bonfire and resequence bonfire form slightly --- seed_data/bonfires.json | 71 +++++++++++++++++++++++++++++++++++- views/bonfire/generator.jade | 8 ++-- 2 files changed, 74 insertions(+), 5 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 42778c1e5e..6b04e83164 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -78,6 +78,75 @@ "challengeSeed": "function telephoneCheck(str) {\n // Good luck!\n return true;\n}\n\n", "challengeEntryPoint": "telephoneCheck(\"555-555-5555\");", "bonfireNumber": 2 - } + }, + { + "name": "Reverse a String", + "tests": [ + "expect(reverseString('hello')).to.be.a('String');", + "expect(reverseString('hello')).to.equal('olleh');", + "expect(reverseString('Howdy')).to.equal('ydwoH');", + "expect(reverseString('Greetings from Earth')).to.equal('htraE morf sgniteerG');" + ], + "difficulty": "1", + "description": [ + "Reverse the provided string. ", + "You may need to turn the string into an array before you can reverse it.", + "Your result must be a string." + ], + "challengeEntryPoint": "reverseString('hello');", + "challengeSeed": "function reverseString(str) {\n return str;\r\n}", + "bonfireNumber": 0, + "_id": "202eed8fc186c8434cb6d618" + }, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ] diff --git a/views/bonfire/generator.jade b/views/bonfire/generator.jade index bc150870a1..861b8ffee9 100644 --- a/views/bonfire/generator.jade +++ b/views/bonfire/generator.jade @@ -28,10 +28,6 @@ block content label.col-sm-2.control-label.wrappable(for='description') description: .col-sm-10 textarea#description.form-control(name="description", placeholder="Separate sentences by exactly one space only. Do not add in line breaks.") - .form-group - label.col-sm-2.control-label.wrappable(for='tests') tests: - .col-sm-10 - textarea#tests.form-control(name="tests", rows=5, placeholder="Separate tests by a newline.") .form-group label.col-sm-2.control-label.wrappable(for='challengeSeed') challengeSeed: .col-sm-10 @@ -40,6 +36,10 @@ block content label.col-sm-2.control-label.wrappable(for='challengeEntryPoint') challenge entrypoint: .col-sm-10 textarea#name.form-control(name="challengeEntryPoint", rows=1, type='text', placeholder="palindrome(\"eye\");") + .form-group + label.col-sm-2.control-label.wrappable(for='tests') tests: + .col-sm-10 + textarea#tests.form-control(name="tests", rows=5, placeholder="Separate tests by a newline.") .form-group .col-sm-offset-2.col-sm-10 input.btn.btn-default(type='submit', value="submit")