dxlite 0.3.4 → 0.3.5
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 +2 -4
- data.tar.gz.sig +0 -0
- data/lib/dxlite.rb +20 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52a6f519b3142ed9207a881bf65f9df9afceed0bc0eccdb258aa46b61988f20e
|
4
|
+
data.tar.gz: 1df9a6b682dc8a05fea3d88152c2d8fdb6042cc75aa246731fa69374568bacfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 641a55501dcada49b36db49c38cbbaf66d94283b9c96f5572a7cfce098b651e899d0d3cdede7561cd2b0ce53b42f3a0b1c97518e39cf12ed75b0ca4ead920cef
|
7
|
+
data.tar.gz: 1b5abceae389e71fd4f813e6cc841abf212eab8db0a56800dc1f627452b454593cf4b86ced042b8ce14a33c6ae34908f3ef90b968f39979fb268cf1feb2781f0
|
checksums.yaml.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
��Rj4�Kl�: �����Yϖ?g���kiF�n�����~ܞ({y3��eL�l�K�ЎVF7����߰z��w�(�"�"c�3p�&u�>e<���6�B��\�˲�(-+�P��ϐ��g���>�jb�j�r����%�`,��}��,��a�ot'.&_&82���\�]>�{bo .�o%���Ĝ7���ҙ
|
4
|
-
���X��-������ڇ���dIl�X�n�!�i?�Ɇ�aQ���4
|
1
|
+
o�U!05<Zz��4C4&Psep�+Em�+�E���mOd�4>�~�AW?C/(���&�m|��
|
2
|
+
N�Ň�� �CÍ�T�I��F'�د2vh�<���]���\B)Ú�Q�����9���GDHIT�̦�\Za��*�ͷwo��*�������^�@����f����������hߋ��n��=J��4hm��/���Y��i+}r3�"`�e��I��9?���nr'X?�ʅ6/=����]�(�ij�0��������Y�o*��z�1�=n�Ը��*�c*l�S�hv�$�bHc���O�V �wB���Dcһ+�'�b�r�Ƞ���E(���
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dxlite.rb
CHANGED
@@ -11,7 +11,7 @@ require 'rxfhelper'
|
|
11
11
|
class DxLite
|
12
12
|
using ColouredText
|
13
13
|
|
14
|
-
attr_accessor :summary, :filepath
|
14
|
+
attr_accessor :summary, :filepath, :schema
|
15
15
|
attr_reader :records
|
16
16
|
|
17
17
|
def initialize(s=nil, autosave: false, debug: false)
|
@@ -92,9 +92,25 @@ class DxLite
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def create(rawh, id: nil, custom_attributes: {created: Time.now})
|
95
|
+
|
96
|
+
if id.nil? then
|
97
|
+
|
98
|
+
puts '@records: ' + @records.inspect if @debug
|
99
|
+
|
100
|
+
if @records then
|
101
|
+
id = @records.map {|x| x[:id].to_i}.max.to_i + 1
|
102
|
+
else
|
103
|
+
@records = []
|
104
|
+
id = 1
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
95
108
|
|
96
|
-
id ||= @records.map {|x| x[:id].to_i}.max.to_i + 1
|
97
109
|
h2 = custom_attributes
|
110
|
+
|
111
|
+
fields = rawh.keys
|
112
|
+
puts 'fields: ' + fields.inspect if @debug
|
113
|
+
|
98
114
|
h3 = fields.map {|x| [x.to_sym, nil] }.to_h.merge(rawh)
|
99
115
|
h = {id: id.to_s, created: h2[:created], last_modified: nil, body: h3}
|
100
116
|
@records << h
|
@@ -121,7 +137,9 @@ class DxLite
|
|
121
137
|
if obj.is_a? Array then
|
122
138
|
|
123
139
|
unless schema() then
|
140
|
+
puts 'obj.first: ' + obj.first.inspect if @debug
|
124
141
|
cols = obj.first.keys.map {|c| c == 'id' ? 'uid' : c}
|
142
|
+
puts 'after cols' if @debug
|
125
143
|
self.schema = "items/item(%s)" % cols.join(', ')
|
126
144
|
end
|
127
145
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
dwbAN6/wokoLVZAiMRG1vZlI6RhtSOTHvFHbfBE5JI9rhjRtui8yeV+t8iI8G4Zs
|
36
36
|
2NszuYzdlVfzlrUiPWY5jL9P
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2021-
|
38
|
+
date: 2021-02-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: recordx
|
metadata.gz.sig
CHANGED
Binary file
|