neo4j-java-driver 4.3.1-java → 4.4.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a6cd0aaaceead12534ad80f1a13b10cf3007a19d81ec38e0fbac49459288b17
4
- data.tar.gz: 68c815539b9b430218d8a75f2fcf693440afed8deae43e02f8b7c08b0fd5ab8c
3
+ metadata.gz: 6274146d0ca5ef9a1e5a32475935f3d396f413eb25398da8c36d845b0a5c9b4d
4
+ data.tar.gz: ca2be240e235f99d4610cea6283ee53b1eead343da620b17602816e9c36ee4db
5
5
  SHA512:
6
- metadata.gz: 4175c8bda63b2b0f74fd4ddfb0707fe108313c38afcf9b53776e9039065b1c13f5f25ce5a66f6a96bd49b0a15e19bd07f6e8609a2a36efad78681fe32ef03245
7
- data.tar.gz: 2b9597522dcfb507a38fd473ca9c1f5400b925eecc31488e6fe82cf6825db8ec2bb7b0c9fc516497ad76124a608216422847553345ff1870be1cc5bc32050e4b
6
+ metadata.gz: 9bbb959f453751928e4175d1175a78303f65e12ef7e4841b21dd38fbff5badb12f0fa6289ebdad4a5073d0e48282790182382ca16d78f113947f087053e816f4
7
+ data.tar.gz: ba3657c03e45d104fa88a971f89d5e84dfbddc1cdc3128a5f344c8ca9083095084c660d73e2f28af9281664fee01f16b9944953854a0d97eeb33a868d8982f7a
@@ -8,7 +8,7 @@ module Neo4j::Driver::Ext
8
8
 
9
9
  def to_future(completion_stage)
10
10
  Concurrent::Promises.resolvable_future.tap do |future|
11
- completion_stage.then_apply(&future.method(:fulfill)).exceptionally { |e| future.reject(mapped_exception(e)) }
11
+ completion_stage.then_apply(&future.method(:fulfill)).exceptionally { |e| future.reject(mapped_exception(e.cause)) }
12
12
  end
13
13
  end
14
14
  end
@@ -4,10 +4,16 @@ module Neo4j
4
4
  module Driver
5
5
  module Ext
6
6
  module AuthTokens
7
+ include NeoConverter
8
+
7
9
  def basic(username, password, realm = nil)
8
10
  Neo4j::Driver::Internal::Validator.require_non_nil_credentials!(username, password)
9
11
  super
10
12
  end
13
+
14
+ def custom(principal, credentials, realm, scheme, **parameters)
15
+ super(principal, credentials, realm, scheme, to_neo(parameters))
16
+ end
11
17
  end
12
18
  end
13
19
  end
@@ -16,6 +16,7 @@ module Neo4j
16
16
  java_import org.neo4j.driver.exceptions.SecurityException
17
17
  java_import org.neo4j.driver.exceptions.ServiceUnavailableException
18
18
  java_import org.neo4j.driver.exceptions.SessionExpiredException
19
+ java_import org.neo4j.driver.exceptions.TokenExpiredException
19
20
  java_import org.neo4j.driver.exceptions.TransactionNestingException
20
21
  java_import org.neo4j.driver.exceptions.TransientException
21
22
  java_import org.neo4j.driver.exceptions.UntrustedServerException
@@ -41,6 +42,10 @@ module Neo4j
41
42
  Neo4j::Driver::Exceptions::FatalDiscoveryException
42
43
  when ResultConsumedException
43
44
  Neo4j::Driver::Exceptions::ResultConsumedException
45
+ when TokenExpiredException
46
+ Neo4j::Driver::Exceptions::TokenExpiredException
47
+ when SecurityException
48
+ Neo4j::Driver::Exceptions::SecurityException
44
49
  when TransactionNestingException
45
50
  Neo4j::Driver::Exceptions::TransactionNestingException
46
51
  when ClientException
@@ -53,8 +58,6 @@ module Neo4j
53
58
  Neo4j::Driver::Exceptions::DiscoveryException
54
59
  when ProtocolException
55
60
  Neo4j::Driver::Exceptions::ProtocolException
56
- when SecurityException
57
- Neo4j::Driver::Exceptions::SecurityException
58
61
  when ServiceUnavailableException
59
62
  Neo4j::Driver::Exceptions::ServiceUnavailableException
60
63
  when SessionExpiredException
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Neo4j::Driver::Ext
4
+ module Internal
5
+ module Cluster
6
+ module RoutingTableRegistryImpl
7
+ def routing_table_handler(database)
8
+ get_routing_table_handler(org.neo4j.driver.internal.DatabaseNameUtil.database(database)).then do |it|
9
+ it.get if it.present?
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -17,7 +17,7 @@ module Neo4j
17
17
  end
18
18
 
19
19
  def async_session(**session_config)
20
- java_method(:async_session, [org.neo4j.driver.SessionConfig])
20
+ java_method(:asyncSession, [org.neo4j.driver.SessionConfig])
21
21
  .call(to_java_config(Neo4j::Driver::SessionConfig, session_config))
22
22
  end
23
23
 
@@ -13,7 +13,7 @@ module Neo4j
13
13
  @active_support_logger = active_support_logger
14
14
  end
15
15
 
16
- def get_log(_name)
16
+ def getLog(_name)
17
17
  self
18
18
  end
19
19
 
@@ -5,6 +5,8 @@ require 'date'
5
5
  require 'loader'
6
6
  require 'neo4j-java-driver_jars'
7
7
 
8
+ Loader.load
9
+
8
10
  module Neo4j
9
11
  module Driver
10
12
  include_package 'org.neo4j.driver'
@@ -27,24 +29,9 @@ module Neo4j
27
29
  Path = Java::OrgNeo4jDriverInternal::InternalPath
28
30
  Relationship = Java::OrgNeo4jDriverInternal::InternalRelationship
29
31
  end
30
-
31
- # Workaround for missing zeitwerk support as of jruby-9.2.13.0
32
- module Ext
33
- module Internal
34
- module Async
35
- end
36
- module Cursor
37
- end
38
- module Summary
39
- end
40
- end
41
- end
42
- # End workaround
43
32
  end
44
33
  end
45
34
 
46
- Loader.load
47
-
48
35
  Java::OrgNeo4jDriver::AuthTokens.singleton_class.prepend Neo4j::Driver::Ext::AuthTokens
49
36
  Java::OrgNeo4jDriver::Bookmark.singleton_class.prepend Neo4j::Driver::Ext::Bookmark::ClassMethods
50
37
  Java::OrgNeo4jDriver::GraphDatabase.singleton_class.prepend Neo4j::Driver::Ext::GraphDatabase
@@ -61,6 +48,7 @@ Java::OrgNeo4jDriverInternal::InternalResult.prepend Neo4j::Driver::Ext::Interna
61
48
  Java::OrgNeo4jDriverInternal::InternalSession.prepend Neo4j::Driver::Ext::InternalSession
62
49
  Java::OrgNeo4jDriverInternal::InternalTransaction.prepend Neo4j::Driver::Ext::InternalTransaction
63
50
  Java::OrgNeo4jDriverInternalAsync::InternalAsyncSession.prepend Neo4j::Driver::Ext::Internal::Async::InternalAsyncSession
51
+ Java::OrgNeo4jDriverInternalCluster::RoutingTableRegistryImpl.include Neo4j::Driver::Ext::Internal::Cluster::RoutingTableRegistryImpl
64
52
  Java::OrgNeo4jDriverInternalCursor::DisposableAsyncResultCursor.prepend Neo4j::Driver::Ext::Internal::Cursor::DisposableAsyncResultCursor
65
53
  Java::OrgNeo4jDriverInternalSummary::InternalResultSummary.prepend Neo4j::Driver::Ext::Internal::Summary::InternalResultSummary
66
54
  Java::OrgNeo4jDriverInternalValue::ValueAdapter.include Neo4j::Driver::Ext::RubyConverter
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Neo4j
4
+ module Driver
5
+ module Exceptions
6
+ class CertificateException
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Neo4j
4
+ module Driver
5
+ module Exceptions
6
+ class TokenExpiredException < SecurityException
7
+ end
8
+ end
9
+ end
10
+ end
@@ -15,12 +15,12 @@ module Neo4j
15
15
  end
16
16
 
17
17
  def self.require_non_nil!(obj, message)
18
- raise ArgumentError, message if obj.nil?
18
+ raise ArgumentError, "#{message} can't be nil" if obj.nil?
19
19
  end
20
20
 
21
21
  def self.require_non_nil_credentials!(username, password)
22
- require_non_nil! username, "Username can't be nil"
23
- require_non_nil! password, "Password can't be nil"
22
+ require_non_nil! username, "Username"
23
+ require_non_nil! password, "Password"
24
24
  end
25
25
  end
26
26
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '4.3.1'
5
+ VERSION = '4.4.0'
6
6
  end
7
7
  end
@@ -1,17 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Workaround for missing zeitwerk support in jruby-9.2.8.0
4
- if RUBY_PLATFORM.match?(/java/)
5
- module Neo4j
6
- module Driver
7
- module Exceptions
8
- end
9
- module Internal
10
- end
11
- end
3
+ module Neo4j
4
+ module Driver
12
5
  end
13
6
  end
14
- # End workaround
15
7
 
16
8
  require 'active_support/concern'
17
9
  require 'active_support/core_ext/hash/indifferent_access'
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: 4.3.1
4
+ version: 4.4.0
5
5
  platform: java
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-26 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -218,6 +218,7 @@ files:
218
218
  - jruby/neo4j/driver/ext/exception_mapper.rb
219
219
  - jruby/neo4j/driver/ext/graph_database.rb
220
220
  - jruby/neo4j/driver/ext/internal/async/internal_async_session.rb
221
+ - jruby/neo4j/driver/ext/internal/cluster/routing_table_registry_impl.rb
221
222
  - jruby/neo4j/driver/ext/internal/cursor/disposable_async_result_cursor.rb
222
223
  - jruby/neo4j/driver/ext/internal/summary/internal_result_summary.rb
223
224
  - jruby/neo4j/driver/ext/internal_driver.rb
@@ -240,6 +241,7 @@ files:
240
241
  - lib/neo4j/driver/auto_closable.rb
241
242
  - lib/neo4j/driver/exceptions/authentication_exception.rb
242
243
  - lib/neo4j/driver/exceptions/authorization_expired_exception.rb
244
+ - lib/neo4j/driver/exceptions/certificate_exception.rb
243
245
  - lib/neo4j/driver/exceptions/client_exception.rb
244
246
  - lib/neo4j/driver/exceptions/connection_read_timeout_exception.rb
245
247
  - lib/neo4j/driver/exceptions/database_exception.rb
@@ -253,6 +255,7 @@ files:
253
255
  - lib/neo4j/driver/exceptions/security_exception.rb
254
256
  - lib/neo4j/driver/exceptions/service_unavailable_exception.rb
255
257
  - lib/neo4j/driver/exceptions/session_expired_exception.rb
258
+ - lib/neo4j/driver/exceptions/token_expired_exception.rb
256
259
  - lib/neo4j/driver/exceptions/transaction_nesting_exception.rb
257
260
  - lib/neo4j/driver/exceptions/transient_exception.rb
258
261
  - lib/neo4j/driver/exceptions/untrusted_server_exception.rb
@@ -282,15 +285,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
285
  requirements:
283
286
  - - ">="
284
287
  - !ruby/object:Gem::Version
285
- version: '2.5'
288
+ version: '2.6'
286
289
  required_rubygems_version: !ruby/object:Gem::Requirement
287
290
  requirements:
288
291
  - - ">="
289
292
  - !ruby/object:Gem::Version
290
293
  version: '0'
291
294
  requirements:
292
- - jar org.neo4j.driver, neo4j-java-driver, 4.3.4
293
- rubygems_version: 3.2.14
295
+ - jar org.neo4j.driver, neo4j-java-driver, 4.4.2
296
+ rubygems_version: 3.2.29
294
297
  signing_key:
295
298
  specification_version: 4
296
299
  summary: ''