Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
module GitHubbyGems def gem(name, options = {}) if options[:github] default_options = { :source => 'http://gems.github.com' } if options[:github] == true default_options[:lib] = name.split('-', 2).last else default_options[:lib] = options[:github].to_s + '-' + name end options = default_options.merge(options) end super(name, options) end end Rails::Initializer.run do |config| # ... config.extend GitHubbyGems config.gem 'haml' config.gem 'right_aws' config.gem 'paperclip', :github => 'thoughtbot' config.gem 'god', :github => 'mojombo' # ... end
This paste will be private.
From the Design Piracy series on my blog: