Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
prep for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Aug 18, 2011
1 parent 34cfd3c commit 650c67b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
@@ -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
12 changes: 12 additions & 0 deletions Gemfile
Expand Up @@ -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

12 changes: 12 additions & 0 deletions Rakefile
@@ -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' }
Expand Down Expand Up @@ -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.