polyrex 0.8.38 → 0.8.39
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex.rb +8 -2
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3cc6e9a93d6c43783bfccfe2576297d7b464b38b
|
|
4
|
+
data.tar.gz: fcd94f727f246b0c036b584cf2f2095faa464935
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c0f445d57045c264b7163ba67073650d5619eb53dda875f48437f122b2bfa6f1f50f2d6321c53e5f4dab309b60ee2cfd69a5d689970fc57a4f9d5848116d914
|
|
7
|
+
data.tar.gz: 37cc73a4e6bee80f9aec4ed4675861ed7380dc809d5918f476f8168865d0f773ea368e3ba37bbc170102703a0ac48533a8c927e5b5c6827e2a134aec8b4aaee6
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/polyrex.rb
CHANGED
|
@@ -86,6 +86,7 @@ class Polyrex
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
def delimiter=(separator)
|
|
89
|
+
|
|
89
90
|
@format_masks.map! do |format_mask|
|
|
90
91
|
format_mask.to_s.gsub(/\s/, separator)
|
|
91
92
|
end
|
|
@@ -128,6 +129,7 @@ class Polyrex
|
|
|
128
129
|
end
|
|
129
130
|
|
|
130
131
|
def parse(buffer='', options={})
|
|
132
|
+
|
|
131
133
|
buffer = yield if block_given?
|
|
132
134
|
string_parse buffer, options
|
|
133
135
|
self
|
|
@@ -146,9 +148,11 @@ class Polyrex
|
|
|
146
148
|
end
|
|
147
149
|
|
|
148
150
|
def schema=(s)
|
|
151
|
+
|
|
149
152
|
open(s)
|
|
150
153
|
summary_h = Hash[*@doc.root.xpath("summary/*").map {|x| [x.name, x.text]}.flatten]
|
|
151
154
|
#@summary = OpenStruct.new summary_h
|
|
155
|
+
|
|
152
156
|
@summary = RecordX.new summary_h
|
|
153
157
|
@summary_fields = summary_h.keys.map(&:to_sym)
|
|
154
158
|
self
|
|
@@ -240,9 +244,11 @@ EOF
|
|
|
240
244
|
end
|
|
241
245
|
|
|
242
246
|
def polyrex_new(schema)
|
|
247
|
+
|
|
243
248
|
# -- required for the parsing feature
|
|
244
249
|
doc = PolyrexSchema.new(schema).to_doc
|
|
245
|
-
|
|
250
|
+
fm = doc.root.xpath('//format_mask/text()')
|
|
251
|
+
@format_masks = fm.zip(@format_masks).map{|x,y| y || x }
|
|
246
252
|
|
|
247
253
|
schema_rpath = schema.gsub(/\[[^\]]+\]/,'')
|
|
248
254
|
|
|
@@ -307,7 +313,6 @@ EOF
|
|
|
307
313
|
end
|
|
308
314
|
end
|
|
309
315
|
|
|
310
|
-
|
|
311
316
|
raw_lines = buffer.strip.split(/\r?\n|\r(?!\n)/)
|
|
312
317
|
|
|
313
318
|
raw_summary = schema[/^\w+\[([^\]]+)/,1]
|
|
@@ -331,6 +336,7 @@ EOF
|
|
|
331
336
|
end
|
|
332
337
|
|
|
333
338
|
@summary.format_mask = @format_masks
|
|
339
|
+
|
|
334
340
|
records = @parent_node.root
|
|
335
341
|
@parent_node = records.parent
|
|
336
342
|
records.delete
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polyrex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
|
29
29
|
7hfiCsNv+0o/OwBNlpn8pTTpd3jV6o1Qq0Y7QiFomKd6XWlaHT4ZNtZdb/XTpC7W
|
|
30
30
|
ZUZv+oXV5L4FrLlOrnTUhA+cZRntSyHs
|
|
31
31
|
-----END CERTIFICATE-----
|
|
32
|
-
date: 2013-12-
|
|
32
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: polyrex-schema
|
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
156
156
|
version: '0'
|
|
157
157
|
requirements: []
|
|
158
158
|
rubyforge_project:
|
|
159
|
-
rubygems_version: 2.0.
|
|
159
|
+
rubygems_version: 2.0.3
|
|
160
160
|
signing_key:
|
|
161
161
|
specification_version: 4
|
|
162
162
|
summary: polyrex
|
metadata.gz.sig
CHANGED
|
Binary file
|