Skip to content

Instantly share code, notes, and snippets.

View jshirley's full-sized avatar

Jay Shirley jshirley

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jshirley on github.
* I am jshirley (https://keybase.io/jshirley) on keybase.
* I have a public key whose fingerprint is 97AE 5583 48ED EBC0 4545 6CA1 A1E6 4CBB 40B2 552B
To claim this, I am signing this object:
@jshirley
jshirley / gist:9744173
Created March 24, 2014 16:46
Failing example with ActiveRecord 4.1.0rc1
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.0rc1'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
YUI().use("widget", "overlay", "node", "io-queue", function(Y) {
var overlay = new Y.Overlay({
// width: "10em",
// height: "10em",
headerContent: "",
bodyContent: "This will be replaced",
zIndex: 500,
visible: false
});
overlay.render();
Index: lib/Catalyst/Engine/HTTP/Prefork.pm
===================================================================
--- lib/Catalyst/Engine/HTTP/Prefork.pm (revision 10421)
+++ lib/Catalyst/Engine/HTTP/Prefork.pm (working copy)
@@ -33,7 +33,15 @@
# Restore ARGV since Getopt has eaten it and Net::Server needs it
# for proper restart support
@ARGV = @{ $options->{argv} };
-
+
Index: lib/Catalyst/Engine/HTTP/Prefork.pm
===================================================================
--- lib/Catalyst/Engine/HTTP/Prefork.pm (revision 10421)
+++ lib/Catalyst/Engine/HTTP/Prefork.pm (working copy)
@@ -45,6 +45,9 @@
max_servers => $options->{max_servers} || 50,
max_requests => $options->{max_requests} || 1000,
leave_children_open_on_hup => $options->{restart_graceful} || 0,
+
+ defined $options->{pidfile} ?
my $app = App::Manager->new_with_traits(
# I'm managing Catalyst applications running under Lighttpd
traits => [ 'Lighttpd', 'Catalyst' ],
applications => [
{
name => 'MyApp',
server => 'Catalyst',
# Custom to App::Manager::Catalyst:
engine => 'HTTP::Prefork',
YUI().use("widget", "overlay", "node", "io-form", function(Y) {
var overlay = new Y.Overlay({
// width: "10em",
// height: "10em",
headerContent: "",
bodyContent: "This will be replaced",
zIndex: 500,
visible: false
});
overlay.render();
Y.on('delegate', function(e) {
var tgt = e.target;
e.halt();
var uri = tgt.get('href');
var cfg = {
headers: { 'Content-Type': 'text/html; charset=utf-8' }
};
if ( tgt.hasClass('rest-delete') )
cfg.method = 'DELETE';
else if ( tgt.hasClass('rest-post') )
YUI({
combine: false,
// filter: 'debug',
base: '/static/scripts/yui3/build/'
}).use(
"widget", "overlay", "node", "io-form", "event", "event-simulate",
function(Y) {
var overlay = new Y.Overlay({
package MyApp::Model::Facebook;
use warnings;
use strict;
use parent 'Catalyst::Model::Adaptor';
__PACKAGE__->config(
class => 'WWW::Facebook::API',
args => {