do not use git version in Gemfile if env vars for tilt or rack is not set

This commit is contained in:
Konstantin Haase 2011-05-11 09:38:11 +02:00
parent 27b1008b26
commit 5a899b2df3
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ repos = { 'tilt' => github % "rtomayko/tilt", 'rack' => github % "rack/rack" }
%w[tilt rack].each do |lib|
dep = (ENV[lib] || 'stable').sub "#{lib}-", ''
dep = nil if dep == 'stable'
dep = {:git => repos[lib], :branch => dep} unless dep =~ /(\d+\.)+\d+/
dep = {:git => repos[lib], :branch => dep} if dep and dep !~ /(\d+\.)+\d+/
gem lib, dep
end