polyrex 1.0.8 → 1.0.9
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 +0 -0
- data.tar.gz.sig +1 -1
- data/lib/polyrex.rb +17 -1
- metadata +2 -2
- metadata.gz.sig +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd21788c7c14fb01dfb4283c2caf193795077c0
|
4
|
+
data.tar.gz: 47560d97b8866cba55de8bc36b88d12af5eabdb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc1bc98591ffc9db1d20f6cd5fb54622007db7ee9aad62af5a19709c375d44e3a983c9b763bd898b432978faff1c40cf057881b1a67de63329a3af51f8b58bf0
|
7
|
+
data.tar.gz: ae20f18736fbd06c28ff6d815a482cd8cbac417b62e8ac80adbf76c55804908c52bd3531bbc8c0cf1f4f5c8c8ef0a3cf08b312d32fa03cde92f5a7535056da63
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
p 4)��l�v����KHꠓ;Ӫz�D�����ʘ�<��^
|
data/lib/polyrex.rb
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
class Polyrex
|
40
40
|
attr_accessor :summary_fields, :xslt_schema, :id_counter,
|
41
|
-
:schema, :type, :delimiter
|
41
|
+
:schema, :type, :delimiter, :xslt
|
42
42
|
|
43
43
|
def initialize(location=nil, opt={})
|
44
44
|
|
@@ -64,6 +64,7 @@ class Polyrex
|
|
64
64
|
|
65
65
|
@summary = RecordX.new @doc.root.xpath("summary/*")
|
66
66
|
@summary_fields = @summary.keys
|
67
|
+
|
67
68
|
|
68
69
|
end
|
69
70
|
|
@@ -121,6 +122,7 @@ class Polyrex
|
|
121
122
|
|
122
123
|
options.merge!({pretty: pretty}) if options.empty?
|
123
124
|
xml = @doc.to_s(options)
|
125
|
+
|
124
126
|
buffer = block_given? ? yield(xml) : xml
|
125
127
|
File.open(filepath,'w'){|f| f.write buffer}
|
126
128
|
end
|
@@ -293,6 +295,12 @@ class Polyrex
|
|
293
295
|
end
|
294
296
|
end
|
295
297
|
|
298
|
+
def xslt=(value)
|
299
|
+
|
300
|
+
@summary.xslt = value
|
301
|
+
|
302
|
+
end
|
303
|
+
|
296
304
|
def xslt_schema=(s)
|
297
305
|
@polyrex_xslt.xslt_schema = s
|
298
306
|
self
|
@@ -689,7 +697,10 @@ EOF
|
|
689
697
|
end
|
690
698
|
|
691
699
|
|
700
|
+
# refreshes the XML document with any new modification from
|
701
|
+
# the summary object
|
692
702
|
def refresh_summary()
|
703
|
+
|
693
704
|
summary = @doc.root.element('summary')
|
694
705
|
@summary.to_h.each do |k,v|
|
695
706
|
e = summary.element(k.to_s)
|
@@ -699,6 +710,11 @@ EOF
|
|
699
710
|
summary.add Rexle::Element.new(k.to_s).add_text(v)
|
700
711
|
end
|
701
712
|
end
|
713
|
+
|
714
|
+
if @summary.xslt then
|
715
|
+
@doc.instructions = [['xml-stylesheet',
|
716
|
+
"title='XSL_formatting' type='text/xsl' href='#{@summary.xslt}'"]]
|
717
|
+
end
|
702
718
|
end
|
703
719
|
|
704
720
|
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: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
xutogBWBRwktcdg7bc24/mbFcXcx5WhspVwfj6isE6q3A1nNkMtk3DHHKmUrfemr
|
32
32
|
pWpTJQi2DFAx/g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-10-
|
34
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: polyrex-schema
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
����}��TSQ��G1}�\2aru4O!�љ�艵a��
|
1
|
+
9\w�8逭w����H����ؐ�v�f����hRF;܇d���o�
|
2
|
+
�RG�S ��py(onZ�1T.��n�"�ֻ��҄ �'2�p�nbڎ��u:�Y���&|���D�\ը���8�����eު�.��Lc:_�<�2h���U`<��qI���Z�9G��#��j�IM6w�(qb678c���B}�<��_#zSV'B��[
|