neo4j-java-driver 0.1.4-java → 0.1.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jruby/neo4j/driver.rb +2 -0
- data/jruby/neo4j/driver/ext/graph_database.rb +18 -1
- data/jruby/neo4j/driver/ext/logger.rb +44 -0
- data/lib/neo4j/driver/version.rb +1 -1
- metadata +32 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: effd84fd09b27d55465ef5ae68b865bf8b82cc8856d377b1add198979a8664bf
|
4
|
+
data.tar.gz: dbda85d48819b4eff37c5774c93c8f94af70bfaa8b39dd270b6b4181bf854fe9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712998aadeaf0bcc37d9dc933a2806fe4545dcfbc3c5f3c39f669bd50617c5540fee9980f9adf92d83a7e2086d59f0c500b7a22ab29fc6fcc561608f290c6426
|
7
|
+
data.tar.gz: 6cd6e0cdb74ecbc5cd3065cb305328e07eac5c72147c0a1100e3beae3d04fe64d94942ca74bbc3bf129bb2699883f5901b230b4b60831d081ab44619eeb59804
|
data/jruby/neo4j/driver.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/core_ext/hash/keys'
|
4
|
+
require 'active_support/logger'
|
4
5
|
require 'date'
|
5
6
|
require 'loader'
|
6
7
|
require 'neo4j-java-driver_jars'
|
@@ -37,6 +38,7 @@ end
|
|
37
38
|
|
38
39
|
Loader.load
|
39
40
|
|
41
|
+
ActiveSupport::Logger.prepend Neo4j::Driver::Ext::Logger
|
40
42
|
Java::OrgNeo4jDriverInternal::InternalDriver.prepend Neo4j::Driver::Ext::InternalDriver
|
41
43
|
Java::OrgNeo4jDriverInternal::InternalEntity.include Neo4j::Driver::Ext::MapAccessor
|
42
44
|
Java::OrgNeo4jDriverInternal::InternalNode.prepend Neo4j::Driver::Ext::InternalNode
|
@@ -20,7 +20,7 @@ module Neo4j
|
|
20
20
|
|
21
21
|
def to_java_config(hash)
|
22
22
|
hash&.reduce(Neo4j::Driver::Config.build) { |object, key_value| object.send(*config_method(*key_value)) }
|
23
|
-
|
23
|
+
&.to_config
|
24
24
|
end
|
25
25
|
|
26
26
|
def config_method(key, value)
|
@@ -36,6 +36,9 @@ module Neo4j
|
|
36
36
|
value = load_balancing_strategy(value)
|
37
37
|
when /Time(out)?$/i
|
38
38
|
unit = java.util.concurrent.TimeUnit::SECONDS
|
39
|
+
when 'logger'
|
40
|
+
method = :with_logging
|
41
|
+
value = logging(value)
|
39
42
|
end
|
40
43
|
[method, value, unit].compact
|
41
44
|
end
|
@@ -50,6 +53,20 @@ module Neo4j
|
|
50
53
|
raise ArgumentError
|
51
54
|
end
|
52
55
|
end
|
56
|
+
|
57
|
+
def logging(logger)
|
58
|
+
Class.new do
|
59
|
+
include Neo4j::Driver::Logging
|
60
|
+
|
61
|
+
def initialize(logger)
|
62
|
+
@log = logger
|
63
|
+
end
|
64
|
+
|
65
|
+
def get_log(_name)
|
66
|
+
@log
|
67
|
+
end
|
68
|
+
end.new(logger)
|
69
|
+
end
|
53
70
|
end
|
54
71
|
end
|
55
72
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module Logger
|
7
|
+
# include org.neo4j.driver.v1.Logger
|
8
|
+
|
9
|
+
def error(*args)
|
10
|
+
add(::Logger::ERROR, format(*args))
|
11
|
+
end
|
12
|
+
|
13
|
+
def info(*args)
|
14
|
+
add(::Logger::INFO, format(*args))
|
15
|
+
end
|
16
|
+
|
17
|
+
def warn(*args)
|
18
|
+
add(::Logger::WARN, format(*args))
|
19
|
+
end
|
20
|
+
|
21
|
+
def debug(*args)
|
22
|
+
add(::Logger::DEBUG, format(*args))
|
23
|
+
end
|
24
|
+
|
25
|
+
alias trace debug
|
26
|
+
|
27
|
+
def trace_enabled?
|
28
|
+
debug?
|
29
|
+
end
|
30
|
+
|
31
|
+
def debug_enabled
|
32
|
+
debug?
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def format(*args)
|
38
|
+
args.unshift('%s%n%s') if args.last.is_a? java.lang.Throwable
|
39
|
+
java.lang.String.format(*args)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/neo4j/driver/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-java-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Heinrich Klobuczek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,22 +71,22 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0
|
75
|
-
name:
|
74
|
+
version: '0'
|
75
|
+
name: hoe
|
76
76
|
prerelease: false
|
77
77
|
type: :development
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
|
-
name:
|
89
|
+
name: hoe-bundler
|
90
90
|
prerelease: false
|
91
91
|
type: :development
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -97,38 +97,38 @@ dependencies:
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
103
|
-
name:
|
102
|
+
version: '0'
|
103
|
+
name: hoe-gemspec
|
104
104
|
prerelease: false
|
105
105
|
type: :development
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
117
|
-
name:
|
116
|
+
version: 0.3.0
|
117
|
+
name: neo4j-rake_tasks
|
118
118
|
prerelease: false
|
119
119
|
type: :development
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 0.3.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
-
name:
|
131
|
+
name: parallel
|
132
132
|
prerelease: false
|
133
133
|
type: :development
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -136,13 +136,27 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "<"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '13'
|
145
|
+
name: rake
|
146
|
+
prerelease: false
|
147
|
+
type: :development
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "<"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '13'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
requirement: !ruby/object:Gem::Requirement
|
141
155
|
requirements:
|
142
156
|
- - ">="
|
143
157
|
- !ruby/object:Gem::Version
|
144
158
|
version: '0'
|
145
|
-
name:
|
159
|
+
name: rspec-its
|
146
160
|
prerelease: false
|
147
161
|
type: :development
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -156,7 +170,7 @@ dependencies:
|
|
156
170
|
- - ">="
|
157
171
|
- !ruby/object:Gem::Version
|
158
172
|
version: '0'
|
159
|
-
name:
|
173
|
+
name: rspec-mocks
|
160
174
|
prerelease: false
|
161
175
|
type: :development
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -220,6 +234,7 @@ files:
|
|
220
234
|
- jruby/neo4j/driver/ext/internal_record.rb
|
221
235
|
- jruby/neo4j/driver/ext/internal_relationship.rb
|
222
236
|
- jruby/neo4j/driver/ext/internal_statement_result.rb
|
237
|
+
- jruby/neo4j/driver/ext/logger.rb
|
223
238
|
- jruby/neo4j/driver/ext/map_accessor.rb
|
224
239
|
- jruby/neo4j/driver/ext/ruby_converter.rb
|
225
240
|
- jruby/neo4j/driver/ext/run_override.rb
|