Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails for Zombies - Labs

I'm curious to know how the tutorial site "Rails for Zombies" did their labs. A user is required to answer a series of lab questions by typing ruby code into (what appears to be) a command line prompt to complete each lab. Upon submitting determines if they can proceed to the next lab question.

Peeking at the DOM through Firebug, it appears they're using the canvas tag- I'm assuming this is the command line, right? Also, on the Ruby side, how do they ensure that the code entered is what was required to answer the question? Or do they just have a test setup using RSpec/Cucumber?

Any help is much appreciated. :)

like image 204
Tom Doe Avatar asked Nov 30 '22 09:11

Tom Doe


1 Answers

For the in browser code editor we're using Mozilla Bespin, now known as Skywriter. For the evaluation on the server side we are using a sandbox to run the Ruby code, as Andy Lindeman stated. In most cases as you assumed, we're using tests to ensure the code does what you're supposed to do.

It's definitely not a simple piece of code. If you're interested in using our engine to create a tutorial of sorts, please do get in touch. Gregg at EnvyLabs.

like image 196
Gregg Pollack Avatar answered Dec 05 '22 03:12

Gregg Pollack