Sha256: c8f1a891d748b0bd3e44d58615de49a14bedeb22cd55e1ea662c87ea6ff042e4

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

require "neo4j-community/version"


module Neo4j
  module Community

    def self.jars_root
      "#{File.dirname(__FILE__)}/neo4j-community/jars"
    end

    def self.load_jars!
      require 'java'
      Dir["#{jars_root}/*.jar"].each {|jar| require jar }
    end

    # This can be used by dependent gems to verify the Database versions have no mismatch.
    def self.ensure_version!(other, edition)
      matching = ::Neo4j::Community::NEO_VERSION == other
      return unless matching
      raise "Mismatch of Neo4j JAR versions. Already loaded JAR files #{::Neo4j::Community::NEO_VERSION}, neo4j-#{edition}: #{other}." 
    end

  end
end

Neo4j::Community.load_jars!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neo4j-community-1.6.0.alpha.5-java lib/neo4j-community.rb