ratom-nokogiri 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atom.rb +0 -5
- data/lib/atom/version.rb +1 -1
- data/lib/atom/xml/parser.rb +1 -5
- data/spec/atom_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a11b71dc8ee15dcf1015708f39239b3a1efaeb4
|
4
|
+
data.tar.gz: 4851bb21a72ae9d10ea86d8c3d8db134adbf82fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aac8d7bfd3a6a65a1d91d44ae3a7411163fe90e654e06079b4f2b5ed9f912701a34f206f34ac4864382d871544acdd131f8021cd6fdb7c013aa96a6848e533f2
|
7
|
+
data.tar.gz: 51d030180144481df92c3a437f6684711d5bc60f03a295efbbd75b1ad0f296598a9a9026841b60418264ed3500b214d9a458316d1fcdd59a4d6286e0f0d5793e
|
data/lib/atom.rb
CHANGED
@@ -447,11 +447,6 @@ module Atom # :nodoc:
|
|
447
447
|
elements :categories
|
448
448
|
elements :entries
|
449
449
|
|
450
|
-
# to_xml as a document, not just a root node
|
451
|
-
def document?
|
452
|
-
true
|
453
|
-
end
|
454
|
-
|
455
450
|
# Initialize a Feed.
|
456
451
|
#
|
457
452
|
# This will also yield itself, so a feed can be constructed like this:
|
data/lib/atom/version.rb
CHANGED
data/lib/atom/xml/parser.rb
CHANGED
@@ -175,10 +175,6 @@ module Atom
|
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
-
def document?
|
179
|
-
false
|
180
|
-
end
|
181
|
-
|
182
178
|
def to_xml(builder = nil, root_name = self.class.name.demodulize.downcase, namespace = nil, namespace_handler = nil)
|
183
179
|
orig_builder = builder
|
184
180
|
builder ||= Nokogiri::XML::Builder.new(:encoding => 'UTF-8')
|
@@ -248,7 +244,7 @@ module Atom
|
|
248
244
|
node[k] = v
|
249
245
|
end
|
250
246
|
|
251
|
-
|
247
|
+
builder.doc
|
252
248
|
end
|
253
249
|
|
254
250
|
module DeclarationMethods # :nodoc:
|
data/spec/atom_spec.rb
CHANGED
@@ -1106,7 +1106,7 @@ describe Atom do
|
|
1106
1106
|
end
|
1107
1107
|
|
1108
1108
|
it "should write a simple extension attribute as an attribute" do
|
1109
|
-
@entry.categories.first.to_xml['ns1:attribute'].should == 'extension'
|
1109
|
+
@entry.categories.first.to_xml.root['ns1:attribute'].should == 'extension'
|
1110
1110
|
end
|
1111
1111
|
|
1112
1112
|
it "should read an extension with the same local name as an Atom element" do
|
@@ -1222,8 +1222,8 @@ describe Atom do
|
|
1222
1222
|
end
|
1223
1223
|
|
1224
1224
|
it "should_write_custom_extensions_on_to_xml" do
|
1225
|
-
@node.children.size.should == 2
|
1226
|
-
ratom, custom_extensions = @node.children
|
1225
|
+
@node.root.children.size.should == 2
|
1226
|
+
ratom, custom_extensions = @node.root.children
|
1227
1227
|
ratom.attributes["name"].value.should == "ratom"
|
1228
1228
|
ratom.attributes["value"].value.should == "rocks"
|
1229
1229
|
custom_extensions.attributes["name"].value.should == "custom extensions"
|