Permalink
Browse files

prep for travis

  • Loading branch information...
1 parent 34cfd3c commit 650c67b755f0941b877b52d01c4043a41fea4d00 @rkh committed Aug 18, 2011
Showing with 43 additions and 0 deletions.
  1. +19 −0 .travis.yml
  2. +12 −0 Gemfile
  3. +12 −0 Rakefile
View
@@ -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
@@ -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
@@ -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
+

0 comments on commit 650c67b

Please sign in to comment.