dynarex 1.2.28 → 1.2.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dynarex.rb +25 -8
- metadata +2 -2
- 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: c8f9785899eadfdb8df928f8da8e210aac10b897
|
4
|
+
data.tar.gz: 3a4d97866d80ba64397ebc764e1e519b21cf6381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3bf1b9cf0197070322f61cd1dc8b6d0ee85ccb3967c6f023d17d61ea23e1641475d3e4b0095eb372284902a2929a57c2ec71fd7cb33b13987f511cea8925e7c
|
7
|
+
data.tar.gz: e3c977a825d3bd2bac53a1adbe87f5f959e366768f65d709a709807d36c3586a5e7cfcdae7d3ec5fdf726a81edcdfccbb7f39d7ad93f8164619d40748bea6414
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex.rb
CHANGED
@@ -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
|
-
|
162
|
-
|
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
|
-
|
176
|
-
|
177
|
-
|
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.
|
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-
|
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
|