dynarex 1.2.28 → 1.2.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 926aa9c0961f2dc726d0daf369783f900a5ec88a
4
- data.tar.gz: ecd3a9f1a1f6d21e5495b64138fe996f175abeb8
3
+ metadata.gz: c8f9785899eadfdb8df928f8da8e210aac10b897
4
+ data.tar.gz: 3a4d97866d80ba64397ebc764e1e519b21cf6381
5
5
  SHA512:
6
- metadata.gz: 8a2e24c7507d1bff6709eca13051caef06e49333983677a0594781f71b20e184fc2753a3bd1a5b4f17643b16d6c3143e0c99b4b15881f1c1e42c76e9b2fb3fa5
7
- data.tar.gz: ff8d38e94fa24e71e966ff545f535a966b165c8f7267ddfbd24e56e00e0e308a19a382ed27e6b356226bf0424e2ae622d7327d7e73e2776a633fd6afbfadf6cf
6
+ metadata.gz: e3bf1b9cf0197070322f61cd1dc8b6d0ee85ccb3967c6f023d17d61ea23e1641475d3e4b0095eb372284902a2929a57c2ec71fd7cb33b13987f511cea8925e7c
7
+ data.tar.gz: e3c977a825d3bd2bac53a1adbe87f5f959e366768f65d709a709807d36c3586a5e7cfcdae7d3ec5fdf726a81edcdfccbb7f39d7ad93f8164619d40748bea6414
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -145,6 +145,15 @@ EOF
145
145
  #format_mask = XPath.first(@doc.root, 'summary/format_mask/text()').to_s
146
146
  #format_mask = @doc.root.element('summary/format_mask/text()')
147
147
 
148
+ raw_summary_fields = self.summary[:schema][/^\w+\[([^\]]+)\]/,1]
149
+ sumry = ''
150
+
151
+ if raw_summary_fields then
152
+ summary_fields = raw_summary_fields.split(',')
153
+ sumry = "\n" + summary_fields.map {|x| x + ': ' + \
154
+ self.summary[x]}.join("\n")
155
+ end
156
+
148
157
  if self.summary[:rawdoc_type] == 'rowx' then
149
158
  a = self.fields.map do |field|
150
159
  "<xsl:if test=\"%s != ''\">
@@ -158,8 +167,12 @@ EOF
158
167
  xslt = Nokogiri::XSLT(xsl_buffer)
159
168
  out = xslt.transform(Nokogiri::XML(@doc.to_s))
160
169
 
161
- declaration = %Q(<?dynarex schema="%s"?>\n--+) % self.schema
162
- declaration + out.text
170
+ if @raw_header then
171
+ declaration = @raw_header
172
+ else
173
+ declaration = %Q(<?dynarex schema="%s"?>\n) % self.schema.gsub('"', '\"')
174
+ end
175
+ declaration + sumry + "\n--+\n" + out.text
163
176
 
164
177
  else
165
178
 
@@ -172,9 +185,13 @@ EOF
172
185
  xslt = Nokogiri::XSLT(xsl_buffer)
173
186
 
174
187
  out = xslt.transform(Nokogiri::XML(@doc.to_s))
175
- declaration = %Q(<?dynarex schema="%s" format_mask="%s"?>\n) %
176
- [self.schema, self.format_mask]
177
- out.text
188
+ if @raw_header then
189
+ declaration = @raw_header
190
+ else
191
+ declaration = %Q(<?dynarex schema="%s" format_mask="%s"?>\n) %
192
+ [self.schema, self.format_mask.gsub('"', '\"')]
193
+ end
194
+ declaration + sumry + "\n" + out.text
178
195
  end
179
196
 
180
197
  #xsl_buffer.sub!(/\[!regex_values\]/, xslt_format)
@@ -458,10 +475,10 @@ EOF
458
475
  alias refresh_doc display_xml
459
476
 
460
477
  def string_parse(buffer)
461
- raw_header = buffer.slice!(/<\?dynarex[^>]+>/)
478
+ @raw_header = buffer.slice!(/<\?dynarex[^>]+>/)
462
479
 
463
- if raw_header then
464
- header = raw_header[/<?dynarex (.*)?>/,1]
480
+ if @raw_header then
481
+ header = @raw_header[/<?dynarex (.*)?>/,1]
465
482
 
466
483
  r1 = /([\w\-]+\s*\=\s*'[^']*)'/
467
484
  r2 = /([\w\-]+\s*\=\s*"[^"]*)"/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.28
4
+ version: 1.2.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -29,7 +29,7 @@ cert_chain:
29
29
  kUea9jZD+xTq1Js9t2BHCz3Ev/sgS7CaijrbQetbNwzasFGHRd30xBEwd4zANQOp
30
30
  i0OBH0e4iIMkv+Q+PYlNRnlpQogsAdTs
31
31
  -----END CERTIFICATE-----
32
- date: 2013-08-02 00:00:00.000000000 Z
32
+ date: 2013-08-03 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rexle
metadata.gz.sig CHANGED
Binary file