This document gives examples using RSpec, but the concepts should apply to any testing framework.
In test, we recommend turning off delivery. You can do this in a spec helper, or similar. All calls to #deliver
will return true.
require 'apostle'
This document gives examples using RSpec, but the concepts should apply to any testing framework.
In test, we recommend turning off delivery. You can do this in a spec helper, or similar. All calls to #deliver
will return true.
require 'apostle'
* Must NOT use class="required" validation | |
* Must use Javascript objects for validation | |
var schema = { | |
options : { | |
'bubble' : true, // Bubble validation checks to all elements, if false will stop on fail | |
'blur' : false, // Will not call the validate method on the inputs | |
'auto' : false, // Will not attempt to apply to all forms, just ID matched forms | |
'decorator' : 'inline' // Defaults to supplied decorator, but a decorator can be supplied |
# Checks that the precompile list contains this file or raises an error, in dev only | |
# Note: You will need to move config.assets.precompile to application.rb from production.rb | |
def javascript_include_tag *sources | |
sources.each do |source| | |
raise "Hey, #{source} is not in the precompile list. This will fall apart in production." unless Rails.application.config.assets.precompile.any? do |matcher| | |
if matcher.is_a? Proc | |
matcher.call(source) | |
elsif matcher.is_a? Regexp | |
matcher.match(source) | |
else |
# install git | |
sudo aptitude -y install curl git git-core | |
# get the vmconfig repo | |
git clone git@github.com:learnable/vmconfig.git | |
cd vmconfig | |
# start the automated script | |
./learnable-development-vm.sh |
class App.ProjectsController extends App.ApplicationController | |
@scope 'all' | |
@show: (a,b,c) => | |
console.log "SHOWING" | |
# How do I get my model. Is this just completely wrong? | |
def index | |
filters = {} | |
filters[:categories_filter] = params[:categories].split(',') unless params[:categories].blank? | |
filters[:questions_filter] = params[:questions].split(',') unless params[:questions].blank? | |
@questions = QuestionFilter.new(filters).questions | |
end |
require 'formula' | |
class Cgminer < Formula | |
homepage 'https://github.com/ckolivas/cgminer' | |
url 'https://github.com/ckolivas/cgminer/archive/v2.11.4.zip' | |
head 'https://github.com/ckolivas/cgminer.git', :using => :git | |
md5 'd41d210b03ee16c9ad4cfb439916b30a341dc9b6' | |
depends_on 'autoconf' => :build | |
depends_on 'automake' => :build |
{ | |
"title": "Talk Getting Started in the Industry with the Experts", | |
"description": "<p> Welcome to Learnable - SitePoint's online learning site and the new home of Talk with the Experts.<p><br><br><p>Next in our free Talk with the Experts series we're talking about <b>getting started in the industry</b> with SitePoint devs <bold>Jude Aakjaer and Ben Axnick</bold> (who came in through our graduate intern program). </p><p>Session time: <b>2pm PDT on Wed 1 May</b> <br> <a href='http://www.timeanddate.com/worldclock/fixedtime.html?msg=Talk+Getting+Started+in+the+Industry+with+the+Experts&iso=20130502T07&p1=152&ah=1'>Find out what time it will be at your place here</a></p><br><p>Access to the room will open 15 minutes prior to kick-off.</p>", | |
"hideLogin": false, | |
"redirectUrl": null, | |
"editor": true, | |
"sessions": { | |
"primary": { | |
"date": "This Week: Thursday 18th", | |
"title": "WordPress with Jeremy Ferguson", |