neo4jr-simple 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,14 +68,8 @@ Use command line shell to query and modify the graph:
68
68
 
69
69
  == Contributors
70
70
 
71
- ====Matthew Deiters
72
- * Twitter : http://twitter.com/mdeiters
73
- * GitHub : https://github.com/mdeiters
74
- * LinkedIn : http://www.linkedin.com/in/matthewdeiters
75
- * Blog : http://www.theagiledeveloper.com
76
-
77
- ====Heinrich Klobuczek
78
- * GitHub : https://github.com/klobuczek
79
- * LinkedIn : http://www.linkedin.com/pub/heinrich-klobuczek/0/a71/39b
71
+ https://github.com/mdeiters
72
+ https://github.com/klobuczek
73
+ https://github.com/gregormelhorn
80
74
 
81
75
  Copyright (c) 2009 Matthew Deiters. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -3,14 +3,14 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
3
3
  include Java
4
4
 
5
5
  module Neo4jr
6
- require 'jars/neo4j-kernel-1.0-rc.jar'
6
+ require 'jars/neo4j-kernel-1.0.jar'
7
7
  require 'jars/lucene-core-2.9.1.jar'
8
- require 'jars/neo4j-index-1.0-b1.jar'
8
+ require 'jars/neo4j-index-1.0.jar'
9
9
  require 'jars/geronimo-jta_1.1_spec-1.1.1.jar'
10
10
  require 'jars/jline-0.9.94.jar'
11
- require 'jars/neo4j-commons-0.4.jar'
12
- require 'jars/neo4j-remote-graphdb-0.5.jar'
13
- require 'jars/neo4j-graph-algo-0.3-20100125.090624-8.jar'
11
+ require 'jars/neo4j-commons-1.0.jar'
12
+ require 'jars/neo4j-remote-graphdb-0.6.jar'
13
+ require 'jars/neo4j-graph-algo-0.5-20100430.103813-56.jar'
14
14
 
15
15
  java_import java.lang.System
16
16
  java_import org.neo4j.kernel.EmbeddedGraphDatabase
@@ -38,6 +38,7 @@ require 'neo4jr/traverser_extension'
38
38
  require 'neo4jr/returnable_evaluator'
39
39
  require 'neo4jr/stop_evaluator'
40
40
  require 'neo4jr/simple_cost_evaluator'
41
+ require 'neo4jr/max_cost_evaluator'
41
42
  require 'neo4jr/order'
42
43
  require 'neo4jr/direction'
43
44
  require 'neo4jr/path_rater'
@@ -0,0 +1,13 @@
1
+ module Neo4jr
2
+ class MaxCostEvaluator
3
+ include org.neo4j.graphalgo.shortestpath.MaxCostEvaluator
4
+
5
+ def initialize &block
6
+ @evaluator_block = block
7
+ end
8
+
9
+ def maxCostExceeded currentCost
10
+ @evaluator_block.call currentCost
11
+ end
12
+ end
13
+ end
@@ -4,7 +4,7 @@ module Neo4jr
4
4
  cost = start_cost
5
5
  previous = nil
6
6
  path.each do |r|
7
- cost = cost_accumulator.addCosts(cost, cost_evaluator.getCost(r, r.getEndNode == previous)) if r.kind_of? org.neo4j.api.core.Relationship
7
+ cost = cost_accumulator.addCosts(cost, cost_evaluator.getCost(r, r.getEndNode == previous)) if r.kind_of? org.neo4j.graphdb.Relationship
8
8
  previous = r
9
9
  end
10
10
  cost
@@ -3,7 +3,6 @@ module Neo4jr
3
3
  class StopEvaluator
4
4
  DEPTH_ONE = org.neo4j.graphdb.StopEvaluator::DEPTH_ONE
5
5
  END_OF_GRAPH = org.neo4j.graphdb.StopEvaluator::END_OF_GRAPH
6
- END_OF_NETWORK = org.neo4j.graphdb.StopEvaluator::END_OF_NETWORK
7
6
 
8
7
  # Creates a new StopEvaluator on the fly that delgates to the passed in block to use with the traverse method.
9
8
  # The block should return either true or false
metadata CHANGED
@@ -1,118 +1,132 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4jr-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 2
9
+ version: 0.2.2
5
10
  platform: ruby
6
11
  authors:
7
- - Matthew Deiters
12
+ - Matthew Deiters
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-26 00:00:00 -08:00
17
+ date: 2010-06-06 00:00:00 -07:00
13
18
  default_executable: neosh
14
19
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.2.9
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: jeweler
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
34
- version:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 2
30
+ - 9
31
+ version: 1.2.9
32
+ type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: jeweler
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :development
45
+ version_requirements: *id002
35
46
  description: A simple, ready to go JRuby wrapper for the Neo4j graph database engine. Nothing more then Neo4j and Ruby goodness
36
47
  email: matthew_deiters@mckinsey.com
37
48
  executables:
38
- - neosh
49
+ - neosh
39
50
  extensions: []
40
51
 
41
52
  extra_rdoc_files:
42
- - LICENSE
43
- - README.rdoc
53
+ - LICENSE
54
+ - README.rdoc
44
55
  files:
45
- - VERSION
46
- - bin/neosh
47
- - lib/jars/geronimo-jta_1.1_spec-1.1.1.jar
48
- - lib/jars/jline-0.9.94.jar
49
- - lib/jars/lucene-core-2.9.1.jar
50
- - lib/jars/neo4j-commons-0.4.jar
51
- - lib/jars/neo4j-graph-algo-0.3-20100125.090624-8.jar
52
- - lib/jars/neo4j-index-1.0-b1.jar
53
- - lib/jars/neo4j-kernel-1.0-rc.jar
54
- - lib/jars/neo4j-remote-graphdb-0.5.jar
55
- - lib/jars/neo4j-shell-1.0-rc.jar
56
- - lib/neo4jr-simple.rb
57
- - lib/neo4jr/cli.rb
58
- - lib/neo4jr/configuration.rb
59
- - lib/neo4jr/db.rb
60
- - lib/neo4jr/direction.rb
61
- - lib/neo4jr/embedded_neo_extension.rb
62
- - lib/neo4jr/indexer.rb
63
- - lib/neo4jr/int_array_iterator_extension.rb
64
- - lib/neo4jr/node_extension.rb
65
- - lib/neo4jr/order.rb
66
- - lib/neo4jr/path_rater.rb
67
- - lib/neo4jr/property_container_extension.rb
68
- - lib/neo4jr/relationship_extension.rb
69
- - lib/neo4jr/relationship_type.rb
70
- - lib/neo4jr/returnable_evaluator.rb
71
- - lib/neo4jr/simple_cost_evaluator.rb
72
- - lib/neo4jr/stop_evaluator.rb
73
- - lib/neo4jr/traverser_extension.rb
74
- - LICENSE
75
- - README.rdoc
56
+ - VERSION
57
+ - bin/neosh
58
+ - lib/jars/geronimo-jta_1.1_spec-1.1.1.jar
59
+ - lib/jars/jline-0.9.94.jar
60
+ - lib/jars/lucene-core-2.9.1.jar
61
+ - lib/jars/neo4j-commons-1.0.jar
62
+ - lib/jars/neo4j-graph-algo-0.5-20100430.103813-56.jar
63
+ - lib/jars/neo4j-index-1.0.jar
64
+ - lib/jars/neo4j-kernel-1.0.jar
65
+ - lib/jars/neo4j-remote-graphdb-0.6.jar
66
+ - lib/jars/neo4j-shell-1.0.jar
67
+ - lib/neo4jr-simple.rb
68
+ - lib/neo4jr/cli.rb
69
+ - lib/neo4jr/configuration.rb
70
+ - lib/neo4jr/db.rb
71
+ - lib/neo4jr/direction.rb
72
+ - lib/neo4jr/embedded_neo_extension.rb
73
+ - lib/neo4jr/indexer.rb
74
+ - lib/neo4jr/int_array_iterator_extension.rb
75
+ - lib/neo4jr/max_cost_evaluator.rb
76
+ - lib/neo4jr/node_extension.rb
77
+ - lib/neo4jr/order.rb
78
+ - lib/neo4jr/path_rater.rb
79
+ - lib/neo4jr/property_container_extension.rb
80
+ - lib/neo4jr/relationship_extension.rb
81
+ - lib/neo4jr/relationship_type.rb
82
+ - lib/neo4jr/returnable_evaluator.rb
83
+ - lib/neo4jr/simple_cost_evaluator.rb
84
+ - lib/neo4jr/stop_evaluator.rb
85
+ - lib/neo4jr/traverser_extension.rb
86
+ - LICENSE
87
+ - README.rdoc
76
88
  has_rdoc: true
77
89
  homepage: http://github.com/mdeiters/neo4jr-simple
78
90
  licenses: []
79
91
 
80
92
  post_install_message:
81
93
  rdoc_options:
82
- - --charset=UTF-8
94
+ - --charset=UTF-8
83
95
  require_paths:
84
- - lib
96
+ - lib
85
97
  required_ruby_version: !ruby/object:Gem::Requirement
86
98
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: "0"
90
- version:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 0
103
+ version: "0"
91
104
  required_rubygems_version: !ruby/object:Gem::Requirement
92
105
  requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: "0"
96
- version:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ segments:
109
+ - 0
110
+ version: "0"
97
111
  requirements: []
98
112
 
99
113
  rubyforge_project:
100
- rubygems_version: 1.3.5
114
+ rubygems_version: 1.3.6
101
115
  signing_key:
102
116
  specification_version: 3
103
117
  summary: A simple, ready to go JRuby wrapper for the Neo4j graph database engine.
104
118
  test_files:
105
- - VERSION
106
- - spec/db_spec.rb
107
- - spec/direction_spec.rb
108
- - spec/embedded_graph_database_spec.rb
109
- - spec/functional_example_spec.rb
110
- - spec/indexer_spec.rb
111
- - spec/int_array_iterator_extension_spec.rb
112
- - spec/node_extension_spec.rb
113
- - spec/property_container_extension_spec.rb
114
- - spec/relationship_type_spec.rb
115
- - spec/returnable_evaluator_spec.rb
116
- - spec/spec.opts
117
- - spec/spec_helper.rb
118
- - spec/stop_evaluator_spec.rb
119
+ - VERSION
120
+ - spec/db_spec.rb
121
+ - spec/direction_spec.rb
122
+ - spec/embedded_graph_database_spec.rb
123
+ - spec/functional_example_spec.rb
124
+ - spec/indexer_spec.rb
125
+ - spec/int_array_iterator_extension_spec.rb
126
+ - spec/node_extension_spec.rb
127
+ - spec/property_container_extension_spec.rb
128
+ - spec/relationship_type_spec.rb
129
+ - spec/returnable_evaluator_spec.rb
130
+ - spec/spec.opts
131
+ - spec/spec_helper.rb
132
+ - spec/stop_evaluator_spec.rb