blather 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14b758953e449e83539a7b2f7056f9f4a755a247
4
- data.tar.gz: fc6cb44dd2015306f8c1e5b1a6beb8d2e9d132c6
3
+ metadata.gz: da6bc686ab486904f981a9007d6083c5ac957db9
4
+ data.tar.gz: 2db0ad2f0cdb531daa2e15bac1cd2ec3cd099267
5
5
  SHA512:
6
- metadata.gz: ba7f5d07dce4c3f114b33a998c42a8f5db5f958fb5a38713b25219417bcbe5f42c1467093c58731d390dd062f49ce1c1e7a055d6ccfedbaddd2f1831211718da
7
- data.tar.gz: 79d8bed1bbe6816bc84c66aebeb69a086e21bc30dddfc294f01b621d9f30a0f1c1dc3d58ec447e29c91759ed23797b8ab145a73620a95e4a41fc5b04a42c2389
6
+ metadata.gz: 6a2c4f652c8df341f950cabf944338ada3ef177cf5e49e9bb5f5b9e843a2b52646b490edabbb796848bddfe491b49a6ffd81087eec0193d4a361e7f16ad5631b
7
+ data.tar.gz: 1183457bcecc981430d272c3d90e6a7942a6b2a35b2f3ac5817cc91cd07f3efcfc4ba4d7883d0c4f1b3a038f77a83ac9f4a9725729a1989f59b4f0d0d0da3763
@@ -2,11 +2,13 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0.0
5
6
  - jruby-19mode
6
7
  - rbx-19mode
7
8
  - ruby-head
8
9
  matrix:
9
10
  allow_failures:
10
11
  - rvm: jruby-19mode
12
+ - rvm: ruby-head
11
13
  notifications:
12
14
  irc: "irc.freenode.org#adhearsion"
@@ -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
@@ -1,4 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in blather.gemspec
4
3
  gemspec
4
+
5
+ gem 'activesupport', '~> 3.0' if RUBY_VERSION == "1.9.2"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Blather
2
- VERSION = '0.8.6'
2
+ VERSION = '0.8.7'
3
3
  end
@@ -69,7 +69,11 @@ module Blather
69
69
  end
70
70
 
71
71
  def self.decorator_modules
72
- [self::InstanceMethods]
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.6
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-23 00:00:00.000000000 Z
12
+ date: 2013-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine