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 +4 -4
- data/lib/neo4j-ruby-driver.rb +5 -0
- data/lib/neo4j-ruby-driver_loader.rb +31 -0
- data/lib/neo4j_ruby_driver.rb +2 -13
- data/ruby/neo4j/driver/graph_database.rb +0 -2
- data/ruby/neo4j/driver/internal/async/pool/channel.rb +5 -1
- data/ruby/neo4j/driver/version.rb +1 -1
- data/ruby/neo4j/driver.rb +4 -5
- metadata +5 -4
- data/lib/loader.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a0852a262c9e68ca0dc9b6fecd652a7af17e576f705996d6223effe51bd3e0d
|
4
|
+
data.tar.gz: e7c6d2dde8d8297aff5b47f7b3f929e74db230f89d66d619861956b1be9694f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec4be23a611fac1d7fbc744f23ff511d091c8b7fe4bb449d0462539a8a5d1609937afae3d7dcf05511ce3d63aef357790a693dc83331fec9adfa9ba4e4b4823
|
7
|
+
data.tar.gz: 265d20586c6359343ac6489b1f198df22532b9be47ceb46d290aeaa41980d480b2024224cfec1c8aa7723817fa34e82a45870b0a63a5f26b8d832205a5e660f2
|
@@ -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
|
data/lib/neo4j_ruby_driver.rb
CHANGED
@@ -1,15 +1,4 @@
|
|
1
|
-
#
|
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
|
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
|
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 '
|
12
|
-
require '
|
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.
|
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:
|
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/
|
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.
|
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
|