neo4j-ruby-driver 4.4.1-java → 4.4.4-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
  SHA256:
3
- metadata.gz: 925c81127fcf69cbe1dd09e76e718c8f418a8ccf7205cf937674ed8c892e1c83
4
- data.tar.gz: 03e527fb443800d70fe8aae00df23aa66aee6fd2a480dbed98f726e2eddc5c8b
3
+ metadata.gz: d25c6f125661dfa91a2e3c098f77cc3915e059218404e472829e6bbe30eb6113
4
+ data.tar.gz: 18a372d5f7015458ea87552d63017b2d8b7c343aba9f8ff6ab08c6f970e63422
5
5
  SHA512:
6
- metadata.gz: 7105221e31a3bb6639ec340404a37b170e6054a4055a3fcc06cd5530a238edfc96f7700aacbad8edbe51ea2c132d2c288617e36539e6ff1fb333eb635af667b6
7
- data.tar.gz: 7f003beecfc411577e1b4c03ab87e0e65e11bbb602a48426194f9b5a5209b77cc8fb6628c5c1c81206269f2df78aa67b7e534e9ffdaaab9c183b83106223aab0
6
+ metadata.gz: c54da5e7237caabd5ded1fd3ea90d72e289de683285b372f29f565b959bc5be8c433c3784fc21015e9eab65950aba87a94ea631c9bdbfbae87df481210401cea
7
+ data.tar.gz: 58a072b28ab11eda0be3d97a8fdfea22da983f70c7af13e67cf397846c43faa981716a8f0c60f5cb3aa35d7526fc763fe2a290e14d1380060d28ec259bef3676
data/README.md CHANGED
@@ -56,12 +56,23 @@ $ bin/setup
56
56
  $ rspec spec
57
57
  ```
58
58
 
59
- In case of heap space memory error (`org.neo4j.driver.exceptions.DatabaseException: Java heap space`), you should limit the dbms memory, for example:
59
+ Known errors:
60
+
61
+ 1. In case of heap space memory error (`org.neo4j.driver.exceptions.DatabaseException: Java heap space`), you should limit the dbms memory, for example:
60
62
 
61
63
  ```console
62
64
  $ neoctrl-configure servers/neo4j-enterprise-4.4.5 dbms.memory.pagecache.size=600m dbms.memory.heap.max_size=600m dbms.memory.heap.initial_size=600m dbms.directories.import= dbms.connectors.default_listen_address=::
63
65
  ```
64
66
 
67
+ 2. When using command `pip3 install --user git+https://github.com/klobuczek/boltkit@1.3#egg=boltkit`, if you have m1 mac chip, you may get error when pip3 tries to install `cryptography`. Steps to take in that case (reference https://stackoverflow.com/a/70074869/2559490)
68
+
69
+ ```console
70
+ $ pip uninstall cffi
71
+ $ python -m pip install --upgrade pip
72
+ $ pip install cffi
73
+ $ pip install cryptography
74
+ ```
75
+
65
76
  ## Contributing
66
77
 
67
78
  Suggestions, improvements, bug reports and pull requests are welcome on GitHub at https://github.com/neo4jrb/neo4j-ruby-driver.
@@ -25,7 +25,7 @@ module Neo4j
25
25
  value = nil
26
26
  when 'timeout'
27
27
  value = java.time.Duration.ofMillis(Driver::Internal::DurationNormalizer.milliseconds(value))
28
- when /time(out)?$/
28
+ when /time(out)?$/, 'routing_table_purge_delay'
29
29
  value = Driver::Internal::DurationNormalizer.milliseconds(value) || -1
30
30
  unit = java.util.concurrent.TimeUnit::MILLISECONDS
31
31
  when 'logger'
@@ -0,0 +1,13 @@
1
+ module Neo4j
2
+ module Driver
3
+ module Ext
4
+ module Internal
5
+ module InternalBookmark
6
+ def values
7
+ super.to_set
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '4.4.1'
5
+ VERSION = '4.4.4'
6
6
  end
7
7
  end
@@ -1,20 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/core_ext/hash/keys'
4
- require 'date'
5
- require 'loader'
6
4
  require 'neo4j-ruby-driver_jars'
7
-
8
- Loader.load
5
+ require 'neo4j-ruby-driver_loader'
9
6
 
10
7
  module Neo4j
11
8
  module Driver
9
+ Loader.load
10
+
12
11
  include_package 'org.neo4j.driver'
13
12
 
14
13
  Record = Java::OrgNeo4jDriverInternal::InternalRecord
15
14
  Result = Java::OrgNeo4jDriverInternal::InternalResult
16
15
  Transaction = Java::OrgNeo4jDriverInternal::InternalTransaction
17
16
 
17
+ module Internal
18
+ java_import org.neo4j.driver.internal.DatabaseNameUtil
19
+ end
20
+
18
21
  module Net
19
22
  include_package 'org.neo4j.driver.net'
20
23
  end
@@ -36,6 +39,7 @@ Java::OrgNeo4jDriver::AuthTokens.singleton_class.prepend Neo4j::Driver::Ext::Aut
36
39
  Java::OrgNeo4jDriver::Bookmark.singleton_class.prepend Neo4j::Driver::Ext::Bookmark::ClassMethods
37
40
  Java::OrgNeo4jDriver::GraphDatabase.singleton_class.prepend Neo4j::Driver::Ext::GraphDatabase
38
41
  Java::OrgNeo4jDriver::Query.prepend Neo4j::Driver::Ext::Query
42
+ Java::OrgNeo4jDriverInternal::InternalBookmark.prepend Neo4j::Driver::Ext::Internal::InternalBookmark
39
43
  Java::OrgNeo4jDriverInternal::InternalDriver.prepend Neo4j::Driver::Ext::InternalDriver
40
44
  Java::OrgNeo4jDriverInternal::InternalEntity.include Neo4j::Driver::Ext::InternalEntity
41
45
  Java::OrgNeo4jDriverInternal::InternalNode.prepend Neo4j::Driver::Ext::InternalNode
@@ -8,8 +8,8 @@ module Neo4j
8
8
  class ProtocolException < Neo4jException
9
9
  CODE = "Protocol violation: "
10
10
 
11
- def initialize(message, e)
12
- super("#{CODE}message", e)
11
+ def initialize(message, e = nil)
12
+ super(nil, "#{CODE}#{message}", e)
13
13
  end
14
14
  end
15
15
  end
@@ -67,13 +67,15 @@ module Neo4j::Driver
67
67
  LOCAL_DEFAULT = new(host: 'localhost', port: DEFAULT_PORT)
68
68
 
69
69
  def self.from(address)
70
- address.is_a?(BoltServerAddress) ? address : new(address.host, address.port)
70
+ address.is_a?(BoltServerAddress) ? address : new(host: address.host, port: address.port)
71
71
  end
72
72
 
73
- def eql?(other)
74
- attributes.eql?(other&.attributes)
73
+ def ==(other)
74
+ attributes == other&.attributes
75
75
  end
76
76
 
77
+ alias eql? ==
78
+
77
79
  def to_s
78
80
  "#{host}#{"(#{connection_host})" unless host == connection_host}:#{port}"
79
81
  end
@@ -84,11 +86,9 @@ module Neo4j::Driver
84
86
 
85
87
  # @return stream of unicast addresses.
86
88
  def unicast_stream
87
- [self]
89
+ Set[self]
88
90
  end
89
91
 
90
- private
91
-
92
92
  def attributes
93
93
  [@host, @connection_host, @port]
94
94
  end
@@ -30,10 +30,12 @@ module Neo4j
30
30
  end
31
31
  end
32
32
 
33
- def eql?(other)
34
- other.is_a?(self.class) && self.class.significant_fields.all? { |elem| send(elem).eql?(other.send(elem)) }
33
+ def ==(other)
34
+ other.is_a?(self.class) && self.class.significant_fields.all? { |elem| send(elem) == other.send(elem) }
35
35
  end
36
36
 
37
+ alias eql? ==
38
+
37
39
  def +(numeric)
38
40
  self.class.new(@time + numeric)
39
41
  end
@@ -0,0 +1,5 @@
1
+ # This file is here so that there is a file with the same name as the gem that
2
+ # can be required by Bundler.require. Applications should normally
3
+ # require 'neo4j/driver'.
4
+
5
+ require 'neo4j/driver'
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/concern'
4
+ require 'active_support/core_ext/hash/indifferent_access'
5
+ require 'active_support/isolated_execution_state' if Gem::Requirement.create('>= 7').satisfied_by?(Gem.loaded_specs["activesupport"].version) # TODO: this should not be necessary https://github.com/rails/rails/issues/43851
6
+ require 'active_support/core_ext/numeric/time'
7
+ require 'active_support/duration'
8
+ require 'active_support/time'
9
+ require 'date'
10
+ require 'uri'
11
+ require 'zeitwerk'
12
+
13
+ module Neo4j
14
+ module Driver
15
+ class Loader
16
+ def self.load
17
+ loader = Zeitwerk::Loader.new
18
+ loader.tag = 'neo4j-ruby-driver'
19
+ loader.push_dir(File.expand_path(__dir__))
20
+ driver_specific_dir = File.dirname(File.dirname(caller_locations(1..1).first.path))
21
+ loader.push_dir(driver_specific_dir)
22
+ yield loader if block_given?
23
+ loader.ignore(File.expand_path('neo4j*ruby*driver*.rb', __dir__))
24
+ loader.ignore(File.expand_path('org', __dir__))
25
+ loader.inflector = Zeitwerk::GemInflector.new(File.expand_path('neo4j/driver', driver_specific_dir))
26
+ loader.setup
27
+ loader.eager_load
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,15 +1,4 @@
1
- # frozen_string_literal: true
1
+ # This file is for backwards compatibility only.
2
+ # Applications should require 'neo4j/driver'.
2
3
 
3
- module Neo4j
4
- module Driver
5
- end
6
- end
7
-
8
- require 'active_support/concern'
9
- require 'active_support/core_ext/hash/indifferent_access'
10
- require 'active_support/isolated_execution_state' if Gem::Requirement.create('>= 7').satisfied_by?(Gem.loaded_specs["activesupport"].version) # TODO: this should not be necessary https://github.com/rails/rails/issues/43851
11
- require 'active_support/core_ext/numeric/time'
12
- require 'active_support/duration'
13
- require 'active_support/time'
14
4
  require 'neo4j/driver'
15
- require 'uri'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-ruby-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.1
4
+ version: 4.4.4
5
5
  platform: java
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-14 00:00:00.000000000 Z
11
+ date: 2023-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- name: async
34
- prerelease: false
35
- type: :runtime
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  requirement: !ruby/object:Gem::Requirement
43
29
  requirements:
@@ -69,24 +55,24 @@ dependencies:
69
55
  - !ruby/object:Gem::Dependency
70
56
  requirement: !ruby/object:Gem::Requirement
71
57
  requirements:
72
- - - ">="
58
+ - - '='
73
59
  - !ruby/object:Gem::Version
74
- version: '0'
60
+ version: 0.4.1
75
61
  name: jar-dependencies
76
62
  prerelease: false
77
63
  type: :runtime
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - '='
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 0.4.1
83
69
  - !ruby/object:Gem::Dependency
84
70
  requirement: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - ">="
87
73
  - !ruby/object:Gem::Version
88
74
  version: '0'
89
- name: ffaker
75
+ name: async
90
76
  prerelease: false
91
77
  type: :development
92
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -100,7 +86,7 @@ dependencies:
100
86
  - - ">="
101
87
  - !ruby/object:Gem::Version
102
88
  version: '0'
103
- name: hoe
89
+ name: ffaker
104
90
  prerelease: false
105
91
  type: :development
106
92
  version_requirements: !ruby/object:Gem::Requirement
@@ -114,7 +100,7 @@ dependencies:
114
100
  - - ">="
115
101
  - !ruby/object:Gem::Version
116
102
  version: '0'
117
- name: hoe-bundler
103
+ name: hoe
118
104
  prerelease: false
119
105
  type: :development
120
106
  version_requirements: !ruby/object:Gem::Requirement
@@ -128,7 +114,7 @@ dependencies:
128
114
  - - ">="
129
115
  - !ruby/object:Gem::Version
130
116
  version: '0'
131
- name: hoe-gemspec
117
+ name: hoe-bundler
132
118
  prerelease: false
133
119
  type: :development
134
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -142,7 +128,7 @@ dependencies:
142
128
  - - ">="
143
129
  - !ruby/object:Gem::Version
144
130
  version: '0'
145
- name: parallel
131
+ name: hoe-gemspec
146
132
  prerelease: false
147
133
  type: :development
148
134
  version_requirements: !ruby/object:Gem::Requirement
@@ -248,6 +234,7 @@ files:
248
234
  - jruby/neo4j/driver/ext/internal/async/internal_async_session.rb
249
235
  - jruby/neo4j/driver/ext/internal/cluster/routing_table_registry_impl.rb
250
236
  - jruby/neo4j/driver/ext/internal/cursor/disposable_async_result_cursor.rb
237
+ - jruby/neo4j/driver/ext/internal/internal_bookmark.rb
251
238
  - jruby/neo4j/driver/ext/internal/metrics/internal_connection_pool_metrics.rb
252
239
  - jruby/neo4j/driver/ext/internal/summary/internal_result_summary.rb
253
240
  - jruby/neo4j/driver/ext/internal_driver.rb
@@ -267,7 +254,8 @@ files:
267
254
  - jruby/neo4j/driver/ext/run_override.rb
268
255
  - jruby/neo4j/driver/ext/start_end_naming.rb
269
256
  - jruby/neo4j/driver/version.rb
270
- - lib/loader.rb
257
+ - lib/neo4j-ruby-driver.rb
258
+ - lib/neo4j-ruby-driver_loader.rb
271
259
  - lib/neo4j/driver/auto_closable.rb
272
260
  - lib/neo4j/driver/exceptions/authentication_exception.rb
273
261
  - lib/neo4j/driver/exceptions/authorization_expired_exception.rb
@@ -328,8 +316,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
328
316
  - !ruby/object:Gem::Version
329
317
  version: '0'
330
318
  requirements:
331
- - jar org.neo4j.driver, neo4j-java-driver, 4.4.6
332
- rubygems_version: 3.2.29
319
+ - jar org.neo4j.driver, neo4j-java-driver, 4.4.11
320
+ rubygems_version: 3.2.33
333
321
  signing_key:
334
322
  specification_version: 4
335
323
  summary: ''
data/lib/loader.rb DELETED
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'zeitwerk'
4
-
5
- class Loader
6
- def self.load
7
- loader = Zeitwerk::Loader.new
8
- loader.tag = 'neo4j-ruby-driver'
9
- loader.push_dir(File.expand_path(__dir__))
10
- driver_specific_dir = File.dirname(File.dirname(caller_locations(1..1).first.path))
11
- loader.push_dir(driver_specific_dir)
12
- yield loader if block_given?
13
- loader.ignore(File.expand_path('neo4j-*-driver_jars.rb', __dir__))
14
- loader.ignore(File.expand_path('neo4j_ruby_driver.rb', __dir__))
15
- loader.ignore(File.expand_path('org', __dir__))
16
- loader.inflector = Zeitwerk::GemInflector.new(File.expand_path('neo4j/driver', driver_specific_dir))
17
- loader.setup
18
- loader.eager_load
19
- end
20
- end