Skip to content
Andreas Ronge edited this page Aug 25, 2014 · 3 revisions

Implementation:

All method prefixed with _ gives direct access to the java layer/rest layer. Notice, the database starts with auto commit by default.

The public Neo4j::Node classes is abstract and provides a common API/docs for both the embedded and neo4j server.

The Neo4j::Embedded and Neo4j::Server modules contains drivers for classes like the Neo4j::Node. This is implemented something like this:

  class Neo4j::Node
    # YARD docs
    def [](key)
      # abstract method - impl using either HTTP or Java API
      get_property(key,session=Neo4j::Session.current)
    end


    def self.create(props, session=Neo4j::Session.current)
     session.create_node(props)
    end
  end

Both implementation use the same E2E specs.

How to update YARD docs

  • Run the rake yard task in the gh-pages branch and make a pull request in order to update the online YARD docs.

Testing

The testing will be using much more mocking.

  • The unit rspec folder only contains testing for one Ruby module. All other modules should be mocked.
  • The integration rspec folder contains testing for two or more modules but mocks the neo4j database access.
  • The e2e rspec folder for use the real database (or Neo4j's ImpermanentDatabase)
  • The shared_examples common specs for different types of databases

WARNING: Much of the information in this wiki is out of day. We are in the process of moving things to readthedocs

Api

Contribute

Clone this wiki locally