pacer 2.0.22-java → 2.0.24-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 795f8abed85009564fee9dab5d216b8da0e4b376
4
- data.tar.gz: 3c11929329d4a038d3866ec02969955f2f5f9570
3
+ metadata.gz: 8c44395a1caab1ea9a9a1b811ea80609001f5d8c
4
+ data.tar.gz: 6cc9cc2044c1f83166dbe2b9fb8d0c59bbfa87dc
5
5
  SHA512:
6
- metadata.gz: 40b05f5d1665ed2dd697f8b3c99bfb099c40d5412a8966c38b4d79f13488c60d67a636d73aed70dc60d3bbbb49365c5beb5e4736b81391c70fdfc47743386f44
7
- data.tar.gz: 59ed57f1501dda498244bb17ae62d903cd8026f53ebb9cb1ce2a7d1e4d1460b66e244c9ba1afd8bd8f3f8bebc01cad3f4de9294f34f3973e970d64632733b160
6
+ metadata.gz: 6e9ec5740946804d89d4b933a662c8986cdee66fc59ba64a0df639430b0b0f5b8da44c84397bdacc5530ff651b2965cdd1c2f4102bc174c05d4390d23b047fa5
7
+ data.tar.gz: 81f706ecb9efd913dcfba95ce73d01f071ee15724d7006e307040eea64d860ca32c396aa868a8a04a75a58926f62ff229439f95a554248d2f58263710ad411c4
@@ -2,7 +2,7 @@ group :development do
2
2
  # pacer-* gems are required for testing pacer.
3
3
  # If you have the gem repos cloned locally, we'll use them.
4
4
  #
5
- [ 'pacer-orient', 'pacer-dex' ].each do |lib|
5
+ [ 'pacer-titan', 'pacer-orient', 'pacer-dex' ].each do |lib|
6
6
  if File.directory? "../#{lib}"
7
7
  gem lib, :path => "../#{lib}"
8
8
  end
@@ -12,24 +12,32 @@ module Pacer::Core::Graph
12
12
  # @yield [VertexWrapper] filter proc, see {Pacer::Route#property_filter}
13
13
  # @return [VerticesRoute]
14
14
  def out_v(*filters, &block)
15
- Pacer::Route.property_filter(chain_route(:element_type => :vertex,
16
- :pipe_class => OutVertexPipe,
17
- :route_name => 'outV'),
15
+ Pacer::Route.property_filter(outV,
18
16
  filters, block)
19
17
  end
20
18
 
19
+ def outV
20
+ chain_route(:element_type => :vertex,
21
+ :pipe_class => OutVertexPipe,
22
+ :route_name => 'outV')
23
+ end
24
+
21
25
  # Extends the route with in vertices from this route's matching edges.
22
26
  #
23
27
  # @param [Array<Hash, extension>, Hash, extension] filter see {Pacer::Route#property_filter}
24
28
  # @yield [VertexWrapper] filter proc, see {Pacer::Route#property_filter}
25
29
  # @return [VerticesRoute]
26
30
  def in_v(*filters, &block)
27
- Pacer::Route.property_filter(chain_route(:element_type => :vertex,
28
- :pipe_class => InVertexPipe,
29
- :route_name => 'inV'),
31
+ Pacer::Route.property_filter(inV,
30
32
  filters, block)
31
33
  end
32
34
 
35
+ def inV
36
+ chain_route(:element_type => :vertex,
37
+ :pipe_class => InVertexPipe,
38
+ :route_name => 'inV')
39
+ end
40
+
33
41
  # Extends the route with both in and oud vertices from this route's matching edges.
34
42
  #
35
43
  # @param [Array<Hash, extension>, Hash, extension] filter see {Pacer::Route#property_filter}
@@ -19,13 +19,17 @@ module Pacer::Core::Graph
19
19
  # @return [EdgesRoute]
20
20
  def out_e(*filters, &block)
21
21
  filters = extract_labels(filters)
22
- Pacer::Route.property_filter(chain_route(:element_type => :edge,
23
- :pipe_class => OutEdgesPipe,
24
- :pipe_args => route_labels,
25
- :route_name => edge_route_name('outE')),
22
+ Pacer::Route.property_filter(outE(route_labels),
26
23
  filters, block)
27
24
  end
28
25
 
26
+ def outE(labels)
27
+ chain_route(:element_type => :edge,
28
+ :pipe_class => OutEdgesPipe,
29
+ :pipe_args => (labels || []),
30
+ :route_name => edge_route_name('outE', labels))
31
+ end
32
+
29
33
  # Extends the route with vertices via the out edges from this route's matching vertices.
30
34
  #
31
35
  # @param [Array<Hash, String, Symbol, extension>, Hash, String, Symbol, extension] filter see {Pacer::Route#property_filter}
@@ -41,7 +45,7 @@ module Pacer::Core::Graph
41
45
  :pipe_args => route_labels,
42
46
  :wrapper => nil,
43
47
  :extensions => [],
44
- :route_name => edge_route_name('out')),
48
+ :route_name => edge_route_name('out', route_labels)),
45
49
  filters, block)
46
50
  end
47
51
 
@@ -55,13 +59,17 @@ module Pacer::Core::Graph
55
59
  # @return [EdgesRoute]
56
60
  def in_e(*filters, &block)
57
61
  filters = extract_labels(filters)
58
- Pacer::Route.property_filter(chain_route(:element_type => :edge,
59
- :pipe_class => InEdgesPipe,
60
- :pipe_args => route_labels,
61
- :route_name => edge_route_name('inE')),
62
+ Pacer::Route.property_filter(inE(route_labels),
62
63
  filters, block)
63
64
  end
64
65
 
66
+ def inE(labels)
67
+ chain_route(:element_type => :edge,
68
+ :pipe_class => InEdgesPipe,
69
+ :pipe_args => (labels || []),
70
+ :route_name => edge_route_name('inE', labels))
71
+ end
72
+
65
73
  # Extends the route with vertices via the in edges from this route's matching vertices.
66
74
  #
67
75
  # @param [Array<Hash, String, Symbol, extension>, Hash, String, Symbol, extension] filter see {Pacer::Route#property_filter}
@@ -77,7 +85,7 @@ module Pacer::Core::Graph
77
85
  :pipe_args => route_labels,
78
86
  :wrapper => nil,
79
87
  :extensions => [],
80
- :route_name => edge_route_name('in')),
88
+ :route_name => edge_route_name('in', route_labels)),
81
89
  filters, block)
82
90
  end
83
91
 
@@ -94,7 +102,7 @@ module Pacer::Core::Graph
94
102
  Pacer::Route.property_filter(chain_route(:element_type => :edge,
95
103
  :pipe_class => BothEdgesPipe,
96
104
  :pipe_args => route_labels,
97
- :route_name => edge_route_name('bothE')),
105
+ :route_name => edge_route_name('bothE', route_labels)),
98
106
  filters, block)
99
107
  end
100
108
 
@@ -113,7 +121,7 @@ module Pacer::Core::Graph
113
121
  :pipe_args => route_labels,
114
122
  :wrapper => nil,
115
123
  :extensions => [],
116
- :route_name => edge_route_name('both')),
124
+ :route_name => edge_route_name('both', route_labels)),
117
125
  filters, block)
118
126
  end
119
127
 
@@ -202,9 +210,9 @@ module Pacer::Core::Graph
202
210
 
203
211
  protected
204
212
 
205
- def edge_route_name(prefix)
206
- if route_labels.any?
207
- "#{prefix}(#{route_labels.map { |l| l.to_sym.inspect }.join ', '})"
213
+ def edge_route_name(prefix, labels)
214
+ if labels and labels.any?
215
+ "#{prefix}(#{labels.map { |l| l.to_sym.inspect }.join ', '})"
208
216
  else
209
217
  prefix
210
218
  end
@@ -390,14 +390,10 @@ module Pacer
390
390
  end
391
391
  end
392
392
 
393
- def key_indices(type = nil)
393
+ def key_indices(type = :vertex)
394
+ # will raise internal error if not one of :edge or :vertex
394
395
  if features.supportsKeyIndices
395
- if type
396
- blueprints_graph.getIndexedKeys(index_class(type)).to_set
397
- else
398
- blueprints_graph.getIndexedKeys(index_class(:vertex)).to_set +
399
- blueprints_graph.getIndexedKeys(index_class(:vertex))
400
- end
396
+ blueprints_graph.getIndexedKeys(index_class(type)).to_set
401
397
  else
402
398
  []
403
399
  end
@@ -1,5 +1,5 @@
1
1
  module Pacer
2
- VERSION = "2.0.22"
2
+ VERSION = "2.0.24"
3
3
  # Clients may optionally define the following constants in the Pacer namespace:
4
4
  # - LOAD_JARS : set to false to manage jar loading in the client. Be sure to load the jars defined in JARFILES.
5
5
  # - LOCKJAR_LOCK_OPTS : set some options to be passed to LockJar.lock (ie. :lockfile, :download_artifacts, :local_repo)
@@ -35,6 +35,7 @@ maybe_require 'pacer-neo4j'
35
35
  maybe_require 'pacer-neo4j2'
36
36
  maybe_require 'pacer-orient'
37
37
  maybe_require 'pacer-dex'
38
+ maybe_require 'pacer-titan'
38
39
  maybe_require 'pacer-mcfly'
39
40
 
40
41
  Run = RSpec::GraphRunner.new ENV['GRAPHS']
@@ -2,6 +2,7 @@ maybe_require 'pacer-neo4j/rspec'
2
2
  maybe_require 'pacer-neo4j2/rspec'
3
3
  maybe_require 'pacer-orient/rspec'
4
4
  maybe_require 'pacer-dex/rspec'
5
+ maybe_require 'pacer-titan/rspec'
5
6
  maybe_require 'pacer-mcfly/rspec'
6
7
 
7
8
  class RSpec::GraphRunner
@@ -30,6 +31,9 @@ class RSpec::GraphRunner
30
31
  def orient(*args)
31
32
  end
32
33
 
34
+ def titan(*args)
35
+ end
36
+
33
37
  def mcfly(*args)
34
38
  end
35
39
  end
@@ -57,6 +61,7 @@ class RSpec::GraphRunner
57
61
  include Dex if defined? Dex
58
62
  include Orient if defined? Orient
59
63
  include McFly if defined? McFly
64
+ include Titan if defined? Titan
60
65
 
61
66
  def initialize(*graphs)
62
67
  @graphs = graphs.map { |s| s.to_s.downcase.split(/\s*,\s*/) }.flatten.map { |s| s.strip }.reject { |s| s == '' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pacer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.22
4
+ version: 2.0.24
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-09-22 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lock_jar
@@ -357,3 +357,4 @@ test_files:
357
357
  - spec/support/use_transactions.rb
358
358
  - spec/tackle/simple_mixin.rb
359
359
  - spec/tackle/tinkerpop_graph_mixins.rb
360
+ has_rdoc: