xmpp4r 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +13 -5
- data/README.rdoc +2 -10
- data/Rakefile +1 -1
- data/data/doc/xmpp4r/examples/advanced/recvfile.rb +1 -1
- data/data/doc/xmpp4r/examples/advanced/xmpping.rb +1 -1
- data/data/doc/xmpp4r/examples/basic/client.rb +1 -1
- data/lib/xmpp4r.rb +1 -1
- data/lib/xmpp4r/base64.rb +1 -1
- data/lib/xmpp4r/bytestreams.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/filetransfer.rb +2 -2
- data/lib/xmpp4r/bytestreams/helper/ibb/base.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/ibb/target.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +1 -1
- data/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +1 -1
- data/lib/xmpp4r/bytestreams/iq/bytestreams.rb +1 -1
- data/lib/xmpp4r/bytestreams/iq/si.rb +1 -1
- data/lib/xmpp4r/callbacks.rb +1 -1
- data/lib/xmpp4r/caps/c.rb +1 -1
- data/lib/xmpp4r/caps/helper/generator.rb +1 -1
- data/lib/xmpp4r/caps/helper/helper.rb +1 -1
- data/lib/xmpp4r/client.rb +2 -2
- data/lib/xmpp4r/component.rb +1 -1
- data/lib/xmpp4r/connection.rb +12 -3
- data/lib/xmpp4r/dataforms.rb +1 -1
- data/lib/xmpp4r/dataforms/x/data.rb +1 -1
- data/lib/xmpp4r/debuglog.rb +1 -1
- data/lib/xmpp4r/delay.rb +1 -1
- data/lib/xmpp4r/delay/x/delay.rb +1 -1
- data/lib/xmpp4r/discovery.rb +1 -1
- data/lib/xmpp4r/discovery/helper/helper.rb +1 -1
- data/lib/xmpp4r/discovery/helper/responder.rb +1 -1
- data/lib/xmpp4r/discovery/iq/discoinfo.rb +1 -1
- data/lib/xmpp4r/discovery/iq/discoitems.rb +1 -1
- data/lib/xmpp4r/entity_time.rb +1 -1
- data/lib/xmpp4r/entity_time/iq.rb +1 -1
- data/lib/xmpp4r/entity_time/responder.rb +1 -1
- data/lib/xmpp4r/errors.rb +1 -1
- data/lib/xmpp4r/feature_negotiation.rb +1 -1
- data/lib/xmpp4r/feature_negotiation/iq/feature.rb +1 -1
- data/lib/xmpp4r/httpbinding.rb +1 -1
- data/lib/xmpp4r/httpbinding/client.rb +1 -1
- data/lib/xmpp4r/idgenerator.rb +1 -1
- data/lib/xmpp4r/iq.rb +1 -1
- data/lib/xmpp4r/jid.rb +1 -1
- data/lib/xmpp4r/last/helper/helper.rb +1 -1
- data/lib/xmpp4r/last/iq/last.rb +1 -1
- data/lib/xmpp4r/location/helper/helper.rb +1 -1
- data/lib/xmpp4r/location/location.rb +1 -1
- data/lib/xmpp4r/message.rb +1 -1
- data/lib/xmpp4r/muc.rb +1 -1
- data/lib/xmpp4r/muc/helper/mucbrowser.rb +1 -1
- data/lib/xmpp4r/muc/helper/mucclient.rb +6 -6
- data/lib/xmpp4r/muc/helper/simplemucclient.rb +1 -1
- data/lib/xmpp4r/muc/iq/mucadmin.rb +1 -1
- data/lib/xmpp4r/muc/iq/mucadminitem.rb +1 -1
- data/lib/xmpp4r/muc/iq/mucowner.rb +1 -1
- data/lib/xmpp4r/muc/item.rb +1 -1
- data/lib/xmpp4r/muc/x/muc.rb +1 -1
- data/lib/xmpp4r/muc/x/mucuserinvite.rb +1 -1
- data/lib/xmpp4r/muc/x/mucuseritem.rb +1 -1
- data/lib/xmpp4r/observable.rb +1 -1
- data/lib/xmpp4r/observable/contact.rb +1 -1
- data/lib/xmpp4r/observable/helper.rb +1 -1
- data/lib/xmpp4r/observable/observable_thing.rb +1 -1
- data/lib/xmpp4r/observable/pubsub.rb +1 -1
- data/lib/xmpp4r/observable/subscription.rb +1 -1
- data/lib/xmpp4r/observable/thread_store.rb +1 -1
- data/lib/xmpp4r/presence.rb +1 -1
- data/lib/xmpp4r/pubsub/children/configuration.rb +1 -1
- data/lib/xmpp4r/pubsub/children/event.rb +1 -1
- data/lib/xmpp4r/pubsub/children/item.rb +1 -1
- data/lib/xmpp4r/pubsub/children/items.rb +1 -1
- data/lib/xmpp4r/pubsub/children/node_config.rb +1 -1
- data/lib/xmpp4r/pubsub/children/publish.rb +1 -1
- data/lib/xmpp4r/pubsub/children/retract.rb +1 -1
- data/lib/xmpp4r/pubsub/children/subscription.rb +1 -1
- data/lib/xmpp4r/pubsub/children/subscription_config.rb +1 -1
- data/lib/xmpp4r/pubsub/children/unsubscribe.rb +1 -1
- data/lib/xmpp4r/pubsub/helper/nodebrowser.rb +1 -1
- data/lib/xmpp4r/pubsub/helper/nodehelper.rb +1 -1
- data/lib/xmpp4r/pubsub/helper/servicehelper.rb +1 -1
- data/lib/xmpp4r/pubsub/iq/pubsub.rb +1 -1
- data/lib/xmpp4r/query.rb +1 -1
- data/lib/xmpp4r/rexmladdons.rb +1 -1
- data/lib/xmpp4r/roster.rb +1 -1
- data/lib/xmpp4r/roster/helper/roster.rb +1 -1
- data/lib/xmpp4r/roster/iq/roster.rb +1 -1
- data/lib/xmpp4r/roster/x/roster.rb +1 -1
- data/lib/xmpp4r/rpc/iq/rpc.rb +1 -1
- data/lib/xmpp4r/sasl.rb +1 -1
- data/lib/xmpp4r/semaphore.rb +1 -1
- data/lib/xmpp4r/stream.rb +1 -1
- data/lib/xmpp4r/streamparser.rb +14 -2
- data/lib/xmpp4r/tune/helper/helper.rb +1 -1
- data/lib/xmpp4r/tune/tune.rb +1 -1
- data/lib/xmpp4r/vcard.rb +1 -1
- data/lib/xmpp4r/vcard/helper/vcard.rb +1 -1
- data/lib/xmpp4r/vcard/iq/vcard.rb +1 -1
- data/lib/xmpp4r/version.rb +1 -1
- data/lib/xmpp4r/version/helper/responder.rb +1 -1
- data/lib/xmpp4r/version/helper/simpleresponder.rb +1 -1
- data/lib/xmpp4r/version/iq/version.rb +1 -1
- data/lib/xmpp4r/x.rb +1 -1
- data/lib/xmpp4r/xmpp4r.rb +2 -2
- data/lib/xmpp4r/xmppelement.rb +1 -1
- data/lib/xmpp4r/xmppstanza.rb +1 -1
- data/test/lib/clienttester.rb +1 -1
- data/test/tc_streamparser.rb +7 -0
- data/xmpp4r.gemspec +81 -2
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,15 +1,23 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
xmpp4r 0.5.6 (February 14th, 2013)
|
3
|
+
====================================
|
4
|
+
|
5
|
+
* [DOC] Wrong inline documentation in `client.rb`; details of port number parameter and removal of un-used 'use_ssl parameter'
|
6
|
+
* Prevent REXML exceptions on UTF-8 messages
|
7
|
+
* Fixed broken parse method
|
8
|
+
* Make sure to open files in binary mode, in order to correctly transfer files on Windows
|
9
|
+
* Prevent REXML exceptions on UTF-8 messages
|
10
|
+
* Better control of history on muc.join
|
11
|
+
|
12
|
+
|
13
|
+
xmpp4r 0.5.5 (October 6th, 2013)
|
2
14
|
===============================
|
3
15
|
* Removed unnecessary dependency on pry.
|
4
16
|
|
5
|
-
mad-p-xmpp4r 0.6.2 (26/02/2013)
|
6
|
-
===============================
|
7
17
|
* Merge pull request #1 from Strech/patch-1
|
8
18
|
* Non-bosh connection flushes correctly
|
9
19
|
* Elaborated debug messages in HTTPBinding::Client
|
10
20
|
|
11
|
-
mad-p-xmpp4r 0.6.1 (21/02/2013)
|
12
|
-
===============================
|
13
21
|
* Modified to work with BOSH with HTTPBinding::Client
|
14
22
|
- Support stream restart with urn:xmpp:xbosh way.
|
15
23
|
- Removed unnecessary wait until authenticated.
|
data/README.rdoc
CHANGED
@@ -24,24 +24,15 @@ which can be enabled in your code with:
|
|
24
24
|
|
25
25
|
== Contributors
|
26
26
|
|
27
|
-
=== Present
|
27
|
+
=== Present Maintainer
|
28
28
|
|
29
29
|
Harisankar P S (hsps@rubykitchen.org)
|
30
|
-
Manu S Ajith (manu@rubykitchen.org)
|
31
30
|
|
32
31
|
=== List of Contributors
|
33
32
|
|
34
33
|
http://github.com/xmpp4r/xmpp4r/contributors
|
35
34
|
|
36
35
|
|
37
|
-
== Source Code
|
38
|
-
|
39
|
-
The source for xmpp4r is managed using the Git SCM and can be
|
40
|
-
found in our GitHub.com project page:
|
41
|
-
|
42
|
-
http://github.com/xmpp4r/xmpp4r/tree/master
|
43
|
-
|
44
|
-
|
45
36
|
== Installation
|
46
37
|
|
47
38
|
There are a number of ways that you can install xmpp4r depending
|
@@ -53,6 +44,7 @@ You can install the current release of the xmpp4r library via rubygems:
|
|
53
44
|
|
54
45
|
sudo gem install xmpp4r
|
55
46
|
|
47
|
+
The latest stable version is 0.5.6
|
56
48
|
|
57
49
|
=== Install from local source code (Developers Only)
|
58
50
|
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ PKG_NAME = 'xmpp4r'
|
|
14
14
|
PKG_VERSION = Jabber::XMPP4R_VERSION
|
15
15
|
AUTHORS = ['Lucas Nussbaum', 'Stephan Maka', 'Glenn Rempe', 'Kaoru Maeda', 'Harisankar P S']
|
16
16
|
EMAIL = "mailme@hsps.in"
|
17
|
-
HOMEPAGE = "
|
17
|
+
HOMEPAGE = "http://xmpp4r.github.io"
|
18
18
|
SUMMARY = "XMPP/Jabber library for ruby"
|
19
19
|
|
20
20
|
# These are the common rdoc options that are shared between generation of
|
@@ -58,7 +58,7 @@ ft.add_incoming_callback { |iq,file|
|
|
58
58
|
puts "Waiting for stream configuration"
|
59
59
|
if stream.accept
|
60
60
|
puts "Stream established"
|
61
|
-
outfile = File.new(filename, (offset ? '
|
61
|
+
outfile = File.new(filename, (offset ? 'ab' : 'wb'))
|
62
62
|
while buf = stream.read(65536)
|
63
63
|
outfile.write(buf)
|
64
64
|
print '.'
|
data/lib/xmpp4r.rb
CHANGED
data/lib/xmpp4r/base64.rb
CHANGED
data/lib/xmpp4r/bytestreams.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
require 'xmpp4r/bytestreams/iq/si.rb'
|
6
6
|
require 'xmpp4r/bytestreams/iq/bytestreams.rb'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
require 'xmpp4r/callbacks'
|
6
6
|
require 'xmpp4r/bytestreams/iq/si'
|
@@ -70,7 +70,7 @@ module Jabber
|
|
70
70
|
include TransferSource
|
71
71
|
|
72
72
|
def initialize(filename)
|
73
|
-
@file = File.new(filename)
|
73
|
+
@file = File.new(filename, "rb")
|
74
74
|
@filename = filename
|
75
75
|
@bytes_read = 0
|
76
76
|
@length = nil
|
data/lib/xmpp4r/callbacks.rb
CHANGED
data/lib/xmpp4r/caps/c.rb
CHANGED
data/lib/xmpp4r/client.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
require 'resolv'
|
6
6
|
require 'xmpp4r/connection'
|
@@ -38,7 +38,7 @@ module Jabber
|
|
38
38
|
# be resolved. If none works, fallback is connecting to the domain part
|
39
39
|
# of the jid.
|
40
40
|
# host:: [String] Optional c2s host, will be extracted from jid if nil
|
41
|
-
#
|
41
|
+
# port:: [Fixnum] The server port (default: 5222)
|
42
42
|
# return:: self
|
43
43
|
def connect(host = nil, port = 5222)
|
44
44
|
if host.nil?
|
data/lib/xmpp4r/component.rb
CHANGED
data/lib/xmpp4r/connection.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
begin
|
6
6
|
require 'openssl'
|
@@ -37,6 +37,15 @@ module Jabber
|
|
37
37
|
#Defaults to false
|
38
38
|
attr_accessor :use_ssl
|
39
39
|
|
40
|
+
class SSLSocketUTF8 < OpenSSL::SSL::SSLSocket
|
41
|
+
# #readline returns incorrect encodings for UTF8 strings
|
42
|
+
# because SSLSocket does not support encoding conversions
|
43
|
+
# This forces a correct encoding, and pervents REXML exceptions
|
44
|
+
def sysread *args
|
45
|
+
super.force_encoding ::Encoding::UTF_8
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
40
49
|
##
|
41
50
|
# Create a new connection to the given host and port
|
42
51
|
def initialize
|
@@ -68,7 +77,7 @@ module Jabber
|
|
68
77
|
|
69
78
|
# We want to use the old and deprecated SSL protocol (usually on port 5223)
|
70
79
|
if @use_ssl
|
71
|
-
ssl =
|
80
|
+
ssl = SSLSocketUTF8.new(@socket)
|
72
81
|
ssl.connect # start SSL session
|
73
82
|
ssl.sync_close = true
|
74
83
|
Jabber::debuglog("SSL connection established.")
|
@@ -154,7 +163,7 @@ module Jabber
|
|
154
163
|
ctx.verify_callback = @ssl_verifycb
|
155
164
|
|
156
165
|
# SSL connection establishing
|
157
|
-
sslsocket =
|
166
|
+
sslsocket = SSLSocketUTF8.new(@socket, ctx)
|
158
167
|
sslsocket.sync_close = true
|
159
168
|
Jabber::debuglog("TLSv1: OpenSSL handshake in progress")
|
160
169
|
sslsocket.connect
|
data/lib/xmpp4r/dataforms.rb
CHANGED
data/lib/xmpp4r/debuglog.rb
CHANGED
data/lib/xmpp4r/delay.rb
CHANGED
data/lib/xmpp4r/delay/x/delay.rb
CHANGED
data/lib/xmpp4r/discovery.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
require 'xmpp4r/discovery/iq/discoinfo'
|
6
6
|
require 'xmpp4r/discovery/iq/discoitems'
|
data/lib/xmpp4r/entity_time.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# =XMPP4R - XMPP Library for Ruby
|
2
2
|
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
|
3
|
-
# Website::http://
|
3
|
+
# Website::http://xmpp4r.github.io
|
4
4
|
|
5
5
|
require 'xmpp4r/entity_time/iq'
|
6
6
|
require 'xmpp4r/entity_time/responder'
|