Skip to content

Commit

Permalink
Edit Gemfile to use the swiggly-operator when specifying a version of…
Browse files Browse the repository at this point in the history
… rack+tilt via an environment variable
  • Loading branch information
timfel committed Oct 11, 2011
1 parent 5e6322c commit 08d6907
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Gemfile
Expand Up @@ -19,9 +19,14 @@ gem 'ci_reporter', :group => :ci
github = "git://github.com/%s.git"
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} if dep and dep !~ /(\d+\.)+\d+/
dep = case ENV[lib] || 'stable'
when 'stable'
nil
when /(\d+\.)+\d+/
"~> " + ENV[lib].sub("#{lib}-", '')
else
{:git => repos[lib], :branch => dep}
end
gem lib, dep
end

Expand Down

0 comments on commit 08d6907

Please sign in to comment.