From 3a250fcfb9fcfa0ab3a8105821e670563025faa4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Dec 2010 07:18:49 +0000 Subject: initial cool.io support Cool.io is the new name for Rev. We'll continue to support Rev until Cool.io breaks backwards compatibility. Rev may not be supported if Cool.io is. --- lib/rainbows/rev.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/rev.rb') diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb index 6ddb130..cb4701b 100644 --- a/lib/rainbows/rev.rb +++ b/lib/rainbows/rev.rb @@ -1,6 +1,12 @@ # -*- encoding: binary -*- -require 'rev' -Rev::VERSION >= '0.3.0' or abort 'rev >= 0.3.0 is required' +begin + require 'coolio' + Coolio::VERSION >= '1.0.0' or abort 'cool.io >= 1.0.0 is required' +rescue LoadError + require 'rev' + Rev::VERSION >= '0.3.0' or abort 'rev >= 0.3.0 is required' +end +require 'rev' if defined?(Coolio) # Implements a basic single-threaded event model with # {Rev}[http://rev.rubyforge.org/]. It is capable of handling -- cgit v1.2.3-24-ge0c7