dm_panlex 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/.gitignore +1 -0
  2. data/COPYNG +674 -0
  3. data/README.md +37 -0
  4. data/doc/panlex-db-design.pdf +0 -0
  5. data/lib/dm_panlex/models/ap.rb +28 -0
  6. data/lib/dm_panlex/models/apli.rb +13 -0
  7. data/lib/dm_panlex/models/av.rb +13 -0
  8. data/lib/dm_panlex/models/cp.rb +13 -0
  9. data/lib/dm_panlex/models/cu.rb +16 -0
  10. data/lib/dm_panlex/models/df.rb +15 -0
  11. data/lib/dm_panlex/models/dm.rb +14 -0
  12. data/lib/dm_panlex/models/dn.rb +17 -0
  13. data/lib/dm_panlex/models/ex.rb +17 -0
  14. data/lib/dm_panlex/models/i1.rb +12 -0
  15. data/lib/dm_panlex/models/lc.rb +13 -0
  16. data/lib/dm_panlex/models/lv.rb +22 -0
  17. data/lib/dm_panlex/models/md.rb +14 -0
  18. data/lib/dm_panlex/models/mi.rb +12 -0
  19. data/lib/dm_panlex/models/mn.rb +17 -0
  20. data/lib/dm_panlex/models/us.rb +16 -0
  21. data/lib/dm_panlex/models/wc.rb +14 -0
  22. data/lib/dm_panlex/models/wcex.rb +12 -0
  23. data/lib/dm_panlex.rb +26 -0
  24. data/panlex.gemspec +16 -0
  25. data/spec/dm_panlex/models/ap_spec.rb +75 -0
  26. data/spec/dm_panlex/models/apli_spec.rb +27 -0
  27. data/spec/dm_panlex/models/av_spec.rb +24 -0
  28. data/spec/dm_panlex/models/cp_spec.rb +27 -0
  29. data/spec/dm_panlex/models/cu_spec.rb +36 -0
  30. data/spec/dm_panlex/models/df_spec.rb +36 -0
  31. data/spec/dm_panlex/models/dm_spec.rb +30 -0
  32. data/spec/dm_panlex/models/dn_spec.rb +36 -0
  33. data/spec/dm_panlex/models/ex_spec.rb +39 -0
  34. data/spec/dm_panlex/models/i1_spec.rb +15 -0
  35. data/spec/dm_panlex/models/lc_spec.rb +24 -0
  36. data/spec/dm_panlex/models/lv_spec.rb +60 -0
  37. data/spec/dm_panlex/models/md_spec.rb +33 -0
  38. data/spec/dm_panlex/models/mi_spec.rb +21 -0
  39. data/spec/dm_panlex/models/mn_spec.rb +33 -0
  40. data/spec/dm_panlex/models/us_spec.rb +45 -0
  41. data/spec/dm_panlex/models/wc_spec.rb +30 -0
  42. data/spec/dm_panlex/models/wcex_spec.rb +21 -0
  43. data/spec/spec_helper.rb +7 -0
  44. metadata +136 -0
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Dn, "Denotation" do
5
+ it "has a property id (dn)" do
6
+ should have_property :dn
7
+ end
8
+ it "has a property meaning (mn)" do
9
+ should have_property :mn
10
+ end
11
+ it "has a property expression (ex)" do
12
+ should have_property :ex
13
+ end
14
+ it "is not valid without an id" do
15
+ should validate_presence_of :dn
16
+ end
17
+ it "is not valid without a meaning" do
18
+ should validate_presence_of :mn
19
+ end
20
+ it "is not valid without an expression" do
21
+ should validate_presence_of :ex
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
+ it "has many metadata (md)" do
30
+ should have_many :mds
31
+ end
32
+ it "has many word classifications (wc)" do
33
+ should have_many :wcs
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Ex, "Expression" do
5
+ it "has a property id (ex)" do
6
+ should have_property :ex
7
+ end
8
+ it "has a property variety (lv)" do
9
+ should have_property :lv
10
+ end
11
+ it "has a property text (tt)" do
12
+ should have_property :tt
13
+ end
14
+ it "has a property degraded text (td)" do
15
+ should have_property :td
16
+ end
17
+ it "is not valid without an id" do
18
+ should validate_presence_of :ex
19
+ end
20
+ it "is not valid without a variety" do
21
+ should validate_presence_of :lv
22
+ end
23
+ it "is not valid without a text" do
24
+ should validate_presence_of :tt
25
+ end
26
+ it "is not valid without a degraded text" do
27
+ should validate_presence_of :td
28
+ end
29
+ it "belongs to a language variety (lv)" do
30
+ should belong_to :lv
31
+ end
32
+ it "has many denotations (dn)" do
33
+ should have_many :dns
34
+ end
35
+ it "has many domain descriptors (dm)" do
36
+ should have_many :dms
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe I1, "Iso codes" do
5
+ it "has a property iso1 (iso1)" do
6
+ should have_property :iso1
7
+ end
8
+ it "has a property iso3 (iso3)" do
9
+ should have_property :iso3
10
+ end
11
+ it "belongs to a language code (lc)" do
12
+ should belong_to :lc
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Lc, "Language code" do
5
+ it "has a property code (lc)" do
6
+ should have_property :lc
7
+ end
8
+ it "has a property code type (tp)" do
9
+ should have_property :tp
10
+ end
11
+ it "is not valid without a code" do
12
+ should validate_presence_of :lc
13
+ end
14
+ it "is not valid without a code type" do
15
+ should validate_presence_of :tp
16
+ end
17
+ it "has many language varieties (lv)" do
18
+ should have_many :lvs
19
+ end
20
+ it "has many iso codes (i1)" do
21
+ should have_many :i1s
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,60 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Lv, "Language variety" do
5
+ it "has a property id (lv)" do
6
+ should have_property :lv
7
+ end
8
+ it "has a property ISO 639 code (lc)" do
9
+ should have_property :lc
10
+ end
11
+ it "has a property language-specific id (vc)" do
12
+ should have_property :vc
13
+ end
14
+ it "has a property to show whether the variety permits synonymy (sy)" do
15
+ should have_property :sy
16
+ end
17
+ it "has a property to show whether the variety permits ambiguity (am)" do
18
+ should have_property :am
19
+ end
20
+ it "has a property label (tt)" do
21
+ should have_property :tt
22
+ end
23
+ it "is not valid without an id" do
24
+ should validate_presence_of :lv
25
+ end
26
+ it "is not valid without an ISO 639 code" do
27
+ should validate_presence_of :lc
28
+ end
29
+ it "is not valid without a language-specific id" do
30
+ should validate_presence_of :vc
31
+ end
32
+ it "is not valid without showing whether the variety permits synonymy" do
33
+ should validate_presence_of :sy
34
+ end
35
+ it "is not valid without showing whether the variety permits ambiguity" do
36
+ should validate_presence_of :am
37
+ end
38
+ it "is not valid without a label" do
39
+ should validate_presence_of :tt
40
+ end
41
+ it "belongs to a language code (lc)" do
42
+ should belong_to :lc
43
+ end
44
+ it "has many language approver varieties (av)" do
45
+ should have_many :avs
46
+ end
47
+ it "has many language approved characters (cp)" do
48
+ should have_many :cps
49
+ end
50
+ it "has many language exemplar characters (cu)" do
51
+ should have_many :cus
52
+ end
53
+ it "has many definitions (df)" do
54
+ should have_many :dfs
55
+ end
56
+ it "has many expressions (ex)" do
57
+ should have_many :exs
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Md, "Metadata" do
5
+ it "has a property id (md)" do
6
+ should have_property :md
7
+ end
8
+ it "has a property denotation (dn)" do
9
+ should have_property :dn
10
+ end
11
+ it "has a property variable (vb)" do
12
+ should have_property :vb
13
+ end
14
+ it "has a property value" do
15
+ should have_property :vl
16
+ end
17
+ it "is not valid without an id" do
18
+ should validate_presence_of :md
19
+ end
20
+ it "is not valid without a denotation" do
21
+ should validate_presence_of :dn
22
+ end
23
+ it "is not valid without a variable" do
24
+ should validate_presence_of :vb
25
+ end
26
+ it "is not valid without" do
27
+ should validate_presence_of :vl
28
+ end
29
+ it "belongs to a denotation (dn)" do
30
+ should belong_to :dn
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Mi, "Meaning identifier" do
5
+ it "has a property meaning (mn)" do
6
+ should have_property :mn
7
+ end
8
+ it "has a property text (tt)" do
9
+ should have_property :tt
10
+ end
11
+ it "is not valid without a meaning" do
12
+ should validate_presence_of :mn
13
+ end
14
+ it "is not valid without a text" do
15
+ should validate_presence_of :tt
16
+ end
17
+ it "belongs to a meaning (mn)" do
18
+ should belong_to :mn
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Mn, "Meaning" do
5
+ it "has a property id (mn)" do
6
+ should have_property :mn
7
+ end
8
+ it "has a property approver (ap)" do
9
+ should have_property :ap
10
+ end
11
+ it "is not valid without an id" do
12
+ should validate_presence_of :mn
13
+ end
14
+ it "is not valid without an approver" do
15
+ should validate_presence_of :ap
16
+ end
17
+ it "belongs to an approver (ap)" do
18
+ should belong_to :ap
19
+ end
20
+ it "has many definitions (df)" do
21
+ should have_many :dfs
22
+ end
23
+ it "has many domain descriptors (dm)" do
24
+ should have_many :dms
25
+ end
26
+ it "has many denotations (dn)" do
27
+ should have_many :dns
28
+ end
29
+ it "has many meaning identifier (mi)" do
30
+ should have_many :mis
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Us, "User" do
5
+ it "has a property id (us)" do
6
+ should have_property :us
7
+ end
8
+ it "has a property enrollment date (dt)" do
9
+ should have_property :dt
10
+ end
11
+ it "has a property name (nm)" do
12
+ should have_property :nm
13
+ end
14
+ it "has a property alias (al)" do
15
+ should have_property :al
16
+ end
17
+ it "has a property SMPT (Internet mail) address (sm)" do
18
+ should have_property :sm
19
+ end
20
+ it "has a property HTTP (World Wide Web) address (URL) (ht)" do
21
+ should have_property :ht
22
+ end
23
+ it "has a property to show whether it is approved (ok)" do
24
+ should have_property :ok
25
+ end
26
+ it "has a property to show whether it is a Panlex superuser (ad)" do
27
+ should have_property :ad
28
+ end
29
+ it "is not valid without an id" do
30
+ should validate_presence_of :us
31
+ end
32
+ it "is not valid without an enrollment date" do
33
+ should validate_presence_of :dt
34
+ end
35
+ it "is not valid without an alias" do
36
+ should validate_presence_of :al
37
+ end
38
+ it "is not valid without showing whether it is approved" do
39
+ should validate_presence_of :ok
40
+ end
41
+ it "is not valid without showing whether it is a Panlex superuser" do
42
+ should validate_presence_of :ad
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Wc, "Word classification" do
5
+ it "has a property id (wc)" do
6
+ should have_property :wc
7
+ end
8
+ it "has a property denotation (dn)" do
9
+ should have_property :dn
10
+ end
11
+ it "has a property Panlex word-class expression (ex)" do
12
+ should have_property :ex
13
+ end
14
+ it "is not valid without an id" do
15
+ should validate_presence_of :wc
16
+ end
17
+ it "is not valid without a denotation" do
18
+ should validate_presence_of :dn
19
+ end
20
+ it "is not valid without a Panlex word-class expression" do
21
+ should validate_presence_of :ex
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
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ module Dm_Panlex
4
+ describe Wcex, "Word classification expression" do
5
+ it "has a property expression (ex)" do
6
+ should have_property :ex
7
+ end
8
+ it "has a property text (tt)" do
9
+ should have_property :tt
10
+ end
11
+ it "is not valid without an expression" do
12
+ should validate_presence_of :ex
13
+ end
14
+ it "is not valid without a text" do
15
+ should validate_presence_of :tt
16
+ end
17
+ it "has many word clasifications (wc)" do
18
+ should have_many :wcs
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,7 @@
1
+ require 'dm_panlex'
2
+
3
+ require 'dm-rspec'
4
+
5
+ RSpec.configure do |config|
6
+ config.include(DataMapper::Matchers)
7
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dm_panlex
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Marc Busqué
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-04-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: data_mapper
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.2'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '2.11'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.11'
46
+ - !ruby/object:Gem::Dependency
47
+ name: dm-rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '0.2'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.2'
62
+ description: https://github.com/laMarciana/dm_panlex/
63
+ email: marc@lamarciana.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - .gitignore
69
+ - COPYNG
70
+ - README.md
71
+ - doc/panlex-db-design.pdf
72
+ - lib/dm_panlex.rb
73
+ - lib/dm_panlex/models/ap.rb
74
+ - lib/dm_panlex/models/apli.rb
75
+ - lib/dm_panlex/models/av.rb
76
+ - lib/dm_panlex/models/cp.rb
77
+ - lib/dm_panlex/models/cu.rb
78
+ - lib/dm_panlex/models/df.rb
79
+ - lib/dm_panlex/models/dm.rb
80
+ - lib/dm_panlex/models/dn.rb
81
+ - lib/dm_panlex/models/ex.rb
82
+ - lib/dm_panlex/models/i1.rb
83
+ - lib/dm_panlex/models/lc.rb
84
+ - lib/dm_panlex/models/lv.rb
85
+ - lib/dm_panlex/models/md.rb
86
+ - lib/dm_panlex/models/mi.rb
87
+ - lib/dm_panlex/models/mn.rb
88
+ - lib/dm_panlex/models/us.rb
89
+ - lib/dm_panlex/models/wc.rb
90
+ - lib/dm_panlex/models/wcex.rb
91
+ - panlex.gemspec
92
+ - spec/dm_panlex/models/ap_spec.rb
93
+ - spec/dm_panlex/models/apli_spec.rb
94
+ - spec/dm_panlex/models/av_spec.rb
95
+ - spec/dm_panlex/models/cp_spec.rb
96
+ - spec/dm_panlex/models/cu_spec.rb
97
+ - spec/dm_panlex/models/df_spec.rb
98
+ - spec/dm_panlex/models/dm_spec.rb
99
+ - spec/dm_panlex/models/dn_spec.rb
100
+ - spec/dm_panlex/models/ex_spec.rb
101
+ - spec/dm_panlex/models/i1_spec.rb
102
+ - spec/dm_panlex/models/lc_spec.rb
103
+ - spec/dm_panlex/models/lv_spec.rb
104
+ - spec/dm_panlex/models/md_spec.rb
105
+ - spec/dm_panlex/models/mi_spec.rb
106
+ - spec/dm_panlex/models/mn_spec.rb
107
+ - spec/dm_panlex/models/us_spec.rb
108
+ - spec/dm_panlex/models/wc_spec.rb
109
+ - spec/dm_panlex/models/wcex_spec.rb
110
+ - spec/spec_helper.rb
111
+ homepage: https://github.com/laMarciana/dm_panlex/
112
+ licenses:
113
+ - ''
114
+ post_install_message:
115
+ rdoc_options: []
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ! '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubyforge_project:
132
+ rubygems_version: 1.8.23
133
+ signing_key:
134
+ specification_version: 3
135
+ summary: Data mapper models for the Panlex database
136
+ test_files: []