neo4j-ruby-driver 0.1.4 → 0.1.5

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: f3e3e772ba2164fefe876f905912cf2a42472b1db5c762b8b7f6d0abc2677c83
4
- data.tar.gz: 9a57a05095babfe6ff9b8ff3438893599969f5fd15745e0167f309c73387862c
3
+ metadata.gz: b797aecd52c2d383e12d6307cbfd8f6f0dcf2e9b9bc737a6e8761215e697579b
4
+ data.tar.gz: 551e564449d89be2d2a85b47be42d071e5cab093dd43cb441e8960451db09bab
5
5
  SHA512:
6
- metadata.gz: f41c8ceddda78db2619babd2e730e2fcb6c36726f4764acfe3086647afd732649e8d88bc36850690c3e8dca1d140b581a5b8f66b1967ea368fa091274c915c71
7
- data.tar.gz: 154821e8c904705848ed9bb3475bce53fa4141ca1d9a5b7fc16333be3fd129a1f6fb5f68b39c447d71d1915e5e19735b9fc9367a678fc5c333313ee7c45f97d2
6
+ metadata.gz: 80a8181aa7ec78bef019169aab8567a6938a35e0df30fd119f3136448ec00530f22d18e692f3af58497d26054241817941f3f4471f752600a80f2c21efff7a14
7
+ data.tar.gz: 1050ebee64d47dc77f74414f8a2d7109312200ab81454a5d8f5274872dcf9762903b57ddfecb71c7e4f9b20701d3cc6238415a33f563a82ef15f979bb360aca3
@@ -4,7 +4,15 @@ module Neo4j
4
4
  module Driver
5
5
  class Config
6
6
  class TrustStrategy
7
- def self.trust_all_certificates; end
7
+ class << self
8
+ def trust_all_certificates; end
9
+ end
10
+ end
11
+
12
+ class << self
13
+ def default_config
14
+ new
15
+ end
8
16
  end
9
17
  end
10
18
  end
@@ -15,6 +15,7 @@ module Neo4j
15
15
  auto_closable :driver
16
16
 
17
17
  def driver(uri, auth_token = Neo4j::Driver::AuthTokens.none, config = {})
18
+ raise Exceptions::AuthenticationException, 'Unsupported authentication token' unless auth_token
18
19
  config ||= Config.default_config
19
20
  # routing_settings = config.routing_settings
20
21
  # retry_settings = config.retry_settings
@@ -20,7 +20,7 @@ module Neo4j
20
20
  end
21
21
 
22
22
  def consume
23
- # @ignore_records = true
23
+ @ignore_records = true
24
24
  @records.clear
25
25
  finalize
26
26
  @summary
@@ -54,23 +54,25 @@ module Neo4j
54
54
 
55
55
  after_success(nil)
56
56
 
57
- # @records.clear
58
57
  @failure = nil
59
58
  end
60
59
 
61
- alias failure consume # it probably should be summary instead of consume to preserve the potentially yet
62
- # unused result set
60
+ alias failure summary
63
61
 
64
62
  def on_failure(error)
65
- @finished = true
66
63
  summary
64
+ @finished = true
67
65
 
68
66
  after_failure(error)
69
67
 
70
- @records.clear
71
68
  @failure = error
72
69
  end
73
70
 
71
+ def finalize
72
+ summary unless @ignore_records
73
+ super
74
+ end
75
+
74
76
  private
75
77
 
76
78
  def run_handler
@@ -65,6 +65,10 @@ module Neo4j
65
65
  bookmarks&.max
66
66
  end
67
67
 
68
+ def open?
69
+ @open.true?
70
+ end
71
+
68
72
  private
69
73
 
70
74
  def transaction(mode, config = nil)
@@ -102,7 +106,7 @@ module Neo4j
102
106
  end
103
107
 
104
108
  def ensure_session_is_open
105
- return if @open.true?
109
+ return if open?
106
110
  raise Exceptions::ClientException,
107
111
  'No more interaction with this session are allowed as the current session is already closed.'
108
112
  end
@@ -54,7 +54,7 @@ module Neo4j
54
54
  Bolt::Value.format_as_dictionary(value, object.size)
55
55
  object.each_with_index do |(key, elem), index|
56
56
  key = key.to_s
57
- Bolt::Dictionary.set_key(value, index, key, key.size)
57
+ Bolt::Dictionary.set_key(value, index, key, key.bytesize)
58
58
  to_neo(Bolt::Dictionary.value(value, index), elem)
59
59
  end
60
60
  when Types::Path
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
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: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-24 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -81,21 +81,21 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: neo4j-rake_tasks
84
+ name: hoe
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.3.0
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.3.0
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: parallel
98
+ name: hoe-bundler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,35 +109,35 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rake
112
+ name: hoe-gemspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "<"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '13'
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "<"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '13'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec-its
126
+ name: neo4j-rake_tasks
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 0.3.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 0.3.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: hoe
140
+ name: parallel
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -151,7 +151,21 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: hoe-bundler
154
+ name: rake
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "<"
158
+ - !ruby/object:Gem::Version
159
+ version: '13'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "<"
165
+ - !ruby/object:Gem::Version
166
+ version: '13'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rspec-its
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - ">="
@@ -165,7 +179,7 @@ dependencies:
165
179
  - !ruby/object:Gem::Version
166
180
  version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
- name: hoe-gemspec
182
+ name: rspec-mocks
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - ">="