pacer-neo4j 2.2.0-java → 2.3.0.pre-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/Jarfile +2 -0
- data/Rakefile +0 -32
- data/lib/pacer-neo4j.rb +3 -1
- data/lib/pacer-neo4j/graph.rb +26 -20
- data/lib/pacer-neo4j/version.rb +2 -5
- data/pacer-neo4j.gemspec +3 -2
- metadata +22 -10
- data/pom.xml +0 -95
- data/pom/standalone.xml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4f8db3353a00a093f59302a59a8191e2911d69a
|
4
|
+
data.tar.gz: 0c7b58d580985e4f7e3977a38332c5fd70db2ae2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14401e12817dae511f5dce5f0158ca3425361315f5387eda075a0f5191dbf0c759c7de47f908387b7b03ea35f078a26e135ab044d75a1eb4697c194223baf5b8
|
7
|
+
data.tar.gz: 141d32bc1cf37cbd03d0606e2abc7a6737e608ab19e30f46ab224c365cc752935a178ef5badb960e139076f495e3a242e5f8198410191c03d45f512176998c2e
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -2,3 +2,7 @@ source "http://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in pacer-graph.gemspec
|
4
4
|
gemspec
|
5
|
+
|
6
|
+
# Gemfile-custom is .gitignored, but eval'd here so you can add
|
7
|
+
# whatever dev tools you like to use to your local environment.
|
8
|
+
eval File.read('Gemfile-custom') if File.exist?('Gemfile-custom')
|
data/Jarfile
ADDED
data/Rakefile
CHANGED
@@ -1,35 +1,3 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
|
-
file 'pom.xml' => 'lib/pacer-neo4j/version.rb' do
|
5
|
-
pom = File.read 'pom.xml'
|
6
|
-
when_writing('Update pom.xml version number') do
|
7
|
-
open 'pom.xml', 'w' do |f|
|
8
|
-
pom.each_line do |line|
|
9
|
-
line.sub!(%r{<gem.version>.*</gem.version>}, "<gem.version>#{ Pacer::Neo4j::VERSION }</gem.version>")
|
10
|
-
line.sub!(%r{<blueprints.version>.*</blueprints.version>}, "<blueprints.version>#{ Pacer::Neo4j::BLUEPRINTS_VERSION }</blueprints.version>")
|
11
|
-
line.sub!(%r{<pipes.version>.*</pipes.version>}, "<pipes.version>#{ Pacer::Neo4j::PIPES_VERSION }</pipes.version>")
|
12
|
-
f << line
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
file Pacer::Neo4j::JAR_PATH => 'pom.xml' do
|
19
|
-
when_writing("Execute 'mvn package' task") do
|
20
|
-
system('mvn clean package')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
task :note do
|
25
|
-
puts "NOTE: touch lib/pacer-neo4j/version.rb (or rake touch) to force everything to rebuild"
|
26
|
-
end
|
27
|
-
|
28
|
-
task :build => [:note, Pacer::Neo4j::JAR_PATH]
|
29
|
-
task :install => [:note, Pacer::Neo4j::JAR_PATH]
|
30
|
-
|
31
|
-
desc 'Touch version.rb so that the jar rebuilds'
|
32
|
-
task :touch do
|
33
|
-
system 'touch', 'lib/pacer-neo4j/version.rb'
|
34
|
-
end
|
35
|
-
|
data/lib/pacer-neo4j.rb
CHANGED
@@ -5,7 +5,9 @@ $:.unshift lib_path unless $:.any? { |path| path == lib_path }
|
|
5
5
|
|
6
6
|
require 'pacer-neo4j/version'
|
7
7
|
|
8
|
-
require
|
8
|
+
require 'lock_jar'
|
9
|
+
LockJar.lock(File.join(File.dirname(__FILE__), "..", "Jarfile"))
|
10
|
+
LockJar.load
|
9
11
|
|
10
12
|
require 'pacer-neo4j/graph'
|
11
13
|
require 'pacer-neo4j/algo/wrapping'
|
data/lib/pacer-neo4j/graph.rb
CHANGED
@@ -160,24 +160,27 @@ module Pacer
|
|
160
160
|
end
|
161
161
|
|
162
162
|
def build_query(type, filters)
|
163
|
+
empty = false
|
163
164
|
indexed = index_properties type, filters
|
164
|
-
if indexed.any?
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
165
|
+
q = if indexed.any?
|
166
|
+
indexed.map do |k, v|
|
167
|
+
k = k.to_s.gsub '/', '\\/'
|
168
|
+
if v.is_a? Range
|
169
|
+
lucene_range(k, v)
|
170
|
+
elsif v.class.name == 'RangeSet'
|
171
|
+
s = v.ranges.map { |r| lucene_range(k, r) }.join " OR "
|
172
|
+
"(#{s})"
|
173
|
+
elsif v.is_a? Set
|
174
|
+
empty = true if v.empty?
|
175
|
+
lucene_set(k, v)
|
176
|
+
else
|
177
|
+
"#{k}:#{lucene_value v}"
|
178
|
+
end
|
179
|
+
end.compact.join " AND "
|
174
180
|
else
|
175
|
-
|
181
|
+
nil
|
176
182
|
end
|
177
|
-
|
178
|
-
else
|
179
|
-
nil
|
180
|
-
end
|
183
|
+
[empty, q]
|
181
184
|
end
|
182
185
|
|
183
186
|
def lucene_value(v)
|
@@ -211,18 +214,21 @@ module Pacer
|
|
211
214
|
else
|
212
215
|
filters.graph = self
|
213
216
|
filters.use_lookup!
|
214
|
-
query = build_query(element_type, filters)
|
217
|
+
empty, query = build_query(element_type, filters)
|
215
218
|
if query
|
216
219
|
route = lucene query, element_type: element_type, extensions: filters.extensions, wrapper: filters.wrapper
|
217
220
|
filters.remove_property_keys key_indices(element_type)
|
218
221
|
if filters.any?
|
219
|
-
Pacer::Route.property_filter(route, filters, block)
|
220
|
-
else
|
221
|
-
route
|
222
|
+
route = Pacer::Route.property_filter(route, filters, block)
|
222
223
|
end
|
223
224
|
elsif filters.route_modules.any?
|
224
225
|
mod = filters.route_modules.shift
|
225
|
-
Pacer::Route.property_filter(mod.route(self), filters, block)
|
226
|
+
route = Pacer::Route.property_filter(mod.route(self), filters, block)
|
227
|
+
end
|
228
|
+
if empty
|
229
|
+
[].to_route based_on: route
|
230
|
+
else
|
231
|
+
route
|
226
232
|
end
|
227
233
|
end
|
228
234
|
end
|
data/lib/pacer-neo4j/version.rb
CHANGED
data/pacer-neo4j.gemspec
CHANGED
@@ -7,16 +7,17 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Pacer::Neo4j::VERSION
|
8
8
|
s.platform = 'java'
|
9
9
|
s.authors = ["Darrick Wiebe"]
|
10
|
-
s.email = ["
|
10
|
+
s.email = ["dw@xnlogic.com"]
|
11
11
|
s.homepage = "http://neo4j.org"
|
12
12
|
s.summary = %q{Neo4J jars and related code for Pacer}
|
13
13
|
s.description = s.summary
|
14
14
|
|
15
15
|
s.add_dependency 'pacer', Pacer::Neo4j::PACER_REQ
|
16
|
+
s.add_dependency "lock_jar", "~> 0.10.0"
|
16
17
|
|
17
18
|
s.rubyforge_project = "pacer-neo4j"
|
18
19
|
|
19
|
-
s.files = `git ls-files`.split("\n")
|
20
|
+
s.files = `git ls-files`.split("\n")
|
20
21
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
22
|
s.require_paths = ["lib"]
|
22
23
|
end
|
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.
|
4
|
+
version: 2.3.0.pre
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Darrick Wiebe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pacer
|
@@ -16,23 +16,38 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0.pre
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
22
|
- - '>='
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: 2.0.0.pre
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: lock_jar
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.0
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ~>
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 0.10.0
|
25
39
|
prerelease: false
|
26
40
|
type: :runtime
|
27
41
|
description: Neo4J jars and related code for Pacer
|
28
42
|
email:
|
29
|
-
-
|
43
|
+
- dw@xnlogic.com
|
30
44
|
executables: []
|
31
45
|
extensions: []
|
32
46
|
extra_rdoc_files: []
|
33
47
|
files:
|
34
48
|
- .gitignore
|
35
49
|
- Gemfile
|
50
|
+
- Jarfile
|
36
51
|
- README.md
|
37
52
|
- Rakefile
|
38
53
|
- lib/pacer-neo4j.rb
|
@@ -54,9 +69,6 @@ files:
|
|
54
69
|
- lib/pacer-neo4j/tx_data_wrapper.rb
|
55
70
|
- lib/pacer-neo4j/version.rb
|
56
71
|
- pacer-neo4j.gemspec
|
57
|
-
- pom.xml
|
58
|
-
- pom/standalone.xml
|
59
|
-
- lib/pacer-neo4j-2.2.0-standalone.jar
|
60
72
|
homepage: http://neo4j.org
|
61
73
|
licenses: []
|
62
74
|
metadata: {}
|
@@ -71,9 +83,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
83
|
version: '0'
|
72
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
85
|
requirements:
|
74
|
-
- - '
|
86
|
+
- - '>'
|
75
87
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
88
|
+
version: 1.3.1
|
77
89
|
requirements: []
|
78
90
|
rubyforge_project: pacer-neo4j
|
79
91
|
rubygems_version: 2.1.9
|
data/pom.xml
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
3
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
5
|
-
<modelVersion>4.0.0</modelVersion>
|
6
|
-
<groupId>com.tinkerpop.pacer</groupId>
|
7
|
-
<artifactId>pacer-neo4j</artifactId>
|
8
|
-
<!-- NOTE: the following properties are automatically updated based on the values in lib/pacer-neo4j/version.rb -->
|
9
|
-
<properties>
|
10
|
-
<blueprints.version>2.6.0-SNAPSHOT</blueprints.version>
|
11
|
-
<gem.version>2.2.0</gem.version>
|
12
|
-
</properties>
|
13
|
-
<!-- NOTE: the following properties are automatically updated based on the values in lib/pacer-neo4j/version.rb -->
|
14
|
-
<version>${gem.version}</version>
|
15
|
-
<packaging>pom</packaging>
|
16
|
-
<url>https://github.com/pangloss/pacer</url>
|
17
|
-
<name>Pacer Neo4J dependencies and related code.</name>
|
18
|
-
<description>
|
19
|
-
</description>
|
20
|
-
<inceptionYear>2011</inceptionYear>
|
21
|
-
<developers>
|
22
|
-
<developer>
|
23
|
-
<name>Darrick Wiebe</name>
|
24
|
-
<email>darrick@innatesoftware.com</email>
|
25
|
-
<url>http://github.com/pangloss</url>
|
26
|
-
</developer>
|
27
|
-
</developers>
|
28
|
-
<dependencies>
|
29
|
-
<dependency>
|
30
|
-
<groupId>com.tinkerpop.blueprints</groupId>
|
31
|
-
<artifactId>blueprints-neo4j-graph</artifactId>
|
32
|
-
<version>${blueprints.version}</version>
|
33
|
-
</dependency>
|
34
|
-
</dependencies>
|
35
|
-
|
36
|
-
<build>
|
37
|
-
<directory>${basedir}/target</directory>
|
38
|
-
<finalName>${project.artifactId}-${project.version}</finalName>
|
39
|
-
<resources>
|
40
|
-
<resource>
|
41
|
-
<directory>${basedir}/src/main/resources
|
42
|
-
</directory>
|
43
|
-
</resource>
|
44
|
-
</resources>
|
45
|
-
<testResources>
|
46
|
-
<testResource>
|
47
|
-
<directory>${basedir}/src/test/resources
|
48
|
-
</directory>
|
49
|
-
</testResource>
|
50
|
-
</testResources>
|
51
|
-
<plugins>
|
52
|
-
<plugin>
|
53
|
-
<artifactId>maven-compiler-plugin</artifactId>
|
54
|
-
<configuration>
|
55
|
-
<source>1.6</source>
|
56
|
-
<target>1.6</target>
|
57
|
-
</configuration>
|
58
|
-
</plugin>
|
59
|
-
<plugin>
|
60
|
-
<artifactId>maven-assembly-plugin</artifactId>
|
61
|
-
<version>2.2-beta-4</version>
|
62
|
-
<executions>
|
63
|
-
<execution>
|
64
|
-
<phase>package</phase>
|
65
|
-
<goals>
|
66
|
-
<goal>attached</goal>
|
67
|
-
</goals>
|
68
|
-
</execution>
|
69
|
-
</executions>
|
70
|
-
<configuration>
|
71
|
-
<descriptors>
|
72
|
-
<descriptor>pom/standalone.xml</descriptor>
|
73
|
-
</descriptors>
|
74
|
-
<finalName>${project.artifactId}-${project.version}</finalName>
|
75
|
-
<outputDirectory>lib</outputDirectory>
|
76
|
-
<workDirectory>target/assembly/work</workDirectory>
|
77
|
-
<tarLongFileMode>warn</tarLongFileMode>
|
78
|
-
</configuration>
|
79
|
-
</plugin>
|
80
|
-
<plugin>
|
81
|
-
<groupId>org.apache.maven.plugins</groupId>
|
82
|
-
<artifactId>maven-javadoc-plugin</artifactId>
|
83
|
-
<version>2.6.1</version>
|
84
|
-
</plugin>
|
85
|
-
</plugins>
|
86
|
-
<extensions>
|
87
|
-
<extension>
|
88
|
-
<groupId>org.apache.maven.wagon</groupId>
|
89
|
-
<artifactId>wagon-ftp</artifactId>
|
90
|
-
<version>1.0-alpha-6</version>
|
91
|
-
</extension>
|
92
|
-
</extensions>
|
93
|
-
</build>
|
94
|
-
|
95
|
-
</project>
|
data/pom/standalone.xml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
<assembly>
|
2
|
-
<id>standalone</id>
|
3
|
-
<formats>
|
4
|
-
<format>jar</format>
|
5
|
-
</formats>
|
6
|
-
<includeBaseDirectory>false</includeBaseDirectory>
|
7
|
-
|
8
|
-
<fileSets>
|
9
|
-
<fileSet>
|
10
|
-
<directory>target/classes</directory>
|
11
|
-
<outputDirectory>/</outputDirectory>
|
12
|
-
</fileSet>
|
13
|
-
</fileSets>
|
14
|
-
|
15
|
-
<dependencySets>
|
16
|
-
<dependencySet>
|
17
|
-
<outputDirectory>/</outputDirectory>
|
18
|
-
<unpack>true</unpack>
|
19
|
-
<scope>runtime</scope>
|
20
|
-
</dependencySet>
|
21
|
-
</dependencySets>
|
22
|
-
</assembly>
|