Skip to content

Instantly share code, notes, and snippets.

@bmaland
Created July 12, 2009 20:12
Show Gist options
  • Save bmaland/145781 to your computer and use it in GitHub Desktop.
Save bmaland/145781 to your computer and use it in GitHub Desktop.
# lib/github_gem.rb
module Rails
class Configuration
def github_gem(name, options = {})
options[:source] = 'http://gems.github.com'
options[:lib] = name.sub(/[^-]+-/, '') unless options.has_key?(:lib)
self.gem(name, options)
end
end
end
# Add this line at the top of config/environment.rb:
require File.join(File.dirname(__FILE__), '/../lib/github_gem')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment