neo4j-ruby-driver 4.4.0 → 4.4.3

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: aad2e30fa3fa23dc95e7db9f27847b1c5382c23600c019d93a7625fc5a66d085
4
- data.tar.gz: 534c14f354f92df7a85b153e1451951ded71863fbbb10c61a50a280a8bf3bea7
3
+ metadata.gz: 8a0852a262c9e68ca0dc9b6fecd652a7af17e576f705996d6223effe51bd3e0d
4
+ data.tar.gz: e7c6d2dde8d8297aff5b47f7b3f929e74db230f89d66d619861956b1be9694f9
5
5
  SHA512:
6
- metadata.gz: 909be9c6542e378161b3e9b9c62ad9e45ef08c54f7410b4ea5a2ba3f15267fd445995757f74210aadcaa10f94475f839cddeb2294c23d44a9925e044e23cc162
7
- data.tar.gz: 4d22446e5a24c6f7f99072202bfc4dbab1e222b535c64b1c716a31f4993f9fe0da07c8d5dfbd3f68d793fc1b11f6782f4a6062e3171f41b7b26a8c7260b0966a
6
+ metadata.gz: 4ec4be23a611fac1d7fbc744f23ff511d091c8b7fe4bb449d0462539a8a5d1609937afae3d7dcf05511ce3d63aef357790a693dc83331fec9adfa9ba4e4b4823
7
+ data.tar.gz: 265d20586c6359343ac6489b1f198df22532b9be47ceb46d290aeaa41980d480b2024224cfec1c8aa7723817fa34e82a45870b0a63a5f26b8d832205a5e660f2
@@ -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'
@@ -4,9 +4,7 @@ module Neo4j::Driver
4
4
  class GraphDatabase
5
5
  class << self
6
6
  extend AutoClosable
7
- extend Synchronizable
8
7
  auto_closable :driver, :routing_driver
9
- sync :driver
10
8
 
11
9
  def driver(uri, auth_token = nil, **config)
12
10
  internal_driver(uri, auth_token, config, Internal::DriverFactory.new)
@@ -10,7 +10,7 @@ module Neo4j::Driver
10
10
 
11
11
  def initialize(address, connector, logger)
12
12
  @attributes = Connection::ChannelAttributes.new
13
- @stream = Connection::Stream.new(connector.connect(address))
13
+ @stream = Connection::Stream.new(connect_to_io_socket(connector, address))
14
14
  @stream.write(Connection::BoltProtocolUtil.handshake_buf)
15
15
  @stream.flush
16
16
  Connection::HandshakeHandler.new(logger).decode(self)
@@ -39,6 +39,10 @@ module Neo4j::Driver
39
39
 
40
40
  private
41
41
 
42
+ def connect_to_io_socket(connector, address)
43
+ Sync { connector.connect(address) }
44
+ end
45
+
42
46
  def bracketless(host)
43
47
  host.delete_prefix('[').delete_suffix(']')
44
48
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '4.4.0'
5
+ VERSION = '4.4.3'
6
6
  end
7
7
  end
data/ruby/neo4j/driver.rb CHANGED
@@ -6,15 +6,14 @@ require 'active_support/logger'
6
6
  require 'async/io'
7
7
  require 'async/io/stream'
8
8
  require 'async/queue'
9
- require 'connection_pool'
10
9
  require 'bigdecimal'
11
- require 'date'
12
- require 'loader'
13
-
14
- Loader.load
10
+ require 'connection_pool'
11
+ require 'neo4j-ruby-driver_loader'
15
12
 
16
13
  module Neo4j
17
14
  module Driver
15
+ Loader.load
16
+
18
17
  Record = Neo4j::Driver::Internal::InternalRecord
19
18
  Result = Neo4j::Driver::Internal::InternalResult
20
19
  Transaction = Neo4j::Driver::Internal::InternalTransaction
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.0
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-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
  name: activesupport
@@ -209,7 +209,8 @@ extra_rdoc_files:
209
209
  files:
210
210
  - LICENSE.txt
211
211
  - README.md
212
- - lib/loader.rb
212
+ - lib/neo4j-ruby-driver.rb
213
+ - lib/neo4j-ruby-driver_loader.rb
213
214
  - lib/neo4j/driver/auto_closable.rb
214
215
  - lib/neo4j/driver/exceptions/authentication_exception.rb
215
216
  - lib/neo4j/driver/exceptions/authorization_expired_exception.rb
@@ -500,7 +501,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
500
501
  - !ruby/object:Gem::Version
501
502
  version: '0'
502
503
  requirements: []
503
- rubygems_version: 3.3.7
504
+ rubygems_version: 3.4.1
504
505
  signing_key:
505
506
  specification_version: 4
506
507
  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