dynarex 1.7.9 → 1.7.10
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 +3 -2
- data/lib/dynarex.rb +9 -9
- 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: 2a20140da7001e92b57d4200633b330a92e7740a
|
4
|
+
data.tar.gz: cfea860892b162711caba5d3e1eeeef301ca9b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81e3c54a84c5b007e16ee60c048d0a60f7a1bea77747160ae4d54d3e6820ec89cf1881b5cc89d592846469d061f044f2a0462d5c899fc5e9827f9db50373af99
|
7
|
+
data.tar.gz: b8f041de3156ae34eb16aa167c3a1e69d2228add0ba2e91b51b188e96783cf08971f530169b750b5e0a6c4e62392e50e586ade27bd984117e8cc0d7ce917cd50
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
.boΘM/�;j!
|
2
|
+
��Ó�M�x��p̻;�����8�N��L�ȿn����13�������R���9�+$��+���[5M4��.��J�`y@',7�3��;��*b
|
3
|
+
������+� n�3��N�0�+:����C �"����HDݢgk/��J`oQ&fqsVJ������j/�uU�g����L��J�J�5����M��
|
data/lib/dynarex.rb
CHANGED
@@ -221,7 +221,7 @@ class Dynarex
|
|
221
221
|
pretty ? JSON.pretty_generate(h) : h.to_json
|
222
222
|
end
|
223
223
|
|
224
|
-
def to_s
|
224
|
+
def to_s(header: false, delimiter: @delimiter)
|
225
225
|
|
226
226
|
xsl_buffer =<<EOF
|
227
227
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
@@ -255,7 +255,7 @@ EOF
|
|
255
255
|
smry_fields = %i(schema)
|
256
256
|
smry_fields << :order if self.summary[:order] == 'descending'
|
257
257
|
|
258
|
-
if
|
258
|
+
if delimiter.length > 0 then
|
259
259
|
smry_fields << :delimiter
|
260
260
|
else
|
261
261
|
smry_fields << :format_mask unless self.summary[:rawdoc_type] == 'rowx'
|
@@ -266,7 +266,7 @@ EOF
|
|
266
266
|
declaration = %Q(<?dynarex %s?>\n) % s
|
267
267
|
end
|
268
268
|
|
269
|
-
|
269
|
+
docheader = declaration + sumry
|
270
270
|
|
271
271
|
if self.summary[:rawdoc_type] == 'rowx' then
|
272
272
|
a = self.fields.map do |field|
|
@@ -280,7 +280,7 @@ EOF
|
|
280
280
|
xsl_buffer.sub!(/\[!regex_values\]/, xslt_format)
|
281
281
|
out = Rexslt.new(xsl_buffer, @doc).to_s
|
282
282
|
|
283
|
-
|
283
|
+
docheader + "\n--+\n" + out
|
284
284
|
elsif self.summary[:rawdoc_type] == 'sectionx' then
|
285
285
|
|
286
286
|
a = (self.fields - [:uid, 'uid']).map do |field|
|
@@ -295,14 +295,14 @@ EOF
|
|
295
295
|
|
296
296
|
out = Rexslt.new(xsl_buffer, @doc).to_s
|
297
297
|
|
298
|
-
|
298
|
+
docheader + "--#\n" + out
|
299
299
|
|
300
300
|
elsif self.delimiter.length > 0 then
|
301
301
|
|
302
302
|
tfo = TableFormatter.new border: false, wrap: false, \
|
303
303
|
divider: self.delimiter
|
304
304
|
tfo.source = self.to_h.map{|x| x.values}
|
305
|
-
|
305
|
+
docheader + tfo.display
|
306
306
|
|
307
307
|
else
|
308
308
|
|
@@ -315,7 +315,7 @@ EOF
|
|
315
315
|
|
316
316
|
out = Rexslt.new(xsl_buffer, @doc).to_s
|
317
317
|
|
318
|
-
header + "\n" + out
|
318
|
+
header ? docheader + "\n" + out : out
|
319
319
|
end
|
320
320
|
|
321
321
|
end
|
@@ -393,7 +393,7 @@ EOF
|
|
393
393
|
# dynarex.create name: Bob, age: 52
|
394
394
|
|
395
395
|
def create(obj, id: nil, custom_attributes: {})
|
396
|
-
|
396
|
+
|
397
397
|
raise 'Dynarex#create(): input error: no arg provided' unless obj
|
398
398
|
|
399
399
|
case obj.class.to_s.downcase.to_sym
|
@@ -1294,4 +1294,4 @@ XSL
|
|
1294
1294
|
end
|
1295
1295
|
end
|
1296
1296
|
|
1297
|
-
end
|
1297
|
+
end
|
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.7.
|
4
|
+
version: 1.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
nP4bxzo6o8Qw40KPcv/n3Vcx8tV8hUOOe4XkImYbeWst9hbbHfbg8daipgkn9NEu
|
32
32
|
YXuVi+EfN14P6g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-07-
|
34
|
+
date: 2016-07-23 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex-import
|
metadata.gz.sig
CHANGED
Binary file
|