Skip to content

Instantly share code, notes, and snippets.

View pjb3's full-sized avatar

Paul Barry pjb3

View GitHub Profile
@blowmage
blowmage / docs.rake
Created November 15, 2014 01:56
A rake task to update the documentation in the gh-pages branch.
namespace :docs do
desc "Updates the documentation on the gh-pages branch"
task :update do
branch = `git symbolic-ref --short HEAD`.chomp
if "master" != branch
puts "You are on the #{branch} branch. You must be on the master branch to run this rake task."
exit
end
require_relative "../lib/my_gem/version.rb"
Ruby 2.1.0 in Production: known bugs and patches
Last week, we upgraded the github.com rails app to ruby 2.1.0 in production.
While testing the new build for rollout, we ran into a number of bugs. Most of
these have been fixed on trunk already, but I've documented them below to help
anyone else who might be testing ruby 2.1 in production.
@naruse I think we should backport these patches to the ruby_2_1 branch and
release 2.1.1 sooner rather than later, as some of the bugs are quite critical.
I'm happy to offer any assistance I can to expedite this process.
@pjb3
pjb3 / dsl_object.rb
Created August 30, 2011 12:21
DSL for constructing object graph
class DslObject
def initialize(*args, &block)
args.zip(self.class.properties).each do |arg, property|
instance_variable_set("@#{property}", arg)
end
instance_eval(&block) if block
end
def self.properties(*properties)