Show
Ignore:
Timestamp:
11/05/10 18:54:05 (7 years ago)
Author:
mauriciobomfim
Message:

Added jruby support

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Explorator/trunk/vendor/plugins/active_rdf/lib/active_rdf.rb

    r483 r487  
    55 
    66# determine the directory in which we are running depending on cruby or jruby 
    7 if RUBY_PLATFORM =~ /xjava/ 
    8   # jruby can not follow symlinks, because java does not know the symlink concept 
    9   this_dir = File.dirname(File.expand_path(__FILE__)) 
    10 else 
    11   file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ 
    12   this_dir = File.dirname(File.expand_path(file))   
    13 end 
     7file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ 
     8this_dir = File.dirname(File.expand_path(file))   
    149 
    15 # set the load path, which uses the running directory, but has to be different if running on jruby directly from source.  
    16 if RUBY_PLATFORM =~ /xjava/ and Gem::cache.search(/^activerdf$/).empty? 
    17   $: << this_dir + '/activerdf/lib/' 
    18   $: << this_dir + '/activerdf/lib/active_rdf/' 
    19 else 
    20   $: << this_dir + '/' 
    21   $: << this_dir + '/active_rdf/' 
    22 end 
     10 
     11$: << this_dir + '/' 
     12$: << this_dir + '/active_rdf/' 
    2313 
    2414require 'active_rdf_helpers' 
     
    4939        # we are not running as a gem 
    5040        $activerdflog.info 'ActiveRDF is NOT installed as a Gem' 
    51         if RUBY_PLATFORM =~ /xjava/ 
    52           load_adapter this_dir + '/activerdf/activerdf-jena/lib/activerdf_jena/init' 
    53           load_adapter this_dir + '/activerdf/activerdf-sparql/lib/activerdf_sparql/sparql' 
    54     #load_adapter this_dir + '/../activerdf-sesame/lib/activerdf_sesame/sesame' 
    55         else 
    5641        #load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/rdflite' 
    5742        #load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/fetching' 
     
    6045        load_adapter this_dir + '/../activerdf-sparql/lib/activerdf_sparql/sparql' 
    6146        #load_adapter this_dir + '/../activerdf-yars/lib/activerdf_yars/jars2'     
    62   end 
    6347   
    6448else