Skip to content

Instantly share code, notes, and snippets.

View leehambley's full-sized avatar

Lee Hambley leehambley

View GitHub Profile
desc <<-DESC
Copy files to the currently deployed version. This is useful for updating \
files piecemeal, such as when you need to quickly deploy only a single \
file. Some files, such as updated templates, images, or stylesheets, \
might not require a full deploy, and especially in emergency situations \
it can be handy to just push the updates to production, quickly.
To use this task, specify the files and directories you want to copy as a \
comma-delimited list in the FILES environment variable. All directories \
will be processed recursively, with all files being pushed to the \
# Be sure to restart your server when you modify this file
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
class Address < ActiveRecord::Base
belongs_to :customer
validates_presence_of :line_1, :city, :postcode
validates_format_of :tag, :with => MVOR::Patterns.dashed_word, :allow_blank => true
belongs_to :addressable, :polymorphic => true
def expendable?
Validation Output: 1 Error
Line 16, Column 59: document type does not allow element "form" here; missing one of "object", "div", "blockquote", "center", "noframes", "fieldset", "applet", "map", "iframe", "noscript", "ins", "del" start-tag
<form action="two" method="get" accept-charset="utf-8">
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
# Author: Michael van Rooijen
# Description:
# This recipe is designed to work for people using Phusion Passenger,
# Git as your repository.
#
# The script (initially) does the following:
# - It first (after you run cap:deploy setup) will set up the capistrano environment on your remote machine
# - After that, it will sync your current database.yml file to the "shared" location on the remote machine
# - You are now basically ready to deploy.
# - Once you run "cap:deploy" it will start the deployment
# Single feature runners
# specify your feature e.g.
# cucumber -p sw feature/webrat/admin/myfeature:xx
# sw single feature webrat
sw: -r features/support/env.rb -r features/support/webrat.rb -r features/step_definitions
# ss single feature selenium
ss: -r features/support/env.rb -r features/support/selenium.rb -r features/step_definitions
require 'rubygems'
require 'test/unit'
class Agent
attr_accessor :list
def initialize (list=[])
self.list = list
end
# £1.54 discount on 3 or more Strawberries
grammar PricingRules
rule discount
amount / item
end
rule item
Feature: Registration
In order to track contributions
As a Site Owner
I want Users to be able to register
Scenario: Register With Valid Form Data
Given I am on the registration page
Then I should see a new user form
When I fill in the form correctly
And press the Register button
Feature: Registration
In order to track contributions
As a Site Owner
I want Users to be able to register
Background:
Given I am on the registration oage
Then I should see a new user form
When I fill in the form correctly