xmpp4r-simple 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +10 -0
  2. data/Rakefile +3 -1
  3. data/lib/xmpp4r-simple.rb +13 -2
  4. metadata +20 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ xmpp4r-simple (0.8.7)
2
+
3
+ [ Blaine Cook ]
4
+ * If using Jabber::Simple in a DRb environment, the Jabber::Simple object
5
+ will execute in the DRb server's environment to improve efficiency.
6
+ * Jabber::Simple will now recover gracefully from server-side disconnects.
7
+ * Updated Rakefile to pass tests on firebrigade (http://firebrigade.seattlerb.org)
8
+
9
+ -- Blaine Cook <blaine@obvious.com> Wed, 31 Jan 2007 17:15:56 -0800
10
+
1
11
  xmpp4r-simple (0.8.6)
2
12
 
3
13
  [ Blaine Cook ]
data/Rakefile CHANGED
@@ -24,8 +24,10 @@ require 'rcov/rcovtask'
24
24
 
25
25
  spec = Gem::Specification.new do |s|
26
26
  s.add_dependency('xmpp4r', '>= 0.3.0')
27
+ s.add_dependency('rake')
28
+ s.add_dependency('rcov')
27
29
  s.name = "xmpp4r-simple"
28
- s.version = "0.8.6"
30
+ s.version = "0.8.7"
29
31
  s.author = "Blaine Cook"
30
32
  s.email = "romeda@gmail.com"
31
33
  s.homepage = "http://xmpp4r-simple.rubyforge.org/"
data/lib/xmpp4r-simple.rb CHANGED
@@ -18,6 +18,7 @@
18
18
  require 'rubygems'
19
19
  require 'xmpp4r'
20
20
  require 'xmpp4r/roster'
21
+ require 'xmpp4r/vcard'
21
22
 
22
23
  module Jabber
23
24
 
@@ -26,6 +27,8 @@ module Jabber
26
27
 
27
28
  class Contact #:nodoc:
28
29
 
30
+ include DRb::DRbUndumped if defined?(DRb::DRbUndumped)
31
+
29
32
  def initialize(client, jid)
30
33
  @jid = jid.respond_to?(:resource) ? jid : JID.new(jid)
31
34
  @client = client
@@ -73,6 +76,8 @@ module Jabber
73
76
 
74
77
  class Simple
75
78
 
79
+ include DRb::DRbUndumped if defined?(DRb::DRbUndumped)
80
+
76
81
  # Create a new Jabber::Simple client. You will be automatically connected
77
82
  # to the Jabber server and your status message will be set to the string
78
83
  # passed in as the status_message argument.
@@ -141,7 +146,7 @@ module Jabber
141
146
  stat_msg = Presence.new(@presence, @status_message)
142
147
  send!(stat_msg)
143
148
  end
144
-
149
+
145
150
  # Ask the users specified by jids for authorization (i.e., ask them to add
146
151
  # you to their contact list). If you are already in the user's contact list,
147
152
  # add() will not attempt to re-request authorization. In order to force
@@ -325,7 +330,13 @@ module Jabber
325
330
  attempts += 1
326
331
  client.send(msg)
327
332
  rescue Errno::EPIPE, IOError => e
328
- sleep 0.33
333
+ sleep 1
334
+ disconnect
335
+ reconnect
336
+ retry unless attempts > 3
337
+ raise e
338
+ rescue Errno::ECONNRESET => e
339
+ sleep (attempts^2) * 60 + 60
329
340
  disconnect
330
341
  reconnect
331
342
  retry unless attempts > 3
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: xmpp4r-simple
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.6
7
- date: 2007-01-26 00:00:00 -08:00
6
+ version: 0.8.7
7
+ date: 2007-01-31 00:00:00 -08:00
8
8
  summary: A simplified Jabber client library.
9
9
  require_paths:
10
10
  - lib
@@ -57,3 +57,21 @@ dependencies:
57
57
  - !ruby/object:Gem::Version
58
58
  version: 0.3.0
59
59
  version:
60
+ - !ruby/object:Gem::Dependency
61
+ name: rake
62
+ version_requirement:
63
+ version_requirements: !ruby/object:Gem::Version::Requirement
64
+ requirements:
65
+ - - ">"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.0.0
68
+ version:
69
+ - !ruby/object:Gem::Dependency
70
+ name: rcov
71
+ version_requirement:
72
+ version_requirements: !ruby/object:Gem::Version::Requirement
73
+ requirements:
74
+ - - ">"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.0.0
77
+ version: