neo4j-core 7.0.3 → 7.0.4

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
  SHA1:
3
- metadata.gz: 5654ea223457efdf807edf070c8a648ba64812d9
4
- data.tar.gz: 88aefd027d19f9a8ca6aaa5e327e8aa1911fdde7
3
+ metadata.gz: ce16b1d922c7d961d01877373300831a960938ef
4
+ data.tar.gz: 9189e6af8a309ea814a3ace27f64110162e3120d
5
5
  SHA512:
6
- metadata.gz: ba63fa18f50cae3668a0701666bcf85f5dfb122c3c19875fb0861ff07d35026a66c3f3d2a60363470131eb40ea930e7ae5c91511190d1523d496c7d771f03e3d
7
- data.tar.gz: a4d02a69ab27fe9c20d35dda962ef0c84df6f8a892d6e7f752001108a57c0ecda2c82e470918531a68cdc10b5a57fb18ede8b33b7faa12ca51c2c7dce10e5cd3
6
+ metadata.gz: e0ff88e22aa50cbdb312ebe7e8daed01c0cd97a685156d4d6bdacb3e0f506aae6bba5de15ab477b20b85c996e06cdad03ac02362df4f44be4dd12ea5866a65b3
7
+ data.tar.gz: 1e713b042d10673c1ec1b47864aa2ec7c6f1f6763eba8e1bd2438a05341bfcb2ef865f750a18c8b14d2ba074bfed69be1cf5884011744d1c61e0e15bc485aa07
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Neo4j-core [![Code Climate](https://codeclimate.com/github/neo4jrb/neo4j-core.png)](https://codeclimate.com/github/neo4jrb/neo4j-core) [![Build Status](https://travis-ci.org/neo4jrb/neo4j-core.png)](https://travis-ci.org/neo4jrb/neo4j-core) [![Coverage Status](https://coveralls.io/repos/neo4jrb/neo4j-core/badge.png?branch=master)](https://coveralls.io/r/neo4jrb/neo4j-core?branch=master) [![PullReview stats](https://www.pullreview.com/github/neo4jrb/neo4j-core/badges/master.svg?)](https://www.pullreview.com/github/neo4jrb/neo4j-core/reviews/master)
1
+ # Neo4j-core [![Code Climate](https://codeclimate.com/github/neo4jrb/neo4j-core.svg)](https://codeclimate.com/github/neo4jrb/neo4j-core) [![Build Status](https://travis-ci.org/neo4jrb/neo4j-core.svg)](https://travis-ci.org/neo4jrb/neo4j-core) [![Coverage Status](https://coveralls.io/repos/neo4jrb/neo4j-core/badge.svg?branch=master)](https://coveralls.io/r/neo4jrb/neo4j-core?branch=master) [![PullReview stats](https://www.pullreview.com/github/neo4jrb/neo4j-core/badges/master.svg?)](https://www.pullreview.com/github/neo4jrb/neo4j-core/reviews/master)
2
2
 
3
3
  A simple Ruby wrapper around the Neo4j graph database that works with the server and embedded Neo4j API. This gem can be used both from JRuby and normal MRI.
4
4
  It can be used standalone without the neo4j gem.
@@ -33,7 +33,7 @@ Or via the `Neo4j::Core::Query` class
33
33
 
34
34
  neo4j_session.query(query_obj)
35
35
 
36
- Making multiple queries with one request is support with the HTTP Adaptor:
36
+ Making multiple queries with one request is supported with the HTTP Adaptor:
37
37
 
38
38
  results = neo4j_session.queries do
39
39
  append 'MATCH (n:Foo) RETURN n LIMIT 10'
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '7.0.3'
3
+ VERSION = '7.0.4'
4
4
  end
5
5
  end
@@ -201,7 +201,7 @@ module Neo4j
201
201
  Message.new(structure.signature, *structure.list).tap do |message|
202
202
  log_message :S, message.type, message.args.join(' ')
203
203
  end
204
- end.tap { flush_response }
204
+ end
205
205
  end
206
206
  end
207
207
 
@@ -216,15 +216,16 @@ module Neo4j
216
216
 
217
217
  # Replace with Enumerator?
218
218
  def flush_response
219
- if !(header = recvmsg(2)).empty? && (chunk_size = header.unpack('s>*')[0]) > 0
220
- log_message :S, :chunk_size, chunk_size
221
-
222
- chunk = recvmsg(chunk_size)
219
+ chunk = ''
223
220
 
224
- unpacker = PackStream::Unpacker.new(StringIO.new(chunk))
221
+ while !(header = recvmsg(2)).empty? && (chunk_size = header.unpack('s>*')[0]) > 0
222
+ log_message :S, :chunk_size, chunk_size
225
223
 
226
- [].tap { |r| while arg = unpacker.unpack_value!; r << arg; end }
224
+ chunk << recvmsg(chunk_size)
227
225
  end
226
+
227
+ unpacker = PackStream::Unpacker.new(StringIO.new(chunk))
228
+ [].tap { |r| while arg = unpacker.unpack_value!; r << arg; end }
228
229
  end
229
230
 
230
231
  # Represents messages sent to or received from the server
@@ -19,6 +19,19 @@ module Neo4j
19
19
  adaptor.queries(@session, {transaction: self}.merge(options), &block)
20
20
  end
21
21
 
22
+ def after_commit_registry
23
+ @after_commit_registry ||= []
24
+ end
25
+
26
+ def after_commit(&block)
27
+ after_commit_registry << block
28
+ end
29
+
30
+ def post_close!
31
+ super
32
+ after_commit_registry.each(&:call) unless failed?
33
+ end
34
+
22
35
  private
23
36
 
24
37
  # Because we're inheriting from the old Transaction class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.3
4
+ version: 7.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Chris Grigg, Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday