multi_xml 0.5.5 → 0.7.0
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.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.rubocop.yml +54 -0
- data/CHANGELOG.md +12 -0
- data/CONTRIBUTING.md +5 -3
- data/Gemfile +21 -0
- data/LICENSE.md +1 -1
- data/README.md +12 -35
- data/Rakefile +27 -15
- data/lib/multi_xml/parsers/libxml.rb +12 -9
- data/lib/multi_xml/parsers/libxml2_parser.rb +21 -25
- data/lib/multi_xml/parsers/nokogiri.rb +14 -10
- data/lib/multi_xml/parsers/oga.rb +71 -0
- data/lib/multi_xml/parsers/ox.rb +16 -22
- data/lib/multi_xml/parsers/rexml.rb +16 -16
- data/lib/multi_xml/version.rb +1 -1
- data/lib/multi_xml.rb +127 -112
- metadata +37 -69
- data/multi_xml.gemspec +0 -24
- data/spec/helper.rb +0 -17
- data/spec/multi_xml_spec.rb +0 -43
- data/spec/parser_shared_example.rb +0 -694
- data/spec/speed.rb +0 -63
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
@@ -1,10 +1,13 @@
|
|
1
|
-
require
|
1
|
+
require "rexml/document" unless defined?(REXML::Document)
|
2
2
|
|
3
3
|
module MultiXml
|
4
4
|
module Parsers
|
5
|
-
module Rexml
|
5
|
+
module Rexml # :nodoc:
|
6
6
|
extend self
|
7
|
-
|
7
|
+
|
8
|
+
def parse_error
|
9
|
+
::REXML::ParseException
|
10
|
+
end
|
8
11
|
|
9
12
|
# Parse an XML Document IO into a simple hash using REXML
|
10
13
|
#
|
@@ -12,11 +15,9 @@ module MultiXml
|
|
12
15
|
# XML Document IO to parse
|
13
16
|
def parse(xml)
|
14
17
|
doc = REXML::Document.new(xml)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
raise REXML::ParseException, "The document #{doc.to_s.inspect} does not have a valid root"
|
19
|
-
end
|
18
|
+
raise(REXML::ParseException, "The document #{doc.to_s.inspect} does not have a valid root") unless doc.root
|
19
|
+
|
20
|
+
merge_element!({}, doc.root)
|
20
21
|
end
|
21
22
|
|
22
23
|
private
|
@@ -39,7 +40,7 @@ module MultiXml
|
|
39
40
|
hash = get_attributes(element)
|
40
41
|
|
41
42
|
if element.has_elements?
|
42
|
-
element.each_element {|child| merge_element!(hash, child) }
|
43
|
+
element.each_element { |child| merge_element!(hash, child) }
|
43
44
|
merge_texts!(hash, element) unless empty_content?(element)
|
44
45
|
hash
|
45
46
|
else
|
@@ -54,13 +55,12 @@ module MultiXml
|
|
54
55
|
# element::
|
55
56
|
# XML element whose texts are to me merged into the hash
|
56
57
|
def merge_texts!(hash, element)
|
57
|
-
|
58
|
-
hash
|
59
|
-
else
|
58
|
+
if element.has_text?
|
60
59
|
# must use value to prevent double-escaping
|
61
|
-
texts =
|
62
|
-
element.texts.each { |t| texts << t.value }
|
60
|
+
texts = element.texts.map(&:value).join
|
63
61
|
merge!(hash, MultiXml::CONTENT_ROOT, texts)
|
62
|
+
else
|
63
|
+
hash
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -76,7 +76,7 @@ module MultiXml
|
|
76
76
|
# value::
|
77
77
|
# Value to be associated with key.
|
78
78
|
def merge!(hash, key, value)
|
79
|
-
if hash.
|
79
|
+
if hash.key?(key)
|
80
80
|
if hash[key].instance_of?(Array)
|
81
81
|
hash[key] << value
|
82
82
|
else
|
@@ -97,7 +97,7 @@ module MultiXml
|
|
97
97
|
# XML element to extract attributes from.
|
98
98
|
def get_attributes(element)
|
99
99
|
attributes = {}
|
100
|
-
element.attributes.each { |n,v| attributes[n] = v }
|
100
|
+
element.attributes.each { |n, v| attributes[n] = v }
|
101
101
|
attributes
|
102
102
|
end
|
103
103
|
|
data/lib/multi_xml/version.rb
CHANGED
data/lib/multi_xml.rb
CHANGED
@@ -1,77 +1,84 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
|
7
|
-
|
8
|
-
module MultiXml
|
1
|
+
require "bigdecimal"
|
2
|
+
require "date"
|
3
|
+
require "stringio"
|
4
|
+
require "time"
|
5
|
+
require "yaml"
|
6
|
+
|
7
|
+
module MultiXml # rubocop:disable Metrics/ModuleLength
|
9
8
|
class ParseError < StandardError; end
|
9
|
+
|
10
|
+
class NoParserError < StandardError; end
|
11
|
+
|
10
12
|
class DisallowedTypeError < StandardError
|
11
13
|
def initialize(type)
|
12
|
-
super
|
14
|
+
super("Disallowed type attribute: #{type.inspect}")
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
16
|
-
REQUIREMENT_MAP
|
17
|
-
[
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
unless defined?(REQUIREMENT_MAP)
|
19
|
+
REQUIREMENT_MAP = [
|
20
|
+
["ox", :ox],
|
21
|
+
["libxml", :libxml],
|
22
|
+
["nokogiri", :nokogiri],
|
23
|
+
["rexml/document", :rexml],
|
24
|
+
["oga", :oga]
|
25
|
+
].freeze
|
26
|
+
end
|
22
27
|
|
23
|
-
CONTENT_ROOT =
|
28
|
+
CONTENT_ROOT = "__content__".freeze unless defined?(CONTENT_ROOT)
|
24
29
|
|
25
30
|
unless defined?(PARSING)
|
31
|
+
float_proc = proc { |float| float.to_f }
|
32
|
+
datetime_proc = proc { |time| Time.parse(time).utc rescue DateTime.parse(time).utc } # rubocop:disable Style/RescueModifier
|
33
|
+
|
26
34
|
PARSING = {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
35
|
+
"symbol" => proc { |symbol| symbol.to_sym },
|
36
|
+
"date" => proc { |date| Date.parse(date) },
|
37
|
+
"datetime" => datetime_proc,
|
38
|
+
"dateTime" => datetime_proc,
|
39
|
+
"integer" => proc { |integer| integer.to_i },
|
40
|
+
"float" => float_proc,
|
41
|
+
"double" => float_proc,
|
42
|
+
"decimal" => proc { |number| BigDecimal(number) },
|
43
|
+
"boolean" => proc { |boolean| !%w[0 false].include?(boolean.strip) },
|
44
|
+
"string" => proc { |string| string.to_s },
|
45
|
+
"yaml" => proc { |yaml| YAML.load(yaml) rescue yaml }, # rubocop:disable Style/RescueModifier
|
46
|
+
"base64Binary" => proc { |binary| base64_decode(binary) },
|
47
|
+
"binary" => proc { |binary, entity| parse_binary(binary, entity) },
|
48
|
+
"file" => proc { |file, entity| parse_file(file, entity) }
|
49
|
+
}.freeze
|
50
|
+
end
|
51
|
+
|
52
|
+
unless defined?(TYPE_NAMES)
|
53
|
+
TYPE_NAMES = {
|
54
|
+
"Symbol" => "symbol",
|
55
|
+
"Integer" => "integer",
|
56
|
+
"BigDecimal" => "decimal",
|
57
|
+
"Float" => "float",
|
58
|
+
"TrueClass" => "boolean",
|
59
|
+
"FalseClass" => "boolean",
|
60
|
+
"Date" => "date",
|
61
|
+
"DateTime" => "datetime",
|
62
|
+
"Time" => "datetime",
|
63
|
+
"Array" => "array",
|
64
|
+
"Hash" => "hash"
|
65
|
+
}.freeze
|
45
66
|
end
|
46
67
|
|
47
|
-
|
48
|
-
'Symbol' => 'symbol',
|
49
|
-
'Fixnum' => 'integer',
|
50
|
-
'Bignum' => 'integer',
|
51
|
-
'BigDecimal' => 'decimal',
|
52
|
-
'Float' => 'float',
|
53
|
-
'TrueClass' => 'boolean',
|
54
|
-
'FalseClass' => 'boolean',
|
55
|
-
'Date' => 'date',
|
56
|
-
'DateTime' => 'datetime',
|
57
|
-
'Time' => 'datetime',
|
58
|
-
'Array' => 'array',
|
59
|
-
'Hash' => 'hash'
|
60
|
-
} unless defined?(TYPE_NAMES)
|
61
|
-
|
62
|
-
DISALLOWED_XML_TYPES = %w(symbol yaml)
|
68
|
+
DISALLOWED_XML_TYPES = %w[symbol yaml].freeze
|
63
69
|
|
64
70
|
DEFAULT_OPTIONS = {
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
68
|
-
}
|
71
|
+
typecast_xml_value: true,
|
72
|
+
disallowed_types: DISALLOWED_XML_TYPES,
|
73
|
+
symbolize_keys: false
|
74
|
+
}.freeze
|
69
75
|
|
70
76
|
class << self
|
71
77
|
# Get the current parser class.
|
72
78
|
def parser
|
73
79
|
return @parser if defined?(@parser)
|
74
|
-
|
80
|
+
|
81
|
+
self.parser = default_parser
|
75
82
|
@parser
|
76
83
|
end
|
77
84
|
|
@@ -83,15 +90,16 @@ module MultiXml
|
|
83
90
|
return :ox if defined?(::Ox)
|
84
91
|
return :libxml if defined?(::LibXML)
|
85
92
|
return :nokogiri if defined?(::Nokogiri)
|
93
|
+
return :oga if defined?(::Oga)
|
86
94
|
|
87
95
|
REQUIREMENT_MAP.each do |library, parser|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
next
|
93
|
-
end
|
96
|
+
require library
|
97
|
+
return parser
|
98
|
+
rescue LoadError
|
99
|
+
next
|
94
100
|
end
|
101
|
+
raise(NoParserError,
|
102
|
+
"No XML parser detected. If you're using Rubinius and Bundler, try adding an XML parser to your Gemfile (e.g. libxml-ruby, nokogiri, or rubysl-rexml). For more information, see https://github.com/sferik/multi_xml/issues/42.")
|
95
103
|
end
|
96
104
|
|
97
105
|
# Set the XML parser utilizing a symbol, string, or class.
|
@@ -101,15 +109,16 @@ module MultiXml
|
|
101
109
|
# * <tt>:nokogiri</tt>
|
102
110
|
# * <tt>:ox</tt>
|
103
111
|
# * <tt>:rexml</tt>
|
112
|
+
# * <tt>:oga</tt>
|
104
113
|
def parser=(new_parser)
|
105
114
|
case new_parser
|
106
115
|
when String, Symbol
|
107
116
|
require "multi_xml/parsers/#{new_parser.to_s.downcase}"
|
108
|
-
@parser = MultiXml::Parsers.const_get(
|
117
|
+
@parser = MultiXml::Parsers.const_get(new_parser.to_s.split("_").collect(&:capitalize).join.to_s)
|
109
118
|
when Class, Module
|
110
119
|
@parser = new_parser
|
111
120
|
else
|
112
|
-
raise
|
121
|
+
raise("Did not recognize your parser specification. Please specify either a symbol or a class.")
|
113
122
|
end
|
114
123
|
end
|
115
124
|
|
@@ -122,25 +131,26 @@ module MultiXml
|
|
122
131
|
# <tt>:disallowed_types</tt> :: Types to disallow from being typecasted. Defaults to `['yaml', 'symbol']`. Use `[]` to allow all types.
|
123
132
|
#
|
124
133
|
# <tt>:typecast_xml_value</tt> :: If true, won't typecast values for parsed document
|
125
|
-
def parse(xml, options={})
|
126
|
-
xml ||=
|
134
|
+
def parse(xml, options = {}) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
|
135
|
+
xml ||= ""
|
127
136
|
|
128
137
|
options = DEFAULT_OPTIONS.merge(options)
|
129
138
|
|
130
|
-
xml.strip
|
139
|
+
xml = xml.strip if xml.respond_to?(:strip)
|
131
140
|
begin
|
132
141
|
xml = StringIO.new(xml) unless xml.respond_to?(:read)
|
133
142
|
|
134
143
|
char = xml.getc
|
135
144
|
return {} if char.nil?
|
145
|
+
|
136
146
|
xml.ungetc(char)
|
137
147
|
|
138
148
|
hash = undasherize_keys(parser.parse(xml) || {})
|
139
|
-
hash =
|
149
|
+
hash = typecast_xml_value(hash, options[:disallowed_types]) if options[:typecast_xml_value]
|
140
150
|
rescue DisallowedTypeError
|
141
151
|
raise
|
142
|
-
rescue parser.parse_error =>
|
143
|
-
raise
|
152
|
+
rescue parser.parse_error => e
|
153
|
+
raise(ParseError, e.message, e.backtrace)
|
144
154
|
end
|
145
155
|
hash = symbolize_keys(hash) if options[:symbolize_keys]
|
146
156
|
hash
|
@@ -148,38 +158,42 @@ module MultiXml
|
|
148
158
|
|
149
159
|
# This module decorates files with the <tt>original_filename</tt>
|
150
160
|
# and <tt>content_type</tt> methods.
|
151
|
-
module FileLike
|
161
|
+
module FileLike # :nodoc:
|
152
162
|
attr_writer :original_filename, :content_type
|
153
163
|
|
154
164
|
def original_filename
|
155
|
-
@original_filename ||
|
165
|
+
@original_filename || "untitled"
|
156
166
|
end
|
157
167
|
|
158
168
|
def content_type
|
159
|
-
@content_type ||
|
169
|
+
@content_type || "application/octet-stream"
|
160
170
|
end
|
161
171
|
end
|
162
172
|
|
163
173
|
private
|
164
174
|
|
165
175
|
# TODO: Add support for other encodings
|
166
|
-
def parse_binary(binary, entity)
|
167
|
-
case entity[
|
168
|
-
when
|
169
|
-
|
176
|
+
def parse_binary(binary, entity) # :nodoc:
|
177
|
+
case entity["encoding"]
|
178
|
+
when "base64"
|
179
|
+
base64_decode(binary)
|
170
180
|
else
|
171
181
|
binary
|
172
182
|
end
|
173
183
|
end
|
174
184
|
|
175
185
|
def parse_file(file, entity)
|
176
|
-
f = StringIO.new(
|
186
|
+
f = StringIO.new(base64_decode(file))
|
177
187
|
f.extend(FileLike)
|
178
|
-
f.original_filename = entity[
|
179
|
-
f.content_type = entity[
|
188
|
+
f.original_filename = entity["name"]
|
189
|
+
f.content_type = entity["content_type"]
|
180
190
|
f
|
181
191
|
end
|
182
192
|
|
193
|
+
def base64_decode(input)
|
194
|
+
input.unpack1("m")
|
195
|
+
end
|
196
|
+
|
183
197
|
def symbolize_keys(params)
|
184
198
|
case params
|
185
199
|
when Hash
|
@@ -187,7 +201,7 @@ module MultiXml
|
|
187
201
|
result.merge(key.to_sym => symbolize_keys(value))
|
188
202
|
end
|
189
203
|
when Array
|
190
|
-
params.
|
204
|
+
params.collect { |value| symbolize_keys(value) }
|
191
205
|
else
|
192
206
|
params
|
193
207
|
end
|
@@ -196,27 +210,27 @@ module MultiXml
|
|
196
210
|
def undasherize_keys(params)
|
197
211
|
case params
|
198
212
|
when Hash
|
199
|
-
params.
|
200
|
-
hash[key.to_s.tr(
|
213
|
+
params.each_with_object({}) do |(key, value), hash|
|
214
|
+
hash[key.to_s.tr("-", "_")] = undasherize_keys(value)
|
201
215
|
hash
|
202
216
|
end
|
203
217
|
when Array
|
204
|
-
params.
|
218
|
+
params.collect { |value| undasherize_keys(value) }
|
205
219
|
else
|
206
220
|
params
|
207
221
|
end
|
208
222
|
end
|
209
223
|
|
210
|
-
def typecast_xml_value(value, disallowed_types=nil)
|
224
|
+
def typecast_xml_value(value, disallowed_types = nil) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
|
211
225
|
disallowed_types ||= DISALLOWED_XML_TYPES
|
212
226
|
|
213
227
|
case value
|
214
228
|
when Hash
|
215
|
-
if value.include?(
|
216
|
-
raise
|
229
|
+
if value.include?("type") && !value["type"].is_a?(Hash) && disallowed_types.include?(value["type"])
|
230
|
+
raise(DisallowedTypeError, value["type"])
|
217
231
|
end
|
218
232
|
|
219
|
-
if value[
|
233
|
+
if value["type"] == "array"
|
220
234
|
|
221
235
|
# this commented-out suggestion helps to avoid the multiple attribute
|
222
236
|
# problem, but it breaks when there is only one item in the array.
|
@@ -227,29 +241,31 @@ module MultiXml
|
|
227
241
|
|
228
242
|
# This attempt fails to consider the order that the detect method
|
229
243
|
# retrieves the entries.
|
230
|
-
#_, entries = value.detect {|key, _| key != 'type'}
|
244
|
+
# _, entries = value.detect {|key, _| key != 'type'}
|
231
245
|
|
232
246
|
# This approach ignores attribute entries that are not convertable
|
233
247
|
# to an Array which allows attributes to be ignored.
|
234
|
-
_, entries = value.detect {|k, v| k !=
|
248
|
+
_, entries = value.detect { |k, v| k != "type" && (v.is_a?(Array) || v.is_a?(Hash)) }
|
235
249
|
|
236
|
-
|
250
|
+
case entries
|
251
|
+
when NilClass
|
237
252
|
[]
|
253
|
+
when String
|
254
|
+
[] if entries.strip.empty?
|
255
|
+
when Array
|
256
|
+
entries.collect { |entry| typecast_xml_value(entry, disallowed_types) }
|
257
|
+
when Hash
|
258
|
+
[typecast_xml_value(entries, disallowed_types)]
|
238
259
|
else
|
239
|
-
|
240
|
-
when Array
|
241
|
-
entries.map {|entry| typecast_xml_value(entry, disallowed_types)}
|
242
|
-
when Hash
|
243
|
-
[typecast_xml_value(entries, disallowed_types)]
|
244
|
-
else
|
245
|
-
raise "can't typecast #{entries.class.name}: #{entries.inspect}"
|
246
|
-
end
|
260
|
+
raise("can't typecast #{entries.class.name}: #{entries.inspect}")
|
247
261
|
end
|
248
|
-
|
262
|
+
|
263
|
+
elsif value.key?(CONTENT_ROOT)
|
249
264
|
content = value[CONTENT_ROOT]
|
250
|
-
|
265
|
+
block = PARSING[value["type"]]
|
266
|
+
if block
|
251
267
|
if block.arity == 1
|
252
|
-
value.delete(
|
268
|
+
value.delete("type") if PARSING[value["type"]]
|
253
269
|
if value.keys.size > 1
|
254
270
|
value[CONTENT_ROOT] = block.call(content)
|
255
271
|
value
|
@@ -260,37 +276,36 @@ module MultiXml
|
|
260
276
|
block.call(content, value)
|
261
277
|
end
|
262
278
|
else
|
263
|
-
value.keys.size > 1 ? value : content
|
279
|
+
(value.keys.size > 1) ? value : content
|
264
280
|
end
|
265
|
-
elsif value[
|
266
|
-
|
281
|
+
elsif value["type"] == "string" && value["nil"] != "true"
|
282
|
+
""
|
267
283
|
# blank or nil parsed values are represented by nil
|
268
|
-
elsif value.empty? || value[
|
284
|
+
elsif value.empty? || value["nil"] == "true"
|
269
285
|
nil
|
270
286
|
# If the type is the only element which makes it then
|
271
287
|
# this still makes the value nil, except if type is
|
272
288
|
# a XML node(where type['value'] is a Hash)
|
273
|
-
elsif value[
|
289
|
+
elsif value["type"] && value.size == 1 && !value["type"].is_a?(Hash)
|
274
290
|
nil
|
275
291
|
else
|
276
|
-
xml_value = value.
|
292
|
+
xml_value = value.each_with_object({}) do |(k, v), hash|
|
277
293
|
hash[k] = typecast_xml_value(v, disallowed_types)
|
278
294
|
hash
|
279
295
|
end
|
280
296
|
|
281
297
|
# Turn {:files => {:file => #<StringIO>} into {:files => #<StringIO>} so it is compatible with
|
282
298
|
# how multipart uploaded files from HTML appear
|
283
|
-
xml_value[
|
299
|
+
(xml_value["file"].is_a?(StringIO)) ? xml_value["file"] : xml_value
|
284
300
|
end
|
285
301
|
when Array
|
286
|
-
value.map!{|i| typecast_xml_value(i, disallowed_types)}
|
287
|
-
value.length > 1 ? value : value.first
|
302
|
+
value.map! { |i| typecast_xml_value(i, disallowed_types) }
|
303
|
+
(value.length > 1) ? value : value.first
|
288
304
|
when String
|
289
305
|
value
|
290
306
|
else
|
291
|
-
raise
|
307
|
+
raise("can't typecast #{value.class.name}: #{value.inspect}")
|
292
308
|
end
|
293
309
|
end
|
294
310
|
end
|
295
|
-
|
296
311
|
end
|
metadata
CHANGED
@@ -1,111 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.7.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
- Erik
|
9
|
-
autorequire:
|
10
|
-
bindir:
|
11
|
-
cert_chain:
|
12
|
-
-
|
13
|
-
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMakNDQWhhZ0F3SUJB
|
14
|
-
Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE5TVE4d0RRWURWUVFEREFaelpt
|
15
|
-
VnkKYVdzeEZUQVRCZ29Ka2lhSmsvSXNaQUVaRmdWbmJXRnBiREVUTUJFR0Nn
|
16
|
-
bVNKb21UOGl4a0FSa1dBMk52YlRBZQpGdzB4TXpBeU1ETXhNREF5TWpkYUZ3
|
17
|
-
MHhOREF5TURNeE1EQXlNamRhTUQweER6QU5CZ05WQkFNTUJuTm1aWEpwCmF6
|
18
|
-
RVZNQk1HQ2dtU0pvbVQ4aXhrQVJrV0JXZHRZV2xzTVJNd0VRWUtDWkltaVpQ
|
19
|
-
eUxHUUJHUllEWTI5dE1JSUIKSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4
|
20
|
-
QU1JSUJDZ0tDQVFFQWwweDVkeDh1S3hpN1Rrckl1eUJVVEpWQgp2MW85M25V
|
21
|
-
QjlqL3k0TTk2Z1Yycll3QWNpMUpQQnNlTmQ2RnliempvM1lHdUhsN0VRSHVT
|
22
|
-
SE5hZjFwMmx4ZXcvCnk2MEpYSUpCQmdQY0RLL0tDUDROVUhvZm0wamZvWUQr
|
23
|
-
SDV1TkpmSENOcTcvWnNUeE90RTNSYTkyczBCQ01UcG0Kd0JNTWxXUjVNdGRF
|
24
|
-
aElZdUJPNFhobmVqWWdIMEwvN0JMMmx5bW50Vm5zci9hZ2RRb29qUUNOMUlR
|
25
|
-
bXNSSnZyUgpkdVpSTzN0WnZvSW8xcEJjNEpFZWhEdXFDZXlCZ1BMT3FNb0t0
|
26
|
-
UWxvbGQxVFFzMWtXVUJLN0tXTUZFaEtDL0tnCnp5ektSSFFvOXlEWXdPdllu
|
27
|
-
Z29CTFkrVC9sd0NUNGR5c3NkaHpSYmZueEFoYUt1NFNBc3NJd2FDMDF5Vm93
|
28
|
-
SUQKQVFBQm96a3dOekFKQmdOVkhSTUVBakFBTUIwR0ExVWREZ1FXQkJTMHJ1
|
29
|
-
RGZSYWs1Y2kxT3BETlgvWmRERWtJcwppVEFMQmdOVkhROEVCQU1DQkxBd0RR
|
30
|
-
WUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFISFNNcy9NUDBzT2FMa0V2NEpvCnp2
|
31
|
-
a20zcW41QTZ0MHZhSHg3NzRjbWVqeU1VKzV3eVN4UmV6c3BMN1VMaDlOZXVL
|
32
|
-
Mk9oVStPZTNUcHFyQWc1VEsKUjhHUUlMblZ1MkZlbUdBNnNBa1BEbGNQdGdB
|
33
|
-
NmllSTE5UFpPRjZIVkxtYy9JRC9kUC9OZ1pXV3pFZXFRS21jSwoyK0hNK1NF
|
34
|
-
RURoWmtTY1lla3c0Wk9lMTY0WnRaRzgxNm9BdjV4MHBHaXRTSWt1bVVwN1Y4
|
35
|
-
aUVaLzZlaHI3WTllClhPZzRlZXVuNUwvSmptakFSb1cya05kdmtSRDNjMkVl
|
36
|
-
U0xxV3ZRUnNCbHlwSGZoczZKSnVMbHlaUEdoVTNSL3YKU2YzbFZLcEJDV2dS
|
37
|
-
cEdUdnk0NVhWcEIrNTl5MzNQSm1FdVExUFRFT1l2UXlhbzlVS01BQWFBTi83
|
38
|
-
cVdRdGpsMApobHc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
39
|
-
date: 2013-08-06 00:00:00.000000000 Z
|
7
|
+
- Erik Berlin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
40
12
|
dependencies:
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
14
|
+
name: bigdecimal
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
16
|
requirements:
|
46
|
-
- - ~>
|
17
|
+
- - "~>"
|
47
18
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1
|
49
|
-
type: :
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
50
21
|
prerelease: false
|
51
22
|
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
23
|
requirements:
|
54
|
-
- - ~>
|
24
|
+
- - "~>"
|
55
25
|
- !ruby/object:Gem::Version
|
56
|
-
version: '1
|
57
|
-
description:
|
58
|
-
email:
|
26
|
+
version: '3.1'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- sferik@gmail.com
|
59
30
|
executables: []
|
60
31
|
extensions: []
|
61
32
|
extra_rdoc_files: []
|
62
33
|
files:
|
63
|
-
- .
|
34
|
+
- ".rspec"
|
35
|
+
- ".rubocop.yml"
|
36
|
+
- ".yardopts"
|
64
37
|
- CHANGELOG.md
|
65
38
|
- CONTRIBUTING.md
|
39
|
+
- Gemfile
|
66
40
|
- LICENSE.md
|
67
41
|
- README.md
|
68
42
|
- Rakefile
|
69
|
-
- multi_xml.
|
43
|
+
- lib/multi_xml.rb
|
70
44
|
- lib/multi_xml/parsers/libxml.rb
|
71
45
|
- lib/multi_xml/parsers/libxml2_parser.rb
|
72
46
|
- lib/multi_xml/parsers/nokogiri.rb
|
47
|
+
- lib/multi_xml/parsers/oga.rb
|
73
48
|
- lib/multi_xml/parsers/ox.rb
|
74
49
|
- lib/multi_xml/parsers/rexml.rb
|
75
50
|
- lib/multi_xml/version.rb
|
76
|
-
- lib/multi_xml.rb
|
77
|
-
- spec/helper.rb
|
78
|
-
- spec/multi_xml_spec.rb
|
79
|
-
- spec/parser_shared_example.rb
|
80
|
-
- spec/speed.rb
|
81
51
|
homepage: https://github.com/sferik/multi_xml
|
82
52
|
licenses:
|
83
53
|
- MIT
|
84
|
-
|
54
|
+
metadata:
|
55
|
+
allowed_push_host: https://rubygems.org
|
56
|
+
homepage_uri: https://github.com/sferik/multi_xml
|
57
|
+
source_code_uri: https://github.com/sferik/multi_xml
|
58
|
+
changelog_uri: https://github.com/sferik/multi_xml/blob/master/CHANGELOG.md
|
59
|
+
rubygems_mfa_required: 'true'
|
60
|
+
post_install_message:
|
85
61
|
rdoc_options: []
|
86
62
|
require_paths:
|
87
63
|
- lib
|
88
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- -
|
66
|
+
- - ">="
|
92
67
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
68
|
+
version: 3.1.4
|
94
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
70
|
requirements:
|
97
|
-
- -
|
71
|
+
- - ">="
|
98
72
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
73
|
+
version: '0'
|
100
74
|
requirements: []
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
test_files:
|
107
|
-
- spec/helper.rb
|
108
|
-
- spec/multi_xml_spec.rb
|
109
|
-
- spec/parser_shared_example.rb
|
110
|
-
- spec/speed.rb
|
111
|
-
has_rdoc:
|
75
|
+
rubygems_version: 3.5.9
|
76
|
+
signing_key:
|
77
|
+
specification_version: 4
|
78
|
+
summary: Provides swappable XML backends utilizing LibXML, Nokogiri, Ox, or REXML.
|
79
|
+
test_files: []
|
data/multi_xml.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'multi_xml/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.add_development_dependency 'bundler', '~> 1.0'
|
8
|
-
spec.author = "Erik Michaels-Ober"
|
9
|
-
spec.cert_chain = ['certs/sferik.pem']
|
10
|
-
spec.description = %q{Provides swappable XML backends utilizing LibXML, Nokogiri, Ox, or REXML.}
|
11
|
-
spec.email = 'sferik@gmail.com'
|
12
|
-
spec.files = %w(.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md Rakefile multi_xml.gemspec)
|
13
|
-
spec.files += Dir.glob("lib/**/*.rb")
|
14
|
-
spec.files += Dir.glob("spec/**/*")
|
15
|
-
spec.homepage = 'https://github.com/sferik/multi_xml'
|
16
|
-
spec.licenses = ['MIT']
|
17
|
-
spec.name = 'multi_xml'
|
18
|
-
spec.require_paths = ['lib']
|
19
|
-
spec.required_rubygems_version = '>= 1.3.5'
|
20
|
-
spec.signing_key = File.expand_path("~/.gem/private_key.pem") if $0 =~ /gem\z/
|
21
|
-
spec.summary = %q{A generic swappable back-end for XML parsing}
|
22
|
-
spec.test_files = Dir.glob("spec/**/*")
|
23
|
-
spec.version = MultiXml::VERSION
|
24
|
-
end
|