pacer 2.0.0.pre-java → 2.0.4.pre-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/Gemfile +1 -0
- data/README.md +1 -0
- data/Rakefile +3 -0
- data/lib/pacer/graph/pacer_graph.rb +2 -0
- data/lib/pacer/route_builder.rb +5 -1
- data/lib/pacer/support/lock_jar.rb +33 -0
- data/lib/pacer/version.rb +6 -3
- data/lib/pacer.rb +21 -4
- data/pacer.gemspec +1 -0
- data/spec/spec_helper.rb +2 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b8f9ea6540733bd10016d860f63f163db353792
|
4
|
+
data.tar.gz: 359febf17e50d2c627243faa288e9f4a69181be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ddf0f9eb5a7a1ef005e68024c6f96af2df8107e92a80e7dab5d5645282294cb7066f49f25abebcde53712414a64104c1f81249b9e8a3c2590f3a59e0116611b
|
7
|
+
data.tar.gz: 9eb6c58fdda3202253260738855d05a7e12e112cdc14b7dde18bac0810ca6cfcbe1a193160f24816e9ed27b5248ac6422ab882d593619226e32e2a8c8914b604
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Pacer
|
2
|
+
[![Coverage Status](https://img.shields.io/coveralls/pangloss/pacer.svg)](https://coveralls.io/r/pangloss/pacer) [![Build Status](https://travis-ci.org/pangloss/pacer.svg)](https://travis-ci.org/pangloss/pacer)
|
2
3
|
|
3
4
|
Pacer is a JRuby library that enables very expressive graph traversals.
|
4
5
|
|
data/Rakefile
CHANGED
@@ -175,10 +175,12 @@ module Pacer
|
|
175
175
|
edge
|
176
176
|
end
|
177
177
|
|
178
|
+
# This method accepts only an unwrapped Blueprints Vertex
|
178
179
|
def remove_vertex(vertex)
|
179
180
|
blueprints_graph.removeVertex vertex
|
180
181
|
end
|
181
182
|
|
183
|
+
# This method accepts only an unwrapped Blueprints Edge
|
182
184
|
def remove_edge(edge)
|
183
185
|
blueprints_graph.removeEdge edge
|
184
186
|
end
|
data/lib/pacer/route_builder.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
module Pacer
|
2
2
|
class RouteBuilder
|
3
|
+
REJECT_KEYS = Set[:element_type, :wrapper, :extensions, :modules, :graph,
|
4
|
+
:back, :filter, :side_effect, :transform, :visitor,
|
5
|
+
:based_on]
|
6
|
+
|
3
7
|
class << self
|
4
8
|
attr_writer :current
|
5
9
|
|
@@ -64,7 +68,7 @@ module Pacer
|
|
64
68
|
|
65
69
|
def arguments(source, args)
|
66
70
|
args.reject do |key, val|
|
67
|
-
|
71
|
+
REJECT_KEYS.include? key
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# TODO: Remove when https://github.com/jmhedden/lock_jar/pull/1 is merged.
|
2
|
+
module LockJar
|
3
|
+
# Add a Jarfile to be included when LockJar.lock_registered_jarfiles is called.
|
4
|
+
#
|
5
|
+
# @param [String] jarfile path to register
|
6
|
+
# @return [Array] All registered jarfiles
|
7
|
+
def self.register_jarfile( jarfile )
|
8
|
+
fail "Jarfile not found: #{ jarfile }" unless File.exists? jarfile
|
9
|
+
@@registered_jarfiles ||= []
|
10
|
+
@@registered_jarfiles << jarfile
|
11
|
+
end
|
12
|
+
|
13
|
+
# Lock the registered Jarfiles and generate a Jarfile.lock.
|
14
|
+
#
|
15
|
+
# Options and groups are passed through to the LockJar.lock method, but
|
16
|
+
# if a jarfile is specified, it will be ignored. Use LockJar.register_jarfile
|
17
|
+
# to add dependencies.
|
18
|
+
#
|
19
|
+
# A block can be passed in, overriding values from the Jarfiles.
|
20
|
+
#
|
21
|
+
# @return [Hash] Lock data
|
22
|
+
def self.lock_registered_jarfiles( *args, &blk )
|
23
|
+
jarfiles = @@registered_jarfiles || []
|
24
|
+
instances = jarfiles.map do |jarfile|
|
25
|
+
LockJar::Domain::JarfileDsl.create jarfile
|
26
|
+
end
|
27
|
+
combined = instances.reduce do |result, inst|
|
28
|
+
LockJar::Domain::DslHelper.merge result, inst
|
29
|
+
end
|
30
|
+
args = args.reject { |arg| arg.is_a? String }
|
31
|
+
lock combined, *args, &blk
|
32
|
+
end
|
33
|
+
end
|
data/lib/pacer/version.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
module Pacer
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
VERSION = "2.0.4.pre"
|
3
|
+
JARFILES = []
|
4
|
+
# Clients may also optionally define the following constants in the Pacer namespace:
|
5
|
+
# - LOAD_JARS : set to false to manage jar loading in the client. Be sure to load the jars defined in JARFILES.
|
6
|
+
# - LOCKJAR_LOCK_OPTS : set some options to be passed to LockJar.lock (ie. :lockfile, :download_artifacts, :local_repo)
|
7
|
+
unless const_defined? :START_TIME
|
5
8
|
START_TIME = Time.now
|
6
9
|
end
|
7
10
|
end
|
data/lib/pacer.rb
CHANGED
@@ -21,10 +21,28 @@ end
|
|
21
21
|
require 'java'
|
22
22
|
require 'pp'
|
23
23
|
require 'rubygems'
|
24
|
-
|
25
24
|
require 'lock_jar'
|
26
|
-
|
27
|
-
|
25
|
+
require 'pacer/support/lock_jar'
|
26
|
+
|
27
|
+
module Pacer
|
28
|
+
def self.load_dependencies!
|
29
|
+
Pacer::JARFILES.each do |jarfile|
|
30
|
+
LockJar.register_jarfile(jarfile)
|
31
|
+
end
|
32
|
+
if (not defined? Pacer::LOAD_JARS) or Pacer::LOAD_JARS == true
|
33
|
+
if defined? Pacer::LOCKJAR_OPTS
|
34
|
+
LockJar.lock_registered_jarfiles LOCKJAR_OPTS
|
35
|
+
LockJar.load LOCKJAR_OPTS
|
36
|
+
else
|
37
|
+
LockJar.lock_registered_jarfiles
|
38
|
+
LockJar.load
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
LockJar.register_jarfile(File.join(File.dirname(__FILE__), "..", "Jarfile"))
|
45
|
+
Pacer.load_dependencies!
|
28
46
|
|
29
47
|
module Pacer
|
30
48
|
unless const_defined? :PATH
|
@@ -41,7 +59,6 @@ module Pacer
|
|
41
59
|
Enumerator = Enumerable::Enumerator
|
42
60
|
end
|
43
61
|
|
44
|
-
|
45
62
|
require 'pacer/loader'
|
46
63
|
|
47
64
|
class << self
|
data/pacer.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 2.0.4.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-
|
11
|
+
date: 2014-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lock_jar
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
version: 0.10.0
|
25
25
|
prerelease: false
|
26
26
|
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: xn_gem_release_tasks
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
prerelease: false
|
40
|
+
type: :development
|
27
41
|
description: Pacer defines composeable routes through a graph and then traverses them very quickly.
|
28
42
|
email: dw@xnlogic.com
|
29
43
|
executables: []
|
@@ -34,6 +48,7 @@ files:
|
|
34
48
|
- .document
|
35
49
|
- .gitignore
|
36
50
|
- .rspec
|
51
|
+
- .travis.yml
|
37
52
|
- CONTRIBUTORS
|
38
53
|
- Gemfile
|
39
54
|
- Gemfile-custom.sample
|
@@ -138,6 +153,7 @@ files:
|
|
138
153
|
- lib/pacer/support/awesome_print.rb
|
139
154
|
- lib/pacer/support/enumerable.rb
|
140
155
|
- lib/pacer/support/hash.rb
|
156
|
+
- lib/pacer/support/lock_jar.rb
|
141
157
|
- lib/pacer/support/native_exception.rb
|
142
158
|
- lib/pacer/support/nil_class.rb
|
143
159
|
- lib/pacer/support/proc.rb
|
@@ -308,4 +324,3 @@ test_files:
|
|
308
324
|
- spec/support/use_transactions.rb
|
309
325
|
- spec/tackle/simple_mixin.rb
|
310
326
|
- spec/tackle/tinkerpop_graph_mixins.rb
|
311
|
-
has_rdoc:
|