iqvoc_skosxl 2.1.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdc6a35e58b0d000312d04c68cdd1c2c6ac12605
4
- data.tar.gz: f71ad4c57bac10b3f5d5a0d4a2e2859aa18a0537
3
+ metadata.gz: 71c4e174716271a11722d0ed4095fe90dd98fabc
4
+ data.tar.gz: 4db8d50bde562f2f519cc7020f779728b5a02b2c
5
5
  SHA512:
6
- metadata.gz: 7bd885f0fe99b8b2714a39327e85169f25f24851f3b6e723fe08612eec472e1d052c7bdbb5401bdf0789214227fc4df9b2c8a1098f632d53609f09865279b02c
7
- data.tar.gz: 648fe3b0bd5023ed198095bb529c6f7eaa5e3afaab29809c84c5339c9303b8c75ede63105d0b0ae53d5b1568fa8cca81f9ce1d6de93d635c41f873f69fb3cdc0
6
+ metadata.gz: 1cb8a521a55337791146f08706ced52e783bc5bb2b3e26594f08d3f4db650fea5132cf489193993fe7583945c83cf31e23f3eaf50e4bcd6e98c3309967555817
7
+ data.tar.gz: 051099db1772d5c835bb77a9d82961e7f754be5daa06e3a961b4e1bcacce8a34a3387fd05e40b9983b7640ced2f85a9527a013c96e7f81456866abb3c41970ee
data/Gemfile CHANGED
@@ -1,49 +1,13 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 3.2.13'
4
- gem 'iqvoc', :git => 'git://github.com/innoq/iqvoc.git'
5
-
6
- group :development do
7
- gem 'awesome_print'
8
- end
9
-
10
- group :assets do
11
- gem 'uglifier', '>= 1.0.3'
12
- gem 'sass-rails', '~> 3.2.5'
13
- end
14
-
15
- group :development, :test do
16
- platforms :ruby do
17
- gem 'mysql2'
18
- gem 'sqlite3'
19
- end
20
- platforms :jruby do
21
- gem 'activerecord-jdbcsqlite3-adapter'
22
- gem 'activerecord-jdbcmysql-adapter'
23
- end
24
- end
3
+ gem 'iqvoc', '~> 4.3.0', :github => 'innoq/iqvoc'
4
+ gem 'mysql2'
5
+ gem 'sqlite3'
6
+ gem 'awesome_print', :group => :test
25
7
 
26
8
  group :test do
27
- gem 'test-unit'
28
- gem 'nokogiri', '~> 1.5.0'
29
9
  gem 'capybara'
30
- gem 'database_cleaner'
31
- gem 'factory_girl_rails'
32
- end
33
-
34
- group :production, :production_internal do
35
- platforms :ruby do
36
- gem 'sqlite3'
37
-
38
- gem 'pry'
39
- gem 'pry-rails'
40
- gem 'pry-debugger'
41
- gem 'pry-remote'
42
- gem 'hirb-unicode'
43
- gem 'cane'
44
- end
45
-
46
- platforms :jruby do
47
- gem 'activerecord-oracle_enhanced-adapter'
48
- end
10
+ gem 'factory_girl', '~> 4.3.0'
11
+ gem 'turn'
12
+ gem 'webmock'
49
13
  end
data/Gemfile.lock CHANGED
@@ -1,186 +1,257 @@
1
1
  GIT
2
2
  remote: git://github.com/innoq/iqvoc.git
3
- revision: 77c24b3613951ce84e4a65db2f04b53c278aa0b6
3
+ revision: 8b7c4a60041cdf1fc0e6fd41f7c9c4dc1d2578cb
4
4
  specs:
5
- iqvoc (4.1.0)
5
+ iqvoc (4.3.2)
6
+ apipie-rails
6
7
  authlogic
8
+ bootstrap-sass (~> 2.3.1.3)
7
9
  bundler
8
10
  cancan
9
- iq_rdf (~> 0.1.2)
11
+ database_cleaner
12
+ delayed_job_active_record (~> 4.0.0)
13
+ faraday
14
+ font-awesome-rails
15
+ iq_rdf (>= 0.1.13)
10
16
  iq_triplestorage
11
17
  json
12
- kaminari
13
- rails (~> 3.2.1)
18
+ kaminari (= 0.13.0)
19
+ linkeddata
20
+ maruku
21
+ nokogiri
22
+ protected_attributes (>= 1.0.5)
23
+ rails (~> 4.0.0)
14
24
  rails_autolink
15
- sass-rails (~> 3.2.5)
25
+ sass-rails (~> 4.0.0)
16
26
  simple_form
27
+ uglifier (>= 1.3.0)
17
28
 
18
29
  GEM
19
- remote: http://rubygems.org/
30
+ remote: https://rubygems.org/
20
31
  specs:
21
- actionmailer (3.2.13)
22
- actionpack (= 3.2.13)
23
- mail (~> 2.5.3)
24
- actionpack (3.2.13)
25
- activemodel (= 3.2.13)
26
- activesupport (= 3.2.13)
27
- builder (~> 3.0.0)
32
+ actionmailer (4.0.2)
33
+ actionpack (= 4.0.2)
34
+ mail (~> 2.5.4)
35
+ actionpack (4.0.2)
36
+ activesupport (= 4.0.2)
37
+ builder (~> 3.1.0)
28
38
  erubis (~> 2.7.0)
29
- journey (~> 1.0.4)
30
- rack (~> 1.4.5)
31
- rack-cache (~> 1.2)
32
- rack-test (~> 0.6.1)
33
- sprockets (~> 2.2.1)
34
- activemodel (3.2.13)
35
- activesupport (= 3.2.13)
36
- builder (~> 3.0.0)
37
- activerecord (3.2.13)
38
- activemodel (= 3.2.13)
39
- activesupport (= 3.2.13)
40
- arel (~> 3.0.2)
41
- tzinfo (~> 0.3.29)
42
- activerecord-jdbc-adapter (1.2.9)
43
- activerecord-jdbcmysql-adapter (1.2.9)
44
- activerecord-jdbc-adapter (~> 1.2.9)
45
- jdbc-mysql (~> 5.1.0)
46
- activerecord-jdbcsqlite3-adapter (1.2.9)
47
- activerecord-jdbc-adapter (~> 1.2.9)
48
- jdbc-sqlite3 (~> 3.7.2)
49
- activerecord-oracle_enhanced-adapter (1.4.2)
50
- activeresource (3.2.13)
51
- activemodel (= 3.2.13)
52
- activesupport (= 3.2.13)
53
- activesupport (3.2.13)
54
- i18n (= 0.6.1)
55
- multi_json (~> 1.0)
56
- arel (3.0.2)
39
+ rack (~> 1.5.2)
40
+ rack-test (~> 0.6.2)
41
+ activemodel (4.0.2)
42
+ activesupport (= 4.0.2)
43
+ builder (~> 3.1.0)
44
+ activerecord (4.0.2)
45
+ activemodel (= 4.0.2)
46
+ activerecord-deprecated_finders (~> 1.0.2)
47
+ activesupport (= 4.0.2)
48
+ arel (~> 4.0.0)
49
+ activerecord-deprecated_finders (1.0.3)
50
+ activesupport (4.0.2)
51
+ i18n (~> 0.6, >= 0.6.4)
52
+ minitest (~> 4.2)
53
+ multi_json (~> 1.3)
54
+ thread_safe (~> 0.1)
55
+ tzinfo (~> 0.3.37)
56
+ addressable (2.3.5)
57
+ ansi (1.4.3)
58
+ apipie-rails (0.0.24)
59
+ rails (>= 3.0.10)
60
+ arel (4.0.2)
61
+ atomic (1.1.14)
62
+ atomic (1.1.14-java)
57
63
  authlogic (3.3.0)
58
64
  activerecord (>= 3.2)
59
65
  activesupport (>= 3.2)
60
- awesome_print (1.1.0)
61
- builder (3.0.4)
62
- cancan (1.6.9)
63
- cane (2.5.2)
64
- parallel
66
+ awesome_print (1.2.0)
67
+ bootstrap-sass (2.3.1.3)
68
+ sass (~> 3.2)
69
+ builder (3.1.4)
70
+ cancan (1.6.10)
65
71
  capybara (2.1.0)
66
72
  mime-types (>= 1.16)
67
73
  nokogiri (>= 1.3.3)
68
74
  rack (>= 1.0.0)
69
75
  rack-test (>= 0.5.4)
70
76
  xpath (~> 2.0)
71
- coderay (1.0.9)
72
- columnize (0.3.6)
73
- database_cleaner (0.9.1)
74
- debugger (1.5.0)
75
- columnize (>= 0.3.1)
76
- debugger-linecache (~> 1.2.0)
77
- debugger-ruby_core_source (~> 1.2.0)
78
- debugger-linecache (1.2.0)
79
- debugger-ruby_core_source (1.2.0)
77
+ crack (0.4.1)
78
+ safe_yaml (~> 0.9.0)
79
+ database_cleaner (1.2.0)
80
+ delayed_job (4.0.0)
81
+ activesupport (>= 3.0, < 4.1)
82
+ delayed_job_active_record (4.0.0)
83
+ activerecord (>= 3.0, < 4.1)
84
+ delayed_job (>= 3.0, < 4.1)
85
+ ebnf (0.3.5)
86
+ rdf
87
+ sxp
88
+ equivalent-xml (0.4.0)
89
+ nokogiri (>= 1.4.3)
80
90
  erubis (2.7.0)
81
- execjs (1.4.0)
82
- multi_json (~> 1.0)
83
- factory_girl (4.2.0)
91
+ execjs (2.0.2)
92
+ factory_girl (4.3.0)
84
93
  activesupport (>= 3.0.0)
85
- factory_girl_rails (4.2.1)
86
- factory_girl (~> 4.2.0)
87
- railties (>= 3.0.0)
88
- hike (1.2.2)
89
- hirb (0.7.1)
90
- hirb-unicode (0.0.5)
91
- hirb (~> 0.5)
92
- unicode-display_width (~> 0.1.1)
93
- i18n (0.6.1)
94
- iq_rdf (0.1.10)
94
+ faraday (0.9.0)
95
+ multipart-post (>= 1.2, < 3)
96
+ font-awesome-rails (4.0.3.1)
97
+ railties (>= 3.2, < 5.0)
98
+ haml (4.0.5)
99
+ tilt
100
+ hike (1.2.3)
101
+ htmlentities (4.3.1)
102
+ i18n (0.6.9)
103
+ iq_rdf (0.1.14)
95
104
  activesupport
96
105
  builder
97
106
  bundler
98
107
  iq_triplestorage (0.2.2)
99
- jdbc-mysql (5.1.24)
100
- jdbc-sqlite3 (3.7.2.1)
101
- journey (1.0.4)
102
- json (1.7.7)
103
- json (1.7.7-java)
104
- kaminari (0.14.1)
108
+ json (1.8.1)
109
+ json (1.8.1-java)
110
+ json-ld (1.1.1)
111
+ rdf (>= 1.0.8)
112
+ kaminari (0.13.0)
105
113
  actionpack (>= 3.0.0)
106
114
  activesupport (>= 3.0.0)
107
- mail (2.5.3)
108
- i18n (>= 0.4.0)
115
+ railties (>= 3.0.0)
116
+ linkeddata (1.1.1)
117
+ equivalent-xml (>= 0.4.0)
118
+ json-ld (>= 1.1.1)
119
+ nokogiri (>= 1.6.1)
120
+ rdf (>= 1.1.1)
121
+ rdf-aggregate-repo (>= 1.1.0)
122
+ rdf-isomorphic (>= 1.1.0)
123
+ rdf-json (>= 1.1.0)
124
+ rdf-microdata (>= 1.1.1)
125
+ rdf-n3 (>= 1.1.0)
126
+ rdf-rdfa (>= 1.1.1)
127
+ rdf-rdfxml (>= 1.1.0)
128
+ rdf-trig (>= 1.1.2)
129
+ rdf-trix (>= 1.1.0)
130
+ rdf-turtle (>= 1.1.2)
131
+ sparql (>= 1.1.2)
132
+ sparql-client (>= 1.1.1)
133
+ mail (2.5.4)
109
134
  mime-types (~> 1.16)
110
135
  treetop (~> 1.4.8)
111
- method_source (0.8.1)
112
- mime-types (1.22)
113
- multi_json (1.7.2)
114
- mysql2 (0.3.11)
115
- nokogiri (1.5.9)
116
- nokogiri (1.5.9-java)
117
- parallel (0.6.4)
136
+ maruku (0.7.1)
137
+ mime-types (1.25.1)
138
+ mini_portile (0.5.2)
139
+ minitest (4.7.5)
140
+ multi_json (1.8.4)
141
+ multipart-post (2.0.0)
142
+ mysql2 (0.3.13)
143
+ net-http-persistent (2.9.4)
144
+ nokogiri (1.6.1)
145
+ mini_portile (~> 0.5.0)
146
+ nokogiri (1.6.1-java)
147
+ mini_portile (~> 0.5.0)
118
148
  polyglot (0.3.3)
119
- pry (0.9.12)
120
- coderay (~> 1.0.5)
121
- method_source (~> 0.8)
122
- slop (~> 3.4)
123
- pry-debugger (0.2.2)
124
- debugger (~> 1.3)
125
- pry (~> 0.9.10)
126
- pry-rails (0.2.2)
127
- pry (>= 0.9.10)
128
- pry-remote (0.1.7)
129
- pry (~> 0.9)
130
- slop (~> 3.0)
131
- rack (1.4.5)
132
- rack-cache (1.2)
133
- rack (>= 0.4)
134
- rack-ssl (1.3.3)
135
- rack
149
+ protected_attributes (1.0.5)
150
+ activemodel (>= 4.0.1, < 5.0)
151
+ rack (1.5.2)
136
152
  rack-test (0.6.2)
137
153
  rack (>= 1.0)
138
- rails (3.2.13)
139
- actionmailer (= 3.2.13)
140
- actionpack (= 3.2.13)
141
- activerecord (= 3.2.13)
142
- activeresource (= 3.2.13)
143
- activesupport (= 3.2.13)
144
- bundler (~> 1.0)
145
- railties (= 3.2.13)
146
- rails_autolink (1.0.9)
147
- rails (~> 3.1)
148
- railties (3.2.13)
149
- actionpack (= 3.2.13)
150
- activesupport (= 3.2.13)
151
- rack-ssl (~> 1.3.2)
154
+ rails (4.0.2)
155
+ actionmailer (= 4.0.2)
156
+ actionpack (= 4.0.2)
157
+ activerecord (= 4.0.2)
158
+ activesupport (= 4.0.2)
159
+ bundler (>= 1.3.0, < 2.0)
160
+ railties (= 4.0.2)
161
+ sprockets-rails (~> 2.0.0)
162
+ rails_autolink (1.1.5)
163
+ rails (> 3.1)
164
+ railties (4.0.2)
165
+ actionpack (= 4.0.2)
166
+ activesupport (= 4.0.2)
152
167
  rake (>= 0.8.7)
153
- rdoc (~> 3.4)
154
- thor (>= 0.14.6, < 2.0)
155
- rake (10.0.4)
156
- rdoc (3.12.2)
157
- json (~> 1.4)
158
- sass (3.2.7)
159
- sass-rails (3.2.6)
160
- railties (~> 3.2.0)
168
+ thor (>= 0.18.1, < 2.0)
169
+ rake (10.1.1)
170
+ rdf (1.1.2.1)
171
+ rdf-aggregate-repo (1.1.0)
172
+ rdf (>= 1.1)
173
+ rdf-isomorphic (1.1.0)
174
+ rdf (>= 1.1)
175
+ rdf-json (1.1.0)
176
+ rdf (>= 1.1.0)
177
+ rdf-microdata (1.1.1)
178
+ htmlentities (>= 4.3.0)
179
+ nokogiri (>= 1.6.1)
180
+ rdf (>= 1.1.0)
181
+ rdf-xsd (>= 1.1.0)
182
+ rdf-n3 (1.1.0)
183
+ rdf (>= 1.1)
184
+ rdf-rdfa (1.1.2)
185
+ haml (>= 4.0)
186
+ htmlentities (>= 4.3.1)
187
+ rdf (>= 1.1.0)
188
+ rdf-xsd (>= 1.1)
189
+ rdf-rdfxml (1.1.0)
190
+ rdf (>= 1.1)
191
+ rdf-rdfa (>= 1.1)
192
+ rdf-xsd (>= 1.1)
193
+ rdf-trig (1.1.2)
194
+ ebnf (>= 0.3.5)
195
+ rdf (>= 1.1.1.1)
196
+ rdf-turtle (>= 1.1.2)
197
+ rdf-trix (1.1.0)
198
+ rdf (>= 1.1)
199
+ rdf-turtle (1.1.2)
200
+ ebnf (>= 0.3.5)
201
+ rdf (>= 1.1.1.1)
202
+ rdf-xsd (1.1.0)
203
+ rdf (>= 1.1)
204
+ safe_yaml (0.9.7)
205
+ sass (3.2.14)
206
+ sass-rails (4.0.1)
207
+ railties (>= 4.0.0, < 5.0)
161
208
  sass (>= 3.1.10)
162
- tilt (~> 1.3)
163
- simple_form (2.1.0)
164
- actionpack (~> 3.0)
165
- activemodel (~> 3.0)
166
- slop (3.4.4)
167
- sprockets (2.2.2)
209
+ sprockets-rails (~> 2.0.0)
210
+ simple_form (3.0.1)
211
+ actionpack (>= 4.0.0, < 4.1)
212
+ activemodel (>= 4.0.0, < 4.1)
213
+ sparql (1.1.2.1)
214
+ builder (>= 3.0)
215
+ ebnf (>= 0.3.2)
216
+ json (>= 1.7)
217
+ rdf (>= 1.1.0)
218
+ rdf-aggregate-repo (>= 1.1.0)
219
+ rdf-xsd (>= 1.0.2)
220
+ sparql-client (>= 1.1)
221
+ sxp (>= 0.1.3)
222
+ sparql-client (1.1.1)
223
+ json (>= 1.8)
224
+ net-http-persistent (>= 1.4)
225
+ rdf (>= 1.1)
226
+ sprockets (2.10.1)
168
227
  hike (~> 1.2)
169
228
  multi_json (~> 1.0)
170
229
  rack (~> 1.0)
171
230
  tilt (~> 1.1, != 1.3.0)
172
- sqlite3 (1.3.7)
173
- test-unit (2.5.4)
231
+ sprockets-rails (2.0.1)
232
+ actionpack (>= 3.0)
233
+ activesupport (>= 3.0)
234
+ sprockets (~> 2.8)
235
+ sqlite3 (1.3.8)
236
+ sxp (0.1.5)
174
237
  thor (0.18.1)
175
- tilt (1.3.7)
176
- treetop (1.4.12)
238
+ thread_safe (0.1.3)
239
+ atomic
240
+ thread_safe (0.1.3-java)
241
+ atomic
242
+ tilt (1.4.1)
243
+ treetop (1.4.15)
177
244
  polyglot
178
245
  polyglot (>= 0.3.1)
179
- tzinfo (0.3.37)
180
- uglifier (2.0.1)
246
+ turn (0.9.6)
247
+ ansi
248
+ tzinfo (0.3.38)
249
+ uglifier (2.4.0)
181
250
  execjs (>= 0.3.0)
182
- multi_json (~> 1.0, >= 1.0.2)
183
- unicode-display_width (0.1.1)
251
+ json (>= 1.8.0)
252
+ webmock (1.15.2)
253
+ addressable (>= 2.2.7)
254
+ crack (>= 0.3.2)
184
255
  xpath (2.0.0)
185
256
  nokogiri (~> 1.3)
186
257
 
@@ -189,24 +260,11 @@ PLATFORMS
189
260
  ruby
190
261
 
191
262
  DEPENDENCIES
192
- activerecord-jdbcmysql-adapter
193
- activerecord-jdbcsqlite3-adapter
194
- activerecord-oracle_enhanced-adapter
195
263
  awesome_print
196
- cane
197
264
  capybara
198
- database_cleaner
199
- factory_girl_rails
200
- hirb-unicode
201
- iqvoc!
265
+ factory_girl (~> 4.3.0)
266
+ iqvoc (~> 4.3.0)!
202
267
  mysql2
203
- nokogiri (~> 1.5.0)
204
- pry
205
- pry-debugger
206
- pry-rails
207
- pry-remote
208
- rails (~> 3.2.13)
209
- sass-rails (~> 3.2.5)
210
268
  sqlite3
211
- test-unit
212
- uglifier (>= 1.0.3)
269
+ turn
270
+ webmock
@@ -1,8 +1,6 @@
1
1
  class Labeling::SKOSXL::AltLabel < Labeling::SKOSXL::Base
2
2
 
3
- def build_rdf(document, subject)
4
- subject.Skosxl::altLabel(IqRdf.build_uri(target.origin))
5
- subject.Skos.altLabel(target.to_s, :lang => target.language)
6
- end
3
+ self.rdf_namespace = 'skosxl'
4
+ self.rdf_predicate = 'altLabel'
7
5
 
8
6
  end
@@ -1,5 +1,9 @@
1
1
  class Labeling::SKOSXL::Base < Labeling::Base
2
2
 
3
+ class_attribute :rdf_namespace, :rdf_predicate
4
+ self.rdf_namespace = nil
5
+ self.rdf_predicate = nil
6
+
3
7
  def self.target_in_edit_mode
4
8
  includes(:target).merge(Iqvoc::XLLabel.base_class.in_edit_mode)
5
9
  end
@@ -32,7 +36,7 @@ class Labeling::SKOSXL::Base < Labeling::Base
32
36
  def self.single_query(params = {})
33
37
  query_str = build_query_string(params)
34
38
 
35
- scope = includes(:target).order("LOWER(#{Label::Base.table_name}.value)")
39
+ scope = includes(:target).order("LOWER(#{Label::Base.table_name}.value)").references(:labels)
36
40
 
37
41
  if params[:query].present?
38
42
  scope = scope.merge(Label::Base.by_query_value(query_str).by_language(params[:languages].to_a).published)
@@ -52,7 +56,7 @@ class Labeling::SKOSXL::Base < Labeling::Base
52
56
  #
53
57
  end
54
58
 
55
- scope
59
+ scope.map { |result| SearchResult.new(result) }
56
60
  end
57
61
 
58
62
  def self.search_result_partial_name
@@ -71,6 +75,11 @@ class Labeling::SKOSXL::Base < Labeling::Base
71
75
  # includes(:target).merge(self.label_class.by_language(language))
72
76
  # end
73
77
 
78
+ def build_rdf(document, subject)
79
+ subject.send(self.rdf_namespace.camelcase).send(self.rdf_predicate, IqRdf.build_uri(target.origin))
80
+ subject.Skos.send(self.rdf_predicate, target.value.to_s, :lang => target.language)
81
+ end
82
+
74
83
  def build_search_result_rdf(document, result)
75
84
  result.Sdc::link(IqRdf.build_uri(owner.origin))
76
85
  build_rdf(document, result)
@@ -1,9 +1,7 @@
1
1
  class Labeling::SKOSXL::HiddenLabel < Labeling::SKOSXL::Base
2
2
 
3
- def build_rdf(document, subject)
4
- subject.Skosxl::hiddenLabel(IqRdf.build_uri(target.origin))
5
- subject.Skos.hiddenLabel(target.to_s, :lang => target.language)
6
- end
3
+ self.rdf_namespace = 'skosxl'
4
+ self.rdf_predicate = 'hiddenLabel'
7
5
 
8
6
  def self.view_section(obj)
9
7
  "hidden"
@@ -1,12 +1,10 @@
1
1
  class Labeling::SKOSXL::PrefLabel < Labeling::SKOSXL::Base
2
2
 
3
- def build_rdf(document, subject)
4
- subject.Skosxl::prefLabel(IqRdf.build_uri(target.origin))
5
- subject.Skos.prefLabel(target.to_s, :lang => target.language)
6
- end
3
+ self.rdf_namespace = 'skosxl'
4
+ self.rdf_predicate = 'prefLabel'
7
5
 
8
6
  def self.only_one_allowed?
9
7
  true
10
8
  end
11
9
 
12
- end
10
+ end
@@ -6,4 +6,4 @@
6
6
  <div class="panel">
7
7
  <h2><%= t("txt.views.labels.language") %></h2>
8
8
  <%= label.language %>
9
- </div
9
+ </div>
@@ -1,9 +1,13 @@
1
1
  <% if concept = result.owner %>
2
- <dt>
3
- <%= link_to search_result_label(highlight_query(result.target.value, params[:query]), concept), concept_path(:id => concept) %>
4
- </dt>
5
- <dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
6
- <% if result.target.language %>
7
- <dd><%= t('txt.views.search_results.language') %>: <%= result.target.language %></dd>
8
- <% end %>
2
+ <li class="search-result" data-rdf-namespace="<%= iqvoc_default_rdf_namespaces[result.rdf_namespace.try(:to_sym)] %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.to_s %>" data-rdf-language="<%= result.language %>">
3
+ <%= link_to_object(concept, result.target.value, :class => 'search-result-link', :data => { 'resource-path' => rdf_path(concept.origin, :lang => nil, :format => nil) }) %> <% if concept.additional_info.present? %>(<%= concept.additional_info %>)<% end %>
4
+ <dl class="search-result-meta">
5
+ <dt class="search-result-key"><%= t('txt.views.search_results.type') %></dt>
6
+ <dd class="search-result-value" data-key="<%= t('txt.views.search_results.type') %>"><%= result.model_name.human %></dd>
7
+ <% if result.target.language %>
8
+ <dt class="search-result-key"><%= t('txt.views.search_results.language') %></dt>
9
+ <dd class="search-result-value" data-key="<%= t('txt.views.search_results.language') %>"><%= result.target.language %></dd>
10
+ <% end %>
11
+ </dl>
12
+ </li>
9
13
  <% end %>
data/config/engine.rb CHANGED
@@ -7,7 +7,7 @@ module Iqvoc
7
7
  paths["lib/tasks"] << "lib/engine_tasks"
8
8
 
9
9
  initializer "iqvoc_skosxl.load_migrations" do |app|
10
- app.config.paths['db/migrate'] += Iqvoc::SKOSXL::Engine.paths['db/migrate'].existent
10
+ app.config.paths['db/migrate'].concat(Iqvoc::SKOSXL::Engine.paths['db/migrate'].existent)
11
11
  end
12
12
  end
13
13
 
@@ -1,4 +1,3 @@
1
- require 'debug'
2
1
  require 'iqvoc/environments/development'
3
2
 
4
3
  if Iqvoc::SKOSXL.const_defined?(:Application)
@@ -1,4 +1,3 @@
1
- require 'debug'
2
1
  require 'iqvoc/environments/test'
3
2
 
4
3
  if Iqvoc::SKOSXL.const_defined?(:Application)
@@ -2,5 +2,6 @@ silence_warnings do
2
2
  Iqvoc::Label = nil
3
3
  end
4
4
 
5
- Iqvoc.searchable_class_names = ['Labeling::SKOSXL::Base'] +
6
- Iqvoc::Concept.labeling_class_names.keys + Iqvoc::Concept.note_class_names
5
+ Iqvoc.searchable_class_names = { 'Labeling::SKOSXL::Base' => 'labels',
6
+ 'Labeling::SKOSXL::PrefLabel' => 'pref_labels',
7
+ 'Labeling::SKOSXL::AltLabel' => 'alt_labels' }
@@ -6,4 +6,5 @@
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  if Iqvoc::SKOSXL.const_defined?(:Application)
8
8
  Iqvoc::SKOSXL::Application.config.secret_token = '1cf4863673a83d39f30e77670978adaa9009fc27e6869066c67157ef6790c4b79a4eb4c32029987a3444483b73cb01606291c272a32d6201c06f4ca75dcd5b14'
9
- end
9
+ Iqvoc::SKOSXL::Application.config.secret_key_base = '1cf4863673a83d39f30e77670978adaa9009fc27e6869066c67157ef6790c4b79a4eb4c32029987a3444483b73cb01606291c272a32d6201c06f4ca75dcd5b14'
10
+ end
@@ -5,5 +5,5 @@
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  if Iqvoc::SKOSXL.const_defined?(:Application)
8
- Iqvoc::SKOSXL::Application.config.secret_token = '1cf4863673a83d39f30e77670978adaa9009fc27e6869066c67157ef6790c4b79a4eb4c32029987a3444483b73cb01606291c272a32d6201c06f4ca75dcd5b14'
9
- end
8
+ Iqvoc::SKOSXL::Application.config.secret_key_base = '1cf4863673a83d39f30e77670978adaa9009fc27e6869066c67157ef6790c4b79a4eb4c32029987a3444483b73cb01606291c272a32d6201c06f4ca75dcd5b14'
9
+ end
data/config/routes.rb CHANGED
@@ -1,13 +1,10 @@
1
1
  Iqvoc.localized_routes << lambda do |routing|
2
2
  routing.resources :labels
3
3
 
4
- routing.match "labels/versions/:origin/branch(.:format)" => "labels/versions#branch", :as => "label_versions_branch"
5
- routing.match "labels/versions/:origin/merge(.:format)" => "labels/versions#merge", :as => "label_versions_merge"
6
- routing.match "labels/versions/:origin/lock(.:format)" => "labels/versions#lock", :as => "label_versions_lock"
7
- routing.match "labels/versions/:origin/unlock(.:format)" => "labels/versions#unlock", :as => "label_versions_unlock"
8
- routing.match "labels/versions/:origin/to_review(.:format)" => "labels/versions#to_review", :as => "label_versions_to_review"
9
- routing.match "labels/versions/:origin/consistency_check(.:format)" => "labels/versions#consistency_check", :as => "label_versions_consistency_check"
10
- end
11
-
12
- Rails.application.routes.draw do
4
+ routing.post "labels/versions/:origin/branch(.:format)" => "labels/versions#branch", :as => "label_versions_branch"
5
+ routing.post "labels/versions/:origin/merge(.:format)" => "labels/versions#merge", :as => "label_versions_merge"
6
+ routing.post "labels/versions/:origin/lock(.:format)" => "labels/versions#lock", :as => "label_versions_lock"
7
+ routing.post "labels/versions/:origin/unlock(.:format)" => "labels/versions#unlock", :as => "label_versions_unlock"
8
+ routing.post "labels/versions/:origin/to_review(.:format)" => "labels/versions#to_review", :as => "label_versions_to_review"
9
+ routing.get "labels/versions/:origin/consistency_check(.:format)" => "labels/versions#consistency_check", :as => "label_versions_consistency_check"
13
10
  end
data/db/schema.rb ADDED
@@ -0,0 +1,162 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130315141952) do
15
+
16
+ create_table "collection_members", :force => true do |t|
17
+ t.integer "collection_id"
18
+ t.integer "target_id"
19
+ t.string "type"
20
+ end
21
+
22
+ add_index "collection_members", ["collection_id", "target_id", "type"], :name => "ix_collections_fk_type"
23
+
24
+ create_table "concept_relations", :force => true do |t|
25
+ t.string "type"
26
+ t.integer "owner_id"
27
+ t.integer "target_id"
28
+ t.datetime "created_at"
29
+ t.datetime "updated_at"
30
+ t.integer "rank", :default => 100
31
+ end
32
+
33
+ add_index "concept_relations", ["owner_id", "target_id"], :name => "ix_concept_relations_fk"
34
+
35
+ create_table "concepts", :force => true do |t|
36
+ t.string "type"
37
+ t.string "origin", :limit => 4000
38
+ t.integer "rev", :default => 1
39
+ t.date "published_at"
40
+ t.integer "published_version_id"
41
+ t.integer "locked_by"
42
+ t.date "expired_at"
43
+ t.date "follow_up"
44
+ t.boolean "to_review"
45
+ t.date "rdf_updated_at"
46
+ t.datetime "created_at"
47
+ t.datetime "updated_at"
48
+ t.boolean "top_term", :default => false
49
+ end
50
+
51
+ add_index "concepts", ["origin"], :name => "ix_concepts_on_origin", :length => {"origin"=>255}
52
+ add_index "concepts", ["published_version_id"], :name => "ix_concepts_publ_version_id"
53
+
54
+ create_table "configuration_settings", :force => true do |t|
55
+ t.string "key"
56
+ t.string "value"
57
+ end
58
+
59
+ create_table "label_relations", :force => true do |t|
60
+ t.string "type"
61
+ t.integer "domain_id"
62
+ t.integer "range_id"
63
+ t.datetime "created_at"
64
+ t.datetime "updated_at"
65
+ end
66
+
67
+ add_index "label_relations", ["domain_id", "range_id", "type"], :name => "ix_label_rel_dom_rng_type"
68
+ add_index "label_relations", ["type"], :name => "ix_label_relations_on_type"
69
+
70
+ create_table "labelings", :force => true do |t|
71
+ t.string "type"
72
+ t.integer "owner_id"
73
+ t.integer "target_id"
74
+ t.datetime "created_at"
75
+ t.datetime "updated_at"
76
+ end
77
+
78
+ add_index "labelings", ["owner_id", "target_id", "type"], :name => "ix_labelings_fk_type"
79
+ add_index "labelings", ["type"], :name => "ix_labelings_on_type"
80
+
81
+ create_table "labels", :force => true do |t|
82
+ t.string "type"
83
+ t.string "origin", :limit => 4000
84
+ t.string "language"
85
+ t.string "value", :limit => 1024
86
+ t.datetime "created_at"
87
+ t.datetime "updated_at"
88
+ t.date "published_at"
89
+ t.integer "rev", :default => 1
90
+ t.integer "published_version_id"
91
+ t.integer "locked_by"
92
+ t.date "expired_at"
93
+ t.date "follow_up"
94
+ t.boolean "to_review"
95
+ t.date "rdf_updated_at"
96
+ end
97
+
98
+ add_index "labels", ["language"], :name => "ix_labels_on_language"
99
+ add_index "labels", ["origin"], :name => "ix_labels_on_origin", :length => {"origin"=>255}
100
+ add_index "labels", ["published_version_id"], :name => "ix_labels_on_published_v"
101
+ add_index "labels", ["value"], :name => "ix_labels_on_value", :length => {"value"=>255}
102
+
103
+ create_table "matches", :force => true do |t|
104
+ t.integer "concept_id"
105
+ t.string "type"
106
+ t.string "value"
107
+ t.datetime "created_at"
108
+ t.datetime "updated_at"
109
+ end
110
+
111
+ add_index "matches", ["concept_id", "type"], :name => "ix_matches_fk_type"
112
+ add_index "matches", ["type"], :name => "ix_matches_on_type"
113
+
114
+ create_table "notations", :force => true do |t|
115
+ t.integer "concept_id"
116
+ t.string "value", :limit => 4000
117
+ t.string "data_type", :limit => 4000
118
+ end
119
+
120
+ add_index "notations", ["concept_id"], :name => "index_notations_on_concept_id"
121
+
122
+ create_table "note_annotations", :force => true do |t|
123
+ t.integer "note_id"
124
+ t.string "predicate", :limit => 50
125
+ t.string "value", :limit => 1024
126
+ t.datetime "created_at"
127
+ t.datetime "updated_at"
128
+ t.string "namespace", :limit => 50
129
+ end
130
+
131
+ add_index "note_annotations", ["note_id"], :name => "ix_note_annotations_fk"
132
+
133
+ create_table "notes", :force => true do |t|
134
+ t.string "language", :limit => 2
135
+ t.string "value", :limit => 4000
136
+ t.string "type", :limit => 50
137
+ t.datetime "created_at"
138
+ t.datetime "updated_at"
139
+ t.integer "owner_id"
140
+ t.string "owner_type", :null => false
141
+ end
142
+
143
+ add_index "notes", ["language"], :name => "ix_notes_on_language"
144
+ add_index "notes", ["owner_id", "owner_type", "type"], :name => "ix_notes_fk_type"
145
+ add_index "notes", ["type"], :name => "ix_notes_on_type"
146
+
147
+ create_table "users", :force => true do |t|
148
+ t.string "forename"
149
+ t.string "surname"
150
+ t.string "email"
151
+ t.string "crypted_password"
152
+ t.boolean "active"
153
+ t.datetime "created_at"
154
+ t.datetime "updated_at"
155
+ t.string "password_salt"
156
+ t.string "persistence_token"
157
+ t.string "perishable_token"
158
+ t.string "role"
159
+ t.string "telephone_number"
160
+ end
161
+
162
+ end
data/iqvoc_skosxl.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.summary = "iQvoc SKOS-XL extension"
13
13
  s.description = ""
14
14
 
15
- s.add_dependency "iqvoc", "~> 4.1.0"
15
+ s.add_dependency "iqvoc", "~> 4.3.0"
16
16
  s.add_dependency "bundler"
17
17
 
18
18
  s.files = %w(README.md Gemfile Gemfile.lock Rakefile iqvoc_skosxl.gemspec) + Dir.glob("{app,config,db,public,lib,test}/**/*")
@@ -1,5 +1,5 @@
1
1
  module Iqvoc
2
2
  module SKOSXL
3
- VERSION = "2.1.0"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  end
data/lib/iqvoc/xllabel.rb CHANGED
@@ -14,7 +14,7 @@ module Iqvoc
14
14
 
15
15
  self.base_class_name = 'Label::SKOSXL::Base'
16
16
 
17
- self.relation_class_names = ['Label::Relation::SKOSXL::Base']
17
+ self.relation_class_names = []
18
18
 
19
19
  self.note_class_names = Iqvoc::Concept.note_class_names
20
20
 
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require 'integration_test_helper'
17
+ require Iqvoc::Engine.root.join('test', 'integration_test_helper')
18
18
 
19
19
  class ConceptLabelLanguageTest < ActionDispatch::IntegrationTest
20
20
 
@@ -1,5 +1,21 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  require 'test_helper'
2
- require 'integration_test_helper'
18
+ require Iqvoc::Engine.root.join('test', 'integration_test_helper')
3
19
 
4
20
  class DashboardTest < ActionDispatch::IntegrationTest
5
21
 
@@ -1,5 +1,21 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  require 'test_helper'
2
- require 'integration_test_helper'
18
+ require Iqvoc::Engine.root.join('test', 'integration_test_helper')
3
19
 
4
20
  class EditConceptsTest < ActionDispatch::IntegrationTest
5
21
 
@@ -1,3 +1,19 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  require 'test_helper'
2
18
 
3
19
  class LabelsOrderTest < ActionDispatch::IntegrationTest
data/test/test_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
  require File.expand_path('../../config/environment', __FILE__)
3
3
  require 'rails/test_help'
4
+ require 'factories'
4
5
 
5
6
  class ActiveSupport::TestCase
6
7
  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iqvoc_skosxl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Glaser
@@ -10,34 +10,34 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-17 00:00:00.000000000 Z
13
+ date: 2014-02-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: iqvoc
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ~>
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 4.1.0
21
+ version: 4.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ~>
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 4.1.0
28
+ version: 4.3.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: bundler
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  description: ''
@@ -47,11 +47,10 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - README.md
51
50
  - Gemfile
52
51
  - Gemfile.lock
52
+ - README.md
53
53
  - Rakefile
54
- - iqvoc_skosxl.gemspec
55
54
  - app/assets/javascripts/iqvoc_skosxl/manifest.js
56
55
  - app/assets/javascripts/manifest.js
57
56
  - app/assets/stylesheets/iqvoc_skosxl/entity_select.css
@@ -111,7 +110,9 @@ files:
111
110
  - config/routes.rb
112
111
  - db/migrate/20110408121540_extend_label.rb
113
112
  - db/migrate/20110408123644_add_label_relations.rb
113
+ - db/schema.rb
114
114
  - db/seeds.rb
115
+ - iqvoc_skosxl.gemspec
115
116
  - lib/engine_tasks/db.rake
116
117
  - lib/iqvoc/skosxl/version.rb
117
118
  - lib/iqvoc/xllabel.rb
@@ -122,7 +123,6 @@ files:
122
123
  - test/integration/dashboard_test.rb
123
124
  - test/integration/edit_labels_test.rb
124
125
  - test/integration/labels_order_test.rb
125
- - test/integration_test_helper.rb
126
126
  - test/test_helper.rb
127
127
  - test/unit/label_test.rb
128
128
  homepage: http://innoq.com
@@ -134,17 +134,17 @@ require_paths:
134
134
  - lib
135
135
  required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.0.0
147
+ rubygems_version: 2.2.0
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: iQvoc SKOS-XL extension
@@ -155,6 +155,5 @@ test_files:
155
155
  - test/integration/dashboard_test.rb
156
156
  - test/integration/edit_labels_test.rb
157
157
  - test/integration/labels_order_test.rb
158
- - test/integration_test_helper.rb
159
158
  - test/test_helper.rb
160
159
  - test/unit/label_test.rb
@@ -1,27 +0,0 @@
1
- require 'test_helper'
2
- require 'capybara/rails'
3
-
4
- module ActionController
5
- class IntegrationTest
6
- include Capybara::DSL
7
-
8
- def login(role = nil)
9
- logout
10
- user(role)
11
- visit new_user_session_path(:lang => :de)
12
- fill_in "E-Mail", :with => user.email
13
- fill_in "Passwort", :with => user.password
14
- click_button "Anmelden"
15
- end
16
-
17
- def logout
18
- visit dashboard_path(:lang => :de)
19
- click_link_or_button "Abmelden" if page.has_link?("Abmelden")
20
- end
21
-
22
- def user(role = nil)
23
- @user ||= FactoryGirl.create(:user, :role => (role || User.default_role))
24
- end
25
-
26
- end
27
- end