Empact-roxml 2.5.1 → 2.5.2
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.
- data/History.txt +25 -0
- data/Manifest.txt +0 -4
- data/README.rdoc +12 -2
- data/examples/posts.rb +1 -1
- data/examples/twitter.rb +1 -1
- data/lib/roxml.rb +59 -149
- data/lib/roxml/definition.rb +60 -150
- data/lib/roxml/extensions.rb +4 -1
- data/lib/roxml/extensions/array/conversions.rb +0 -23
- data/lib/roxml/extensions/deprecation.rb +1 -1
- data/lib/roxml/extensions/string.rb +0 -15
- data/lib/roxml/extensions/string/conversions.rb +0 -38
- data/lib/roxml/hash_definition.rb +5 -40
- data/lib/roxml/xml/references.rb +20 -8
- data/roxml.gemspec +4 -4
- data/spec/definition_spec.rb +120 -193
- data/spec/examples/library_spec.rb +8 -3
- data/spec/examples/post_spec.rb +1 -1
- data/spec/roxml_spec.rb +14 -14
- data/test/bugs/rexml_bugs.rb +1 -1
- data/test/mocks/dictionaries.rb +8 -7
- data/test/mocks/mocks.rb +19 -19
- data/test/test_helper.rb +1 -0
- data/test/unit/definition_test.rb +22 -96
- data/test/unit/deprecations_test.rb +1 -74
- data/test/unit/to_xml_test.rb +6 -6
- data/test/unit/xml_attribute_test.rb +1 -1
- data/test/unit/xml_block_test.rb +3 -3
- data/test/unit/xml_bool_test.rb +4 -4
- data/test/unit/xml_convention_test.rb +3 -3
- data/test/unit/xml_hash_test.rb +5 -14
- data/test/unit/xml_initialize_test.rb +2 -6
- data/test/unit/xml_name_test.rb +5 -24
- data/test/unit/xml_namespace_test.rb +2 -2
- data/test/unit/xml_object_test.rb +5 -5
- data/test/unit/xml_required_test.rb +1 -1
- data/test/unit/xml_text_test.rb +2 -2
- metadata +12 -17
- data/lib/roxml/extensions/active_support.rb +0 -54
- data/spec/string_spec.rb +0 -15
- data/test/release/dependencies_test.rb +0 -32
- data/test/unit/xml_construct_test.rb +0 -77
@@ -1,72 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
2
2
|
|
3
|
-
class
|
4
|
-
def test_tag_refs_is_deprecated
|
5
|
-
assert_deprecated do
|
6
|
-
Class.new do
|
7
|
-
include ROXML
|
8
|
-
end.tag_refs
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_literal_as_array_is_deprecated
|
13
|
-
assert_deprecated do
|
14
|
-
assert ROXML::Definition.new(:authors, :as => :array).array?
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_no_block_shorthand_means_no_block
|
19
|
-
assert_deprecated do
|
20
|
-
assert ROXML::Definition.new(:count, :as => :intager).blocks.empty?
|
21
|
-
end
|
22
|
-
assert_deprecated do
|
23
|
-
assert ROXML::Definition.new(:count, :as => :foat).blocks.empty?
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_symbol_shorthands_are_deprecated
|
28
|
-
assert_deprecated do
|
29
|
-
ROXML::Definition.new(:junk, :as => :integer)
|
30
|
-
end
|
31
|
-
assert_deprecated do
|
32
|
-
ROXML::Definition.new(:junk, :as => :float)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_as_cdata_is_deprecated
|
37
|
-
assert_deprecated do
|
38
|
-
assert ROXML::Definition.new(:manufacturer, :as => :cdata).cdata?
|
39
|
-
end
|
40
|
-
assert_deprecated do
|
41
|
-
assert ROXML::Definition.new(:manufacturer, :as => [Integer, :cdata]).cdata?
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_content_is_a_recognized_type
|
46
|
-
assert_deprecated do
|
47
|
-
opts = ROXML::Definition.new(:author, :content)
|
48
|
-
assert opts.content?
|
49
|
-
assert_equal '.', opts.name
|
50
|
-
assert_equal :text, opts.type
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_content_symbol_as_target_is_translated_to_string
|
55
|
-
assert_deprecated do
|
56
|
-
opts = ROXML::Definition.new(:content, :attr => :content)
|
57
|
-
assert_equal 'content', opts.name
|
58
|
-
assert_equal :attr, opts.type
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_attr_is_a_recognized_type
|
63
|
-
assert_deprecated do
|
64
|
-
opts = ROXML::Definition.new(:author, :attr)
|
65
|
-
assert_equal 'author', opts.name
|
66
|
-
assert_equal :attr, opts.type
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
3
|
+
class TestDeprecation < ActiveSupport::TestCase
|
70
4
|
def test_as_array_not_deprecated
|
71
5
|
assert_not_deprecated do
|
72
6
|
opts = ROXML::Definition.new(:name, :as => [])
|
@@ -75,13 +9,6 @@ class TestDefinition < Test::Unit::TestCase
|
|
75
9
|
end
|
76
10
|
end
|
77
11
|
|
78
|
-
def test_as_hash_of_attrs_deprecated
|
79
|
-
assert_deprecated do
|
80
|
-
opts = ROXML::Definition.new(:name, :as => {:attrs => [:dt, :dd]})
|
81
|
-
assert opts.hash?
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
12
|
def test_as_hash_not_deprecated
|
86
13
|
assert_not_deprecated do
|
87
14
|
opts = ROXML::Definition.new(:name, :as => {:key => '@dt', :value => '@dd'})
|
data/test/unit/to_xml_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
2
2
|
|
3
|
-
class TestHashToXml <
|
3
|
+
class TestHashToXml < ActiveSupport::TestCase
|
4
4
|
to_xml_test :dictionary_of_attrs,
|
5
5
|
:dictionary_of_mixeds,
|
6
6
|
:dictionary_of_texts,
|
@@ -10,7 +10,7 @@ class TestHashToXml < Test::Unit::TestCase
|
|
10
10
|
:dictionary_of_attr_name_clashes
|
11
11
|
end
|
12
12
|
|
13
|
-
class TestOtherToXml <
|
13
|
+
class TestOtherToXml < ActiveSupport::TestCase
|
14
14
|
to_xml_test :book => :book_valid,
|
15
15
|
:book_with_author_text_attribute => :book_text_with_attribute,
|
16
16
|
:uppercase_library => :library_uppercase
|
@@ -28,7 +28,7 @@ class TestOtherToXml < Test::Unit::TestCase
|
|
28
28
|
to_xml_test :book_with_wrapped_attr
|
29
29
|
end
|
30
30
|
|
31
|
-
class TestToXmlWithDefaults <
|
31
|
+
class TestToXmlWithDefaults < ActiveSupport::TestCase
|
32
32
|
def test_content_and_attr_defaults_are_represented_in_output
|
33
33
|
dict = Person.from_xml(fixture(:nameless_ageless_youth))
|
34
34
|
|
@@ -37,7 +37,7 @@ class TestToXmlWithDefaults < Test::Unit::TestCase
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
class TestToXmlWithBlocks <
|
40
|
+
class TestToXmlWithBlocks < ActiveSupport::TestCase
|
41
41
|
def test_pagecount_serialized_properly_after_modification
|
42
42
|
b = Book.from_xml(fixture(:book_valid))
|
43
43
|
xml = xml_fixture(:book_valid)
|
@@ -73,9 +73,9 @@ class BookWithOctalPages
|
|
73
73
|
include ROXML
|
74
74
|
|
75
75
|
xml_accessor :pages_with_to_xml_proc, :as => Integer, :to_xml => proc {|val| sprintf("%#o", val) }, :required => true
|
76
|
-
xml_accessor :pages_with_type, OctalInteger, :required => true
|
76
|
+
xml_accessor :pages_with_type, :as => OctalInteger, :required => true
|
77
77
|
end
|
78
78
|
|
79
|
-
class TestToXmlWithOverriddenOutput <
|
79
|
+
class TestToXmlWithOverriddenOutput < ActiveSupport::TestCase
|
80
80
|
to_xml_test :book_with_octal_pages
|
81
81
|
end
|
data/test/unit/xml_block_test.rb
CHANGED
@@ -3,18 +3,18 @@ require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
|
3
3
|
class ArrayWithBlockShorthand
|
4
4
|
include ROXML
|
5
5
|
|
6
|
-
xml_reader :array, [
|
6
|
+
xml_reader :array, :as => [Integer], :from => 'number'
|
7
7
|
end
|
8
8
|
|
9
9
|
class ArrayWithBlock
|
10
10
|
include ROXML
|
11
11
|
|
12
|
-
xml_reader :array, [
|
12
|
+
xml_reader :array, :as => [], :from => 'number' do |arr|
|
13
13
|
arr.map(&:to_i).reverse
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class TestXMLBlocks <
|
17
|
+
class TestXMLBlocks < ActiveSupport::TestCase
|
18
18
|
def test_block_is_applied
|
19
19
|
muffins = Muffins.from_xml(fixture(:muffins))
|
20
20
|
|
data/test/unit/xml_bool_test.rb
CHANGED
@@ -10,11 +10,11 @@ class XmlBool
|
|
10
10
|
|
11
11
|
xml_name 'xml_bool'
|
12
12
|
xml_reader :true_from_TRUE?, :to_xml => PROC_TRUE
|
13
|
-
xml_reader :false_from_FALSE?, :
|
13
|
+
xml_reader :false_from_FALSE?, :from => 'text_for_FALSE', :to_xml => PROC_TRUE
|
14
14
|
xml_reader :true_from_one?, :from => '@attr_for_one', :to_xml => PROC_1
|
15
|
-
xml_reader :false_from_zero?, :
|
15
|
+
xml_reader :false_from_zero?, :from => 'text_for_zero', :in => 'container', :to_xml => PROC_1
|
16
16
|
xml_reader :true_from_True?, :from => '@attr_for_True', :in => 'container', :to_xml => PROC_True
|
17
|
-
xml_reader :false_from_False?, :
|
17
|
+
xml_reader :false_from_False?, :from => 'false_from_cdata_False', :cdata => true, :to_xml => PROC_True
|
18
18
|
xml_reader :true_from_true?, :to_xml => PROC_true
|
19
19
|
xml_reader :false_from_false?, :to_xml => PROC_true
|
20
20
|
xml_reader :missing?
|
@@ -68,7 +68,7 @@ UNEXPECTED_VALUE_XML = %{
|
|
68
68
|
}
|
69
69
|
|
70
70
|
|
71
|
-
class TestXMLBool <
|
71
|
+
class TestXMLBool < ActiveSupport::TestCase
|
72
72
|
def test_bool_results_for_various_inputs
|
73
73
|
x = XmlBool.from_xml(BOOL_XML)
|
74
74
|
assert_equal true, x.true_from_TRUE?
|
@@ -54,7 +54,7 @@ class BookCase
|
|
54
54
|
include ROXML
|
55
55
|
|
56
56
|
xml_reader :book_count, :as => Integer, :required => true
|
57
|
-
xml_reader :big_books, [
|
57
|
+
xml_reader :big_books, :as => [], :required => true
|
58
58
|
end
|
59
59
|
|
60
60
|
class BookCaseCamelCase < BookCase
|
@@ -88,13 +88,13 @@ class ParentBookCaseDefault
|
|
88
88
|
include ROXML
|
89
89
|
|
90
90
|
xml_reader :book_count, :as => Integer, :required => true
|
91
|
-
xml_reader :big_books, [
|
91
|
+
xml_reader :big_books, :as => [], :required => true
|
92
92
|
end
|
93
93
|
|
94
94
|
class InheritedBookCaseDefault < ParentBookCaseDefault
|
95
95
|
end
|
96
96
|
|
97
|
-
class
|
97
|
+
class TestXMLConvention < ActiveSupport::TestCase
|
98
98
|
# TODO: Test convention applies to xml_name as well...
|
99
99
|
|
100
100
|
def test_default_convention_is_underscore
|
data/test/unit/xml_hash_test.rb
CHANGED
@@ -3,11 +3,11 @@ require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
|
3
3
|
class BookWithContributorHash
|
4
4
|
include ROXML
|
5
5
|
|
6
|
-
xml_reader :contributors,
|
6
|
+
xml_reader :contributors, :as => {:key => '@role',
|
7
7
|
:value => 'name'}
|
8
8
|
end
|
9
9
|
|
10
|
-
class TestXMLHash <
|
10
|
+
class TestXMLHash < ActiveSupport::TestCase
|
11
11
|
def setup
|
12
12
|
@contents = {'quaquaversally' => 'adjective: (of a geological formation) sloping downward from the center in all directions.',
|
13
13
|
'tergiversate' => 'To use evasions or ambiguities; equivocate.'}
|
@@ -30,7 +30,7 @@ class TestXMLHash < Test::Unit::TestCase
|
|
30
30
|
Class.new do
|
31
31
|
include ROXML
|
32
32
|
|
33
|
-
xml_reader :object_key_to_text, {:key => BookWithContributorHash,
|
33
|
+
xml_reader :object_key_to_text, :as => {:key => BookWithContributorHash,
|
34
34
|
:value => 'text_node'}
|
35
35
|
end
|
36
36
|
end
|
@@ -41,7 +41,7 @@ class TestXMLHash < Test::Unit::TestCase
|
|
41
41
|
Class.new do
|
42
42
|
include ROXML
|
43
43
|
|
44
|
-
xml_reader :key_to_object_value,
|
44
|
+
xml_reader :key_to_object_value, :as => {:key => '@text_node',
|
45
45
|
:value => BookWithContributorHash}
|
46
46
|
end
|
47
47
|
end
|
@@ -93,7 +93,7 @@ class TestXMLHash < Test::Unit::TestCase
|
|
93
93
|
dict = Class.new do
|
94
94
|
include ROXML
|
95
95
|
|
96
|
-
xml_reader :missing_hash, {:key => :name, :value => :content}, :in => 'EmptyDictionary'
|
96
|
+
xml_reader :missing_hash, :as => {:key => :name, :value => :content}, :in => 'EmptyDictionary'
|
97
97
|
end
|
98
98
|
|
99
99
|
assert_equal({}, dict.from_xml(%{
|
@@ -104,15 +104,6 @@ class TestXMLHash < Test::Unit::TestCase
|
|
104
104
|
}).missing_hash)
|
105
105
|
end
|
106
106
|
|
107
|
-
def test_as_hash_of_type_keys_deprecated
|
108
|
-
assert_deprecated do
|
109
|
-
opts = ROXML::Definition.new(:name, :as => {:key => :name, :value => {OctalInteger => 'value'}})
|
110
|
-
assert opts.hash?
|
111
|
-
assert_equal OctalInteger, opts.hash.value.type
|
112
|
-
assert_equal 'value', opts.hash.value.name
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
107
|
def test_as_hash_of_as_type_not_deprecated
|
117
108
|
assert_not_deprecated do
|
118
109
|
opts = ROXML::Definition.new(:name, :as => {:key => :name, :value => {:from => 'value', :as => OctalInteger}})
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
2
2
|
|
3
3
|
class InheritedBookWithDepth < Book
|
4
|
-
xml_reader :depth, Measurement
|
4
|
+
xml_reader :depth, :as => Measurement
|
5
5
|
end
|
6
6
|
|
7
7
|
class BookWithXmlInitialize < BookWithDepth
|
@@ -13,11 +13,7 @@ class BookWithXmlInitialize < BookWithDepth
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
class TestXMLInitialize <
|
17
|
-
def test_xml_construct_not_in_use
|
18
|
-
assert Measurement.xml_construction_args_without_deprecation.empty?
|
19
|
-
end
|
20
|
-
|
16
|
+
class TestXMLInitialize < ActiveSupport::TestCase
|
21
17
|
def test_initialize_is_run
|
22
18
|
m = Measurement.from_xml('<measurement units="hundredths-meters">1130</measurement>')
|
23
19
|
assert_equal 11.3, m.value
|
data/test/unit/xml_name_test.rb
CHANGED
@@ -24,31 +24,31 @@ class ParentOfNamedChild
|
|
24
24
|
include ROXML
|
25
25
|
|
26
26
|
xml_name :parent
|
27
|
-
xml_accessor :child_accessor_name, NamedChild
|
27
|
+
xml_accessor :child_accessor_name, :as => NamedChild
|
28
28
|
end
|
29
29
|
|
30
30
|
class ParentOfNamedChildWithFrom
|
31
31
|
include ROXML
|
32
32
|
|
33
33
|
xml_name :parent
|
34
|
-
xml_accessor :child_accessor_name, NamedChild, :from => 'child_from_name'
|
34
|
+
xml_accessor :child_accessor_name, :as => NamedChild, :from => 'child_from_name'
|
35
35
|
end
|
36
36
|
|
37
37
|
class ParentOfUnnamedChild
|
38
38
|
include ROXML
|
39
39
|
|
40
40
|
xml_name :parent
|
41
|
-
xml_accessor :child_accessor_name, Child
|
41
|
+
xml_accessor :child_accessor_name, :as => Child
|
42
42
|
end
|
43
43
|
|
44
44
|
class ParentOfUnnamedChildWithFrom
|
45
45
|
include ROXML
|
46
46
|
|
47
47
|
xml_name :parent
|
48
|
-
xml_accessor :child_accessor_name
|
48
|
+
xml_accessor :child_accessor_name,:as => Child, :from => 'child_from_name'
|
49
49
|
end
|
50
50
|
|
51
|
-
class TestXMLName <
|
51
|
+
class TestXMLName < ActiveSupport::TestCase
|
52
52
|
def test_from_always_dominates_attribute_name_xml_name_or_not
|
53
53
|
parent = ParentOfNamedChildWithFrom.new
|
54
54
|
parent.child_accessor_name = Child.new
|
@@ -104,31 +104,12 @@ class TestXMLName < Test::Unit::TestCase
|
|
104
104
|
assert_equal :dictionary, dict.class.tag_name
|
105
105
|
end
|
106
106
|
|
107
|
-
def test_tag_refs
|
108
|
-
assert_equal 'definition', DictionaryOfTexts.tag_refs_without_deprecation.first.name
|
109
|
-
assert_equal 'word', DictionaryOfTexts.tag_refs_without_deprecation.first.hash.key.name
|
110
|
-
assert_equal 'meaning', DictionaryOfTexts.tag_refs_without_deprecation.first.hash.value.name
|
111
|
-
|
112
|
-
dict = DictionaryOfTexts.from_xml(fixture(:dictionary_of_texts))
|
113
|
-
|
114
|
-
assert_equal 'definition', dict.tag_refs_without_deprecation.first.name
|
115
|
-
assert_equal 'word', dict.tag_refs_without_deprecation.first.hash.key.name
|
116
|
-
assert_equal 'meaning', dict.tag_refs_without_deprecation.first.hash.value.name
|
117
|
-
end
|
118
|
-
|
119
107
|
def test_roxml_attrs
|
120
108
|
assert_equal 'definition', DictionaryOfTexts.roxml_attrs.first.name
|
121
109
|
assert_equal 'word', DictionaryOfTexts.roxml_attrs.first.hash.key.name
|
122
110
|
assert_equal 'meaning', DictionaryOfTexts.roxml_attrs.first.hash.value.name
|
123
111
|
end
|
124
112
|
|
125
|
-
def test_xml_name_query_is_deprecated
|
126
|
-
# This query should go when the XML_NAME_WARNING stuff goes
|
127
|
-
assert_deprecated do
|
128
|
-
NamedChild.xml_name?
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
113
|
def test_xml_name_should_not_be_conventionalized_if_explicitly_set
|
133
114
|
reference = ROXML::XMLTextRef.new(ROXML::Definition.new(:name, :from => 'georss:name'), WrapModule::InstanceStandin.new)
|
134
115
|
assert_equal "georss:name", reference.name
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
2
2
|
|
3
|
-
class TestDefaultXMLNamespaces <
|
3
|
+
class TestDefaultXMLNamespaces < ActiveSupport::TestCase
|
4
4
|
def setup
|
5
5
|
@book = BookWithContributions.from_xml(fixture(:book_with_default_namespace))
|
6
6
|
end
|
@@ -47,7 +47,7 @@ class NamespaceyObject
|
|
47
47
|
xml_reader :no_namespace, :from => 'no_namespace'
|
48
48
|
end
|
49
49
|
|
50
|
-
class TestXMLNamespaceDeclarations <
|
50
|
+
class TestXMLNamespaceDeclarations < ActiveSupport::TestCase
|
51
51
|
def setup
|
52
52
|
@instance = NamespaceyObject.from_xml(%{
|
53
53
|
<aws:book xmlns:aws="http://www.aws.com/aws" xmlns:different="http://www.aws.com/different">
|
@@ -13,10 +13,10 @@ end
|
|
13
13
|
class CartHolder
|
14
14
|
include ROXML
|
15
15
|
|
16
|
-
xml_reader :cart, EmptyCart, :required => true
|
16
|
+
xml_reader :cart, :as => EmptyCart, :required => true
|
17
17
|
end
|
18
18
|
|
19
|
-
class TestXMLObject <
|
19
|
+
class TestXMLObject < ActiveSupport::TestCase
|
20
20
|
# Test book with text and attribute
|
21
21
|
def test_book_author_text_attribute
|
22
22
|
book = BookWithAuthorTextAttribute.from_xml(fixture(:book_text_with_attribute))
|
@@ -120,19 +120,19 @@ class TestXMLObject < Test::Unit::TestCase
|
|
120
120
|
include ROXML
|
121
121
|
|
122
122
|
xml_reader :name, :from => 'node_name'
|
123
|
-
xml_reader :nodes, [Node]
|
123
|
+
xml_reader :nodes, :as => [Node]
|
124
124
|
end
|
125
125
|
|
126
126
|
class Taxonomy
|
127
127
|
include ROXML
|
128
128
|
|
129
129
|
xml_reader :name, :from => 'taxonomy_name'
|
130
|
-
xml_reader :nodes, [Node]
|
130
|
+
xml_reader :nodes, :as => [Node]
|
131
131
|
end
|
132
132
|
|
133
133
|
class Taxonomies
|
134
134
|
include ROXML
|
135
|
-
xml_reader :taxonomies, [Taxonomy]
|
135
|
+
xml_reader :taxonomies, :as => [Taxonomy]
|
136
136
|
end
|
137
137
|
|
138
138
|
def test_more_recursion
|
data/test/unit/xml_text_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
|
2
2
|
|
3
|
-
class TestXMLText <
|
3
|
+
class TestXMLText < ActiveSupport::TestCase
|
4
4
|
# Test a simple mapping with no composition
|
5
5
|
def test_valid_simple
|
6
6
|
book = Book.from_xml(fixture(:book_valid))
|
@@ -28,7 +28,7 @@ class TestXMLText < Test::Unit::TestCase
|
|
28
28
|
empty_array = Class.new do
|
29
29
|
include ROXML
|
30
30
|
|
31
|
-
xml_reader :missing_array, [
|
31
|
+
xml_reader :missing_array, :as => [], :from => 'missing'
|
32
32
|
end
|
33
33
|
|
34
34
|
obj = empty_array.from_xml('<empty_array></empty_array>')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Empact-roxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Woosley
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-03-
|
15
|
+
date: 2009-03-12 00:00:00 -07:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -109,7 +109,6 @@ files:
|
|
109
109
|
- lib/roxml.rb
|
110
110
|
- lib/roxml/definition.rb
|
111
111
|
- lib/roxml/extensions.rb
|
112
|
-
- lib/roxml/extensions/active_support.rb
|
113
112
|
- lib/roxml/extensions/array.rb
|
114
113
|
- lib/roxml/extensions/array/conversions.rb
|
115
114
|
- lib/roxml/extensions/deprecation.rb
|
@@ -134,7 +133,6 @@ files:
|
|
134
133
|
- spec/shared_specs.rb
|
135
134
|
- spec/spec.opts
|
136
135
|
- spec/spec_helper.rb
|
137
|
-
- spec/string_spec.rb
|
138
136
|
- spec/xml/parser_spec.rb
|
139
137
|
- tasks/rspec.rake
|
140
138
|
- tasks/test.rake
|
@@ -171,7 +169,6 @@ files:
|
|
171
169
|
- test/fixtures/person_with_mothers.xml
|
172
170
|
- test/mocks/dictionaries.rb
|
173
171
|
- test/mocks/mocks.rb
|
174
|
-
- test/release/dependencies_test.rb
|
175
172
|
- test/test_helper.rb
|
176
173
|
- test/unit/definition_test.rb
|
177
174
|
- test/unit/deprecations_test.rb
|
@@ -179,7 +176,6 @@ files:
|
|
179
176
|
- test/unit/xml_attribute_test.rb
|
180
177
|
- test/unit/xml_block_test.rb
|
181
178
|
- test/unit/xml_bool_test.rb
|
182
|
-
- test/unit/xml_construct_test.rb
|
183
179
|
- test/unit/xml_convention_test.rb
|
184
180
|
- test/unit/xml_hash_test.rb
|
185
181
|
- test/unit/xml_initialize_test.rb
|
@@ -221,18 +217,17 @@ signing_key:
|
|
221
217
|
specification_version: 2
|
222
218
|
summary: Ruby Object to XML mapping library
|
223
219
|
test_files:
|
224
|
-
- test/unit/definition_test.rb
|
225
|
-
- test/unit/deprecations_test.rb
|
226
|
-
- test/unit/to_xml_test.rb
|
227
|
-
- test/unit/xml_attribute_test.rb
|
228
|
-
- test/unit/xml_block_test.rb
|
229
|
-
- test/unit/xml_bool_test.rb
|
230
|
-
- test/unit/xml_construct_test.rb
|
231
220
|
- test/unit/xml_convention_test.rb
|
232
|
-
- test/unit/xml_hash_test.rb
|
233
|
-
- test/unit/xml_initialize_test.rb
|
234
|
-
- test/unit/xml_name_test.rb
|
235
|
-
- test/unit/xml_namespace_test.rb
|
236
221
|
- test/unit/xml_object_test.rb
|
237
222
|
- test/unit/xml_required_test.rb
|
223
|
+
- test/unit/xml_bool_test.rb
|
224
|
+
- test/unit/xml_name_test.rb
|
225
|
+
- test/unit/definition_test.rb
|
226
|
+
- test/unit/xml_namespace_test.rb
|
227
|
+
- test/unit/deprecations_test.rb
|
238
228
|
- test/unit/xml_text_test.rb
|
229
|
+
- test/unit/xml_block_test.rb
|
230
|
+
- test/unit/xml_attribute_test.rb
|
231
|
+
- test/unit/xml_initialize_test.rb
|
232
|
+
- test/unit/xml_hash_test.rb
|
233
|
+
- test/unit/to_xml_test.rb
|