blather 0.8.6 → 0.8.7
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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -1
- data/lib/blather/roster.rb +1 -1
- data/lib/blather/version.rb +1 -1
- data/lib/blather/xmpp_node.rb +6 -2
- data/spec/blather/stanza/presence_spec.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da6bc686ab486904f981a9007d6083c5ac957db9
|
4
|
+
data.tar.gz: 2db0ad2f0cdb531daa2e15bac1cd2ec3cd099267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a2c4f652c8df341f950cabf944338ada3ef177cf5e49e9bb5f5b9e843a2b52646b490edabbb796848bddfe491b49a6ffd81087eec0193d4a361e7f16ad5631b
|
7
|
+
data.tar.gz: 1183457bcecc981430d272c3d90e6a7942a6b2a35b2f3ac5817cc91cd07f3efcfc4ba4d7883d0c4f1b3a038f77a83ac9f4a9725729a1989f59b4f0d0d0da3763
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# [develop](https://github.com/adhearsion/blather/compare/master...develop)
|
2
2
|
|
3
|
+
# [v0.8.7](https://github.com/adhearsion/blather/compare/v0.8.6...v0.8.7) - [2013-08-26](https://rubygems.org/gems/blather/versions/0.8.7)
|
4
|
+
* Bugfix: Handle stanzas with nested elements that don't have a decorator module or are not stanzas
|
5
|
+
* Bugfix: Fix the roster which was broken by the DSL being included in Object
|
6
|
+
|
3
7
|
# [v0.8.6](https://github.com/adhearsion/blather/compare/v0.8.5...v0.8.6) - [2013-08-23](https://rubygems.org/gems/blather/versions/0.8.6)
|
4
8
|
* Bugfix: Ensure that session creation always comes immediately after binding. Fixes incompatibility with ejabberd.
|
5
9
|
* Bugfix: Close streams on next EM tick to avoid hanging.
|
data/Gemfile
CHANGED
data/lib/blather/roster.rb
CHANGED
@@ -47,7 +47,7 @@ module Blather
|
|
47
47
|
# @param [true, false] send send the update over the wire
|
48
48
|
# @see Blather::JID
|
49
49
|
def push(elem, send = true)
|
50
|
-
jid = elem.respond_to?(:jid) ? elem.jid : JID.new(elem)
|
50
|
+
jid = elem.respond_to?(:jid) && elem.jid ? elem.jid : JID.new(elem)
|
51
51
|
@items[key(jid)] = node = RosterItem.new(elem)
|
52
52
|
|
53
53
|
@stream.write(node.to_stanza(:set)) if send
|
data/lib/blather/version.rb
CHANGED
data/lib/blather/xmpp_node.rb
CHANGED
@@ -69,7 +69,11 @@ module Blather
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def self.decorator_modules
|
72
|
-
|
72
|
+
if self.const_defined?(:InstanceMethods)
|
73
|
+
[self::InstanceMethods]
|
74
|
+
else
|
75
|
+
[]
|
76
|
+
end
|
73
77
|
end
|
74
78
|
|
75
79
|
def decorate(*decorators)
|
@@ -78,7 +82,7 @@ module Blather
|
|
78
82
|
extend mod
|
79
83
|
end
|
80
84
|
|
81
|
-
@handler_hierarchy.unshift decorator.handler_hierarchy.first
|
85
|
+
@handler_hierarchy.unshift decorator.handler_hierarchy.first if decorator.respond_to?(:handler_hierarchy)
|
82
86
|
end
|
83
87
|
self
|
84
88
|
end
|
@@ -122,4 +122,30 @@ describe Blather::Stanza::Presence do
|
|
122
122
|
s.handler_hierarchy.should include(Blather::Stanza::Presence::C.registered_name.to_sym)
|
123
123
|
s.handler_hierarchy.should include(Blather::Stanza::Presence::Status.registered_name.to_sym)
|
124
124
|
end
|
125
|
+
|
126
|
+
it "handle stanzas with nested elements that don't have a decorator module or are not stanzas" do
|
127
|
+
string = <<-XML
|
128
|
+
<presence from="me@gmx.net/GMX MultiMessenger" to="receiver@gmail.com/480E24CF" lang="de">
|
129
|
+
<show>away</show>
|
130
|
+
<priority>0</priority>
|
131
|
+
<nick xmlns="http://jabber.org/protocol/nick">Me</nick>
|
132
|
+
<x xmlns="jabber:x:data" type="submit">
|
133
|
+
<field var="FORM_TYPE" type="hidden">
|
134
|
+
<value>http://jabber.org/protocol/profile</value>
|
135
|
+
</field>
|
136
|
+
<field var="x-sip_capabilities" type="text-single">
|
137
|
+
<value>19</value>
|
138
|
+
</field>
|
139
|
+
</x>
|
140
|
+
<x xmlns="vcard-temp:x:update">
|
141
|
+
<photo/>
|
142
|
+
</x>
|
143
|
+
<ignore xmlns="http://gmx.net/protocol/gateway"/>
|
144
|
+
<delay xmlns="urn:xmpp:delay" from="me@gmx.net/GMX MultiMessenger" stamp="2013-08-26T22:18:41Z"/>
|
145
|
+
<x xmlns="jabber:x:delay" stamp="20130826T22:18:41"/>
|
146
|
+
</presence>
|
147
|
+
XML
|
148
|
+
s = Blather::Stanza::Presence.parse string
|
149
|
+
s.should be_a Blather::Stanza::Presence
|
150
|
+
end
|
125
151
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Smick
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|