Skip to content

Commit

Permalink
Release 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Jul 25, 2009
1 parent 6afb7b8 commit 646703a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
@@ -1,3 +1,11 @@
== 0.3.1 / 2009-07-25
* Feature, extension - find path between given pair of nodes (#58)
* Fix a messy exception on GET /nodes/UnknownClassName (#57)
* Bug - exception on GET /nodes/classname/rel if rel is a has_one relationship (#56)
* Bug: GET /nodes/classname missing out nodes with no properties (#55)
* Bug: Lucene sorting caused exception if there were no documents (#54)
* Bug: reindexer fails to connect nodes to the IndexNode (#53)

== 0.3.0 / 2009-06-25
* Neo4j should track node changes
* RESTful support for lucene queries, sorting and paging
Expand Down
18 changes: 16 additions & 2 deletions README.rdoc
Expand Up @@ -53,7 +53,8 @@ This page contains the following information:
* Ten Minute Tutorial
* Lucene API Documentation
* Neo4j API Documentation
* Extensions: REST (see Neo4j::RestMixin)
* Extension: REST (see Neo4j::RestMixin)
* Extension: find_path
* Ruby on Rails with Neo4j.rb

There is also some complete examples in the example folder
Expand Down Expand Up @@ -1426,9 +1427,22 @@ It requires the following gems
For RSpec testing it also needs:
* rack-test

For more information see the test/rest/example.rb or the examples/admin or Neo4j::RestMixin.
For more information see the examples/rest/example.rb or the examples/admin or Neo4j::RestMixin.


== Extension: find_path

Extension which finds the shortest path (in terms of number of links) between
two nodes. Use something like this:

require 'neo4j/extensions/find_path'
node1.traverse.both(:knows).depth(:all).path_to(node2)
# => [node1, node42, node1234, node256, node2]

This extension is still rather experimental. The algorithm is based on the one
used in the Neo4j Java IMDB example. For more information see Neo4j::Relationships::NodeTraverser#path_to
or the RSpec find_path_spec.rb.

== Ruby on Rails with Neo4j.rb

Neo4j.rb does work nicely with R&R.
Expand Down
11 changes: 8 additions & 3 deletions lib/neo4j/extensions/tx_tracker.rb
Expand Up @@ -255,9 +255,13 @@ def create_node_with_uuid(uuid)
#

def self.on_neo_started(neo_instance)
return if neo_instance.ref_node.relationship?(:tx_node_list)
@tx_node_list = TxNodeList.new # cache this so we do not have to look it up always
neo_instance.ref_node.relationships.outgoing(:tx_node_list) << @tx_node_list
# has the tx_node_list already been created ?
unless neo_instance.ref_node.relationship?(:tx_node_list)
# it does not exist - create it
neo_instance.ref_node.relationships.outgoing(:tx_node_list) << TxNodeList.new
end
# cache this so we do not have to look it up always
@tx_node_list = neo_instance.ref_node.relationships.outgoing(:tx_node_list).nodes.first
Neo4j.event_handler.add(@tx_node_list)
end

Expand All @@ -269,6 +273,7 @@ def self.on_neo_stopped(neo_instance)


def self.instance
Neo4j.start unless @tx_node_list
@tx_node_list
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/neo4j/version.rb
@@ -1,3 +1,3 @@
module Neo4j
VERSION = '0.3.0' unless defined?(Neo4j::VERSION)
VERSION = '0.3.1' unless defined?(Neo4j::VERSION)
end

0 comments on commit 646703a

Please sign in to comment.