Skip to content

Instantly share code, notes, and snippets.

View pixeltrix's full-sized avatar

Andrew White pixeltrix

View GitHub Profile
From 832c042e2c8eba2200627cc62de2854edcfb07c1 Mon Sep 17 00:00:00 2001
From: thedarkone <nobody>
Date: Wed, 11 Feb 2009 21:39:48 +0100
Subject: [PATCH] Port fast reloadable templates from rails-dev-boost.
---
actionmailer/test/abstract_unit.rb | 1 +
actionmailer/test/mail_service_test.rb | 2 +-
actionpack/lib/action_controller/rescue.rb | 2 +-
actionpack/lib/action_view.rb | 1 +
# This works
require 'rubygems'
require 'activesupport'
class Base
def self.cry
"#{self.name}.cry called!"
end
end
>> ActiveMerchant::Billing.constants
=> ["AuthorizedNetGateway", "PayflowGateway", "Integrations",
"PaypalExpressGateway", "BrainTreeGateway", "UsaEpayGateway",
"AVSResult", "PayflowUkGateway", "DataCashGateway", "BeanstreamCore",
"Error", "EfsnetGateway", "PaypalGateway", "ModernPaymentsGateway",
"SageCore", "PaypalCaGateway", "SecurePayAuGateway",
"AuthorizeNetGateway", "SkipJackGateway", "CardStreamGateway",
"SageGateway", "Gateway", "TrustCommerceGateway", "PaypalExpressCommon",
"SecurePayTechGateway", "PayflowExpressResponse", "AuthorizeNetCimGateway",
"CVVResult", "CreditCardFormatting", "PayflowCommonAPI",
rails profiler 'Rails::Application.reload_routes!' 10 flat
Using the ruby-prof extension.
Thread ID: 2148403500
Total: 27.237074
%self total self wait child calls name
24.69 6.74 6.73 0.00 0.01 152830 Rack::Mount::StrexpParser#action
7.75 9.58 2.11 0.00 7.47 159960 Rack::Mount::StrexpParser#next_token
3.65 3.64 0.99 0.00 2.65 84460 Array#each(d2)
3.16 16.07 0.86 0.00 15.21 83280 Array#each(d1)
# Using ActionDispatch::Routing::Mapper
andyw$ rails benchmarker 10 'Rails::Application.reload_routes!'
user system total real
#1 20.040000 0.180000 20.220000 ( 20.254536)
# Using ActionDispatch::Routing::DeprecatedMapper
andyw$ rails benchmarker 10 'Rails::Application.reload_routes!'
user system total real
#1 21.380000 0.190000 21.570000 ( 21.599967)
# Profile of hand optimized ragel generated compiler on 1.8.7
Using the ruby-prof extension.
Thread ID: 2148403500
Total: 25.718855
%self total self wait child calls name
15.03 11.38 3.86 0.00 7.52 7130 Rack::Mount::StrexpParser#compile
10.95 4.65 2.82 0.00 1.84 331150 Kernel#loop
4.39 1.13 1.13 0.00 0.00 5086080 Array#[]
# Rails 3.0.0b4 - 1.8.7
user system total real
#1 19.660000 0.120000 19.780000 ( 19.837813)
# Rails 3.0.0b4 - 1.9.2
user system total real
#1 11.560000 0.110000 11.670000 ( 11.654350)
# Modifed RACC - 1.8.7
user system total real
From 3111fc9b26e64370b2216e7690d6542de8206db7 Mon Sep 17 00:00:00 2001
From: Andrew White <[email protected]>
Date: Thu, 18 Mar 2010 16:49:23 +0000
Subject: [PATCH] Add column and index query methods to ActiveRecord::Schema
---
.../abstract/schema_definitions.rb | 10 ++
.../abstract/schema_statements.rb | 57 ++++++++++-
.../test/cases/active_schema_test_mysql.rb | 6 +-
activerecord/test/cases/migration_test.rb | 108 +++++++++++++++++++-
From b6975e132d1cb4806c16bfa987e6c8c67ee23ab2 Mon Sep 17 00:00:00 2001
From: Andrew White <[email protected]>
Date: Sat, 3 Jul 2010 08:14:17 +0100
Subject: [PATCH] Refactor recall parameter normalization [#5021 state:resolved]
---
.../lib/action_dispatch/routing/route_set.rb | 22 ++++-----------
actionpack/test/template/url_helper_test.rb | 29 ++++++++++++++++++-
2 files changed, 33 insertions(+), 18 deletions(-)
From 093539dae2b6ca22d34640db414d7f8ee2272f53 Mon Sep 17 00:00:00 2001
From: Andrew White <[email protected]>
Date: Sun, 4 Jul 2010 06:52:52 +0100
Subject: [PATCH] Refactor resource options and scoping. Resource classes are now
only responsible for controlling how they are named. All other
options passed to resources are pushed out to the scope.
---
actionpack/lib/action_dispatch/routing/mapper.rb | 171 +++++++++-------------
actionpack/test/dispatch/routing_test.rb | 4 +-