allow setting rack dependency with env var (for CI)
This commit is contained in:
parent
968dce35d7
commit
01ae70e2b3
13
Gemfile
13
Gemfile
|
@ -7,7 +7,6 @@
|
||||||
# If you have issues with a gem: `bundle install --without-coffee-script`.
|
# If you have issues with a gem: `bundle install --without-coffee-script`.
|
||||||
|
|
||||||
RUBY_ENGINE = 'ruby' unless defined? RUBY_ENGINE
|
RUBY_ENGINE = 'ruby' unless defined? RUBY_ENGINE
|
||||||
TILT_REPO = "git://github.com/rtomayko/tilt.git"
|
|
||||||
|
|
||||||
source :rubygems unless ENV['QUICK']
|
source :rubygems unless ENV['QUICK']
|
||||||
gemspec
|
gemspec
|
||||||
|
@ -17,11 +16,13 @@ gem 'rack-test', '>= 0.5.6'
|
||||||
|
|
||||||
# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
|
# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
|
||||||
# Used by the CI.
|
# Used by the CI.
|
||||||
tilt = (ENV['tilt'] || 'stable').dup
|
github = "git://github.com/%s.git"
|
||||||
tilt.sub! 'tilt-', ''
|
repos = { 'tilt' => github % "rtomayko/tilt", 'rack' => github % "rack/rack" }
|
||||||
if tilt != 'stable'
|
%w[tilt rack].each do |lib|
|
||||||
tilt = {:git => TILT_REPO, :branch => tilt} unless tilt =~ /(\d+\.)+\d+/
|
dep = (ENV[lib] || 'stable').sub "#{lib}-", ''
|
||||||
gem 'tilt', tilt
|
next if dep == 'stable'
|
||||||
|
dep = {:git => repos[lib], :branch => dep} unless dep =~ /(\d+\.)+\d+/
|
||||||
|
gem lib, dep
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'haml', '>= 3.0', :group => 'haml'
|
gem 'haml', '>= 3.0', :group => 'haml'
|
||||||
|
|
Loading…
Reference in New Issue