julien51-babylon 0.1.5 → 0.1.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.
@@ -95,6 +95,8 @@ module Babylon
95
95
  # elsif name =~ /\Axmlns:/
96
96
  # @elem.add_namespace(name.gsub("xmlns:", ""), value)
97
97
  # else
98
+
99
+ #
98
100
  @elem.set_attribute name, Babylon.decode_xml(value)
99
101
  # end
100
102
  end
@@ -5,7 +5,7 @@ module Babylon
5
5
 
6
6
  # Match nodes of the given name with the given namespace URI.
7
7
  def namespace(set, name, nsuri)
8
- set.find_all.each do |n|
8
+ set.find_all do |n|
9
9
  n.name == name && n.namespaces.values.include?(nsuri)
10
10
  end
11
11
  end
@@ -45,7 +45,7 @@ describe Babylon::ClientConnection do
45
45
 
46
46
  it "should sort the srv records" do
47
47
  @client = Babylon::ClientConnection.connect(@params, handler_mock)
48
- @srv.map(&:target).should == ["xmpp2.server.tld", "xmpp.server.tld", "xmpp3.server.tld"]
48
+ @srv.map {|srv| srv.target }.should == ["xmpp2.server.tld", "xmpp.server.tld", "xmpp3.server.tld"]
49
49
  end
50
50
 
51
51
  it "should try to connect to each record until one of the them actually connects"
@@ -301,4 +301,4 @@ describe Babylon::ClientConnection do
301
301
  end
302
302
  end
303
303
 
304
- end
304
+ end
@@ -212,6 +212,13 @@ describe Babylon::XmppParser do
212
212
  # TODO: FIX NAMESPACES @element.namespaces.values.should == ["http://www.w3.org/2005/Atom", "http://namespace.com"]
213
213
  @element.namespaces.values.should == []
214
214
  end
215
+
216
+ it "should escape characters correctly" do
217
+ @attrs = ["url", "http://api.flickr.com/services/feeds/photos_public.gne?id=49724566@N00&lang=en-us&format=atom"]
218
+ @parser.__send__(:add_namespaces_and_attributes_to_current_node, @attrs)
219
+ @element["url"].should == "http://api.flickr.com/services/feeds/photos_public.gne?id=49724566@N00&lang=en-us&format=atom"
220
+ end
221
+
215
222
  end
216
223
 
217
224
  describe "a communication with an XMPP Client" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: julien51-babylon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - julien Genestoux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-04 00:00:00 -07:00
12
+ date: 2009-06-11 00:00:00 -07:00
13
13
  default_executable: babylon
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency