prep for travis
This commit is contained in:
parent
9c7da4a9f7
commit
70e33eedbf
|
@ -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,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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue