Skip to content

Instantly share code, notes, and snippets.

@FiXato
Forked from bmaland/github_gem.rb
Created July 13, 2009 07:34
Show Gist options
  • Save FiXato/145987 to your computer and use it in GitHub Desktop.
Save FiXato/145987 to your computer and use it in GitHub Desktop.
github_gem for rails
# Works like :gem for rails, but sets source to github's gem repo.
# add to lib/github_gem.rb in your rails project.
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