dynarex 1.2.55 → 1.2.56
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dynarex.rb +9 -1
- metadata +16 -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: 16bba2f2ab993f7eb53a568efb0a9f17c7a252be
|
|
4
|
+
data.tar.gz: 4ff34ef303155d85f401c995c8a386c056ef2b24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3be10e56019dfcbc80eecf7e37d8220505027783c8f0e7c2d7acc21921adaf1d3b636039bc78765995bdb0b2e48bdc931b5990b2a0fa1d5e46684e417799da47
|
|
7
|
+
data.tar.gz: a522619b8693cc939b00413031d440f0134b88aa2354c2941cf0da4e12da5f218d3adef9f91691f7fabdf3ce34a665aaf70aeccf19afa93940706e17e4dc285a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/dynarex.rb
CHANGED
|
@@ -15,6 +15,8 @@ require 'yaml'
|
|
|
15
15
|
require 'rowx'
|
|
16
16
|
require 'nokogiri'
|
|
17
17
|
require 'ostruct'
|
|
18
|
+
require 'table-formatter'
|
|
19
|
+
|
|
18
20
|
|
|
19
21
|
class Dynarex
|
|
20
22
|
|
|
@@ -48,6 +50,7 @@ class Dynarex
|
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
def delimiter=(separator)
|
|
53
|
+
@delimiter = separator
|
|
51
54
|
@format_mask = @format_mask.to_s.gsub(/\s/, separator)
|
|
52
55
|
@summary[:format_mask] = @format_mask
|
|
53
56
|
end
|
|
@@ -150,6 +153,7 @@ class Dynarex
|
|
|
150
153
|
end
|
|
151
154
|
|
|
152
155
|
def to_s
|
|
156
|
+
|
|
153
157
|
xsl_buffer =<<EOF
|
|
154
158
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
155
159
|
<xsl:output encoding="UTF-8"
|
|
@@ -198,6 +202,10 @@ EOF
|
|
|
198
202
|
end
|
|
199
203
|
declaration + sumry + "\n--+\n" + out.text
|
|
200
204
|
|
|
205
|
+
elsif self.delimiter.length > 0 then
|
|
206
|
+
tfo = TableFormatter.new border: false, nowrap: true, divider: self.delimiter
|
|
207
|
+
tfo.source = self.to_h.map{|x| x.values}
|
|
208
|
+
tfo.display
|
|
201
209
|
else
|
|
202
210
|
|
|
203
211
|
format_mask = self.format_mask
|
|
@@ -264,7 +272,7 @@ EOF
|
|
|
264
272
|
# dynarex.create name: Bob, age: 52
|
|
265
273
|
|
|
266
274
|
def create(arg, id=nil)
|
|
267
|
-
|
|
275
|
+
raise 'Dynarex#create(): input error: no arg provided' unless arg
|
|
268
276
|
#jr291012 rebuild_doc()
|
|
269
277
|
#jr291012 (load_records; rebuild_doc) if @dirty_flag == true
|
|
270
278
|
methods = {Hash: :hash_create, String: :create_from_line}
|
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.56
|
|
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-10-
|
|
32
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: rexle
|
|
@@ -171,6 +171,20 @@ dependencies:
|
|
|
171
171
|
- - ">="
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
173
|
version: '0'
|
|
174
|
+
- !ruby/object:Gem::Dependency
|
|
175
|
+
name: table-formatter
|
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - ">="
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0'
|
|
181
|
+
type: :runtime
|
|
182
|
+
prerelease: false
|
|
183
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
184
|
+
requirements:
|
|
185
|
+
- - ">="
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: '0'
|
|
174
188
|
description:
|
|
175
189
|
email: james@r0bertson.co.uk
|
|
176
190
|
executables: []
|
metadata.gz.sig
CHANGED
|
Binary file
|