pacer-neo4j 2.3.4-java → 2.3.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/pacer-neo4j/version.rb +1 -1
- data/lib/pacer-neo4j.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6142dce5f42d82a2edf30b8388efcdf8e9b4fc3b
|
4
|
+
data.tar.gz: f3119c7b969e9cec9c2c9b3aaf0639eb30ab4096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9d5cd744317e9f1e77584bbcdcacc1cbdf99bb3b576e4585849acf8ab73c3f67b70e758cc43665d8c2991fada7fd209ffef34c48e330821c34a89b9160304d9
|
7
|
+
data.tar.gz: 45671a073b32743609e716ecb365ee4ccf516439c96584b162f23286b7b4ac163b3c0346bcea0380504cf5182f2352d4edfb84d89fe25bcf3f8bb7fea864176b
|
data/README.md
CHANGED
@@ -11,11 +11,13 @@ This plugin enables full [Neo4J](http://neo4j.org) graph support in Pacer.
|
|
11
11
|
|
12
12
|
Here is how you open a Neo4J graph in Pacer.
|
13
13
|
|
14
|
+
```
|
14
15
|
require 'pacer'
|
15
16
|
require 'pacer-neo4j'
|
16
17
|
|
17
18
|
# Graph will be created if it doesn't exist
|
18
19
|
graph = Pacer.neo4j 'path/to/graph'
|
20
|
+
```
|
19
21
|
|
20
22
|
All other operations are identical across graph implementations (except
|
21
23
|
where certain features are not supported). See Pacer's documentation for
|
data/lib/pacer-neo4j/version.rb
CHANGED
data/lib/pacer-neo4j.rb
CHANGED
@@ -29,6 +29,10 @@ Pacer::FunctionResolver.clear_cache
|
|
29
29
|
module Pacer
|
30
30
|
# Add 'static methods' to the Pacer namespace.
|
31
31
|
class << self
|
32
|
+
def neo4j_class(args)
|
33
|
+
Pacer::Neo4j::BlueprintsGraph
|
34
|
+
end
|
35
|
+
|
32
36
|
# Return a graph for the given path. Will create a graph if none exists at
|
33
37
|
# that location. (The graph is only created if data is actually added to it).
|
34
38
|
#
|
@@ -48,13 +52,13 @@ module Pacer
|
|
48
52
|
open = proc do
|
49
53
|
raw_graph = Pacer.open_graphs[path]
|
50
54
|
if raw_graph
|
51
|
-
graph =
|
55
|
+
graph = neo4j_class(args).new(raw_graph)
|
52
56
|
else
|
53
57
|
FileUtils.mkdir_p path
|
54
58
|
if args
|
55
|
-
graph =
|
59
|
+
graph = neo4j_class(args).new(path, args.to_hash_map)
|
56
60
|
else
|
57
|
-
graph =
|
61
|
+
graph = neo4j_class({}).new(path)
|
58
62
|
end
|
59
63
|
graph.allow_auto_tx = false
|
60
64
|
Pacer.open_graphs[path] = graph.raw_graph
|
@@ -69,7 +73,7 @@ module Pacer
|
|
69
73
|
Neo4j::Graph.new(Pacer::YamlEncoder, open, shutdown)
|
70
74
|
else
|
71
75
|
# Don't register the new graph so that it won't be automatically closed.
|
72
|
-
Neo4j::Graph.new Pacer::YamlEncoder, proc {
|
76
|
+
Neo4j::Graph.new Pacer::YamlEncoder, proc { neo4j_class(args || {}).new(path_or_graph) }
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pacer-neo4j
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Darrick Wiebe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pacer
|