Skip to content

Commit

Permalink
Add Gemfile, handy for CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Jun 21, 2010
1 parent 3d19773 commit 41e22c9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
20 changes: 20 additions & 0 deletions Gemfile
@@ -0,0 +1,20 @@
source :rubygems

gem 'rack', '= 1.1.0' # 1.2 has issues
gem 'haml'
gem 'compass'
gem 'rack-test'
gem 'yard', "~> 0.5.3"
gem 'sinatra-default_charset', '>= 0.2.0'
gem 'rack-flash', '>= 0.1.1'
gem 'rspec', '~> 1.3.0'
gem 'rake', '>= 0.8.7'
gem 'bundler', '>= 0.9'

# could have used groups, but this is easier. plays nice with hudson.
if ENV['SINATRA'] == 'sinatra master' then gem 'sinatra', :git => "git://github.com/sinatra/sinatra.git"
else gem 'sinatra', '>= 1.0'
end

ext = ENV['EXT'] || 'backports'
gem(*ext.split(' '))
5 changes: 3 additions & 2 deletions tasks/spec.task
@@ -1,9 +1,10 @@
def rspec(pattern, format = nil, more_opts = nil, ruby = RUBY)
def rspec(pattern, format = nil, more_opts = nil, ruby = RUBY, command = 'spec')
format ||= ENV["FORMAT"] || :progress
libs = Dir.glob("{*,.}/lib").join File::PATH_SEPARATOR
files = Dir.glob(pattern).map { |f| f.inspect }.join " "
opts = ["-b -c --format #{format} --loadby mtime --reverse", *more_opts].compact.join " "
sh "#{ruby} -I#{libs} -S spec #{opts} #{files}"
command = "bundle exec #{command}" if ENV['BUNDLER']
sh "RUBYLIB=#{libs}:#{ENV['RUBYLIB']} #{ruby} -S #{command} #{opts} #{files}"
end

pattern = "spec/**/*_spec.rb"
Expand Down

0 comments on commit 41e22c9

Please sign in to comment.