polyrex 0.9.7 → 0.9.8
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 -1
- data.tar.gz.sig +0 -0
- data/lib/polyrex.rb +6 -5
- 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: 4979f33552bf45fb8dc60ed04bffe094c9f02a56
|
4
|
+
data.tar.gz: cccc6176ea90f6923151ede50cfc951323128e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f587f81bc5490a91335937c48a25112f6894a5e84b1ad4f30603f8b056b7c11e1285abf737e0342d6e837dbaa36ac5cf02bc6d1e4776266e9b78ae984fc64d99
|
7
|
+
data.tar.gz: ae1e8eaa32d4e6f7bf62cdfbe910a66c8c3e79cff90747381104313d03f696746b91b5786e10c5dafdf86a1e53d0d2e7eb9d96c6ca8d8228c075ec8ea0ee5149
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
SD#G٧�C0�W� �-�ȳ�kO;�o7�Bj�����y�E傒�g��C��\�6�*�|��9�I��Wr�����<�k��3�B�3,��>��FPH�5��W�Ĕ�/(��PV����`�5������/������
|
2
|
+
�E��Y"˧������h(����
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex.rb
CHANGED
@@ -43,6 +43,7 @@ class Polyrex
|
|
43
43
|
def initialize(location=nil, opt={})
|
44
44
|
|
45
45
|
options = {id_counter: '1'}.merge opt
|
46
|
+
|
46
47
|
@id_counter = options[:id_counter]
|
47
48
|
@format_masks = []
|
48
49
|
@delimiter = ''
|
@@ -80,7 +81,7 @@ class Polyrex
|
|
80
81
|
CGI.unescapeHTML(to_xml(options))
|
81
82
|
end
|
82
83
|
|
83
|
-
def create(id
|
84
|
+
def create(id: nil)
|
84
85
|
# @create is a PolyrexCreateObject, @parent_node is a Rexle::Element pointing to the current record
|
85
86
|
|
86
87
|
@create.id = id || @id_counter
|
@@ -128,7 +129,7 @@ class Polyrex
|
|
128
129
|
|
129
130
|
def find_by_id(id)
|
130
131
|
@parent_node = @doc.root.element("//[@id='#{id}']")
|
131
|
-
@objects[@parent_node.name].new(@parent_node, @id)
|
132
|
+
@objects[@parent_node.name].new(@parent_node, id: @id)
|
132
133
|
end
|
133
134
|
|
134
135
|
def id(id)
|
@@ -409,8 +410,8 @@ EOF
|
|
409
410
|
|
410
411
|
def load_handlers(schema)
|
411
412
|
|
412
|
-
@create = PolyrexCreateObject.new(schema, @id_counter)
|
413
|
-
objects = PolyrexObjects.new(schema
|
413
|
+
@create = PolyrexCreateObject.new(schema, id: @id_counter)
|
414
|
+
objects = PolyrexObjects.new(schema)
|
414
415
|
|
415
416
|
@objects = objects.to_h.inject({}){|r,x| r.merge x[0].downcase => x[-1]}
|
416
417
|
@objects_a = objects.to_a
|
@@ -536,7 +537,7 @@ EOF
|
|
536
537
|
self.instance_eval(
|
537
538
|
%Q(
|
538
539
|
def #{name.downcase}()
|
539
|
-
@objects['#{name}'].new(@parent_node.element('.'), @id)
|
540
|
+
@objects['#{name}'].new(@parent_node.element('.'), id: @id)
|
540
541
|
end
|
541
542
|
))
|
542
543
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
wbQnaFmJMPFyXo9Yh/95QJEinnBsM0Yk8nJhmcChjdCpQL5243BjgzVEjHI1Ouxe
|
32
32
|
SmUIljyExpxiHQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-07-
|
34
|
+
date: 2014-07-27 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: polyrex-schema
|
metadata.gz.sig
CHANGED
Binary file
|