neo4j-ruby-driver 4.4.0.alpha.1 → 4.4.0.alpha.2

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: 66dae72d3ada4d96cffcce68f8caa4ca4d0077979b3f8e4062ab4743b127eefd
4
- data.tar.gz: 03da615177758e34cf55aa8b0ae50ec10a03e6d80ed20dc89ddc1ccac7957085
3
+ metadata.gz: 698039b3b9cd2cf99a79e5a96f23ad4be85aabe2dbf85274b01ec8bf05301658
4
+ data.tar.gz: cf29ed98589d4e6aac9469d67d3e069696091612d9a0fd8eef2e3993f2ef9a4f
5
5
  SHA512:
6
- metadata.gz: c624a88a71ba6c8dc3eee672058609aeadeed4890996d7e92e97682f8fb3ffff6d275720c99abe08be73765bfd266ae56b6fb4f87fcdd562e7db5428445624d9
7
- data.tar.gz: ca7633a62d8654d82a23e7829e8b3b934fbdfbec13718193fd80a0671569d11e48fb9ebc81bbbe45a574c3a73b23b53e55dea4c4c1051c09a6329d1ec9490075
6
+ metadata.gz: 3f2beecb1b73d3394f3ea6259c4664b7aa0400472edba1aafdc02a0b5932cd90e1e5ff2bf8319e6931c341b9e74a0037d4727ceffc4e29138f188fa373aee4b0
7
+ data.tar.gz: 673f97b1c0eed87beea9f0c1538eb96fe34ff92fdd9b49ef82c9dc9e54b49b0197c98e578ea399023b3b1579774e474d3019527c67ed7a62b5251fdeff078f23
data/lib/loader.rb CHANGED
@@ -7,12 +7,13 @@ class Loader
7
7
  loader = Zeitwerk::Loader.new
8
8
  loader.tag = 'neo4j-ruby-driver'
9
9
  loader.push_dir(File.expand_path(__dir__))
10
- loader.push_dir(File.dirname(File.dirname(caller_locations(1..1).first.path)))
10
+ driver_specific_dir = File.dirname(File.dirname(caller_locations(1..1).first.path))
11
+ loader.push_dir(driver_specific_dir)
11
12
  yield loader if block_given?
12
13
  loader.ignore(File.expand_path('neo4j-*-driver_jars.rb', __dir__))
13
14
  loader.ignore(File.expand_path('neo4j_ruby_driver.rb', __dir__))
14
15
  loader.ignore(File.expand_path('org', __dir__))
15
- loader.inflector = Zeitwerk::GemInflector.new(File.expand_path('neo4j/driver', __dir__))
16
+ loader.inflector = Zeitwerk::GemInflector.new(File.expand_path('neo4j/driver', driver_specific_dir))
16
17
  loader.setup
17
18
  loader.eager_load
18
19
  end
@@ -38,8 +38,8 @@ module Neo4j
38
38
 
39
39
  # Console.logger = ::Logger.new(STDOUT, level: :debug)
40
40
  DEFAULTS = {
41
- # logger: ::Logger.new(nil),
42
- logger: ::Logger.new(STDOUT, level: :debug),
41
+ logger: ::Logger.new(nil),
42
+ # logger: ::Logger.new(STDOUT, level: :debug),
43
43
  # logger: Console.logger,
44
44
  leaked_sessions_logging: false,
45
45
  max_connection_pool_size: Internal::Async::Pool::PoolSettings::DEFAULT_MAX_CONNECTION_POOL_SIZE,
@@ -2,9 +2,9 @@ module Neo4j::Driver
2
2
  module Internal
3
3
  module Messaging
4
4
  class AbstractMessageWriter
5
- def initialize(packer, encoders_by_message_signature)
5
+ def initialize(packer)
6
6
  @packer = Internal::Validator.require_non_nil!(packer)
7
- @encoders_by_message_signature = Internal::Validator.require_non_nil!(encoders_by_message_signature)
7
+ @encoders_by_message_signature = Internal::Validator.require_non_nil!(build_encoders)
8
8
  end
9
9
 
10
10
  def write(msg)
@@ -3,27 +3,22 @@ module Neo4j::Driver
3
3
  module Messaging
4
4
  module V3
5
5
  class MessageWriterV3 < AbstractMessageWriter
6
- def initialize(output)
7
- super(Common::CommonValuePacker.new(output), build_encoders)
8
- end
9
-
10
6
  private
11
7
 
12
8
  def build_encoders
13
- result = Util::Iterables.new_hash_map_with_size(9)
14
- result.put(Request::HelloMessage::SIGNATURE, Encode::HelloMessageEncoder.new)
15
- result.put(Request::GoodbyeMessage::SIGNATURE, Encode::GoodbyeMessageEncoder.new)
16
-
17
- result.put(Request::RunWithMetadataMessage::SIGNATURE, Encode::RunWithMetadataMessageEncoder.new)
18
- result.put(Request::DiscardAllMessage::SIGNATURE, Encode::DiscardAllMessageEncoder.new)
19
- result.put(Request::PullAllMessage::SIGNATURE, Encode::PullAllMessageEncoder.new)
9
+ {
10
+ Request::HelloMessage::SIGNATURE => Encode::HelloMessageEncoder.new,
11
+ Request::GoodbyeMessage::SIGNATURE => Encode::GoodbyeMessageEncoder.new,
20
12
 
21
- result.put(Request::BeginMessage::SIGNATURE, Encode::BeginMessageEncoder.new)
22
- result.put(Request::CommitMessage::SIGNATURE, Encode::CommitMessageEncoder.new)
23
- result.put(Request::RollbackMessage::SIGNATURE, Encode::RollbackMessageEncoder.new)
24
- result.put(Request::ResetMessage::SIGNATURE, Encode::ResetMessageEncoder.new)
13
+ Request::RunWithMetadataMessage::SIGNATURE => Encode::RunWithMetadataMessageEncoder.new,
14
+ Request::DiscardAllMessage::SIGNATURE => Encode::DiscardAllMessageEncoder.new,
15
+ Request::PullAllMessage::SIGNATURE => Encode::PullAllMessageEncoder.new,
25
16
 
26
- result
17
+ Request::BeginMessage::SIGNATURE => Encode::BeginMessageEncoder.new,
18
+ Request::CommitMessage::SIGNATURE => Encode::CommitMessageEncoder.new,
19
+ Request::RollbackMessage::SIGNATURE => Encode::RollbackMessageEncoder.new,
20
+ Request::ResetMessage::SIGNATURE => Encode::ResetMessageEncoder.new,
21
+ }
27
22
  end
28
23
  end
29
24
  end
@@ -3,28 +3,23 @@ module Neo4j::Driver
3
3
  module Messaging
4
4
  module V4
5
5
  class MessageWriterV4 < AbstractMessageWriter
6
- def initialize(output)
7
- super(Common::CommonValuePacker.new(output), build_encoders)
8
- end
9
-
10
6
  private
11
7
 
12
8
  def build_encoders
13
- result = Util::Iterables.new_hash_map_with_size(9)
14
- result.put(Request::HelloMessage::SIGNATURE, Encode::HelloMessageEncoder.new)
15
- result.put(Request::GoodbyeMessage::SIGNATURE, Encode::GoodbyeMessageEncoder.new)
16
- result.put(Request::RunWithMetadataMessage::SIGNATURE, Encode::RunWithMetadataMessageEncoder.new)
17
-
18
- result.put(Request::DiscardAllMessage::SIGNATURE, Encode::DiscardAllMessageEncoder.new) # new
19
- result.put(Request::PullMessage::SIGNATURE, Encode::PullMessageEncoder.new) # new
9
+ {
10
+ Request::HelloMessage::SIGNATURE => Encode::HelloMessageEncoder.new,
11
+ Request::GoodbyeMessage::SIGNATURE => Encode::GoodbyeMessageEncoder.new,
12
+ Request::RunWithMetadataMessage::SIGNATURE => Encode::RunWithMetadataMessageEncoder.new,
20
13
 
21
- result.put(Request::BeginMessage::SIGNATURE, Encode::BeginMessageEncoder.new)
22
- result.put(Request::CommitMessage::SIGNATURE, Encode::CommitMessageEncoder.new)
23
- result.put(Request::RollbackMessage::SIGNATURE, Encode::RollbackMessageEncoder.new)
14
+ Request::DiscardAllMessage::SIGNATURE => Encode::DiscardAllMessageEncoder.new, # new
15
+ Request::PullMessage::SIGNATURE => Encode::PullMessageEncoder.new, # new
24
16
 
25
- result.put(Request::ResetMessage::SIGNATURE, Encode::ResetMessageEncoder.new)
17
+ Request::BeginMessage::SIGNATURE => Encode::BeginMessageEncoder.new,
18
+ Request::CommitMessage::SIGNATURE => Encode::CommitMessageEncoder.new,
19
+ Request::RollbackMessage::SIGNATURE => Encode::RollbackMessageEncoder.new,
26
20
 
27
- result
21
+ Request::ResetMessage::SIGNATURE => Encode::ResetMessageEncoder.new,
22
+ }
28
23
  end
29
24
  end
30
25
  end
@@ -7,7 +7,7 @@ module Neo4j::Driver
7
7
  INSTANCE = new
8
8
 
9
9
  def create_message_format
10
- V44::MessageFormatV4.new
10
+ V4::MessageFormatV4.new
11
11
  end
12
12
 
13
13
  def build_result_cursor_factory(connection, query, bookmark_holder, tx, run_message, fetch_size)
@@ -8,29 +8,24 @@ module Neo4j::Driver
8
8
 
9
9
  # new messages such as ROUTE
10
10
  class MessageWriterV43 < AbstractMessageWriter
11
- def initialize(output)
12
- super(Common::CommonValuePacker.new(output), build_encoders)
13
- end
14
-
15
11
  private
16
12
 
17
13
  def build_encoders
18
- result = Util::Iterables.new_hash_map_with_size(9)
19
- result.put(Request::HelloMessage::SIGNATURE, Encode::HelloMessageEncoder.new)
20
- result.put(Request::GoodbyeMessage::SIGNATURE, Encode::GoodbyeMessageEncoder.new)
21
- result.put(Request::RunWithMetadataMessage::SIGNATURE, Encode::RunWithMetadataMessageEncoder.new)
22
- result.put(Request::RouteMessage::SIGNATURE, Encode::RouteMessageEncoder.new) # new
23
-
24
- result.put(Request::DiscardMessage::SIGNATURE, Encode::DiscardMessageEncoder.new)
25
- result.put(Request::PullMessage::SIGNATURE, Encode::PullMessageEncoder.new)
14
+ {
15
+ Request::HelloMessage::SIGNATURE => Encode::HelloMessageEncoder.new,
16
+ Request::GoodbyeMessage::SIGNATURE => Encode::GoodbyeMessageEncoder.new,
17
+ Request::RunWithMetadataMessage::SIGNATURE => Encode::RunWithMetadataMessageEncoder.new,
18
+ Request::RouteMessage::SIGNATURE => Encode::RouteMessageEncoder.new, # new
26
19
 
27
- result.put(Request::BeginMessage::SIGNATURE, Encode::BeginMessageEncoder.new)
28
- result.put(Request::CommitMessage::SIGNATURE, Encode::CommitMessageEncoder.new)
29
- result.put(Request::RollbackMessage::SIGNATURE, Encode::RollbackMessageEncoder.new)
20
+ Request::DiscardMessage::SIGNATURE => Encode::DiscardMessageEncoder.new,
21
+ Request::PullMessage::SIGNATURE => Encode::PullMessageEncoder.new,
30
22
 
31
- result.put(Request::ResetMessage::SIGNATURE, Encode::ResetMessageEncoder.new)
23
+ Request::BeginMessage::SIGNATURE => Encode::BeginMessageEncoder.new,
24
+ Request::CommitMessage::SIGNATURE => Encode::CommitMessageEncoder.new,
25
+ Request::RollbackMessage::SIGNATURE => Encode::RollbackMessageEncoder.new,
32
26
 
33
- result
27
+ Request::ResetMessage::SIGNATURE => Encode::ResetMessageEncoder.new,
28
+ }
34
29
  end
35
30
  end
36
31
  end
@@ -3,10 +3,6 @@ module Neo4j::Driver
3
3
  module Messaging
4
4
  module V44
5
5
  class MessageWriterV44 < AbstractMessageWriter
6
- def initialize(output)
7
- super(output, build_encoders)
8
- end
9
-
10
6
  private
11
7
 
12
8
  def build_encoders
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '4.4.0.alpha.1'
5
+ VERSION = '4.4.0.alpha.2'
6
6
  end
7
7
  end
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.alpha.1
4
+ version: 4.4.0.alpha.2
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-06-13 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -260,7 +260,6 @@ files:
260
260
  - lib/neo4j/driver/types/offset_time.rb
261
261
  - lib/neo4j/driver/types/point.rb
262
262
  - lib/neo4j/driver/types/time.rb
263
- - lib/neo4j/driver/version.rb
264
263
  - lib/neo4j_ruby_driver.rb
265
264
  - ruby/neo4j/driver.rb
266
265
  - ruby/neo4j/driver/access_mode.rb
@@ -489,6 +488,7 @@ files:
489
488
  - ruby/neo4j/driver/session_config.rb
490
489
  - ruby/neo4j/driver/transaction_config.rb
491
490
  - ruby/neo4j/driver/values.rb
491
+ - ruby/neo4j/driver/version.rb
492
492
  homepage: https://github.com/neo4jrb/neo4j-ruby-driver
493
493
  licenses:
494
494
  - MIT