xmlmapper 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xmlmapper/text_node.rb +5 -1
- data/lib/xmlmapper/version.rb +1 -1
- data/spec/fixtures/text_node_with_comment.xml +2 -0
- data/spec/xmlmapper_spec.rb +17 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8715dbba0c19b07cfea4744aa080a2df0dcc402d
|
4
|
+
data.tar.gz: a0d5a5c30764891dc5a4b6d794be191ded65bded
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e1b7bde79d987845bfa44a7e474305206bf724b3a265ce3e11cb24145a5ec426d8039fbbab3121a1fa8509574917f3d1535898b6c5db1a157a5184751b8be71
|
7
|
+
data.tar.gz: 98deca942d679ec338f1ee3ac794b8af9c3e6915e82df01c17e1b5847774f5112b333ab39766cb100752e0fa4cdb734782715e5b4b4218ce01886f7ded2707f8
|
data/lib/xmlmapper/text_node.rb
CHANGED
data/lib/xmlmapper/version.rb
CHANGED
data/spec/xmlmapper_spec.rb
CHANGED
@@ -554,7 +554,6 @@ end
|
|
554
554
|
class DefaultNamespaceCombi
|
555
555
|
include XmlMapper
|
556
556
|
|
557
|
-
|
558
557
|
register_namespace 'bk', "urn:loc.gov:books"
|
559
558
|
register_namespace 'isbn', "urn:ISBN:0-395-36341-6"
|
560
559
|
register_namespace 'p', "urn:loc.gov:people"
|
@@ -567,6 +566,14 @@ class DefaultNamespaceCombi
|
|
567
566
|
element :author, String, :namespace => 'p', :tag => "author"
|
568
567
|
end
|
569
568
|
|
569
|
+
class TextNodeWithComment
|
570
|
+
include XmlMapper
|
571
|
+
|
572
|
+
tag 'textnode'
|
573
|
+
|
574
|
+
content :value, String
|
575
|
+
end
|
576
|
+
|
570
577
|
describe XmlMapper do
|
571
578
|
|
572
579
|
describe "being included into another class" do
|
@@ -1134,4 +1141,13 @@ describe XmlMapper do
|
|
1134
1141
|
end
|
1135
1142
|
end
|
1136
1143
|
|
1144
|
+
context 'text_node with comments' do
|
1145
|
+
it 'returns the full text in the node' do
|
1146
|
+
xml = fixture_file('text_node_with_comment.xml')
|
1147
|
+
text_node = TextNodeWithComment.parse(xml, single: true)
|
1148
|
+
|
1149
|
+
expect(text_node.value).to eq "With Comment"
|
1150
|
+
end
|
1151
|
+
end
|
1152
|
+
|
1137
1153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmlmapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien Le Berrigaud
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- spec/fixtures/set_config_options.xml
|
91
91
|
- spec/fixtures/statuses.xml
|
92
92
|
- spec/fixtures/subclass_namespace.xml
|
93
|
+
- spec/fixtures/text_node_with_comment.xml
|
93
94
|
- spec/fixtures/unformatted_address.xml
|
94
95
|
- spec/fixtures/wrapper.xml
|
95
96
|
- spec/has_many_empty_array_spec.rb
|
@@ -162,6 +163,7 @@ test_files:
|
|
162
163
|
- spec/fixtures/set_config_options.xml
|
163
164
|
- spec/fixtures/statuses.xml
|
164
165
|
- spec/fixtures/subclass_namespace.xml
|
166
|
+
- spec/fixtures/text_node_with_comment.xml
|
165
167
|
- spec/fixtures/unformatted_address.xml
|
166
168
|
- spec/fixtures/wrapper.xml
|
167
169
|
- spec/has_many_empty_array_spec.rb
|