dm_panlex 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dm_panlex'
3
- s.version = '0.2.0'
3
+ s.version = '0.2.1'
4
4
  s.summary = 'Data mapper models for the Panlex database'
5
5
  s.description = 'https://github.com/laMarciana/dm_panlex/'
6
6
  s.license = 'GPL3'
@@ -20,9 +20,7 @@ module DmPanlex
20
20
  property :co, Text
21
21
  property :ad, Text
22
22
 
23
- belongs_to :apli, :parent_key => :li, :child_key => :li
24
-
25
- has n, :avs, :parent_key => :ap, :child_key => :ap, :constraint => :destroy
26
- has n, :mns, :parent_key => :ap, :child_key => :ap
23
+ has n, :avs, :model => 'Av', :child_key => :ap, :constraint => :destroy
24
+ has n, :mns, :model => 'Mn', :child_key => :ap
27
25
  end
28
26
  end
@@ -8,6 +8,6 @@ module DmPanlex
8
8
  property :li, String, :length => 2, :required => true, :unique_index => true
9
9
  property :pl, Text, :required => true, :unique_index => true
10
10
 
11
- has n, :aps, :parent_key => :li, :child_key => :li
11
+ has n, :aps, :model => 'Ap', :parent_key => :li, :child_key => :li
12
12
  end
13
13
  end
@@ -7,7 +7,5 @@ module DmPanlex
7
7
  property :ap, Integer, :key => true
8
8
  property :lv, Integer, :key => true
9
9
 
10
- belongs_to :ap, :parent_key => :ap, :child_key => :ap
11
- belongs_to :lv, :parent_key => :lv, :child_key => :lv
12
10
  end
13
11
  end
@@ -8,6 +8,5 @@ module DmPanlex
8
8
  property :c0, String, :length => 5, :key => true
9
9
  property :c1, String, :length => 5, :required => true, :unique_index => :cp_lv_key
10
10
 
11
- belongs_to :lv, :parent_key => :lv, :child_key => :lv
12
11
  end
13
12
  end
@@ -11,6 +11,5 @@ module DmPanlex
11
11
  property :loc, String, :length => 255, :key => true, :unique_index => [:cu_c0_key, :cu_c1_key]
12
12
  property :vb, String, :length => 255, :key => true, :required => true, :unique_index => [:cu_c0_key, :cu_c1_key]
13
13
 
14
- belongs_to :lv, :parent_key => :lv, :child_key => :lv
15
14
  end
16
15
  end
@@ -9,7 +9,5 @@ module DmPanlex
9
9
  property :lv, Integer, :required => true, :unique_index => :df_mn_key
10
10
  property :tt, Text, :required => true, :unique_index => :df_mn_key
11
11
 
12
- belongs_to :lv, :parent_key => :lv, :child_key => :lv
13
- belongs_to :mn, :parent_key => :mn, :child_key => :mn
14
12
  end
15
13
  end
@@ -8,7 +8,5 @@ module DmPanlex
8
8
  property :mn, Integer, :required => true, :unique_index => :dm_mn_key
9
9
  property :ex, Integer, :required => true, :unique_index => :dm_mn_key
10
10
 
11
- belongs_to :ex, :parent_key => :ex, :child_key => :ex
12
- belongs_to :mn, :parent_key => :mn, :child_key => :mn
13
11
  end
14
12
  end
@@ -8,10 +8,7 @@ module DmPanlex
8
8
  property :mn, Integer, :required => true, :unique_index => :dm_mn_ex_key, :index => true
9
9
  property :ex, Integer, :required => true, :unique_index => :dm_mn_ex_key, :index => true
10
10
 
11
- belongs_to :ex, :parent_key => :ex, :child_key => :ex
12
- belongs_to :mn, :parent_key => :mn, :child_key => :mn
13
-
14
- has n, :mds, :parent_key => :dn, :child_key => :dn
15
- has n, :wcs, :parent_key => :dn, :child_key => :dn
11
+ has n, :mds, :model => 'Md', :child_key => :dn
12
+ has n, :wcs, :model => 'Wc', :child_key => :dn
16
13
  end
17
14
  end
@@ -9,9 +9,7 @@ module DmPanlex
9
9
  property :tt, Text, :required => true, :unique_index => :ex_lv_tt_key, :index => true
10
10
  property :td, Text, :required => true, :index => true
11
11
 
12
- belongs_to :lv, :parent_key => :lv, :child_key => :lv
13
-
14
- has n, :dms, :parent_key => :ex, :child_key => :ex
15
- has n, :dns, :parent_key => :ex, :child_key => :ex
12
+ has n, :dms, :model => 'Dm', :child_key => :ex
13
+ has n, :dns, :model => 'Dn', :child_key => :ex
16
14
  end
17
15
  end
@@ -7,6 +7,5 @@ module DmPanlex
7
7
  property :iso1, String, :length => 2, :key => true
8
8
  property :iso3, String, :length => 3, :required => true
9
9
 
10
- belongs_to :lc, :parent_key => :lc, :child_key => :iso3
11
10
  end
12
11
  end
@@ -7,7 +7,7 @@ module DmPanlex
7
7
  property :lc, String, :length => 3, :key => true
8
8
  property :tp, String, :length => 1, :required => true
9
9
 
10
- has n, :i1s, :parent_key => :lc, :child_key => :iso3
11
- has n, :lvs, :parent_key => :lc, :child_key => :lc
10
+ has n, :i1s, :model => 'I1', :child_key => :iso3
11
+ has n, :lvs, :model => 'Lv', :child_key => :lc
12
12
  end
13
13
  end
@@ -11,12 +11,10 @@ module DmPanlex
11
11
  property :am, Boolean, :required => true, :default => true
12
12
  property :tt, Text, :required => true
13
13
 
14
- belongs_to :lc, :parent_key => :lc, :child_key => :lc
15
-
16
- has n, :avs, :parent_key => :lv, :child_key => :lv, :constraint => :destroy
17
- has n, :cps, :parent_key => :lv, :child_key => :lv
18
- has n, :cus, :parent_key => :lv, :child_key => :lv
19
- has n, :dfs, :parent_key => :lv, :child_key => :lv
20
- has n, :exs, :parent_key => :lv, :child_key => :lv
14
+ has n, :avs, :model => 'Av', :child_key => :lv, :constraint => :destroy
15
+ has n, :cps, :model => 'Cp', :child_key => :lv
16
+ has n, :cus, :model => 'Cu', :child_key => :lv
17
+ has n, :dfs, :model => 'Df', :child_key => :lv
18
+ has n, :exs, :model => 'Ex', :child_key => :lv
21
19
  end
22
20
  end
@@ -9,6 +9,5 @@ module DmPanlex
9
9
  property :vb, Text, :required => true, :unique_index => :md_dn_key
10
10
  property :vl, Text, :required => true, :unique_index => :md_dn_key
11
11
 
12
- belongs_to :dn, :parent_key => :dn, :child_key => :dn
13
12
  end
14
13
  end
@@ -7,6 +7,5 @@ module DmPanlex
7
7
  property :mn, Integer, :key => true
8
8
  property :tt, Text, :required => true
9
9
 
10
- belongs_to :mn, :parent_key => :mn, :child_key => :mn
11
10
  end
12
11
  end
@@ -7,11 +7,9 @@ module DmPanlex
7
7
  property :mn, Integer, :key => true
8
8
  property :ap, Integer, :required => true, :index => true
9
9
 
10
- belongs_to :ap, :parent_key => :ap, :child_key => :ap
11
-
12
- has n, :dfs, :parent_key => :mn, :child_key => :mn
13
- has n, :dms, :parent_key => :mn, :child_key => :mn
14
- has n, :dns, :parent_key => :mn, :child_key => :mn
15
- has n, :mis, :parent_key => :mn, :child_key => :mn
10
+ has n, :dfs, :model => 'Df', :child_key => :mn
11
+ has n, :dms, :model => 'Dm', :child_key => :mn
12
+ has n, :dns, :model => 'Dn', :child_key => :mn
13
+ has n, :mis, :model => 'Mi', :child_key => :mn
16
14
  end
17
15
  end
@@ -8,7 +8,5 @@ module DmPanlex
8
8
  property :dn, Integer, :required => true, :unique_index => :wc_dn_key
9
9
  property :ex, Integer, :required => true, :unique_index => :wc_dn_key
10
10
 
11
- belongs_to :dn, :parent_key => :dn, :child_key => :dn
12
- belongs_to :wcex, :parent_key => :ex, :child_key => :ex
13
11
  end
14
12
  end
@@ -7,6 +7,6 @@ module DmPanlex
7
7
  property :ex, Integer, :key => true
8
8
  property :tt, Text, :required => true, :unique_index => true
9
9
 
10
- has n, :wcs, :parent_key => :ex, :child_key => :ex
10
+ has n, :wcs, :model => 'Wc', :child_key => :ex
11
11
  end
12
12
  end
@@ -62,9 +62,6 @@ module DmPanlex
62
62
  it "is not valid without a quality in editor's judgement" do
63
63
  should validate_presence_of :uq
64
64
  end
65
- it "belongs to an approver license (apli)" do
66
- should belong_to :apli
67
- end
68
65
  it "has many approver varieties (av)" do
69
66
  should have_many :avs
70
67
  end
@@ -14,11 +14,5 @@ module DmPanlex
14
14
  it "is not valid without a variety" do
15
15
  should validate_presence_of :lv
16
16
  end
17
- it "belongs to an approver (ap)" do
18
- should belong_to :ap
19
- end
20
- it "belongs to a language variety (lv)" do
21
- should belong_to :lv
22
- end
23
17
  end
24
18
  end
@@ -20,8 +20,5 @@ module DmPanlex
20
20
  it "is not valid without an end of character range" do
21
21
  should validate_presence_of :c1
22
22
  end
23
- it "belongs to a language variety (lv)" do
24
- should belong_to :lv
25
- end
26
23
  end
27
24
  end
@@ -29,8 +29,5 @@ module DmPanlex
29
29
  it "is not valid without a variable" do
30
30
  should validate_presence_of :vb
31
31
  end
32
- it "belongs to a language variety (lv)" do
33
- should belong_to :lv
34
- end
35
32
  end
36
33
  end
@@ -26,11 +26,5 @@ module DmPanlex
26
26
  it "is not valid without a text" do
27
27
  should validate_presence_of :tt
28
28
  end
29
- it "belongs to a language variety (lv)" do
30
- should belong_to :lv
31
- end
32
- it "belongs to a meaning (mn)" do
33
- should belong_to :mn
34
- end
35
29
  end
36
30
  end
@@ -20,11 +20,5 @@ module DmPanlex
20
20
  it "is not valid without an expression" do
21
21
  should validate_presence_of :ex
22
22
  end
23
- it "belongs to an expression (ex)" do
24
- should belong_to :ex
25
- end
26
- it "belongs to a meaning (mn)" do
27
- should belong_to :mn
28
- end
29
23
  end
30
24
  end
@@ -20,12 +20,6 @@ module DmPanlex
20
20
  it "is not valid without an expression" do
21
21
  should validate_presence_of :ex
22
22
  end
23
- it "belongs to an expression (ex)" do
24
- should belong_to :ex
25
- end
26
- it "belongs to a meaning (mn)" do
27
- should belong_to :mn
28
- end
29
23
  it "has many metadata (md)" do
30
24
  should have_many :mds
31
25
  end
@@ -26,9 +26,6 @@ module DmPanlex
26
26
  it "is not valid without a degraded text" do
27
27
  should validate_presence_of :td
28
28
  end
29
- it "belongs to a language variety (lv)" do
30
- should belong_to :lv
31
- end
32
29
  it "has many denotations (dn)" do
33
30
  should have_many :dns
34
31
  end
@@ -8,8 +8,5 @@ module DmPanlex
8
8
  it "has a property iso3 (iso3)" do
9
9
  should have_property :iso3
10
10
  end
11
- it "belongs to a language code (lc)" do
12
- should belong_to :lc
13
- end
14
11
  end
15
12
  end
@@ -38,9 +38,6 @@ module DmPanlex
38
38
  it "is not valid without a label" do
39
39
  should validate_presence_of :tt
40
40
  end
41
- it "belongs to a language code (lc)" do
42
- should belong_to :lc
43
- end
44
41
  it "has many language approver varieties (av)" do
45
42
  should have_many :avs
46
43
  end
@@ -26,8 +26,5 @@ module DmPanlex
26
26
  it "is not valid without" do
27
27
  should validate_presence_of :vl
28
28
  end
29
- it "belongs to a denotation (dn)" do
30
- should belong_to :dn
31
- end
32
29
  end
33
30
  end
@@ -14,8 +14,5 @@ module DmPanlex
14
14
  it "is not valid without a text" do
15
15
  should validate_presence_of :tt
16
16
  end
17
- it "belongs to a meaning (mn)" do
18
- should belong_to :mn
19
- end
20
17
  end
21
18
  end
@@ -14,9 +14,6 @@ module DmPanlex
14
14
  it "is not valid without an approver" do
15
15
  should validate_presence_of :ap
16
16
  end
17
- it "belongs to an approver (ap)" do
18
- should belong_to :ap
19
- end
20
17
  it "has many definitions (df)" do
21
18
  should have_many :dfs
22
19
  end
@@ -20,11 +20,5 @@ module DmPanlex
20
20
  it "is not valid without a Panlex word-class expression" do
21
21
  should validate_presence_of :ex
22
22
  end
23
- it "belongs to a denotation (dn)" do
24
- should belong_to :dn
25
- end
26
- it "belongs to a word class expressions (wcex)" do
27
- should belong_to :wcex
28
- end
29
23
  end
30
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm_panlex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -101,6 +101,7 @@ files:
101
101
  - .yardopts
102
102
  - COPYING.txt
103
103
  - README.md
104
+ - dm_panlex.gemspec
104
105
  - lib/dm_panlex.rb
105
106
  - lib/dm_panlex/models/ap.rb
106
107
  - lib/dm_panlex/models/apli.rb
@@ -121,7 +122,6 @@ files:
121
122
  - lib/dm_panlex/models/wc.rb
122
123
  - lib/dm_panlex/models/wcex.rb
123
124
  - panlex-db-design.pdf
124
- - panlex.gemspec
125
125
  - spec/dm_panlex/models/ap_spec.rb
126
126
  - spec/dm_panlex/models/apli_spec.rb
127
127
  - spec/dm_panlex/models/av_spec.rb