Skip to content
Create a gist now

Instantly share code, notes, and snippets.

# Neater Github gem dependencies for Rails
module GithubGem
def github_gem(gem_name, opts={})
lib_name = gem_name.split('-', 2)[1]
self.gem gem_name, {:lib => lib_name, :source => ''}.merge(opts)
end do |config|
config.extend GithubGem
config.gem 'andand'
config.github_gem 'binarylogic-authlogic', :version => '2.1.1'
if %w(test development).include?(RAILS_ENV)
config.gem "mocha"
config.github_gem "thoughtbot-shoulda", :version => '>=2.10'
config.github_gem "seanhussey-woulda"
# ...
# Certainly beats the equivalent
config.gem 'andand'
config.gem 'binarylogic-authlogic', :version => '2.1.1',
:lib => 'authlogic', :source => ''
if %w(test development).include?(RAILS_ENV)
config.gem "mocha"
config.gem "thoughtbot-shoulda", :version => '>=2.10',
:lib => 'shoulda', :source => ''
config.gem "seanhussey-woulda",
:lib => 'woulda', :source => ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.