dynarex 1.7.6 → 1.7.7
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 +1 -3
- data.tar.gz.sig +0 -0
- data/lib/dynarex.rb +5 -16
- metadata +1 -1
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74ff64580b7fd666f3b3b41f0a836de6243285ed
|
4
|
+
data.tar.gz: 51c9d0aced7e4fddc17a303b9cf1740d56b974d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6081e82a8ce7b4297ca496f3dc0e9967f699d09b78957c9c7b945034af10611948cbdbbc937815f6ced0f3234bd677ed0a108a7762cf7d006d97fee3cc8357b
|
7
|
+
data.tar.gz: 8869063cf200542affe243edf781ec3e7417ae0ebe14bc5359d83bdac7467b5777956de4fe5800af9d471331855150a8e4c566733d98b44ca5d1318952fe7502
|
checksums.yaml.gz.sig
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex.rb
CHANGED
@@ -40,9 +40,7 @@ class Dynarex
|
|
40
40
|
def initialize(rawx=nil, username: nil, password: nil, schema: nil,
|
41
41
|
default_key: nil, json_out: true)
|
42
42
|
|
43
|
-
|
44
|
-
@log = Logger.new File.expand_path('~/dx.log'),'daily'
|
45
|
-
#@logger.debug 'inside intialize'
|
43
|
+
|
46
44
|
@username, @password, @schema, @default_key, @json_out = username,
|
47
45
|
password, schema, default_key, json_out
|
48
46
|
@delimiter = ''
|
@@ -53,7 +51,6 @@ class Dynarex
|
|
53
51
|
@json_out = json_out
|
54
52
|
|
55
53
|
openx(rawx.clone) if rawx
|
56
|
-
#@logger.debug 'doc: ' + @doc.xml.inspect
|
57
54
|
|
58
55
|
end
|
59
56
|
|
@@ -225,8 +222,6 @@ class Dynarex
|
|
225
222
|
|
226
223
|
def to_s
|
227
224
|
|
228
|
-
@log.debug 'inside to_s'
|
229
|
-
|
230
225
|
xsl_buffer =<<EOF
|
231
226
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
232
227
|
<xsl:output encoding="UTF-8"
|
@@ -252,8 +247,6 @@ EOF
|
|
252
247
|
self.summary[x.to_sym]}.join("\n") + "\n"
|
253
248
|
end
|
254
249
|
|
255
|
-
@log.debug 'before @raw_header'
|
256
|
-
|
257
250
|
if @raw_header then
|
258
251
|
declaration = @raw_header
|
259
252
|
else
|
@@ -273,8 +266,6 @@ EOF
|
|
273
266
|
end
|
274
267
|
|
275
268
|
header = declaration + sumry
|
276
|
-
|
277
|
-
@log.debug 'after header'
|
278
269
|
|
279
270
|
if self.summary[:rawdoc_type] == 'rowx' then
|
280
271
|
a = self.fields.map do |field|
|
@@ -300,7 +291,7 @@ EOF
|
|
300
291
|
xslt_format = a.join
|
301
292
|
|
302
293
|
xsl_buffer.sub!(/\[!regex_values\]/, xslt_format)
|
303
|
-
|
294
|
+
|
304
295
|
out = Rexslt.new(xsl_buffer, @doc).to_s
|
305
296
|
|
306
297
|
header + "--#\n" + out
|
@@ -313,18 +304,16 @@ EOF
|
|
313
304
|
header + tfo.display
|
314
305
|
|
315
306
|
else
|
316
|
-
|
307
|
+
|
317
308
|
format_mask = self.format_mask
|
318
309
|
format_mask.gsub!(/\[[^!\]]+\]/) {|x| x[1] }
|
319
310
|
xslt_format = format_mask.gsub(/\s(?=\[!\w+\])/,'<xsl:text> </xsl:text>')
|
320
311
|
.gsub(/\[!(\w+)\]/, '<xsl:value-of select="\1"/>')
|
321
312
|
|
322
313
|
xsl_buffer.sub!(/\[!regex_values\]/, xslt_format)
|
323
|
-
|
324
|
-
File.write 'test.xsl', xsl_buffer
|
325
|
-
File.write 'test.xml', @doc.xml
|
314
|
+
|
326
315
|
out = Rexslt.new(xsl_buffer, @doc).to_s
|
327
|
-
|
316
|
+
|
328
317
|
header + "\n" + out
|
329
318
|
end
|
330
319
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
)����, ����e��d�a.e$�%�brmnv�*R0�<����
|
2
|
+
�f�[�4��i��#F�{C� ����= �d�����T?ɉ�3��t���G!3�W�#���:^".��Px�r�n^Ӈԅ�.���N+zP����������
|
3
|
+
wi�,����>��9B[�$����q<�yC�X�Eו��?G�^��3-��nW��8�~��:��)]3s��i�p���v��X����0����Y��F�H���w
|