This file contains hidden or 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
DEBUG: Executing ln -nfs /data/my_trms_com/shared/config/keep.database.yml /data/my_trms_com/releases/20090903185551/config/database.yml | |
DEBUG: ---- Begin output of ln -nfs /data/my_trms_com/shared/config/keep.database.yml /data/my_trms_com/releases/20090903185551/config/database.yml ---- | |
DEBUG: STDOUT: | |
DEBUG: STDERR: | |
DEBUG: ---- End output of ln -nfs /data/my_trms_com/shared/config/keep.database.yml /data/my_trms_com/releases/20090903185551/config/database.yml ---- | |
DEBUG: Ran ln -nfs /data/my_trms_com/shared/config/keep.database.yml /data/my_trms_com/releases/20090903185551/config/database.yml returned 0 | |
DEBUG: Executing ln -nfs /data/my_trms_com/shared/config/database.yml /data/my_trms_com/releases/20090903185551/config/database.yml | |
DEBUG: ---- Begin output of ln -nfs /data/my_trms_com/shared/config/database.yml /data/my_trms_com/releases/20090903185551/config/database.yml ---- | |
DEBUG: STDOUT: |
This file contains hidden or 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
# Small bug in factory_girl running under rails 3 beta. | |
# Given a model: | |
class Thing < ActiveRecord::Base | |
# has a 'name' attribute | |
end | |
# These factory definitions work great. | |
Factory.define :thing do |thing| | |
thing.sequence(:name) { |n| "user#{n}" } |
This file contains hidden or 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
I'll throw a +1 in this as well. Here's the somewhat convoluted situation we have: | |
Anyone can send us emails at [email protected], and ZD tickets are created from that email. This works great. | |
We wrote a SSO app that takes advantage of ZD's remote authentication and API features. Our customers can sign up and | |
log into our site, and check the status of their tickets that were created from our site, or from emails they sent in. | |
This also works great. | |
But... I've seen several instances of customers signing up to our SSO app using one email address ([email protected]), and | |
then sending in email tickets from a different email address ([email protected]). From ZD's perspective, these are |
This file contains hidden or 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
# HTML5 style data-* attributes in haml | |
def test_html5_data_attributes | |
assert_equal("<div data-author_id='123' data-biz='baz' data-foo='bar'></div>\n", | |
render("%div{:data => {:author_id => 123, :foo => 'bar', :biz => 'baz'}}")) | |
assert_equal("<div data-one_plus_one='2'></div>\n", | |
render("%div{:data => {:one_plus_one => 1+1}}")) | |
assert_equal("<div data-foo='Here's a \"quoteful\" string.'></div>\n", | |
render(%{%div{:data => {:foo => %{Here's a "quoteful" string.}}}})) |
This file contains hidden or 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
# File: test_helper.rb | |
class ActiveSupport::TestCase | |
... | |
end | |
### Stub out post-processing on each class that uses paperclip | |
### (Uses an application configuration to turn on the slow processing again, if desired.) | |
if APP_CONFIG[:override_paperclip_processing] | |
[Canvas, Message, PictureAsset, User].each do |klass| |
This file contains hidden or 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
# | |
# Cookbook Name:: delayed_job | |
# Recipe:: default | |
# | |
if ['solo', 'app', 'app_master'].include?(node[:instance_role]) | |
run_for_app("your_app_name_here") do |app_name, data| | |
ey_cloud_report "delayed_job" do |
This file contains hidden or 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
# | |
# Cookbook Name:: nodejs | |
# Recipe:: default | |
# | |
if ['solo'].include?(node[:instance_role]) | |
nodejs_file = "node-v0.1.101.tar.gz" | |
nodejs_dir = "node-v0.1.101" | |
nodejs_url = "http://nodejs.org/dist/#{nodejs_file}" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<script src="js/jquery.js" type="text/javascript"></script> | |
<script src="js/underscore.js" type="text/javascript"></script> | |
<script src="js/backbone.js" type="text/javascript"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function(){ | |
This file contains hidden or 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
['net/http', 'json'].each {|lib| require lib}; def payout bet; 13 == JSON.parse(Net::HTTP.get 'roulette.engineyard.com', '/')['winning_number'].to_i ? bet * 35 : 0; end |
This file contains hidden or 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
#This is psudocode, but should be an okay example... | |
# Step 1: require rails' environment | |
require 'path/to/config/environment' | |
# Step 2: add rails app to cascade: | |
run Rack::Cascade.new([ | |
rack_app1, | |
MyRailsApp::Application, # Place rails in the cascade where you need it |