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
configuration do | |
application 'test-application' | |
path "/srv/app/test/#{application}" | |
repository 'git@example.org:project.git' | |
tunnel true | |
end | |
target :staging do | |
branch 'staging' | |
app 'user@staging.example.org' |
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
validate_presence_of :name, :if => :should_validate_name? | |
def should_validate_name? | |
parent_object.has_certain_properties? | |
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
validate :custom_validation_method | |
def custom_validation_method | |
if parent_object.has_stuff? && name.blank? | |
errors.add :name, 'should not be blank when parent object has stuff' | |
end | |
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
desc "Migrate all of the databases" | |
task :migrate_all => :environment do | |
Customer.connect_each do |customer| | |
puts "Migrating #{customer.environment}" | |
ActiveRecord::Migrator.migrate "db/migrate/" | |
end | |
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
config/database.yml | |
db/schema.rb | |
db/*.sqlite3 | |
doc/app | |
doc/diagrams | |
log/*.log | |
tmp/* |
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
#!/usr/bin/ruby -w | |
=begin | |
/*************************************************************************** | |
* Copyright (C) 2008, Paul Lutus * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * |
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
http://localhost:4567/b71e6394-cb6a-4bf3-859f-d8b11fc86764/api |
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
begin | |
require 'hanna/rdoctask' | |
rescue LoadError | |
require 'rake/rdoctask' | |
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
function getElementXPath(elt) | |
{ | |
var path = ""; | |
for (; elt && elt.nodeType == 1; elt = elt.parentNode) | |
{ | |
idx = getElementIdx(elt); | |
xname = elt.tagName; | |
if (idx > 1) xname += "[" + idx + "]"; | |
path = "/" + xname + path; | |
} |
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
function getElementXPath(elt) | |
{ | |
var path = ""; | |
for (; elt && elt.nodeType == 1; elt = elt.parentNode) | |
{ | |
idx = getElementIdx(elt); | |
xname = elt.tagName; | |
if (idx > 1) xname += "[" + idx + "]"; | |
path = "/" + xname + path; | |
} |