This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'test/unit' | |
class Agent | |
attr_accessor :list | |
def initialize (list=[]) | |
self.list = list | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# £1.54 discount on 3 or more Strawberries | |
grammar PricingRules | |
rule discount | |
amount / item | |
end | |
rule item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |