Public Gists by jeroenvandijk

Gravatar
Tue Nov 24 01:31:39 -0800 2009
1
2
3
# Run this file with the bacon gem: 'bacon bacon_nokogiri.rb'
require 'nokogiri'
 
Gravatar
Wed Nov 11 01:21:32 -0800 2009
1
2
3
### An example of a feature in Dutch with tables. All the table headers need to be translated.
Feature
  # Given the following persons
Gravatar
Wed Nov 04 05:51:14 -0800 2009
1
2
3
# Allowing step transformations to transform tupils
#
# The feature:
Gravatar
Tue Nov 03 05:57:03 -0800 2009
1
2
3
# Hack needed to be compatible with webrat
module Webrat
  class SeleniumSession
Gravatar
Sat Sep 05 02:31:20 -0700 2009
1
2
3
class AddAttachmentsDataToWrapper < ActiveRecord::Migration
  def self.up
    add_column :wrappers, :data_file_name, :string
Gravatar
Thu Jul 30 09:03:34 -0700 2009
1
2
3
class ResourceController < ApplicationController
  acts_as_resource
  
Gravatar
Tue Jul 28 02:07:58 -0700 2009
1
2
3
# TODO divide examples into groups
# one assertion at a time, so more intelligence to interpretation of comments
# TODO define state
Gravatar
Mon Apr 06 02:20:12 -0700 2009
1
2
3
#!/usr/bin/env ruby
#
# usage: script/server_restarter
Gravatar
Thu Mar 05 03:48:41 -0800 2009
1
2
3
#!/usr/bin/env ruby
#
# usage: script/server_restarter
Gravatar
Mon Mar 02 08:35:20 -0800 2009
1
2
3
# template.rb
in_root { run("rm public/index.html") }
 
Gravatar
Sun Feb 22 01:28:47 -0800 2009
1
2
3
# More info on http://www.jeevidee.nl/instant_rails_application
 
# template.rb
Gravatar
Fri Nov 21 08:10:53 -0800 2008
1
2
3
require 'autotest/redgreen'
  
module Autotest::Growl
Gravatar
Fri Nov 07 02:55:46 -0800 2008
1
2
3
# Helper for work experience fields, adopted from Advanced Rails recipes 13 and railscasts 73-75 from Ryan Bates.
def fields_for_work_experience(work_experience, &block)
unless work_experience.new_record?
Gravatar
Fri Nov 07 02:55:05 -0800 2008
1
2
3
def fields_for_work_experience(work_experience, &block)
prefix = work_experience.new_record? ? 'new' : 'existing'
# uses the fields_for helper with a block that gives an extra option to the form fields preventing hash and array param clashes (also for date_selects) which
Gravatar
Sat Nov 01 07:39:49 -0700 2008
1
2
3
 
# after $ mysql -u ''adminusername'' -p