polyrex-schema 0.1.4 → 0.1.5
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.
- data/lib/polyrex-schema.rb +5 -3
- metadata +2 -2
data/lib/polyrex-schema.rb
CHANGED
|
@@ -10,8 +10,6 @@ class PolyrexSchema
|
|
|
10
10
|
def initialize(s)
|
|
11
11
|
|
|
12
12
|
@doc = Document.new
|
|
13
|
-
#node = Element.new 'root'
|
|
14
|
-
#@doc.add node
|
|
15
13
|
node = @doc
|
|
16
14
|
|
|
17
15
|
s.scan(/\w+\[[^\]]*\]|\w+/).each do |x|
|
|
@@ -27,6 +25,10 @@ class PolyrexSchema
|
|
|
27
25
|
end
|
|
28
26
|
end
|
|
29
27
|
|
|
28
|
+
summary = XPath.first(@doc.root, 'summary')
|
|
29
|
+
summary.add_element Element.new('recordx_type').add_text('polyrex')
|
|
30
|
+
summary.add_element Element.new('schema').add_text(s)
|
|
31
|
+
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
def to_s
|
|
@@ -45,4 +47,4 @@ class PolyrexSchema
|
|
|
45
47
|
node.add new_node
|
|
46
48
|
records
|
|
47
49
|
end
|
|
48
|
-
end
|
|
50
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polyrex-schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors: []
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2010-
|
|
12
|
+
date: 2010-11-25 00:00:00 +00:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|