Skip to content

Instantly share code, notes, and snippets.

route_options = {:controller => 'toys', :action => 'index', :owner_id => 'toy_owner'}
# initialize Mapper with the current RouteSet
mapper = ActionController::Routing::RouteSet::Mapper.new(ActionController::Routing::Routes)
# create a new named_route
new_named_route = mapper.named_route('rubber_duck', 'rubber_duck', route_options)
# add to current RouteSet
ActionController::Routing::Routes.routes.insert(0, new_named_route)
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "init",
"server_fqdn": "ec2-174-129-61-113.compute-1.amazonaws.com",
},
"recipes": "bootstrap::client"
}
}
@learnist
learnist / Cherry picking a bug fix to production
Created June 12, 2009 17:41
Cherry picking a bug fix to production
# Get the latest production tag
git tag -l 'production/*' | tail -1
> production/20090610235902
# Create a local production_bugfix branch
git branch production_bugfix production/20090610235902
# Checkout or "switch" to the production_bugfix branch
git co production_bugfix
RecursiveEnumerator.new(self) do |klass|
klass.superclass.respond_to?(:foobar) ? klass.superclass : break
end
dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/../../spec/spec_suite")
require File.expand_path("#{dir}/../../spec/spec_helpers/firefox_helper")
$LOAD_PATH.unshift("#{dir}/../vendor/plugins/screw-unit-server/lib")
require "screw_unit"
class ScrewUnitSpecSuite < SpecSuite
def run
header
params = {}