rsxml 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rsxml.rb +1 -1
- data/spec/rsxml_spec.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/rsxml.rb
CHANGED
@@ -69,7 +69,7 @@ module Rsxml
|
|
69
69
|
return fragment if !ns_prefixes
|
70
70
|
|
71
71
|
ns_attrs = Hash[*ns_prefixes.map do |prefix,href|
|
72
|
-
prefix = nil if prefix.length == 0
|
72
|
+
prefix = nil if prefix.to_s.length == 0
|
73
73
|
[["xmlns", prefix].compact.join(":"), href]
|
74
74
|
end.flatten]
|
75
75
|
xml = Builder::XmlMarkup.new
|
data/spec/rsxml_spec.rb
CHANGED
@@ -105,7 +105,7 @@ describe Rsxml do
|
|
105
105
|
xml = Rsxml.to_xml(["foo:foofoo", {"foo:bar"=>"1", "foo:baz"=>"baz"}])
|
106
106
|
|
107
107
|
org_with_ns = ["foo:foofoo", {"foo:bar"=>"1", "foo:baz"=>"baz", "xmlns"=>"http://baz.com/baz", "xmlns:foo"=>"http://foo.com/foo"}]
|
108
|
-
rsxml = Rsxml.to_rsxml(xml, {
|
108
|
+
rsxml = Rsxml.to_rsxml(xml, {:foo=>"http://foo.com/foo", ""=>"http://baz.com/baz"})
|
109
109
|
|
110
110
|
rsxml.should == org_with_ns
|
111
111
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Trampoline Systems Ltd
|