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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bad4d77e4c5097175bfbac1ddd248ee8ee75dd3e
4
- data.tar.gz: 4414e3da7931a09acc4fa96d1977eeef4e384f45
3
+ metadata.gz: 2a20140da7001e92b57d4200633b330a92e7740a
4
+ data.tar.gz: cfea860892b162711caba5d3e1eeeef301ca9b74
5
5
  SHA512:
6
- metadata.gz: 81f801e58c22a9aaddf055e42bcaa83862297723faee98ed084c373f4126cc260d15cb3397d694024949ce40e0bbbeedb8c840a42f9eb0cbc1581a92b5558190
7
- data.tar.gz: 153328a5a875ce9b538940a3b65885cb603a40307d6af4877ca10ba3f596eb76af9c54ec74c6de1dfedfa9e631a51ed30bb5c0fd2fb744c4e2ad9e2a00d0b055
6
+ metadata.gz: 81e3c54a84c5b007e16ee60c048d0a60f7a1bea77747160ae4d54d3e6820ec89cf1881b5cc89d592846469d061f044f2a0462d5c899fc5e9827f9db50373af99
7
+ data.tar.gz: b8f041de3156ae34eb16aa167c3a1e69d2228add0ba2e91b51b188e96783cf08971f530169b750b5e0a6c4e62392e50e586ade27bd984117e8cc0d7ce917cd50
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- ]Vv����e��CP*?���3�Fp1�m�8�Uf� ��^���e��
2
- ����R��flI>��}S����5E��D���Z/Mh��yo�ۧ��d ZYg�4�aHy��.�/��"�����O[�dm/P�p�iL�*��q��Nfw�3Y^��c��n�T�� �B�X|��M�
1
+ .b oΘM/�;j!
2
+ ��Ó�M�x��p̻;�����8N��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��
@@ -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 self.delimiter.length > 0 then
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
- header = declaration + sumry
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
- header + "\n--+\n" + out
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
- header + "--#\n" + out
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
- header + tfo.display
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.9
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-13 00:00:00.000000000 Z
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