dynarex 1.2.69 → 1.2.70
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 +0 -0
- data/lib/dynarex.rb +11 -6
- 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: d9f360b95bf319e679a611beaf83c6a3c4a005e0
|
4
|
+
data.tar.gz: b62a391947c25a71c5407cf75dab224394658b1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21d419e6729c9327ab672df7ace69418710d236f05651089ef057e01712409f2d81c89f94b339e0610e8319e8d2e7ec80e62887f8a58d08c6563c1dbfb154d31
|
7
|
+
data.tar.gz: 9da3609f0ee8a90f16eab8b89541b7e014de38c33e6e806178943ea6bfbeae6239f3612864ad64d308110673285ad37b040007e78f4e5d1c871cce4d14103e4c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex.rb
CHANGED
@@ -386,7 +386,7 @@ EOF
|
|
386
386
|
|
387
387
|
xml.send key, value.gsub('>','>')\
|
388
388
|
.gsub('<','<')\
|
389
|
-
.gsub(
|
389
|
+
.gsub(/(&\s|&[a-zA-Z\.]+;?)/) {|x| x[-1] == ';' ? x : x.sub('&','&')}
|
390
390
|
|
391
391
|
end
|
392
392
|
end
|
@@ -409,8 +409,10 @@ EOF
|
|
409
409
|
val = value.send(value.is_a?(String) ? :to_s : :to_yaml)
|
410
410
|
xml.send(name, val.gsub('>','>')\
|
411
411
|
.gsub('<','<')\
|
412
|
-
.gsub(
|
413
|
-
)
|
412
|
+
.gsub(/(&\s|&[a-zA-Z\.]+;?)/) do |x|
|
413
|
+
x[-1] == ';' ? x : x.sub('&','&')
|
414
|
+
end
|
415
|
+
)
|
414
416
|
end
|
415
417
|
end
|
416
418
|
end
|
@@ -769,7 +771,7 @@ EOF
|
|
769
771
|
def dynarex_new(s)
|
770
772
|
@schema = s
|
771
773
|
ptrn = %r((\w+)\[?([^\]]+)?\]?\/(\w+)\(([^\)]+)\))
|
772
|
-
|
774
|
+
|
773
775
|
if s.match(ptrn) then
|
774
776
|
@root_name, raw_summary, record_name, raw_fields = s.match(ptrn).captures
|
775
777
|
summary, fields = [raw_summary || '',raw_fields].map {|x| x.split(/,/).map &:strip}
|
@@ -802,8 +804,9 @@ EOF
|
|
802
804
|
end
|
803
805
|
|
804
806
|
def open(s)
|
805
|
-
|
807
|
+
|
806
808
|
if s[/</] then # xml
|
809
|
+
|
807
810
|
buffer = s
|
808
811
|
elsif s[/[\[\(]/] # schema
|
809
812
|
dynarex_new(s)
|
@@ -815,6 +818,7 @@ EOF
|
|
815
818
|
end
|
816
819
|
|
817
820
|
@doc = Rexle.new(buffer) unless @doc
|
821
|
+
|
818
822
|
@schema = @doc.root.text('summary/schema')
|
819
823
|
@root_name = @doc.root.name
|
820
824
|
@summary = summary_to_h
|
@@ -903,7 +907,8 @@ EOF
|
|
903
907
|
|
904
908
|
if node then
|
905
909
|
text = node.text.unescape
|
906
|
-
|
910
|
+
|
911
|
+
r.merge node.name.to_sym => (text[/^--- |^\[/] ? YAML.load(text) : text)
|
907
912
|
else
|
908
913
|
r
|
909
914
|
end
|
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.70
|
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-12-
|
32
|
+
date: 2013-12-13 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|