polyrex 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e019ed697a5c8ce9fb634af811713998c026a0a
4
- data.tar.gz: b6cecdd0c87475f37cff5815795bc48aab5caf7d
3
+ metadata.gz: 12ded278477a495cf6eaa0c402a40c5451f4e35e
4
+ data.tar.gz: fcc70ec6262820debcb045f1bff508f12b3e000b
5
5
  SHA512:
6
- metadata.gz: aaf2f391603824982f39073bd07cae6561293b0bfaeb0aff6b6bb7b34186519f8c055488cd77610017b7c2250e7372874a226606ab1681b597ac5198e2ee9338
7
- data.tar.gz: 6b54f2079fa8222c48a5ddcdb55f3f58cb23814a4b495cedb8e514a97d2dc045ed8cee96b5faff4a59fa05911e1ee676b8bdc70b98fa86d26dd9993d7be09288
6
+ metadata.gz: 5dc29ad11406d399d6bbe60837fb600dfd5159eae3bc7f1e95654a0e9c11a55880102f272b483557a36426fa40dd6f67075e8b00f4ff31ee62a7357954d9b287
7
+ data.tar.gz: 5fe387e8dba98915c77c060db33af93c5bff19072ecd601996e7f2c9ce544f2e7a068d9aa2a34ed9100bd80d3a0daaa29e7743320476f82e984797bd29480f11
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/polyrex.rb CHANGED
@@ -38,7 +38,7 @@ end
38
38
 
39
39
  class Polyrex
40
40
  attr_accessor :summary_fields, :xslt_schema, :id_counter,
41
- :schema, :type, :delimiter, :xslt
41
+ :schema, :type, :delimiter, :xslt, :format_masks
42
42
 
43
43
  def initialize(location=nil, opt={})
44
44
 
@@ -554,7 +554,14 @@ xsl_buffer = '
554
554
  unless @format_masks[i][/^\(.*\)$/] then
555
555
 
556
556
  @field_names, field_values = RXRawLineParser.new(format_masks[i])\
557
- .parse(line)
557
+ .parse(line)
558
+
559
+ schema_a = @schema.split('/')[1..-1]
560
+
561
+ @field_names = schema_a[i] ? \
562
+ schema_a[i][/\[([^\]]+)/,1].split(/\s*,\s*/).map(&:to_sym) : \
563
+ schema_a[-1][/\[([^\]]+)/,1].split(/\s*,\s*/).map(&:to_sym)
564
+
558
565
  else
559
566
 
560
567
  format_masks = @format_masks[i][1..-2].split('|')
@@ -741,4 +748,4 @@ xsl_buffer = '
741
748
  end
742
749
  end
743
750
 
744
- end
751
+ end
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: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  EUI+ncIuEEQSxIVKGeaQ49Dk10P2t0cX3DGyMlv7sreJohHxJfNKsjG/SAk0cks0
32
32
  9+gffejS1ORTgQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-09-19 00:00:00.000000000 Z
34
+ date: 2016-11-21 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: polyrex-schema
metadata.gz.sig CHANGED
Binary file