Skip to content

Instantly share code, notes, and snippets.

@dewski
Created January 31, 2012 05:34
Show Gist options
  • Save dewski/1709060 to your computer and use it in GitHub Desktop.
Save dewski/1709060 to your computer and use it in GitHub Desktop.
Snippet from Gem Garage
# Public: Take the gem's runtime dependencies and install them from their remote source
#
# Returns nothing.
# Raises GemGarage::MissingGemError if the gem file doesn't exist.
def install_dependencies
raise GemGarage::MissingGemError unless File.exists?(file_path)
with_gem do |spec|
spec.runtime_dependencies.each do |dependency|
Resque.enqueue(GemGarage::Jobs::InstallDependency, rubygem.account_id, dependency.name, dependency.requirement)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment