prep for travis

This commit is contained in:
Konstantin Haase 2011-08-18 10:10:22 +02:00
parent 9c7da4a9f7
commit 70e33eedbf
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- rbx
- rbx-2.0
- jruby
- ruby-head
env:
- rack=1.3.0
- rack=master
- tilt=1.3.2
- tilt=master
- sinatra=master
notifications:
recipients:
- k.haase@finn.de
- ohhgabriel@gmail.com

View File

@ -12,3 +12,15 @@ group :development, :test do
gem 'yajl-ruby'
end
end
# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
# Used by the 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+/
gem lib, dep unless dep
end

View File

@ -1,4 +1,6 @@
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'open-uri'
require 'yaml'
desc "run specs"
task(:spec) { ruby '-S rspec spec' }
@ -46,3 +48,13 @@ task 'sinatra-contrib.gemspec' do
end
task :gemspec => 'sinatra-contrib.gemspec'
desc 'update travis config to correspond to sinatra'
task :travis, [:branch] do |t, a|
a.with_defaults :branch => :master
data = YAML.load open("https://raw.github.com/sinatra/sinatra/#{a.branch}/.travis.yml")
data["notifications"]["recipients"] << "ohhgabriel@gmail.com"
File.open('.travis.yml', 'w') { |f| f << data.to_yaml }
system 'git add .travis.yml && git diff --cached .travis.yml'
end