1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Make CI Reporter optional

This commit is contained in:
Tim Felgentreff 2011-06-09 13:46:30 +02:00
parent 4f013c2ea1
commit e187ec85ee
2 changed files with 8 additions and 3 deletions

View file

@ -11,7 +11,7 @@ source :rubygems unless ENV['QUICK']
gem 'rake' gem 'rake'
gem 'rack-test', '>= 0.5.6' gem 'rack-test', '>= 0.5.6'
gem 'ci_reporter' gem 'ci_reporter', :group => :ci
# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`. # Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
# Used by the CI. # Used by the CI.

View file

@ -2,7 +2,12 @@ require 'rake/clean'
require 'rake/testtask' require 'rake/testtask'
require 'fileutils' require 'fileutils'
require 'date' require 'date'
require 'ci/reporter/rake/test_unit'
# CI Reporter is only needed for the CI
begin
require 'ci/reporter/rake/test_unit'
rescue LoadError
end
task :default => :test task :default => :test
task :spec => :test task :spec => :test
@ -78,7 +83,7 @@ task :add_template, [:name] do |t, args|
puts "Liquid not found in #{file}" puts "Liquid not found in #{file}"
else else
puts "Adding section to #{file}" puts "Adding section to #{file}"
template = template.gsub(/Liquid/, args.name.capitalize).gsub(/liquid/, args.name.downcase) template = template.gsub(/Liquid/, args.name.capitalize).gsub(/liquid/, args.name.downcase)
code.gsub! /^(\s*===.*CoffeeScript)/, "\n" << template << "\n\\1" code.gsub! /^(\s*===.*CoffeeScript)/, "\n" << template << "\n\\1"
File.open(file, "w") { |f| f << code } File.open(file, "w") { |f| f << code }
end end