neo4j-wrapper 2.0.1-java → 2.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,8 +26,10 @@ module Neo4j
26
26
  end
27
27
 
28
28
  def rule_node
29
- ref_node._java_node.synchronized do
30
- @@rule_nodes[key] ||= find_node || create_node
29
+ @@rule_nodes[key] ||= Neo4j::Transaction.run do |tx|
30
+ java_ref_node = ref_node._java_node
31
+ tx.acquire_write_lock(java_ref_node)
32
+ find_node(java_ref_node) || create_node(java_ref_node)
31
33
  end
32
34
  end
33
35
 
@@ -47,12 +49,10 @@ module Neo4j
47
49
  end
48
50
  end
49
51
 
50
- def create_node
51
- Neo4j::Transaction.run do
52
- node = Neo4j::Node.new
53
- ref_node.create_relationship_to(node, type_to_java(@classname))
54
- node
55
- end
52
+ def create_node(ref)
53
+ node = Neo4j::Node.new
54
+ ref.create_relationship_to(node, type_to_java(@classname))
55
+ node
56
56
  end
57
57
 
58
58
  def inherit(subclass)
@@ -61,8 +61,8 @@ module Neo4j
61
61
  end
62
62
  end
63
63
 
64
- def find_node
65
- ref_node.rel?(:outgoing, @classname.to_s) && ref_node._node(:outgoing, @classname.to_s)
64
+ def find_node(ref = ref_node)
65
+ ref.rel?(:outgoing, @classname.to_s) && ref_node._node(:outgoing, @classname.to_s)
66
66
  end
67
67
 
68
68
  def ref_node_changed?
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Wrapper
3
- VERSION = '2.0.1'
3
+ VERSION = '2.1.0'
4
4
  end
5
5
  end
@@ -27,5 +27,5 @@ It comes included with the Apache Lucene document database.
27
27
  s.extra_rdoc_files = %w( README.rdoc )
28
28
  s.rdoc_options = ["--quiet", "--title", "Neo4j.rb", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
29
29
 
30
- s.add_dependency("neo4j-core", "2.0.1")
30
+ s.add_dependency("neo4j-core", "2.1.0")
31
31
  end
metadata CHANGED
@@ -1,108 +1,144 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: neo4j-wrapper
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.0.1
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 2.1.0
6
6
  platform: java
7
- authors:
8
- - Andreas Ronge
9
- autorequire:
7
+ authors:
8
+ - Andreas Ronge
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-06-07 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: neo4j-core
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - "="
22
- - !ruby/object:Gem::Version
23
- version: 2.0.1
24
- type: :runtime
25
- version_requirements: *id001
26
- description: |
27
- You can think of Neo4j as a high-performance graph engine with all the features of a mature and robust database.
28
- The programmer works with an object-oriented, flexible network structure rather than with strict and static tables
29
- yet enjoys all the benefits of a fully transactional, enterprise-strength database.
30
- It comes included with the Apache Lucene document database.
31
-
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: neo4j-core
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '='
19
+ - !ruby/object:Gem::Version
20
+ version: 2.1.0
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.0
27
+ none: false
28
+ prerelease: false
29
+ type: :runtime
30
+ description: ! "You can think of Neo4j as a high-performance graph engine with all\
31
+ \ the features of a mature and robust database.\nThe programmer works with an object-oriented,\
32
+ \ flexible network structure rather than with strict and static tables \nyet enjoys\
33
+ \ all the benefits of a fully transactional, enterprise-strength database.\nIt comes\
34
+ \ included with the Apache Lucene document database.\n"
32
35
  email: andreas.ronge@gmail.com
33
36
  executables: []
34
-
35
37
  extensions: []
36
-
37
- extra_rdoc_files:
38
- - README.rdoc
39
- files:
40
- - lib/neo4j-wrapper.rb
41
- - lib/neo4j-wrapper/find.rb
42
- - lib/neo4j-wrapper/wrapper.rb
43
- - lib/neo4j-wrapper/class_methods.rb
44
- - lib/neo4j-wrapper/version.rb
45
- - lib/neo4j-wrapper/relationship_mixin/initialize.rb
46
- - lib/neo4j-wrapper/relationship_mixin/delegates.rb
47
- - lib/neo4j-wrapper/relationship_mixin/class_methods.rb
48
- - lib/neo4j-wrapper/properties/instance_methods.rb
49
- - lib/neo4j-wrapper/properties/class_methods.rb
50
- - lib/neo4j-wrapper/has_n/nodes.rb
51
- - lib/neo4j-wrapper/has_n/instance_methods.rb
52
- - lib/neo4j-wrapper/has_n/decl_rel.rb
53
- - lib/neo4j-wrapper/has_n/class_methods.rb
54
- - lib/neo4j-wrapper/node_mixin/initialize.rb
55
- - lib/neo4j-wrapper/node_mixin/delegates.rb
56
- - lib/neo4j-wrapper/node_mixin/class_methods.rb
57
- - lib/neo4j-wrapper/rule/rule.rb
58
- - lib/neo4j-wrapper/rule/rule_node.rb
59
- - lib/neo4j-wrapper/rule/instance_methods.rb
60
- - lib/neo4j-wrapper/rule/class_methods.rb
61
- - lib/neo4j-wrapper/rule/event_listener.rb
62
- - lib/neo4j-wrapper/rule/functions/function.rb
63
- - lib/neo4j-wrapper/rule/functions/size.rb
64
- - lib/neo4j-wrapper/rule/functions/sum.rb
65
- - lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
66
- - lib/neo4j/identity_map.rb
67
- - lib/neo4j/node_mixin.rb
68
- - lib/neo4j/relationship_mixin.rb
69
- - lib/neo4j/type_converters/type_converters.rb
70
- - README.rdoc
71
- - Gemfile
72
- - neo4j-wrapper.gemspec
38
+ extra_rdoc_files:
39
+ - README.rdoc
40
+ files:
41
+ - !binary |-
42
+ bGliL25lbzRqLXdyYXBwZXIucmI=
43
+ - !binary |-
44
+ bGliL25lbzRqL2lkZW50aXR5X21hcC5yYg==
45
+ - !binary |-
46
+ bGliL25lbzRqL25vZGVfbWl4aW4ucmI=
47
+ - !binary |-
48
+ bGliL25lbzRqL3JlbGF0aW9uc2hpcF9taXhpbi5yYg==
49
+ - !binary |-
50
+ bGliL25lbzRqL3R5cGVfY29udmVydGVycy90eXBlX2NvbnZlcnRlcnMucmI=
51
+ - !binary |-
52
+ bGliL25lbzRqLXdyYXBwZXIvY2xhc3NfbWV0aG9kcy5yYg==
53
+ - !binary |-
54
+ bGliL25lbzRqLXdyYXBwZXIvZmluZC5yYg==
55
+ - !binary |-
56
+ bGliL25lbzRqLXdyYXBwZXIvdmVyc2lvbi5yYg==
57
+ - !binary |-
58
+ bGliL25lbzRqLXdyYXBwZXIvd3JhcHBlci5yYg==
59
+ - !binary |-
60
+ bGliL25lbzRqLXdyYXBwZXIvaGFzX24vY2xhc3NfbWV0aG9kcy5yYg==
61
+ - !binary |-
62
+ bGliL25lbzRqLXdyYXBwZXIvaGFzX24vZGVjbF9yZWwucmI=
63
+ - !binary |-
64
+ bGliL25lbzRqLXdyYXBwZXIvaGFzX24vaW5zdGFuY2VfbWV0aG9kcy5yYg==
65
+ - !binary |-
66
+ bGliL25lbzRqLXdyYXBwZXIvaGFzX24vbm9kZXMucmI=
67
+ - !binary |-
68
+ bGliL25lbzRqLXdyYXBwZXIvbm9kZV9taXhpbi9jbGFzc19tZXRob2RzLnJi
69
+ - !binary |-
70
+ bGliL25lbzRqLXdyYXBwZXIvbm9kZV9taXhpbi9kZWxlZ2F0ZXMucmI=
71
+ - !binary |-
72
+ bGliL25lbzRqLXdyYXBwZXIvbm9kZV9taXhpbi9pbml0aWFsaXplLnJi
73
+ - !binary |-
74
+ bGliL25lbzRqLXdyYXBwZXIvcHJvcGVydGllcy9jbGFzc19tZXRob2RzLnJi
75
+ - !binary |-
76
+ bGliL25lbzRqLXdyYXBwZXIvcHJvcGVydGllcy9pbnN0YW5jZV9tZXRob2Rz
77
+ LnJi
78
+ - !binary |-
79
+ bGliL25lbzRqLXdyYXBwZXIvcmVsYXRpb25zaGlwX21peGluL2NsYXNzX21l
80
+ dGhvZHMucmI=
81
+ - !binary |-
82
+ bGliL25lbzRqLXdyYXBwZXIvcmVsYXRpb25zaGlwX21peGluL2RlbGVnYXRl
83
+ cy5yYg==
84
+ - !binary |-
85
+ bGliL25lbzRqLXdyYXBwZXIvcmVsYXRpb25zaGlwX21peGluL2luaXRpYWxp
86
+ emUucmI=
87
+ - !binary |-
88
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9jbGFzc19tZXRob2RzLnJi
89
+ - !binary |-
90
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9ldmVudF9saXN0ZW5lci5yYg==
91
+ - !binary |-
92
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9pbnN0YW5jZV9tZXRob2RzLnJi
93
+ - !binary |-
94
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9ydWxlLnJi
95
+ - !binary |-
96
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9ydWxlX25vZGUucmI=
97
+ - !binary |-
98
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9mdW5jdGlvbnMvZnVuY3Rpb24ucmI=
99
+ - !binary |-
100
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9mdW5jdGlvbnMvc2l6ZS5yYg==
101
+ - !binary |-
102
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9mdW5jdGlvbnMvc3VtLnJi
103
+ - !binary |-
104
+ bGliL25lbzRqLXdyYXBwZXIvcnVsZS9uZW80al9jb3JlX2V4dC90cmF2ZXJz
105
+ ZXIucmI=
106
+ - README.rdoc
107
+ - Gemfile
108
+ - neo4j-wrapper.gemspec
73
109
  homepage: http://github.com/andreasronge/neo4j-wrapper/tree
74
110
  licenses: []
75
-
76
- post_install_message:
77
- rdoc_options:
78
- - --quiet
79
- - --title
80
- - Neo4j.rb
81
- - --line-numbers
82
- - --main
83
- - README.rdoc
84
- - --inline-source
85
- require_paths:
86
- - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
111
+ post_install_message:
112
+ rdoc_options:
113
+ - --quiet
114
+ - --title
115
+ - Neo4j.rb
116
+ - --line-numbers
117
+ - --main
118
+ - README.rdoc
119
+ - --inline-source
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: 1.8.7
88
127
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: 1.8.7
93
- required_rubygems_version: !ruby/object:Gem::Requirement
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ segments:
133
+ - 0
134
+ hash: 2
135
+ version: !binary |-
136
+ MA==
94
137
  none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: "0"
99
138
  requirements: []
100
-
101
139
  rubyforge_project: neo4j-wrapper
102
- rubygems_version: 1.8.15
103
- signing_key:
140
+ rubygems_version: 1.8.24
141
+ signing_key:
104
142
  specification_version: 3
105
143
  summary: A graph database for JRuby
106
144
  test_files: []
107
-
108
- has_rdoc: true