neo4j-ruby-driver 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -28
- data/ffi/bolt/value.rb +1 -1
- data/ffi/neo4j/driver.rb +7 -1
- data/ffi/neo4j/driver/internal/async/direct_connection.rb +1 -1
- data/ffi/neo4j/driver/internal/explicit_transaction.rb +2 -1
- data/ffi/neo4j/driver/internal/handlers/pull_all_response_handler.rb +2 -3
- data/ffi/neo4j/driver/internal/handlers/response_handler.rb +4 -3
- data/ffi/neo4j/driver/internal/network_session.rb +8 -6
- data/ffi/neo4j/driver/internal/value/node_value.rb +1 -1
- data/ffi/neo4j/driver/internal/value/value_adapter.rb +12 -8
- data/ffi/neo4j/driver/statement.rb +3 -2
- data/ffi/neo4j/driver/types/relationship.rb +1 -1
- data/lib/neo4j/driver/exceptions/client_exception.rb +5 -0
- data/lib/neo4j/driver/exceptions/neo4j_exception.rb +6 -1
- data/lib/neo4j/driver/internal/statement_validator.rb +16 -0
- data/lib/neo4j/driver/types/bytes.rb +10 -0
- data/lib/neo4j/driver/version.rb +1 -1
- metadata +98 -36
- data/Gemfile +0 -8
- data/Rakefile +0 -16
- data/lib/neo4j/driver/types/byte_array.rb +0 -17
- data/neo4j-ruby-driver.gemspec +0 -63
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0527e52f881e9d0a1d2a82bb6d44adada7187cf5ed0639897c95c6eeb414710
|
4
|
+
data.tar.gz: d1816823ed6760dfaafea61ecc2d30945535c322156059ac807dd15545a38088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1484192cda413f3e35adaf9636f9c7db560eb3c34bb192903922b2c82bd16dd882bfb64465b5fd9f1f5f23c5c9bf55484c811777b816ed5fe0fd4a85459fb3b
|
7
|
+
data.tar.gz: e4311e81ab4bab518cc93afc71d0fccb04a51b12759eebe377c8690fd9557d8be4d0aa0a2c8ef97dcd5b939bbd06310655bce0042a750bac76bf02fd8c35c6f9
|
data/README.md
CHANGED
@@ -1,16 +1,34 @@
|
|
1
1
|
# Neo4j::Driver
|
2
2
|
|
3
|
-
|
4
|
-
completed.
|
5
|
-
The proposed API is heavilly inspired but the java and javascipt driver. Please add comments and suggestions if you feel there
|
6
|
-
is better idiomatic alternative in ruby.
|
3
|
+
home :: https://github.com/neo4jrb/neo4j-ruby-driver
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
This repository contains 2 implementation of a neo4j driver for ruby:
|
6
|
+
- `neo4j-java-driver` based on official java implementation. It provides a thin wrapper over java driver (only in jruby).
|
7
|
+
- `neo4j-ruby-driver` based on [seabolt](https://github.com/neo4j-drivers/seabolt) and [ffi](https://github.com/ffi/ffi). Available on all rubies (including jruby) and all platforms supported by seabolt.
|
11
8
|
|
12
9
|
## Installation
|
13
10
|
|
11
|
+
### neo4j-java-driver
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'neo4j-java-driver'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install neo4j-java-driver
|
26
|
+
|
27
|
+
### neo4j-ruby-driver
|
28
|
+
|
29
|
+
As a prerequisite [seabolt](https://github.com/neo4j-drivers/seabolt) must be installed. Please follow the instructions to install either from package or source.
|
30
|
+
Add `SEABOLT_LIB` environment variable with the location of the installed library.
|
31
|
+
|
14
32
|
Add this line to your application's Gemfile:
|
15
33
|
|
16
34
|
```ruby
|
@@ -27,42 +45,33 @@ Or install it yourself as:
|
|
27
45
|
|
28
46
|
## Usage
|
29
47
|
|
30
|
-
|
31
|
-
|
32
|
-
## Development
|
48
|
+
Both drivers implement identical API and can be used interchangeably. The API is to highest possible degree consistent with the official java driver.
|
49
|
+
At this moment [The Neo4j Drivers Manual v1.7](https://neo4j.com/docs/driver-manual/1.7/) along with the ruby version of the [code fragments](https://github.com/neo4jrb/neo4j-ruby-driver/blob/master/docs/dev_manual_examples.rb) and the ruby specs provide the only documentation.
|
33
50
|
|
34
|
-
|
35
|
-
In order to run test by running `rake spec` you may have to set your own `NEO4J_BOLT_URL` URI or it will
|
36
|
-
fallback to `bolt://localhost:7687`.
|
37
|
-
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
51
|
+
[Neo4j Java Driver 1.7 API](https://neo4j.com/docs/api/java-driver/current/) can be helpful as well..
|
38
52
|
|
39
|
-
|
53
|
+
## Development
|
40
54
|
|
41
55
|
This gem includes 2 different implementations: java driver based and another one using seabolt via ffi
|
42
56
|
|
43
57
|
For java driver based:
|
44
58
|
|
45
|
-
$
|
46
|
-
$ bundle
|
47
|
-
$ rspec
|
59
|
+
$ bin/setup
|
48
60
|
|
49
|
-
FFI based:
|
61
|
+
FFI based same as above but with SEABOLT_LIB variable set (e.g. on Mac OSX):
|
50
62
|
|
51
|
-
$
|
52
|
-
$ SEABOLT_LIB=~/seabolt/build/dist/lib/libseabolt17.dylib bundle
|
53
|
-
$ SEABOLT_LIB=~/seabolt/build/dist/lib/libseabolt17.dylib rspec
|
63
|
+
$ SEABOLT_LIB=~/seabolt/build/dist/lib/libseabolt17.dylib bin/setup
|
54
64
|
|
55
|
-
Please note that seabolt
|
65
|
+
Please note that seabolt has to be installed separately: https://github.com/neo4j-drivers/seabolt
|
66
|
+
|
67
|
+
In order to run test by running `rake spec` you may have to set your own `NEO4J_BOLT_URL` URI or it will
|
68
|
+
fallback to `bolt://localhost:7687`.
|
56
69
|
|
57
70
|
## Contributing
|
58
71
|
|
59
|
-
|
72
|
+
Suggestions, improvements, bug reports and pull requests are welcome on GitHub at https://github.com/neo4jrb/neo4j-ruby-driver.
|
60
73
|
|
61
74
|
## License
|
62
75
|
|
63
76
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
64
77
|
|
65
|
-
|
66
|
-
[https://neo4j.com/docs/developer-manual/3.4/drivers/]: https://neo4j.com/docs/developer-manual/3.4/drivers/
|
67
|
-
|
68
|
-
[https://neo4j.com/docs/developer-manual/3.4/drivers/]: https://neo4j.com/docs/developer-manual/3.4/drivers/
|
data/ffi/bolt/value.rb
CHANGED
@@ -29,7 +29,7 @@ module Bolt
|
|
29
29
|
attach_function :format_as_string, :BoltValue_format_as_String, %i[pointer string int32], :void
|
30
30
|
attach_function :format_as_dictionary, :BoltValue_format_as_Dictionary, %i[pointer int32], :void
|
31
31
|
attach_function :format_as_list, :BoltValue_format_as_List, %i[pointer int32], :void
|
32
|
-
attach_function :format_as_bytes, :BoltValue_format_as_Bytes, %i[pointer
|
32
|
+
attach_function :format_as_bytes, :BoltValue_format_as_Bytes, %i[pointer pointer int32], :void
|
33
33
|
attach_function :format_as_structure, :BoltValue_format_as_Structure, %i[pointer int16 int32], :void
|
34
34
|
end
|
35
35
|
end
|
data/ffi/neo4j/driver.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Workaround for missing zeitwerk support in jruby-9.2.
|
3
|
+
# Workaround for missing zeitwerk support in jruby-9.2.8.0
|
4
4
|
if RUBY_PLATFORM.match?(/java/)
|
5
5
|
module Bolt
|
6
6
|
end
|
@@ -42,4 +42,10 @@ require 'concurrent/atomic/atomic_reference'
|
|
42
42
|
require 'ffi'
|
43
43
|
require 'loader'
|
44
44
|
require 'recursive-open-struct'
|
45
|
+
|
46
|
+
module Neo4j
|
47
|
+
module Driver
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
45
51
|
Loader.load
|
@@ -25,7 +25,8 @@ module Neo4j
|
|
25
25
|
|
26
26
|
def run(query, parameters = {})
|
27
27
|
ensure_can_run_queries
|
28
|
-
@
|
28
|
+
@result&.failure
|
29
|
+
@result = @protocol.run_in_explicit_transaction(@connection, Statement.new(query, parameters), self)
|
29
30
|
end
|
30
31
|
|
31
32
|
def success
|
@@ -56,9 +56,8 @@ module Neo4j
|
|
56
56
|
@failure = nil
|
57
57
|
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
end
|
59
|
+
alias failure consume # it probably should be summary instead of consume to preserve the potentially yet
|
60
|
+
# unused result set
|
62
61
|
|
63
62
|
def on_failure(error)
|
64
63
|
@finished = true
|
@@ -6,7 +6,7 @@ module Neo4j
|
|
6
6
|
module Handlers
|
7
7
|
class ResponseHandler
|
8
8
|
delegate :bolt_connection, to: :connection
|
9
|
-
attr_reader :connection
|
9
|
+
attr_reader :connection, :failure
|
10
10
|
attr_accessor :request, :previous
|
11
11
|
|
12
12
|
def initialize(connection)
|
@@ -31,8 +31,9 @@ module Neo4j
|
|
31
31
|
if Bolt::Connection.summary_success(bolt_connection) == 1
|
32
32
|
after_success(nil)
|
33
33
|
else
|
34
|
-
|
35
|
-
|
34
|
+
return if previous&.failure
|
35
|
+
@failure = Value::ValueAdapter.to_ruby(Bolt::Connection.failure(bolt_connection))
|
36
|
+
raise Exceptions::ClientException.new(@failure[:code], @failure[:message])
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
@@ -55,6 +55,7 @@ module Neo4j
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def begin_transaction(mode = @mode, config = nil)
|
58
|
+
ensure_session_is_open
|
58
59
|
ensure_no_open_tx_before_starting_tx
|
59
60
|
acquire_connection(mode)
|
60
61
|
@transaction = ExplicitTransaction.new(@connection, self).begin(bookmarks, config)
|
@@ -81,15 +82,16 @@ module Neo4j
|
|
81
82
|
end
|
82
83
|
|
83
84
|
def acquire_connection(mode = @mode)
|
85
|
+
# make sure previous result is fully consumed and connection is released back to the pool
|
84
86
|
@result&.failure
|
87
|
+
|
88
|
+
# there is no unconsumed error, so one of the following is true:
|
89
|
+
# 1) this is first time connection is acquired in this session
|
90
|
+
# 2) previous result has been successful and is fully consumed
|
91
|
+
# 3) previous result failed and error has been consumed
|
92
|
+
|
85
93
|
raise Exceptions::IllegalStateException, 'Existing open connection detected' if @connection&.open?
|
86
94
|
@connection = @connection_provider.acquire_connection(@mode)
|
87
|
-
# old
|
88
|
-
# raise Exception, 'existing connection present' if @connection
|
89
|
-
#
|
90
|
-
# status = Bolt::Status.create
|
91
|
-
# @connection = Bolt::Connector.acquire(@connector, mode, status)
|
92
|
-
# check_status(status)
|
93
95
|
end
|
94
96
|
|
95
97
|
def close_transaction_and_release_connection
|
@@ -17,9 +17,9 @@ module Neo4j
|
|
17
17
|
when :bolt_float
|
18
18
|
Bolt::Float.get(value)
|
19
19
|
when :bolt_bytes
|
20
|
-
Types::
|
20
|
+
Types::Bytes.new(Array.new(Bolt::Value.size(value)) { |i| Bolt::Bytes.get(value, i) }.pack('C*'))
|
21
21
|
when :bolt_string
|
22
|
-
Bolt::String.get(value).read_string(Bolt::Value.size(value))
|
22
|
+
Bolt::String.get(value).read_string(Bolt::Value.size(value)).force_encoding(Encoding::UTF_8)
|
23
23
|
when :bolt_dictionary
|
24
24
|
Array.new(Bolt::Value.size(value)) do |i|
|
25
25
|
[to_ruby(Bolt::Dictionary.key(value, i)).to_sym, to_ruby(Bolt::Dictionary.value(value, i))]
|
@@ -45,13 +45,11 @@ module Neo4j
|
|
45
45
|
Bolt::Value.format_as_integer(value, object)
|
46
46
|
when Float
|
47
47
|
Bolt::Value.format_as_float(value, object)
|
48
|
-
when Types::
|
48
|
+
when Types::Bytes
|
49
49
|
Bolt::Value.format_as_bytes(value, object, object.size)
|
50
50
|
when String
|
51
|
-
|
52
|
-
|
53
|
-
Bolt::Value.format_as_list(value, object.size)
|
54
|
-
object.each_with_index { |elem, index| to_neo(Bolt::List.value(value, index), elem) }
|
51
|
+
object = object.encode(Encoding::UTF_8) unless object.encoding == Encoding::UTF_8
|
52
|
+
Bolt::Value.format_as_string(value, object, object.bytesize)
|
55
53
|
when Hash
|
56
54
|
Bolt::Value.format_as_dictionary(value, object.size)
|
57
55
|
object.each_with_index do |(key, elem), index|
|
@@ -59,6 +57,12 @@ module Neo4j
|
|
59
57
|
Bolt::Dictionary.set_key(value, index, key, key.size)
|
60
58
|
to_neo(Bolt::Dictionary.value(value, index), elem)
|
61
59
|
end
|
60
|
+
when Types::Path
|
61
|
+
Exceptions::ClientException.unable_to_convert(object)
|
62
|
+
when Enumerable
|
63
|
+
object = object.to_a
|
64
|
+
Bolt::Value.format_as_list(value, object.size)
|
65
|
+
object.each_with_index { |elem, index| to_neo(Bolt::List.value(value, index), elem) }
|
62
66
|
when Date
|
63
67
|
DateValue.to_neo(value, object)
|
64
68
|
when ActiveSupport::Duration
|
@@ -83,7 +87,7 @@ module Neo4j
|
|
83
87
|
when Time
|
84
88
|
TimeWithZoneOffsetValue.to_neo(value, object)
|
85
89
|
else
|
86
|
-
|
90
|
+
Exceptions::ClientException.unable_to_convert(object)
|
87
91
|
end
|
88
92
|
value
|
89
93
|
end
|
@@ -5,9 +5,10 @@ module Neo4j
|
|
5
5
|
class Statement
|
6
6
|
attr_reader :text, :parameters
|
7
7
|
|
8
|
-
def initialize(text, parameters =
|
8
|
+
def initialize(text, parameters = nil)
|
9
|
+
Internal::StatementValidator.validate!(parameters)
|
9
10
|
@text = text
|
10
|
-
@parameters = parameters
|
11
|
+
@parameters = parameters || {}
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -4,14 +4,19 @@ module Neo4j
|
|
4
4
|
module Driver
|
5
5
|
module Exceptions
|
6
6
|
class Neo4jException < RuntimeError
|
7
|
-
attr_reader :code, :cause
|
7
|
+
attr_reader :code, :cause, :suppressed
|
8
8
|
|
9
9
|
def initialize(*args)
|
10
10
|
@code = args.shift if args.count > 1
|
11
11
|
message = args.shift
|
12
12
|
@cause = args.shift
|
13
|
+
@suppressed = args.shift
|
13
14
|
super(message)
|
14
15
|
end
|
16
|
+
|
17
|
+
def add_suppressed(exception)
|
18
|
+
(@suppressed ||= []) << exception
|
19
|
+
end
|
15
20
|
end
|
16
21
|
end
|
17
22
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Internal
|
6
|
+
module StatementValidator
|
7
|
+
def self.validate!(parameters)
|
8
|
+
unless parameters.nil? || parameters.is_a?(Hash)
|
9
|
+
raise ArgumentError,
|
10
|
+
"The parameters should be provided as Map type. Unsupported parameters type: #{parameters.class.name}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/neo4j/driver/version.rb
CHANGED
metadata
CHANGED
@@ -1,152 +1,214 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-ruby-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heinrich Klobuczek
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: ffi
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: '0'
|
20
|
-
|
19
|
+
name: activesupport
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: recursive-open-struct
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
|
32
|
+
version: 2.1.10
|
33
|
+
name: zeitwerk
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.1.10
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: activesupport
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: '0'
|
48
|
-
|
47
|
+
name: ffi
|
49
48
|
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: zeitwerk
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - ">="
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '0'
|
62
|
-
|
61
|
+
name: recursive-open-struct
|
63
62
|
prerelease: false
|
63
|
+
type: :runtime
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '0'
|
76
|
-
|
75
|
+
name: ffaker
|
77
76
|
prerelease: false
|
77
|
+
type: :development
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: neo4j-rake_tasks
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
86
|
- - ">="
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: 0.3.0
|
90
|
-
|
89
|
+
name: neo4j-rake_tasks
|
91
90
|
prerelease: false
|
91
|
+
type: :development
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.3.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: parallel
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
100
|
- - ">="
|
102
101
|
- !ruby/object:Gem::Version
|
103
102
|
version: '0'
|
104
|
-
|
103
|
+
name: parallel
|
105
104
|
prerelease: false
|
105
|
+
type: :development
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '13'
|
112
117
|
name: rake
|
118
|
+
prerelease: false
|
119
|
+
type: :development
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "<"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '13'
|
125
|
+
- !ruby/object:Gem::Dependency
|
113
126
|
requirement: !ruby/object:Gem::Requirement
|
114
127
|
requirements:
|
115
128
|
- - ">="
|
116
129
|
- !ruby/object:Gem::Version
|
117
130
|
version: '0'
|
131
|
+
name: rspec-its
|
132
|
+
prerelease: false
|
118
133
|
type: :development
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
name: hoe
|
119
146
|
prerelease: false
|
147
|
+
type: :development
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
150
|
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
152
|
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec-its
|
127
154
|
requirement: !ruby/object:Gem::Requirement
|
128
155
|
requirements:
|
129
156
|
- - ">="
|
130
157
|
- !ruby/object:Gem::Version
|
131
158
|
version: '0'
|
159
|
+
name: hoe-bundler
|
160
|
+
prerelease: false
|
132
161
|
type: :development
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
name: hoe-gemspec
|
133
174
|
prerelease: false
|
175
|
+
type: :development
|
134
176
|
version_requirements: !ruby/object:Gem::Requirement
|
135
177
|
requirements:
|
136
178
|
- - ">="
|
137
179
|
- !ruby/object:Gem::Version
|
138
180
|
version: '0'
|
139
|
-
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '4.0'
|
187
|
+
- - "<"
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '7'
|
190
|
+
name: rdoc
|
191
|
+
prerelease: false
|
192
|
+
type: :development
|
193
|
+
version_requirements: !ruby/object:Gem::Requirement
|
194
|
+
requirements:
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '4.0'
|
198
|
+
- - "<"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '7'
|
201
|
+
description: ''
|
140
202
|
email:
|
141
203
|
- heinrich@mail.com
|
142
204
|
executables: []
|
143
205
|
extensions: []
|
144
|
-
extra_rdoc_files:
|
206
|
+
extra_rdoc_files:
|
207
|
+
- LICENSE.txt
|
208
|
+
- README.md
|
145
209
|
files:
|
146
|
-
- Gemfile
|
147
210
|
- LICENSE.txt
|
148
211
|
- README.md
|
149
|
-
- Rakefile
|
150
212
|
- ffi/bolt/address.rb
|
151
213
|
- ffi/bolt/auth.rb
|
152
214
|
- ffi/bolt/auto_releasable.rb
|
@@ -235,7 +297,8 @@ files:
|
|
235
297
|
- lib/neo4j/driver/exceptions/untrusted_server_exception.rb
|
236
298
|
- lib/neo4j/driver/internal/duration_normalizer.rb
|
237
299
|
- lib/neo4j/driver/internal/ruby_signature.rb
|
238
|
-
- lib/neo4j/driver/
|
300
|
+
- lib/neo4j/driver/internal/statement_validator.rb
|
301
|
+
- lib/neo4j/driver/types/bytes.rb
|
239
302
|
- lib/neo4j/driver/types/local_date_time.rb
|
240
303
|
- lib/neo4j/driver/types/local_time.rb
|
241
304
|
- lib/neo4j/driver/types/offset_time.rb
|
@@ -243,16 +306,14 @@ files:
|
|
243
306
|
- lib/neo4j/driver/types/time.rb
|
244
307
|
- lib/neo4j/driver/version.rb
|
245
308
|
- lib/neo4j_ruby_driver.rb
|
246
|
-
- neo4j-ruby-driver.gemspec
|
247
309
|
homepage: https://github.com/neo4jrb/neo4j-ruby-driver
|
248
310
|
licenses:
|
249
311
|
- MIT
|
250
|
-
metadata:
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
rdoc_options: []
|
312
|
+
metadata: {}
|
313
|
+
post_install_message:
|
314
|
+
rdoc_options:
|
315
|
+
- "--main"
|
316
|
+
- README.md
|
256
317
|
require_paths:
|
257
318
|
- lib
|
258
319
|
- ffi
|
@@ -267,8 +328,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
328
|
- !ruby/object:Gem::Version
|
268
329
|
version: '0'
|
269
330
|
requirements: []
|
270
|
-
|
271
|
-
|
331
|
+
rubyforge_project:
|
332
|
+
rubygems_version: 2.7.9
|
333
|
+
signing_key:
|
272
334
|
specification_version: 4
|
273
|
-
summary:
|
335
|
+
summary: ''
|
274
336
|
test_files: []
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'neo4j/rake_tasks'
|
6
|
-
|
7
|
-
if RUBY_PLATFORM.match?(/java/) && ENV['SEABOLT_LIB']&.length&.positive?
|
8
|
-
require 'jars/installer'
|
9
|
-
task :install_jars do
|
10
|
-
Jars::Installer.vendor_jars!('jruby')
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
RSpec::Core::RakeTask.new(:spec)
|
15
|
-
|
16
|
-
task default: :spec
|
data/neo4j-ruby-driver.gemspec
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'neo4j/driver/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
ffi = ENV['SEABOLT_LIB']&.length&.positive?
|
9
|
-
|
10
|
-
spec.name = "neo4j-#{ffi ? :ruby : :java}-driver"
|
11
|
-
spec.version = Neo4j::Driver::VERSION
|
12
|
-
spec.authors = ['Heinrich Klobuczek']
|
13
|
-
spec.email = ['heinrich@mail.com']
|
14
|
-
|
15
|
-
spec.summary = 'neo4j ruby driver'
|
16
|
-
spec.homepage = 'https://github.com/neo4jrb/neo4j-ruby-driver'
|
17
|
-
spec.license = 'MIT'
|
18
|
-
|
19
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
20
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
21
|
-
if spec.respond_to?(:metadata)
|
22
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org/'
|
23
|
-
|
24
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
25
|
-
spec.metadata['source_code_uri'] = 'https://github.com/neo4jrb/neo4j-ruby-driver'
|
26
|
-
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
27
|
-
else
|
28
|
-
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
29
|
-
'public gem pushes.'
|
30
|
-
end
|
31
|
-
|
32
|
-
# Specify which files should be added to the gem when it is released.
|
33
|
-
spec.files << Dir[*%w[neo4j-ruby-driver.gemspec Rakefile README.md LICENSE.txt Gemfile lib/neo4j_ruby_driver.rb lib/loader.rb]]
|
34
|
-
|
35
|
-
pdir = ffi ? 'ffi' : 'jruby'
|
36
|
-
|
37
|
-
spec.files << Dir['lib/neo4j/**/*.rb']
|
38
|
-
spec.files << Dir["#{pdir}/**/*.rb"]
|
39
|
-
|
40
|
-
spec.bindir = 'exe'
|
41
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
42
|
-
spec.require_paths = ['lib', pdir]
|
43
|
-
|
44
|
-
spec.platform = 'java' if RUBY_PLATFORM.match?(/java/)
|
45
|
-
|
46
|
-
if ffi
|
47
|
-
spec.add_runtime_dependency 'ffi'
|
48
|
-
spec.add_runtime_dependency 'recursive-open-struct'
|
49
|
-
else
|
50
|
-
spec.add_runtime_dependency 'jar-dependencies'
|
51
|
-
spec.requirements << 'jar org.neo4j.driver, neo4j-java-driver, 1.7.5'
|
52
|
-
# avoids to install it on the fly when jar-dependencies needs it
|
53
|
-
spec.add_development_dependency 'ruby-maven'
|
54
|
-
end
|
55
|
-
|
56
|
-
spec.add_runtime_dependency 'activesupport'
|
57
|
-
spec.add_runtime_dependency 'zeitwerk'
|
58
|
-
spec.add_development_dependency 'bundler'
|
59
|
-
spec.add_development_dependency 'neo4j-rake_tasks', '>= 0.3.0'
|
60
|
-
spec.add_development_dependency 'parallel'
|
61
|
-
spec.add_development_dependency 'rake'
|
62
|
-
spec.add_development_dependency 'rspec-its'
|
63
|
-
end
|