rober 0.0.5 → 0.0.6
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 +4 -4
- data/README.md +3 -0
- data/lib/rober/reader.rb +1 -1
- data/lib/rober/version.rb +1 -1
- data/spec/rober_spec.rb +4 -0
- data/spec/test.dbm +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b7fb69845a17f67745da375f410eb67d74d28ea2785df734127692830e370a5
|
|
4
|
+
data.tar.gz: c621ea85846b36bc78bbd799b97f2799df15ad3abed94233c42265d344d2815b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd13e201ce41bc8fc1f2dffdc0ec719f6e92ce8c9f984d5c611fa463c2d14f2ff5e88bdb6d09227ee1cbc8a6a8a6718f92cdaf28ea2edf737a81b7bca8214d45
|
|
7
|
+
data.tar.gz: 25a2bc0535571a33737f77a1d1fd0f708d3acf84851ec7d9333c33b46c1494434d7dc2ccc227be1a20037dda0589445f1c5c86a389132444cebd0966d9cc5c17
|
data/README.md
CHANGED
data/lib/rober/reader.rb
CHANGED
|
@@ -55,7 +55,7 @@ module Rober
|
|
|
55
55
|
list = it.xpath('constraint[@type="pk-constr"]')
|
|
56
56
|
pk_ary = []
|
|
57
57
|
unless list.empty?
|
|
58
|
-
pk_ary = list.first.xpath('columns').map{|col| col[:names]}
|
|
58
|
+
pk_ary = list.first.xpath('columns').map{|col| col[:names].split(/,/)}.flatten
|
|
59
59
|
end
|
|
60
60
|
it.xpath('column').each do |attr|
|
|
61
61
|
type_tag = attr.xpath('./type').first
|
data/lib/rober/version.rb
CHANGED
data/spec/rober_spec.rb
CHANGED
|
@@ -21,5 +21,9 @@ describe Rober do
|
|
|
21
21
|
expect(entities[0].attributes.size).to eq(3)
|
|
22
22
|
expect(entities[1].attributes.size).to eq(4)
|
|
23
23
|
expect(entities[0].comment).to eq("aaa\nbbb")
|
|
24
|
+
expect(entities[1].attributes[0].pk).to eq("1")
|
|
25
|
+
expect(entities[1].attributes[1].pk).to eq("0")
|
|
26
|
+
expect(entities[1].attributes[2].pk).to eq("0")
|
|
27
|
+
expect(entities[1].attributes[3].pk).to eq("1")
|
|
24
28
|
end
|
|
25
29
|
end
|
data/spec/test.dbm
CHANGED
|
@@ -44,11 +44,11 @@ bbb]]></comment>
|
|
|
44
44
|
<column name="created_at" not-null="true" default-value="current_timestamp">
|
|
45
45
|
<type name="timestamptz" length="0"/>
|
|
46
46
|
</column>
|
|
47
|
-
<column name="company_uuid">
|
|
47
|
+
<column name="company_uuid" not-null="true">
|
|
48
48
|
<type name="uuid" length="0"/>
|
|
49
49
|
</column>
|
|
50
50
|
<constraint name="users_pk" type="pk-constr" table="public.users">
|
|
51
|
-
<columns names="uuid" ref-type="src-columns"/>
|
|
51
|
+
<columns names="uuid,company_uuid" ref-type="src-columns"/>
|
|
52
52
|
</constraint>
|
|
53
53
|
</table>
|
|
54
54
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rober
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- aoyagikouhei
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|