polyrex 0.8.19 → 0.8.20
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/lib/polyrex.rb +8 -2
- metadata +2 -2
data/lib/polyrex.rb
CHANGED
|
@@ -264,6 +264,8 @@ class Polyrex
|
|
|
264
264
|
patterns = possible_patterns(@format_masks[i])
|
|
265
265
|
pattern = patterns.detect {|x| line.match(/#{x.join}/)}.join
|
|
266
266
|
field_values = line.match(/#{pattern}/).captures
|
|
267
|
+
|
|
268
|
+
|
|
267
269
|
found_quotes = find_qpattern(pattern)
|
|
268
270
|
|
|
269
271
|
if found_quotes then
|
|
@@ -441,7 +443,7 @@ class Polyrex
|
|
|
441
443
|
else
|
|
442
444
|
r2 = r
|
|
443
445
|
end
|
|
444
|
-
|
|
446
|
+
|
|
445
447
|
rr = r2.map do |x|
|
|
446
448
|
x.each_with_index.map do |item, i|
|
|
447
449
|
d = a[i]
|
|
@@ -455,7 +457,11 @@ class Polyrex
|
|
|
455
457
|
end
|
|
456
458
|
end
|
|
457
459
|
|
|
458
|
-
|
|
460
|
+
count = 2**main_fields
|
|
461
|
+
rr2 = rr.take(count).map {|x| x + [a[-1] + '(.*)']}
|
|
462
|
+
wild_r = rr2.slice!(-1)
|
|
463
|
+
|
|
464
|
+
rrr = rr2 + rr[0..count-2] + [wild_r] + rr[count-1..-1]
|
|
459
465
|
|
|
460
466
|
end
|
|
461
467
|
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: polyrex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.8.
|
|
5
|
+
version: 0.8.20
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- James Robertson
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2012-04-
|
|
13
|
+
date: 2012-04-16 00:00:00 +01:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|