diff --git a/Gemfile b/Gemfile index f96a866..4925011 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem 'thin' gem 'hpricot' gem 'nokogiri' gem 'rake', :require => false +gem 'rest-client' # FIXME list here all actual dependencies (i.e. the ones in debian/control), # with their GEM names (not the Debian package names) diff --git a/vendor/plugins/ruby_bosh/lib/ruby_bosh.rb b/vendor/plugins/ruby_bosh/lib/ruby_bosh.rb index d30dca6..401f270 100644 --- a/vendor/plugins/ruby_bosh/lib/ruby_bosh.rb +++ b/vendor/plugins/ruby_bosh/lib/ruby_bosh.rb @@ -4,7 +4,6 @@ require 'rexml/document' require 'base64' require 'hpricot' require 'timeout' -require 'system_timer' class RubyBOSH BOSH_XMLNS = 'http://jabber.org/protocol/httpbind' @@ -15,7 +14,7 @@ class RubyBOSH CLIENT_XMLNS = 'jabber:client' class Error < StandardError; end - class Timeout < RubyBOSH::Error; end + class TimeoutError < RubyBOSH::Error; end class AuthFailed < RubyBOSH::Error; end class ConnFailed < RubyBOSH::Error; end @@ -134,12 +133,12 @@ class RubyBOSH end def deliver(xml) - SystemTimer.timeout(@timeout) do + Timeout::timeout(@timeout) do send(xml) recv(RestClient.post(@service_url, xml, @headers)) end rescue ::Timeout::Error => e - raise RubyBOSH::Timeout, e.message + raise RubyBOSH::TimeoutError, e.message rescue Errno::ECONNREFUSED => e raise RubyBOSH::ConnFailed, "could not connect to #{@host}\n#{e.message}" rescue Exception => e -- libgit2 0.21.2