pxrowx 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4239ee29c445f6f987078194977e1e11d49554dc
4
- data.tar.gz: 61b95f650aa24878024cbf882055d9d851406b64
3
+ metadata.gz: 21c8374aec2b001d32c1a115311ac773fe88355e
4
+ data.tar.gz: 5dcfa8be41b85543ce9fc18f6c472b27afadfa2e
5
5
  SHA512:
6
- metadata.gz: db34db8278ceca3f2e3269ab3323ba061fd013c1048feb4c8e0982a4b0512970a54a9ed4f1703395e114cb0de86ab189ff00b4dd9226d981a4e2eef16e5e066f
7
- data.tar.gz: 11c537f9565c75068f6afccbae77d5a798742500b853bca76445322dadb5f0a67253e4e0855188337b8afb3344c35bea2d0ad0cd24cff6fae32bc23291cb8607
6
+ metadata.gz: 6ae8179806c72a3adba321558d432cf9ca5bd80f20b2b1446c283d124708cfb7349352e855781bb25afbb155eb27a3f2ecf106d0eadc330b457b5a75a4568095
7
+ data.tar.gz: 0a4d2aee9c608dbddd6aef808f240ff89801fef3e84c932ddd4d58658a6c82b62d360b542a8a4bed6682b967e5517ea546601136c2f0602f6b2eab5f3ab2e1a8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -8,8 +8,10 @@ require 'rexle-builder'
8
8
 
9
9
  class PxRowX
10
10
 
11
- def initialize(txt)
11
+ def initialize(txt, record_name: 'item')
12
12
 
13
+ @record_name = record_name
14
+
13
15
  lt = LineTree.new(txt)
14
16
  a = lt.to_a
15
17
 
@@ -34,9 +36,9 @@ class PxRowX
34
36
  h = {
35
37
  title: '',
36
38
  recordx_type: 'polyrex',
37
- schema: "items[title]/item[#{labels.join(', ')}]"
39
+ schema: "items[title]/#{@record_name}[#{labels.join(', ')}]"
38
40
  }
39
-
41
+
40
42
  summary = RexleBuilder.new(h).to_a
41
43
  summary[0] = 'summary'
42
44
  rows.insert 3, summary
@@ -87,7 +89,7 @@ class PxRowX
87
89
 
88
90
  if x.is_a? String then
89
91
 
90
- r = ['item',{},nil, ['summary',{}, nil ]] if r.empty?
92
+ r = [@record_name,{},nil, ['summary',{}, nil ]] if r.empty?
91
93
  field, value = x.split(/:\s*/,2)
92
94
  r.last << [field, {}, value]
93
95
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxrowx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  pkBwAqlR25JVgr8VTfX/ib2qW3boooPPz10VstLGg/f0QvT7Krw4FUMi5GlKkXD/
32
32
  BdQSzvwx2Iy5kw==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-12-03 00:00:00.000000000 Z
34
+ date: 2016-12-08 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: line-tree
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- P���焰�BG3鞓Y�!㪑:��a
1
+ u�Ӎ7���,�ɦ{�{@�u�oc�I�r����tG���wS��wm�5�lK}���w����ϫ�J��4���)8����B��Nu�q��X'�6�4�ϳwp[�;��-�^��%V�3��e|Ww�%��'�40/�  yˍ��2Λ�-��I��}+���p���X�I��5�֏e�W�ψ���]˞>�**��љ-D^p$��؃�^<�1ͣ�.�.r�h�Z]*-����{�� � f�.x������v�w�]�