Created
October 13, 2011 11:42
-
-
Save rossta/1284035 to your computer and use it in GitHub Desktop.
Custom gem method for local using gems locally (courtesy of ruby-amqp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use local clones if possible. | |
| # If you want to use your local copy, just symlink it to vendor. | |
| def custom_gem(name, options = Hash.new) | |
| local_path = File.expand_path("../vendor/#{name}", __FILE__) | |
| if File.exist?(local_path) | |
| gem name, options.merge(:path => local_path).delete_if { |key, _| [:git, :branch].include?(key) } | |
| else | |
| gem name, options | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment