####These are the steps to installing and setting up Steven Spiel
Steven Spiel is compatible with:
| | | | | | | | --- | --- | --- | --- | --- | --- | --- | | Ruby | Rails | TDD | JS | CSS3 | HTML5 |
class Vehicle | |
def initialize(args) | |
@color = args[:color] | |
@wheels = 4 | |
end | |
def drive | |
@status = :driving | |
end | |
$(document).ready(function () { | |
$('#submit').click(function(){ | |
$.post("/rolls", function(res){ | |
$('#die').html("<img src='" + res.img + "' alt='dice'></img> "); | |
}); | |
}); | |
}); |
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
function Animal(name, legs){ | |
this.name = name; | |
this.legs = legs; | |
} | |
Animal.prototype.identify = function(){ | |
"I am a " + this.name + " with " + this.legs + " legs"; |
$(function(){ | |
$('#submit').click(function(e){ | |
e.preventDefault(); | |
var errors = []; | |
if(!$('#email').val().match(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i) ){ | |
errors.push("<li>Must be a valid email address </li>"); | |
} | |
if(!$('#password').val().match(/[0-9]+?/)){ | |
errors.push("<li>Password must have at least one numeric character (0-9)</li>"); | |
} |
#File found in ruby/gems/(ruby version)/gems/librarian-chef-0.0.2/lib/librarian/chef/source/site.rb | |
require 'fileutils' | |
require 'pathname' | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
require 'digest' | |
require 'zlib' | |
require 'securerandom' |
var Node = Node || { | |
ELEMENT_NODE: 1, | |
ATTRIBUTE_NODE: 2, | |
TEXT_NODE: 3 | |
}; |
# Override the default confirm dialog by rails | |
$.rails.allowAction = (link) -> | |
if link.data('confirm') | |
$.rails.showConfirmationDialog(link) | |
false | |
else | |
true | |
# User click confirm button | |
$.rails.confirmed = (link) -> |