activerubic 0.8.1 → 0.8.2

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.
Files changed (2) hide show
  1. data/lib/active_rubic.rb +42 -9
  2. metadata +8 -8
@@ -239,7 +239,7 @@
239
239
  #
240
240
  ############################################################################
241
241
  module ActiveRubic
242
- VERSION = '0.8.1'
242
+ VERSION = '0.8.2'
243
243
  end
244
244
 
245
245
  RUBIC_VERSION = ActiveRubic::VERSION
@@ -250,6 +250,18 @@ RUBIC_DATASTORES = [ :jena, :joseki, :mysql, :lucene, :geolucene ] unless define
250
250
  # unused
251
251
  RUBIC_CONNECTION_ADAPTERS = [ :rubinstein ] unless defined?(RUBIC_CONNECTION_ADAPTERS)
252
252
 
253
+ # the loader script is taken from ActiveRDF
254
+
255
+ # determine the directory in which we are running depending on cruby or jruby
256
+ if RUBY_PLATFORM =~ /java/
257
+ # jruby can not follow symlinks, because java does not know the symlink concept
258
+ this_dir = File.dirname(File.expand_path(__FILE__))
259
+ else
260
+ file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
261
+ this_dir = File.dirname(File.expand_path(file))
262
+ end
263
+
264
+
253
265
  # adding active_rdf subdirectory to the ruby loadpath
254
266
  file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
255
267
  this_dir = File.dirname(File.expand_path(file))
@@ -264,17 +276,38 @@ RUBIC_HOME = this_dir #unless defined? RUBIC_HOME
264
276
 
265
277
  #################################################
266
278
 
267
- ### set environment
279
+ unless defined? RUBINSTEIN_HOME
280
+ if ENV['RUBINSTEIN_HOME'] then
281
+ RUBINSTEIN_HOME = ENV['RUBINSTEIN_HOME']
282
+ else
283
+ # File.dirname($0) will kill /usr/bin/rake
284
+ #RUBINSTEIN_HOME = File.dirname($0)
285
+ raise "You have not set the RUBINSTEIN_HOME environment variable!"
286
+ end
287
+ end
288
+
289
+ unless defined? RUBINSTEIN_CONFIG
290
+ if ENV['RUBINSTEIN_CONFIG'] then
291
+ RUBINSTEIN_CONFIG = ENV['RUBINSTEIN_CONFIG']
292
+ else
293
+ raise "You have not set the RUBINSTEIN_CONFIG environment variable!"
294
+ end
295
+ end
296
+
297
+ ## running on Rails?
268
298
  if defined? RAILS_ROOT
299
+ # expect the libraries to be installed under RAILS_ROOT/lib
269
300
  RUBINSTEIN_HOME = RAILS_ROOT + '/lib/rubinstein' unless defined? RUBINSTEIN_HOME
301
+ RUBINSTEIN_CONFIG = RUBINSTEIN_HOME + '/config' unless defined? RUBINSTEIN_CONFIG
270
302
  RUBIC_HOME = RAILS_ROOT + '/lib/active_rubic/lib/' unless defined? RUBIC_HOME
303
+
304
+ ## no Rails
271
305
  else
272
- unless defined? RUBINSTEIN_HOME
273
- if ENV['RUBINSTEIN_HOME'] then
274
- RUBINSTEIN_HOME = ENV['RUBINSTEIN_HOME']
306
+ unless defined? RUBINSTEIN_CONFIG
307
+ if ENV['RUBINSTEIN_CONFIG'] then
308
+ RUBINSTEIN_CONFIG = ENV['RUBINSTEIN_CONFIG']
275
309
  else
276
- # File.dirname($0) will kill /usr/bin/rake
277
- RUBINSTEIN_HOME = File.dirname($0)
310
+ RUBINSTEIN_CONFIG = RUBINSTEIN_HOME + '/config'
278
311
  end
279
312
  end
280
313
 
@@ -318,7 +351,7 @@ require 'active_rdf'
318
351
  require RUBIC_HOME + '/objectmanager/namespace'
319
352
 
320
353
  # Namespace configuration
321
- require RUBINSTEIN_HOME + '/config/namespaces'
354
+ require RUBINSTEIN_CONFIG + '/namespaces'
322
355
 
323
356
  ### load helper methods
324
357
  require RUBINSTEIN_HOME + '/lib/helpers'
@@ -391,4 +424,4 @@ module ActiveRubic
391
424
  end
392
425
  end
393
426
 
394
- # EOF
427
+ # EOF
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: activerubic
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.1
7
- date: 2008-01-16 00:00:00 +02:00
6
+ version: 0.8.2
7
+ date: 2008-04-28 00:00:00 +03:00
8
8
  summary: ActiveRubic is a connector to semantic data stores, such as Jena and Joseki.
9
9
  require_paths:
10
10
  - lib
@@ -34,22 +34,22 @@ files:
34
34
  - lib/active_rubic/cacher.rb
35
35
  - lib/active_rubic/base.rb
36
36
  - lib/active_rubinstein
37
+ - lib/active_rubinstein/lucene_searcher.rb
37
38
  - lib/active_rubinstein/deprecated
38
39
  - lib/active_rubinstein/deprecated/base.rb
39
- - lib/active_rubinstein/base.rb
40
- - lib/active_rubinstein/lucene_searcher.rb
41
40
  - lib/active_rubinstein/jena_query.rb
42
- - lib/active_rubinstein/sparql_formulator.rb
43
41
  - lib/active_rubinstein/joseki_query.rb
42
+ - lib/active_rubinstein/sparql_formulator.rb
43
+ - lib/active_rubinstein/base.rb
44
44
  - lib/objectmanager
45
+ - lib/objectmanager/namespace.rb
45
46
  - lib/objectmanager/owl
46
- - lib/objectmanager/owl/class.rb
47
- - lib/objectmanager/owl/thing.rb
48
47
  - lib/objectmanager/owl/object_property.rb
48
+ - lib/objectmanager/owl/thing.rb
49
+ - lib/objectmanager/owl/class.rb
49
50
  - lib/objectmanager/rdfs
50
51
  - lib/objectmanager/rdfs/resource.rb
51
52
  - lib/objectmanager/rdfs/image.rb
52
- - lib/objectmanager/namespace.rb
53
53
  - README.txt
54
54
  test_files: []
55
55